aboutsummaryrefslogtreecommitdiff
path: root/hw/msix.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-10-27 19:07:10 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-10-27 19:07:10 +0200
commitb907b69dd75415bc28349d1dd1e9a598ddace463 (patch)
treeac0c20fcaef6e9d675132617e95ca457dc51459e /hw/msix.c
parentdf2943ba3c73ca21dbda063f15fa3e80064af864 (diff)
parent804b207170cdccca3672b63caaf82312ad205a7f (diff)
Merge branch 'pci' into for_anthony
Diffstat (limited to 'hw/msix.c')
-rw-r--r--hw/msix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/msix.c b/hw/msix.c
index b3bb92d755..f66d2550a7 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -74,7 +74,8 @@ static int msix_add_config(struct PCIDevice *pdev, unsigned short nentries,
}
pdev->msix_bar_size = new_size;
- config_offset = pci_add_capability(pdev, PCI_CAP_ID_MSIX, MSIX_CAP_LENGTH);
+ config_offset = pci_add_capability(pdev, PCI_CAP_ID_MSIX,
+ 0, MSIX_CAP_LENGTH);
if (config_offset < 0)
return config_offset;
config = pdev->config + config_offset;
@@ -158,6 +159,7 @@ void msix_write_config(PCIDevice *dev, uint32_t addr,
{
unsigned enable_pos = dev->msix_cap + MSIX_CONTROL_OFFSET;
int vector;
+ int i;
if (!range_covers_byte(addr, len, enable_pos)) {
return;
@@ -167,7 +169,9 @@ void msix_write_config(PCIDevice *dev, uint32_t addr,
return;
}
- qemu_set_irq(dev->irq[0], 0);
+ for (i = 0; i < PCI_NUM_PINS; ++i) {
+ qemu_set_irq(dev->irq[i], 0);
+ }
if (msix_function_masked(dev)) {
return;