diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2012-05-15 20:09:56 -0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-06-07 17:19:00 +0300 |
commit | cbd2d4342b3d42ab33baa99f5b7a23491b5692f2 (patch) | |
tree | 34edef8be5a550587e9bae0c27d835d35bad1919 /hw/pci_bridge.c | |
parent | 520064c8b15504fb75babce7be6b5800b54ec490 (diff) |
msi: Invoke msi/msix_reset from PCI core
There is no point in pushing this burden to the devices, they tend to
forget to call them (like intel-hda, ahci, xhci did). Instead, reset
functions are now called from pci_device_reset. They do nothing if
MSI/MSI-X is not in use.
CC: Alexander Graf <agraf@suse.de>
CC: Gerd Hoffmann <kraxel@redhat.com>
CC: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci_bridge.c')
-rw-r--r-- | hw/pci_bridge.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c index 866f0b6c52..e0832b4a67 100644 --- a/hw/pci_bridge.c +++ b/hw/pci_bridge.c @@ -254,8 +254,9 @@ void pci_bridge_disable_base_limit(PCIDevice *dev) } /* reset bridge specific configuration registers */ -void pci_bridge_reset_reg(PCIDevice *dev) +void pci_bridge_reset(DeviceState *qdev) { + PCIDevice *dev = PCI_DEVICE(qdev); uint8_t *conf = dev->config; conf[PCI_PRIMARY_BUS] = 0; @@ -291,13 +292,6 @@ void pci_bridge_reset_reg(PCIDevice *dev) pci_set_word(conf + PCI_BRIDGE_CONTROL, 0); } -/* default reset function for PCI-to-PCI bridge */ -void pci_bridge_reset(DeviceState *qdev) -{ - PCIDevice *dev = PCI_DEVICE(qdev); - pci_bridge_reset_reg(dev); -} - /* default qdev initialization function for PCI-to-PCI bridge */ int pci_bridge_initfn(PCIDevice *dev) { |