Commit 4d18760c67af2688a6f9d3f0131dc505e0b9f2c9

Authored by Bjorn Helgaas
1 parent 78b5a310ce

PCI: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK

PCI_MSIX_FLAGS_BIRMASK is mis-named because the BIR mask is in the
Table Offset register, not the flags ("Message Control" per spec)
register.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -605,8 +605,8 @@
605 605  
606 606 pci_read_config_dword(dev, dev->msix_cap + PCI_MSIX_TABLE,
607 607 &table_offset);
608   - bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
609   - table_offset &= ~PCI_MSIX_FLAGS_BIRMASK;
  608 + bir = (u8)(table_offset & PCI_MSIX_TABLE_BIR);
  609 + table_offset &= PCI_MSIX_TABLE_OFFSET;
610 610 phys_addr = pci_resource_start(dev, bir) + table_offset;
611 611  
612 612 return ioremap_nocache(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);