@@ -650,8 +650,6 @@ static int msi_capability_init(struct pci_dev *dev, int nvec)
pci_intx_for_msi(dev, 0);
msi_set_enable(dev, 1);
dev->msi_enabled = 1;
-
- dev->irq = entry->irq;
return 0;
}
@@ -1059,6 +1057,7 @@ int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec)
{
int nvec;
int rc;
+ struct msi_desc *entry;
if (dev->current_state != PCI_D0)
return -EINVAL;
@@ -1114,6 +1113,8 @@ int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec)
return rc;
}
+ entry = list_entry(dev->msi_list.next, struct msi_desc, list);
+ dev->irq = entry->irq;
return nvec;
}
EXPORT_SYMBOL(pci_enable_msi_range);
Save MSI irq in PCI MSI layer, this is preparation for generic MSI. Signed-off-by: Yijing Wang <wangyijing@huawei.com> --- drivers/pci/msi.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)