Commit 12eb21de authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Bjorn Helgaas

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarAlexander Gordeev <agordeev@redhat.com>
parent 5eb6d660
...@@ -713,11 +713,9 @@ static void msix_program_entries(struct pci_dev *dev, ...@@ -713,11 +713,9 @@ static void msix_program_entries(struct pci_dev *dev,
int i = 0; int i = 0;
for_each_pci_msi_entry(entry, dev) { 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; 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); msix_mask_irq(entry, 1);
i++; i++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment