ChangeSet 1.1998.11.21, 2005/02/17 15:07:01-08:00, [EMAIL PROTECTED]

[PATCH] PCI: clean up the msi api

Remove the call to request_mem_region() in msix_capability_init() to
grab the MSI-X vector table.  Drivers should be using
pci_request_regions() so that they own all of the PCI BARs, and the
MSI-X core should trust it's being called by a correct driver.

Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/pci/msi.c |   13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)


diff -Nru a/drivers/pci/msi.c b/drivers/pci/msi.c
--- a/drivers/pci/msi.c 2005-03-04 12:41:47 -08:00
+++ b/drivers/pci/msi.c 2005-03-04 12:41:47 -08:00
@@ -616,15 +616,10 @@
        bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
        phys_addr = pci_resource_start (dev, bir);
        phys_addr += (u32)(table_offset & ~PCI_MSIX_FLAGS_BIRMASK);
-       if (!request_mem_region(phys_addr,
-               nr_entries * PCI_MSIX_ENTRY_SIZE,
-               "MSI-X vector table"))
-               return -ENOMEM;
        base = ioremap_nocache(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);
-       if (base == NULL) {
-               release_mem_region(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);
+       if (base == NULL)
                return -ENOMEM;
-       }
+
        /* MSI-X Table Initialization */
        for (i = 0; i < nvec; i++) {
                entry = alloc_msi_entry();
@@ -859,8 +854,6 @@
                        phys_addr += (u32)(table_offset &
                                ~PCI_MSIX_FLAGS_BIRMASK);
                        iounmap(base);
-                       release_mem_region(phys_addr,
-                               nr_entries * PCI_MSIX_ENTRY_SIZE);
                }
        }
 
@@ -1133,8 +1126,6 @@
                        phys_addr += (u32)(table_offset &
                                ~PCI_MSIX_FLAGS_BIRMASK);
                        iounmap(base);
-                       release_mem_region(phys_addr, PCI_MSIX_ENTRY_SIZE *
-                               multi_msix_capable(control));
                        printk(KERN_WARNING "PCI: %s: 
msi_remove_pci_irq_vectors() "
                               "called without free_irq() on all MSI-X 
vectors\n",
                               pci_name(dev));

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to