From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LTgp8-0001UN-5v for qemu-devel@nongnu.org; Sun, 01 Feb 2009 13:13:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LTgp7-0001Tt-Cp for qemu-devel@nongnu.org; Sun, 01 Feb 2009 13:13:37 -0500 Received: from [199.232.76.173] (port=44677 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTgp7-0001To-3v for qemu-devel@nongnu.org; Sun, 01 Feb 2009 13:13:37 -0500 Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]:46772) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LTgp6-0002Qq-IN for qemu-devel@nongnu.org; Sun, 01 Feb 2009 13:13:36 -0500 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090201181335.DRY7670.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Sun, 1 Feb 2009 18:13:35 +0000 Received: from miranda.arrow ([213.107.21.171]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090201181335.NPYR19264.aamtaout01-winn.ispmail.ntl.com@miranda.arrow> for ; Sun, 1 Feb 2009 18:13:35 +0000 Received: from sdb by miranda.arrow with local (Exim 4.63) (envelope-from ) id 1LTgp3-0003kL-9s for qemu-devel@nongnu.org; Sun, 01 Feb 2009 18:13:33 +0000 Date: Sun, 1 Feb 2009 18:13:33 +0000 From: Stuart Brady Subject: Re: [Qemu-devel] [PATCH] Add and use #defines for PCI device classes Message-ID: <20090201181333.GA14375@miranda.arrow> References: <20090201175609.GA14322@miranda.arrow> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090201175609.GA14322@miranda.arrow> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sun, Feb 01, 2009 at 05:56:09PM +0000, Stuart Brady wrote: > This patch adds and uses #defines for PCI device classes and subclases, > using a new pci_config_set_class() function, similar to the recently > added pci_config_set_vendor_id() and pci_config_set_device_id(). Sorry, forgot the: Signed-off-by: Stuart Brady BTW, I noticed a few oddities: > Index: hw/openpic.c > =================================================================== [...] > - pci_conf[0x0a] = 0x80; // PIC > - pci_conf[0x0b] = 0x08; > + pci_config_set_class(pci_conf, PCI_CLASS_SYSTEM_OTHER); // FIXME? Should that be PCI_CLASS_SYSTEM_PIC (0x0800) instead? > Index: hw/versatile_pci.c > =================================================================== [...] > - d->config[0x0A] = 0x40; // class_sub = pci host > - d->config[0x0B] = 0x0b; // class_base = PCI_bridge > + pci_config_set_class(d->config, PCI_CLASS_PROCESSOR_CO); The comment did not match the code, here... PCI_CLASS_BRIDGE_HOST sounds more likely to my ears... am I wrong? > Index: hw/macio.c > =================================================================== [...] > - > - d->config[0x0a] = 0x00; // class_sub = pci2pci > - d->config[0x0b] = 0xff; // class_base = bridge > + pci_config_set_class(d->config, PCI_CLASS_OTHERS << 8); Again, the comment didn't match the code... Cheers, -- Stuart Brady