From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49805 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPCAN-0001Gq-VA for qemu-devel@nongnu.org; Thu, 17 Jun 2010 06:17:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPCAM-0000J9-KK for qemu-devel@nongnu.org; Thu, 17 Jun 2010 06:17:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21552) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPCAM-0000J3-Bh for qemu-devel@nongnu.org; Thu, 17 Jun 2010 06:17:46 -0400 Date: Thu, 17 Jun 2010 13:01:23 +0300 From: "Michael S. Tsirkin" Message-ID: <20100617100123.GE7912@redhat.com> References: <16f393b5eebf6fb5182668d32c62dd03cedb02cc.1276755023.git.yamahata@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16f393b5eebf6fb5182668d32c62dd03cedb02cc.1276755023.git.yamahata@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH 05/10] pci bridge: add helper function for ssvid capability. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: stefano.stabellini@eu.citrix.com, jan.kiszka@siemens.com, allen.m.kay@intel.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, kraxel@redhat.com, jean.guyader@gmail.com On Thu, Jun 17, 2010 at 03:15:47PM +0900, Isaku Yamahata wrote: > helper function to add ssvid capability. > > Signed-off-by: Isaku Yamahata But .. this is unused? > --- > hw/pci_bridge.c | 20 ++++++++++++++++++++ > hw/pci_bridge.h | 3 +++ > 2 files changed, 23 insertions(+), 0 deletions(-) > > diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c > index 43c21d4..1397a11 100644 > --- a/hw/pci_bridge.c > +++ b/hw/pci_bridge.c > @@ -29,6 +29,26 @@ > > #include "pci_bridge.h" > > +/* PCI bridge subsystem vendor ID helper functions */ > +#define PCI_SSVID_SIZEOF 8 > +#define PCI_SSVID_SVID 4 > +#define PCI_SSVID_SSID 6 > + > +int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset, > + uint16_t svid, uint16_t ssid) > +{ > + int pos; > + pos = pci_add_capability_at_offset(dev, PCI_CAP_ID_SSVID, > + offset, PCI_SSVID_SIZEOF); > + if (pos < 0) { > + return pos; > + } > + > + pci_set_word(dev->config + pos + PCI_SSVID_SVID, svid); > + pci_set_word(dev->config + pos + PCI_SSVID_SSID, ssid); > + return pos; > +} > + > void pci_bridge_write_config(PCIDevice *d, > uint32_t address, uint32_t val, int len) > { > diff --git a/hw/pci_bridge.h b/hw/pci_bridge.h > index 2747e7f..a1f160b 100644 > --- a/hw/pci_bridge.h > +++ b/hw/pci_bridge.h > @@ -23,6 +23,9 @@ > > #include "pci.h" > > +int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset, > + uint16_t svid, uint16_t ssid); > + > struct PCIBridge { > PCIDevice dev; > > -- > 1.6.6.1