svn commit: r198720 - in stable/7/sys: . contrib/pf dev/ata

Alexander Motin mav at FreeBSD.org
Sat Oct 31 17:28:09 UTC 2009


Author: mav
Date: Sat Oct 31 17:28:08 2009
New Revision: 198720
URL: http://svn.freebsd.org/changeset/base/198720

Log:
  MFC rev. 196893:
  Remove constraint, requiring request data to fulfill controller's alignment
  requirements. It is busdma task, to manage proper alignment by loading
  data to bounce buffers.
  
  PR:		kern/120787, kern/127316

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ata/ata-dma.c

Modified: stable/7/sys/dev/ata/ata-dma.c
==============================================================================
--- stable/7/sys/dev/ata/ata-dma.c	Sat Oct 31 17:06:36 2009	(r198719)
+++ stable/7/sys/dev/ata/ata-dma.c	Sat Oct 31 17:28:08 2009	(r198720)
@@ -233,9 +233,9 @@ ata_dmaload(device_t dev, caddr_t data, 
 	device_printf(dev, "FAILURE - zero length DMA transfer attempted\n");
 	return EIO;
     }
-    if (((uintptr_t)data & (ch->dma->alignment - 1)) ||
-	(count & (ch->dma->alignment - 1))) {
-	device_printf(dev, "FAILURE - non aligned DMA transfer attempted\n");
+    if (count & (ch->dma->alignment - 1)) {
+	device_printf(dev, "FAILURE - odd-sized DMA transfer attempt %d %% %d\n",
+	    count, ch->dma->alignment);
 	return EIO;
     }
     if (count > ch->dma->max_iosize) {


More information about the svn-src-all mailing list