diff options
author | Michael Brown | 2016-03-20 15:50:36 +0100 |
---|---|---|
committer | Michael Brown | 2016-03-20 15:52:01 +0100 |
commit | 692324905e135b2eab151671db4494b31c2087c9 (patch) | |
tree | 5cb5c85cfba04a72d2bb98495311547509e5a66a /src/drivers/infiniband | |
parent | [hermon] Add missing iounmap() (diff) | |
download | ipxe-692324905e135b2eab151671db4494b31c2087c9.tar.gz ipxe-692324905e135b2eab151671db4494b31c2087c9.tar.xz ipxe-692324905e135b2eab151671db4494b31c2087c9.zip |
[arbel] Add missing iounmap()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/infiniband')
-rw-r--r-- | src/drivers/infiniband/arbel.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/drivers/infiniband/arbel.c b/src/drivers/infiniband/arbel.c index 2a6c32de..746b7898 100644 --- a/src/drivers/infiniband/arbel.c +++ b/src/drivers/infiniband/arbel.c @@ -3000,6 +3000,16 @@ static int arbel_probe ( struct pci_device *pci ) { pci_set_drvdata ( pci, arbel ); arbel->pci = pci; + /* Fix up PCI device */ + adjust_pci_device ( pci ); + + /* Map PCI BARs */ + arbel->config = ioremap ( pci_bar_start ( pci, ARBEL_PCI_CONFIG_BAR ), + ARBEL_PCI_CONFIG_BAR_SIZE ); + arbel->uar = ioremap ( ( pci_bar_start ( pci, ARBEL_PCI_UAR_BAR ) + + ARBEL_PCI_UAR_IDX * ARBEL_PCI_UAR_SIZE ), + ARBEL_PCI_UAR_SIZE ); + /* Allocate Infiniband devices */ for ( i = 0 ; i < ARBEL_NUM_PORTS ; i++ ) { ibdev = alloc_ibdev ( 0 ); @@ -3014,16 +3024,6 @@ static int arbel_probe ( struct pci_device *pci ) { ib_set_drvdata ( ibdev, arbel ); } - /* Fix up PCI device */ - adjust_pci_device ( pci ); - - /* Get PCI BARs */ - arbel->config = ioremap ( pci_bar_start ( pci, ARBEL_PCI_CONFIG_BAR ), - ARBEL_PCI_CONFIG_BAR_SIZE ); - arbel->uar = ioremap ( ( pci_bar_start ( pci, ARBEL_PCI_UAR_BAR ) + - ARBEL_PCI_UAR_IDX * ARBEL_PCI_UAR_SIZE ), - ARBEL_PCI_UAR_SIZE ); - /* Reset device */ arbel_reset ( arbel ); @@ -3072,6 +3072,8 @@ static int arbel_probe ( struct pci_device *pci ) { err_alloc_ibdev: for ( i-- ; i >= 0 ; i-- ) ibdev_put ( arbel->ibdev[i] ); + iounmap ( arbel->uar ); + iounmap ( arbel->config ); arbel_free ( arbel ); err_alloc: return rc; @@ -3090,6 +3092,8 @@ static void arbel_remove ( struct pci_device *pci ) { unregister_ibdev ( arbel->ibdev[i] ); for ( i = ( ARBEL_NUM_PORTS - 1 ) ; i >= 0 ; i-- ) ibdev_put ( arbel->ibdev[i] ); + iounmap ( arbel->uar ); + iounmap ( arbel->config ); arbel_free ( arbel ); } |