From owner-svn-src-all@FreeBSD.ORG Tue Feb 28 17:29:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9343106566B; Tue, 28 Feb 2012 17:29:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8CA68FC17; Tue, 28 Feb 2012 17:29:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q1SHTVhi080514; Tue, 28 Feb 2012 17:29:31 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1SHTVsj080512; Tue, 28 Feb 2012 17:29:31 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201202281729.q1SHTVsj080512@svn.freebsd.org> From: Ed Maste Date: Tue, 28 Feb 2012 17:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232260 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2012 17:29:31 -0000 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 */