Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2012 17:29:31 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r232260 - head/sys/dev/aac
Message-ID:  <201202281729.q1SHTVsj080512@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Feb 28 17:29:31 2012
New Revision: 232260
URL: http://svn.freebsd.org/changeset/base/232260

Log:
  Avoid transfers crossing a 4GB boundary, which can lead to data
  corruption.  Thanks to scottl@ for the suggestion.
  
  This change will likely be revised after consideration of a general
  method to address this type of issue for other drivers.
  
  Sponsored by:   Sandvine Incorporated
  MFC after:      3 days

Modified:
  head/sys/dev/aac/aac_pci.c

Modified: head/sys/dev/aac/aac_pci.c
==============================================================================
--- head/sys/dev/aac/aac_pci.c	Tue Feb 28 15:52:01 2012	(r232259)
+++ head/sys/dev/aac/aac_pci.c	Tue Feb 28 17:29:31 2012	(r232260)
@@ -403,7 +403,8 @@ aac_pci_attach(device_t dev)
 	 * Note that some of these controllers are 64-bit capable.
 	 */
 	if (bus_dma_tag_create(NULL, 			/* parent */
-			       PAGE_SIZE, 0,		/* algnmnt, boundary */
+			       PAGE_SIZE,		/* alignment */
+			       ((bus_size_t)((uint64_t)1 << 32)), /* boundary*/
 			       BUS_SPACE_MAXADDR,	/* lowaddr */
 			       BUS_SPACE_MAXADDR, 	/* highaddr */
 			       NULL, NULL, 		/* filter, filterarg */



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