diff options
author | Christoph Hellwig <hch@lst.de> | 2016-07-12 12:20:15 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-07-21 23:49:33 +0300 |
commit | 12eb21de1f26233ad195ffe991697d61790f4193 (patch) | |
tree | 696151ef1a21005a756648cb2691080750bc92f2 /drivers/pci/msi.c | |
parent | 5eb6d660193ccc471b415d6f31e17312a63de167 (diff) | |
download | linux-12eb21de1f26233ad195ffe991697d61790f4193.tar.xz |
PCI: Switch msix_program_entries() to use pci_msix_desc_addr()
Instead of relying on the msix_entry structure for the vector number, read
it from the msi_desc.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alexander Gordeev <agordeev@redhat.com>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r-- | drivers/pci/msi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 0d94fbf95ba6..a385f39be6f7 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -713,11 +713,9 @@ static void msix_program_entries(struct pci_dev *dev, int i = 0; for_each_pci_msi_entry(entry, dev) { - int offset = entries[i].entry * PCI_MSIX_ENTRY_SIZE + - PCI_MSIX_ENTRY_VECTOR_CTRL; - entries[i].vector = entry->irq; - entry->masked = readl(entry->mask_base + offset); + entry->masked = readl(pci_msix_desc_addr(entry) + + PCI_MSIX_ENTRY_VECTOR_CTRL); msix_mask_irq(entry, 1); i++; } |