diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-09-29 21:37:33 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-09-29 21:37:33 -0700 |
commit | 208dde28b0f73c0e2dc6be74040fa562e129a6e8 (patch) | |
tree | e4ef7fa60a3411fb6fba868ec1c8549c083e799c /drivers/infiniband/hw/mthca/mthca_catas.c | |
parent | 9824b8f11373b0df806c135a342da9319ef1d893 (diff) | |
download | op-kernel-dev-208dde28b0f73c0e2dc6be74040fa562e129a6e8.zip op-kernel-dev-208dde28b0f73c0e2dc6be74040fa562e129a6e8.tar.gz |
IB/mthca: Use pci_request_regions()
Back in prehistoric (pre-git!) days, the kernel's MSI-X support did
request_mem_region() on a device's MSI-X tables, which meant that a
driver that enabled MSI-X couldn't use pci_request_regions() (since
that would clash with the PCI layer's MSI-X request).
However, that was removed (by me!) years ago, so mthca can just use
pci_request_regions() and pci_release_regions() instead of its own
much more complicated code that avoids requesting the MSI-X tables.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_catas.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_catas.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_catas.c b/drivers/infiniband/hw/mthca/mthca_catas.c index cc440f9..65ad359 100644 --- a/drivers/infiniband/hw/mthca/mthca_catas.c +++ b/drivers/infiniband/hw/mthca/mthca_catas.c @@ -149,18 +149,10 @@ void mthca_start_catas_poll(struct mthca_dev *dev) ((pci_resource_len(dev->pdev, 0) - 1) & dev->catas_err.addr); - if (!request_mem_region(addr, dev->catas_err.size * 4, - DRV_NAME)) { - mthca_warn(dev, "couldn't request catastrophic error region " - "at 0x%lx/0x%x\n", addr, dev->catas_err.size * 4); - return; - } - dev->catas_err.map = ioremap(addr, dev->catas_err.size * 4); if (!dev->catas_err.map) { mthca_warn(dev, "couldn't map catastrophic error region " "at 0x%lx/0x%x\n", addr, dev->catas_err.size * 4); - release_mem_region(addr, dev->catas_err.size * 4); return; } @@ -175,13 +167,8 @@ void mthca_stop_catas_poll(struct mthca_dev *dev) { del_timer_sync(&dev->catas_err.timer); - if (dev->catas_err.map) { + if (dev->catas_err.map) iounmap(dev->catas_err.map); - release_mem_region(pci_resource_start(dev->pdev, 0) + - ((pci_resource_len(dev->pdev, 0) - 1) & - dev->catas_err.addr), - dev->catas_err.size * 4); - } spin_lock_irq(&catas_lock); list_del(&dev->catas_err.list); |