47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
# HG changeset patch
|
|
# User Keir Fraser <keir.fraser@citrix.com>
|
|
# Date 1231862027 0
|
|
# Node ID 4f6a2bbdff3fea7db13979ffccb1ae5403ca79c8
|
|
# Parent b169db55faf38fda27985626284c9262aac09784
|
|
x86: Call msix_set_enable for MSI-x interrupt
|
|
|
|
For MSI-x, we should call msix_set_enable() instead of
|
|
msi_set_enable().
|
|
|
|
Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
|
|
|
|
--- a/xen/arch/x86/msi.c
|
|
+++ b/xen/arch/x86/msi.c
|
|
@@ -702,7 +702,7 @@ static void __pci_disable_msix(int vecto
|
|
|
|
pos = pci_find_cap_offset(bus, slot, func, PCI_CAP_ID_MSIX);
|
|
control = pci_conf_read16(bus, slot, func, msix_control_reg(pos));
|
|
- msi_set_enable(dev, 0);
|
|
+ msix_set_enable(dev, 0);
|
|
|
|
BUG_ON(list_empty(&dev->msi_list));
|
|
|
|
@@ -798,11 +798,20 @@ int pci_restore_msi_state(struct pci_dev
|
|
return -EINVAL;
|
|
}
|
|
|
|
- msi_set_enable(pdev, 0);
|
|
+ if ( entry->msi_attrib.type == PCI_CAP_ID_MSI )
|
|
+ msi_set_enable(pdev, 0);
|
|
+ else if ( entry->msi_attrib.type == PCI_CAP_ID_MSIX )
|
|
+ msix_set_enable(pdev, 0);
|
|
+
|
|
write_msi_msg(entry, &entry->msg);
|
|
|
|
- msi_set_enable(pdev, 1);
|
|
msi_set_mask_bit(vector, entry->msi_attrib.masked);
|
|
+
|
|
+ if ( entry->msi_attrib.type == PCI_CAP_ID_MSI )
|
|
+ msi_set_enable(pdev, 1);
|
|
+ else if ( entry->msi_attrib.type == PCI_CAP_ID_MSIX )
|
|
+ msix_set_enable(pdev, 1);
|
|
+
|
|
spin_unlock_irqrestore(&desc->lock, flags);
|
|
}
|
|
|