From owner-svn-src-all@FreeBSD.ORG Mon Nov 9 18:09:11 2009 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 013DF1065676; Mon, 9 Nov 2009 18:09:10 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBC3D8FC22; Mon, 9 Nov 2009 18:09:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA9I9AHm029404; Mon, 9 Nov 2009 18:09:10 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA9I9AAs029402; Mon, 9 Nov 2009 18:09:10 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200911091809.nA9I9AAs029402@svn.freebsd.org> From: Ken Smith Date: Mon, 9 Nov 2009 18:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199095 - stable/8/sys/dev/sym 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: Mon, 09 Nov 2009 18:09:11 -0000 Author: kensmith Date: Mon Nov 9 18:09:10 2009 New Revision: 199095 URL: http://svn.freebsd.org/changeset/base/199095 Log: MFC r198719: > While certain supported Symbios/LSI SCSI chips (532c896, 53c1000, 53c1010) > do support 64bit addresses, the current SCRIPTS code supports only 32bit > addresses causing data corruption for buffer addresses >4GB. This problem > affects 64bit machines with more than 4GB RAM or amd64 with 4GB and > memory hole remapping. > Work-around this problem with a bus_dma tag that requests bounce-buffers > for addresses >4GB. This causes some overhead, but given the maximum SCSI > bus speed of 160MB/s compared, the effect should hardly be noticeable. > The problem was reported by Mike Watters (mike at mwatters net) who also > verified that this fix cures the problem. > > Since this change is a NOOP on systems with less than 4GB RAM and fixes > data corruption (in RAM and on disk) on systems with more than 4GB, I hope > that this change is accepted for 8.0. Requested by: Stefan Esser (se at freebsd dot org)[1] Reviewed by: jhb, scottl [1] Stefan requested this be part of 8.0 but has been unavailable to do the MFC since submitting the request. We want to get 8.0-RC3 started so I'm doing the merges with re@ hat on. Modified: stable/8/sys/dev/sym/sym_hipd.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sym/sym_hipd.c ============================================================================== --- stable/8/sys/dev/sym/sym_hipd.c Mon Nov 9 18:06:37 2009 (r199094) +++ stable/8/sys/dev/sym/sym_hipd.c Mon Nov 9 18:09:10 2009 (r199095) @@ -8582,7 +8582,7 @@ sym_pci_attach(device_t dev) * Allocate a tag for the DMA of user data. */ if (bus_dma_tag_create(np->bus_dmat, 1, (1<<24), - BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE, SYM_CONF_MAX_SG, (1<<24), 0, busdma_lock_mutex, &np->mtx,