From 5605a1003e44844e1082428389241881b75a730f Mon Sep 17 00:00:00 2001 From: emaste Date: Tue, 28 Feb 2012 17:29:31 +0000 Subject: [PATCH] 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 --- sys/dev/aac/aac_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c index 485d5ffabcdd..1427f005378f 100644 --- a/sys/dev/aac/aac_pci.c +++ b/sys/dev/aac/aac_pci.c @@ -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 */