From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NeQk1-000340-W2 for qemu-devel@nongnu.org; Mon, 08 Feb 2010 05:21:18 -0500 Received: from [199.232.76.173] (port=36928 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NeQk1-00033s-EC for qemu-devel@nongnu.org; Mon, 08 Feb 2010 05:21:17 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NeQjw-00086y-58 for qemu-devel@nongnu.org; Mon, 08 Feb 2010 05:21:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5671) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NeQjv-00086g-N9 for qemu-devel@nongnu.org; Mon, 08 Feb 2010 05:21:11 -0500 Date: Mon, 8 Feb 2010 12:17:53 +0200 From: "Michael S. Tsirkin" Message-ID: <20100208101753.GA14662@redhat.com> References: <20100208064147.GD22624@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100208064147.GD22624@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH] pci: initialize header type register. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata , kraxel@redhat.com Cc: Blue Swirl , qemu-devel@nongnu.org On Mon, Feb 08, 2010 at 03:41:47PM +0900, Isaku Yamahata wrote: > initialize header type register in pci generic code. > > Cc: Blue Swirl > Cc: "Michael S. Tsirkin" > Signed-off-by: Isaku Yamahata No objections here, I am assuming this will be followed by patches removing header type init from bridges? >>From qdev perspective, it is probably cleaner to make multifunction bit a separate qdev property though, right? I queued this one, let's wait a bit for comments from interested people. > --- > hw/pci.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/hw/pci.c b/hw/pci.c > index eb2043e..7b055b4 100644 > --- a/hw/pci.c > +++ b/hw/pci.c > @@ -603,6 +603,7 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, > pci_dev->irq_state = 0; > pci_config_alloc(pci_dev); > > + pci_dev->config[PCI_HEADER_TYPE] = header_type; > header_type &= ~PCI_HEADER_TYPE_MULTI_FUNCTION; > if (header_type == PCI_HEADER_TYPE_NORMAL) { > pci_set_default_subsystem_id(pci_dev); > -- > 1.6.6.1