Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2011 20:56:56 +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: r219932 - stable/8/sys/dev/ata
Message-ID:  <201103232056.p2NKuu1i006895@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
         }



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