svn commit: r219932 - stable/8/sys/dev/ata

Marius Strobl marius at FreeBSD.org
Wed Mar 23 20:56:56 UTC 2011


Author: marius
Date: Wed Mar 23 20:56:56 2011
New Revision: 219932
URL: http://svn.freebsd.org/changeset/base/219932

Log:
  MFC: r219336
  
  - Allocate the DMA memory used for the work area as coherent as at least
    the ataahci(4) and atamarvell(4) drivers share it between the host and
    the controller.
  - Spell some zeros as BUS_DMA_WAITOK when used as bus_dmamem_alloc() flags.

Modified:
  stable/8/sys/dev/ata/ata-dma.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/ata/ata-dma.c
==============================================================================
--- stable/8/sys/dev/ata/ata-dma.c	Wed Mar 23 20:55:29 2011	(r219931)
+++ stable/8/sys/dev/ata/ata-dma.c	Wed Mar 23 20:56:56 2011	(r219932)
@@ -104,7 +104,8 @@ ata_dmainit(device_t dev)
 			   0, NULL, NULL, &ch->dma.work_tag))
 	goto error;
 
-    if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, 0,
+    if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work,
+			 BUS_DMA_WAITOK | BUS_DMA_COHERENT,
 			 &ch->dma.work_map))
 	goto error;
 
@@ -173,8 +174,8 @@ ata_dmaalloc(device_t dev)
             goto error;
 	}
 
-	if (bus_dmamem_alloc(slot->sg_tag, (void **)&slot->sg,
-			     0, &slot->sg_map)) {
+	if (bus_dmamem_alloc(slot->sg_tag, (void **)&slot->sg, BUS_DMA_WAITOK,
+			     &slot->sg_map)) {
 	    device_printf(ch->dev, "FAILURE - alloc sg_map\n");
 	    goto error;
         }


More information about the svn-src-all mailing list