[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 05/10] pci bridge: add helper function for ssvid
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH 05/10] pci bridge: add helper function for ssvid capability. |
Date: |
Thu, 17 Jun 2010 13:01:23 +0300 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Thu, Jun 17, 2010 at 03:15:47PM +0900, Isaku Yamahata wrote:
> helper function to add ssvid capability.
>
> Signed-off-by: Isaku Yamahata <address@hidden>
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
- [Qemu-devel] [PATCH 00/10] pci: pci to pci bridge clean up and enhancement, Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 07/10] pci: fix pci domain registering., Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 05/10] pci bridge: add helper function for ssvid capability., Isaku Yamahata, 2010/06/17
- [Qemu-devel] Re: [PATCH 05/10] pci bridge: add helper function for ssvid capability.,
Michael S. Tsirkin <=
- [Qemu-devel] [PATCH 08/10] pci: remove PCIDeviceInfo::header_type, Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 04/10] pci_bridge: introduce pci bridge layer., Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 03/10] pci: fix pci_bus_reset() with 64bit BAR and several clean ups., Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 01/10] pci_bridge: split out pci bridge code into pci_bridge.c from pci.c, Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 02/10] qdev: export qdev_reset() for later use., Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 06/10] pci: eliminate work around in pci_device_reset()., Isaku Yamahata, 2010/06/17