From owner-freebsd-stable@FreeBSD.ORG Mon Jul 18 21:22:36 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44AA5106564A; Mon, 18 Jul 2011 21:22:36 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id D37528FC14; Mon, 18 Jul 2011 21:22:35 +0000 (UTC) Received: from [127.0.0.1] (pooker.samsco.org [168.103.85.57]) (authenticated bits=0) by pooker.samsco.org (8.14.5/8.14.5) with ESMTP id p6ILMR14078714; Mon, 18 Jul 2011 15:22:27 -0600 (MDT) (envelope-from scottl@samsco.org) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Scott Long In-Reply-To: <201107181714.07827.jhb@freebsd.org> Date: Mon, 18 Jul 2011 15:22:26 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <4F739848-E3CE-4E2C-A91E-90F33410E7AC@samsco.org> References: <4E20BA23.13717.66C6F57@markmcconnell.iinet.com> <201107181402.12755.jhb@freebsd.org> <797CACDE-729E-4F3A-AEFF-531C00C2B83A@samsco.org> <201107181714.07827.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Spam-Status: No, score=-50.0 required=3.8 tests=ALL_TRUSTED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on pooker.samsco.org Cc: markmc@dataabstractsolutions.com, "freebsd-stable@freebsd.org Stable" Subject: Re: disable 64-bit dma for one PCI slot only? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 21:22:36 -0000 On Jul 18, 2011, at 3:14 PM, John Baldwin wrote: > On Monday, July 18, 2011 5:06:40 pm Scott Long wrote: >> On Jul 18, 2011, at 12:02 PM, John Baldwin wrote: >>> On Friday, July 15, 2011 6:07:31 pm Mark McConnell wrote: >>>> Dear folks, >>>>=20 >>>> I have two LSI raid cards, one of which (SCSI 320-I) supports=20 >>>> 64-bit DMA when 4GB+ of DDR is present and another which=20 >>>> does not (SATA 150-D) . Consquently I've disabled 64-bit=20 >>>> addressing for amr devices. >>>>=20 >>>> I would like to disable 64-bit addressing for the SATA card, but=20 >>>> permit it for the SCSI card. Is this possible? >>>=20 >>> You'd have to hack the driver perhaps to only disable 64-bit DMA for = certain=20 >>> PCI IDs. It probably already does this? >>>=20 >>=20 >> The driver already had a table for determining 64bit DMA based on the = PCI ID. >> I guess there's a mistake in the table for this particular card. I = think that >> changing the following line to remove the AMR_ID_DO_SG64 flag will = fix the >> problem: >>=20 >> {0x1000, 0x1960, AMR_ID_QUARTZ | AMR_ID_DO_SG64 | = AMR_ID_PROBE_SIG}, >>=20 >> Actually, what's probably going on is that the driver is only looking = at the >> vendor and device id's, and is ignoring the subvendor and subdevice = id's that >> would give it a better clue on the exact hardware in use. Fixing the = driver >> to look at all 64bits of id info (and take into account wildcards = where >> needed) would be a good project, if anyone is interested. >>=20 >> Btw, I *HATE* the "chip" and "card" identifiers used in pciconf. Can = we >> change it to emit the standard (sub)vendor/(sub)device terminology? >=20 > Oh, yeah. I hate that too. Would you want them as 4 separate = entities or to > just rename the labels to 'devid' and 'subdevid'? >=20 If we're going to change it, might as well break it down into 4 fields. = Maybe we retain the old format under a legacy switch and/or env variable = for users that have tools that parse the output (cough yahoo cough). Scott