From owner-freebsd-stable@FreeBSD.ORG Mon Jul 18 21:49:41 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 2E9EE106564A for ; Mon, 18 Jul 2011 21:49:41 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id E8B5F8FC12 for ; Mon, 18 Jul 2011 21:49:39 +0000 (UTC) Received: by iwr19 with SMTP id 19so4257132iwr.13 for ; Mon, 18 Jul 2011 14:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=pew9BxGSurcWwLg9JAcfAb1IAPSmlKA1kJbYjETo8EU=; b=XbMfhQ96sxgXIygMDbPfmjZk+TyEvyveAmB8vBK98fAgwSEfoNI7O6tNl0koAjXm1I vZxSdBDyB0+3xPoEePRfRy2Zhg6ieujUAVBoFuZm69HGXXRgb56tEYB9vwOJFb/uDu8Y aZZB+QU1rhpRgP7AI9rWj5K55AN6w+9PZHbLQ= Received: by 10.42.145.73 with SMTP id e9mr5036040icv.486.1311024384398; Mon, 18 Jul 2011 14:26:24 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id er13sm959425ibb.2.2011.07.18.14.26.22 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 18 Jul 2011 14:26:23 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 18 Jul 2011 14:25:20 -0700 From: YongHyeon PYUN Date: Mon, 18 Jul 2011 14:25:20 -0700 To: Scott Long Message-ID: <20110718212520.GB5063@michelle.cdnetworks.com> References: <4E20BA23.13717.66C6F57@markmcconnell.iinet.com> <201107181402.12755.jhb@freebsd.org> <797CACDE-729E-4F3A-AEFF-531C00C2B83A@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <797CACDE-729E-4F3A-AEFF-531C00C2B83A@samsco.org> User-Agent: Mutt/1.4.2.3i Cc: markmc@dataabstractsolutions.com, "freebsd-stable@freebsd.org Stable" , John Baldwin 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 Reply-To: pyunyh@gmail.com 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:49:41 -0000 On Mon, Jul 18, 2011 at 03:06:40PM -0600, 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, > >> > >> I have two LSI raid cards, one of which (SCSI 320-I) supports > >> 64-bit DMA when 4GB+ of DDR is present and another which > >> does not (SATA 150-D) . Consquently I've disabled 64-bit > >> addressing for amr devices. > >> > >> I would like to disable 64-bit addressing for the SATA card, but > >> permit it for the SCSI card. Is this possible? > > > > You'd have to hack the driver perhaps to only disable 64-bit DMA for certain > > PCI IDs. It probably already does this? > > > > 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: > > {0x1000, 0x1960, AMR_ID_QUARTZ | AMR_ID_DO_SG64 | AMR_ID_PROBE_SIG}, > > 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. > > Btw, I *HATE* the "chip" and "card" identifiers used in pciconf. Can we change it to emit the standard (sub)vendor/(sub)device terminology? > +1 > Scott