From owner-freebsd-stable@FreeBSD.ORG Wed Jul 20 10:06:46 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 470D2106566B for ; Wed, 20 Jul 2011 10:06:46 +0000 (UTC) (envelope-from se@freebsd.org) Received: from nm7.bullet.mail.ne1.yahoo.com (nm7.bullet.mail.ne1.yahoo.com [98.138.90.70]) by mx1.freebsd.org (Postfix) with SMTP id E2A138FC08 for ; Wed, 20 Jul 2011 10:06:45 +0000 (UTC) Received: from [98.138.90.49] by nm7.bullet.mail.ne1.yahoo.com with NNFMP; 20 Jul 2011 09:54:08 -0000 Received: from [98.138.226.59] by tm2.bullet.mail.ne1.yahoo.com with NNFMP; 20 Jul 2011 09:54:08 -0000 Received: from [127.0.0.1] by smtp210.mail.ne1.yahoo.com with NNFMP; 20 Jul 2011 09:54:08 -0000 X-Yahoo-Newman-Id: 56332.57601.bm@smtp210.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: fQWmwNUVM1kmvi.jyFckTxIX6hDTCrrrrjNsFJgg0_I8IbV KBAYqbWtQXeoxDxtotKg6FiOclr3NHU9boOqHMqS1p5r8qSIzhAYFz8ITdef rOAtDpZRkUuApgc2BJkAaY72xeAj6FgCnKf_WsGQIPAH6XQs3aewU1Wg6WoH XQIV_XFJ00SJLvEdW_g5c2BTTyyT2TlRHqsYq0hX425FSMOTPaPgeMOd3Rss LJHiBUQWTFm5240G7vU85Y1gq1c30gJ6evZt8AZTD5.R7izG6teXWDaa4Cjo BawwL8g87cQ6_tA6ecCV2qbBVMgUzAXwduW8H1TvCpdp6Ao_BofANQoMN8Fg z.AlCQ7QHrsS4h5aES8wibLjltg-- X-Yahoo-SMTP: iDf2N9.swBDAhYEh7VHfpgq0lnq. Received: from [192.168.119.20] (se@81.173.151.77 with plain) by smtp210.mail.ne1.yahoo.com with SMTP; 20 Jul 2011 02:54:07 -0700 PDT Message-ID: <4E26A5BE.4000909@freebsd.org> Date: Wed, 20 Jul 2011 11:54:06 +0200 From: Stefan Esser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <4E20BA23.13717.66C6F57@markmcconnell.iinet.com> <201107181714.07827.jhb@freebsd.org> <4F739848-E3CE-4E2C-A91E-90F33410E7AC@samsco.org> <201107190931.36492.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Wed, 20 Jul 2011 10:06:46 -0000 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.) 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