Use __msi*_set_enable(). Signed-off-by: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx> --- drivers/pci/msi.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 4e5999e..b74668d 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -323,7 +323,8 @@ static void __pci_restore_msi_state(struct pci_dev *dev) pos = entry->msi_attrib.pos; pci_intx_for_msi(dev, 0); - msi_set_enable(dev, 0); + __msi_set_enable(dev, pos, 0); + write_msi_msg(dev->irq, &entry->msg); if (entry->msi_attrib.maskbit) msi_set_mask_bits(dev->irq, entry->msi_attrib.maskbits_mask, @@ -345,18 +346,18 @@ static void __pci_restore_msix_state(struct pci_dev *dev) if (!dev->msix_enabled) return; - /* route the table */ + BUG_ON(list_empty(&dev->msi_list)); + entry = list_entry(dev->msi_list.next, struct msi_desc, list); + pos = entry->msi_attrib.pos; + pci_intx_for_msi(dev, 0); - msix_set_enable(dev, 0); + __msix_set_enable(dev, pos, 0); list_for_each_entry(entry, &dev->msi_list, list) { write_msi_msg(entry->irq, &entry->msg); msi_set_mask_bits(entry->irq, 1, entry->msi_attrib.masked); } - BUG_ON(list_empty(&dev->msi_list)); - entry = list_entry(dev->msi_list.next, struct msi_desc, list); - pos = entry->msi_attrib.pos; pci_read_config_word(dev, pos + PCI_MSIX_FLAGS, &control); control &= ~PCI_MSIX_FLAGS_MASKALL; control |= PCI_MSIX_FLAGS_ENABLE; -- -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html