Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2011 12:46:08 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r219990 - stable/8/sys/dev/firewire
Message-ID:  <201103251246.p2PCk89T081428@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Fri Mar 25 12:46:08 2011
New Revision: 219990
URL: http://svn.freebsd.org/changeset/base/219990

Log:
  MFC: r219543
  
  Allocate the DMA memory shared between the host and the controller as
  coherent.

Modified:
  stable/8/sys/dev/firewire/fwohci.c
  stable/8/sys/dev/firewire/sbp.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/firewire/fwohci.c
==============================================================================
--- stable/8/sys/dev/firewire/fwohci.c	Fri Mar 25 11:52:31 2011	(r219989)
+++ stable/8/sys/dev/firewire/fwohci.c	Fri Mar 25 12:46:08 2011	(r219990)
@@ -686,7 +686,7 @@ fwohci_init(struct fwohci_softc *sc, dev
 	sc->fc.dev = dev;
 
 	sc->fc.config_rom = fwdma_malloc(&sc->fc, CROMSIZE, CROMSIZE,
-						&sc->crom_dma, BUS_DMA_WAITOK);
+	    &sc->crom_dma, BUS_DMA_WAITOK | BUS_DMA_COHERENT);
 	if(sc->fc.config_rom == NULL){
 		device_printf(dev, "config_rom alloc failed.");
 		return ENOMEM;
@@ -708,7 +708,7 @@ fwohci_init(struct fwohci_softc *sc, dev
 /* SID recieve buffer must align 2^11 */
 #define	OHCI_SIDSIZE	(1 << 11)
 	sc->sid_buf = fwdma_malloc(&sc->fc, OHCI_SIDSIZE, OHCI_SIDSIZE,
-						&sc->sid_dma, BUS_DMA_WAITOK);
+	    &sc->sid_dma, BUS_DMA_WAITOK | BUS_DMA_COHERENT);
 	if (sc->sid_buf == NULL) {
 		device_printf(dev, "sid_buf alloc failed.");
 		return ENOMEM;

Modified: stable/8/sys/dev/firewire/sbp.c
==============================================================================
--- stable/8/sys/dev/firewire/sbp.c	Fri Mar 25 11:52:31 2011	(r219989)
+++ stable/8/sys/dev/firewire/sbp.c	Fri Mar 25 12:46:08 2011	(r219990)
@@ -562,7 +562,8 @@ END_DEBUG
 
 		fwdma_malloc(sbp->fd.fc, 
 			/* alignment */ sizeof(uint32_t),
-			SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT);
+			SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT |
+			BUS_DMA_COHERENT);
 		if (sdev->dma.v_addr == NULL) {
 			printf("%s: dma space allocation failed\n",
 							__func__);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103251246.p2PCk89T081428>