OSDN Git Service

PCI: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
authorBjorn Helgaas <bhelgaas@google.com>
Thu, 18 Apr 2013 00:10:07 +0000 (18:10 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Apr 2013 15:50:30 +0000 (09:50 -0600)
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>
drivers/pci/msi.c

index afdc388..f8a1f39 100644 (file)
@@ -605,8 +605,8 @@ static void __iomem *msix_map_region(struct pci_dev *dev, unsigned nr_entries)
 
        pci_read_config_dword(dev, dev->msix_cap + PCI_MSIX_TABLE,
                              &table_offset);
-       bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
-       table_offset &= ~PCI_MSIX_FLAGS_BIRMASK;
+       bir = (u8)(table_offset & PCI_MSIX_TABLE_BIR);
+       table_offset &= PCI_MSIX_TABLE_OFFSET;
        phys_addr = pci_resource_start(dev, bir) + table_offset;
 
        return ioremap_nocache(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);