From owner-freebsd-stable@FreeBSD.ORG Wed Jul 20 16:26:23 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 3B215106564A; Wed, 20 Jul 2011 16:26:23 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id B2F438FC12; Wed, 20 Jul 2011 16:26:22 +0000 (UTC) Received: by iyb11 with SMTP id 11so463471iyb.13 for ; Wed, 20 Jul 2011 09:26:22 -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=DKnPEOVR4QDVX8K7ZOCcT8pLg9zU57reyB4ebp2VgOE=; b=CN95F0VWIOlKin8IzIQbghIu3bC02701W865Mu4ymOGhi8n4rYD8cvW9iGu+ARxPM8 yxSO0qohMIW+K/RQ6ggGmAMOfzOR8GSy8XmdfFN+5AtWS3j0vqsmphTwjAbC15rcCkBH 3ktaTTqZMdB2CVHc6YHCM3TktnBAphlm5S2RE= Received: by 10.231.83.196 with SMTP id g4mr8236989ibl.54.1311179182140; Wed, 20 Jul 2011 09:26:22 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id v16sm250281ibf.42.2011.07.20.09.26.19 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jul 2011 09:26:21 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 20 Jul 2011 09:25:18 -0700 From: YongHyeon PYUN Date: Wed, 20 Jul 2011 09:25:18 -0700 To: Stefan Esser Message-ID: <20110720162518.GA11521@michelle.cdnetworks.com> References: <4E20BA23.13717.66C6F57@markmcconnell.iinet.com> <201107181714.07827.jhb@freebsd.org> <4F739848-E3CE-4E2C-A91E-90F33410E7AC@samsco.org> <201107190931.36492.jhb@freebsd.org> <4E26A5BE.4000909@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E26A5BE.4000909@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable@freebsd.org 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: Wed, 20 Jul 2011 16:26:23 -0000 On Wed, Jul 20, 2011 at 11:54:06AM +0200, Stefan Esser wrote: > Am 19.07.2011 20:17, schrieb Artem Belevich: > > On Tue, Jul 19, 2011 at 6:31 AM, John Baldwin wrote: > >> The only reason it might be nice to stick with two fields is due to the line > >> length (though the first line is over 80 cols even in the current format). Here > >> are two possible suggestions: > >> > >> old: > >> > >> hostb0@pci0:0:0:0: class=0x060000 card=0x20108086 chip=0x01008086 rev=0x09 hdr=0x00 > >> pcib1@pci0:0:1:0: class=0x060400 card=0x20108086 chip=0x01018086 rev=0x09 hdr=0x01 > >> pcib2@pci0:0:1:1: class=0x060400 card=0x20108086 chip=0x01058086 rev=0x09 hdr=0x01 > >> none0@pci0:0:22:0: class=0x078000 card=0x47428086 chip=0x1c3a8086 rev=0x04 hdr=0x00 > >> em0@pci0:0:25:0: class=0x020000 card=0x00008086 chip=0x15038086 rev=0x04 hdr=0x00 > >> ... > >> > >> A) > >> > >> hostb0@pci0:0:0:0: class=0x060000 vendor=0x8086 device=0x0100 subvendor=0x8086 subdevice=0x2010 rev=0x09 hdr=0x00 > >> pcib1@pci0:0:1:0: class=0x060400 vendor=0x8086 device=0x0101 subvendor=0x8086 subdevice=0x2010 rev=0x09 hdr=0x01 > >> pcib2@pci0:0:1:1: class=0x060400 vendor=0x8086 device=0x0105 subvendor=0x8086 subdevice=0x2010 rev=0x09 hdr=0x01 > >> none0@pci0:0:22:0: class=0x078000 vendor=0x8086 device=0x1c3a subvendor=0x8086 subdevice=0x4742 rev=0x04 hdr=0x00 > >> em0@pci0:0:25:0: class=0x020000 vendor=0x8086 device=0x1503 subvendor=0x8086 subdevice=0x0000 rev=0x04 hdr=0x00 > >> ... > >> > >> B) > >> > >> hostb0@pci0:0:0:0: class=0x060000 devid=0x8086:0100 subid=0x8086:2010 rev=0x09 hdr=0x00 > >> pcib1@pci0:0:1:0: class=0x060400 devid=0x8086:0101 subid=0x8086:2010 rev=0x09 hdr=0x01 > >> pcib2@pci0:0:1:1: class=0x060400 devid=0x8086:0105 subid=0x8086:2010 rev=0x09 hdr=0x01 > >> none0@pci0:0:22:0: class=0x078000 devid=0x8086:1c3a subid=0x8086:4742 rev=0x04 hdr=0x00 > >> em0@pci0:0:25:0: class=0x020000 devid=0x8086:1503 subid=0x8086:0000 rev=0x04 hdr=0x00 > >> ... > >> > >> I went with vendor word first for both A) and B) as in my experience that is > >> the more common ordering in driver tables, etc. > > > > Do we need to print (class|devid|device|subvendor|etc.)= on every > > line? IMHO they belong to a header line. Something like this: > > > > Driver Handle Class Vnd:Dev Sub Vnd:Dev Rev Hdr > > ------------------------------------------------------------------ > > hostb0 pci0:0:0:0 0x060000 0x8086:0100 0x8086:2010 0x09 0x00 > > pcib1 pci0:0:1:0 0x060400 0x8086:0101 0x8086:2010 0x09 0x01 > > pcib2 pci0:0:1:1 0x060400 0x8086:0105 0x8086:2010 0x09 0x01 > > none0 pci0:0:22:0 0x078000 0x8086:1c3a 0x8086:4742 0x04 0x00 > > em0 pci0:0:25:0 0x020000 0x8086:1503 0x8086:0000 0x04 0x00 > > This is a very good idea, IMHO. > > When I committed pciconf back in 1996 (it had been contributed by > gwollman) for PCI 1.0 (at a time when their was no standard for PCI to > PCI brigdes, yet ;-) ), the current format seemed sensible, but the > tabular form suggested by Artem is much better to parse. > > I'd want to suggest another slightly different format: > > Driver Handle Class Vnd Dev SubVnd SubDev Rev Hdr > hostb0 0:0:0:0 0x060000 0x8086 0x0100 0x8086 0x2010 0x09 0x00 > pcib1 0:0:1:0 0x060400 0x8086 0x0101 0x8086 0x2010 0x09 0x01 > pcib2 0:0:1:1 0x060400 0x8086 0x0105 0x8086 0x2010 0x09 0x01 > none0 0:0:22:0 0x078000 0x8086 0x1c3a 0x8086 0x4742 0x04 0x00 > em0 0:0:25:0 0x020000 0x8086 0x1503 0x8086 0x0000 0x04 0x00 > dummy0 65535:255:31:7 0x020000 0x8086 0x1503 0x8086 0x0000 0x04 0x00 > > I.e., print only one header line (no "---"), make the "Handle" column > wide enough to hold the longest possible value, use only white space to > separate columns and print 0x as a prefix for all hex numbers. > > Instead of "pci0:0:0:0" for the PCI handle, just "0:0:0:0" could be > printed, IMHO. (But this is bikeshed material, I guess ...) > > The "Rev" column is required for of devices that are not uniquely > identified by their Vnd/Dev-IDs. (These used to exist, e.g. the Symbios > SCSI controllers, though I'm not aware of any device that needed a > different driver depending on the PCI revision number.) > re(4) and rl(4) are one of example that needs the "Rev". > I'd be happy to modify pciconf to print the new format in -CURRENT > (having been the maintainer of the PCI code for quite some time), if > consensus is reached on a format and if this change is accepted by RE. > > Regards, STefan