diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-09-28 12:00:01 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-09-28 14:16:29 -0400 |
commit | c78f6415e964aafd3a91d834970c16b613e421d9 (patch) | |
tree | 0c12248b84ed15f5c49cce6a9160facf3feab82f /drivers/infiniband | |
parent | 2c9446a1d63f1ca570e92f89422595732efedf44 (diff) |
IB/ipath: Unregister from IB core early
This gives upper-level protocols a chance to unregister while the device
is still usable.
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_driver.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 0fe37c5467ac..a260acf4a9e6 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -536,7 +536,12 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev) | |||
536 | return; | 536 | return; |
537 | 537 | ||
538 | dd = pci_get_drvdata(pdev); | 538 | dd = pci_get_drvdata(pdev); |
539 | ipath_unregister_ib_device(dd->verbs_dev); | 539 | |
540 | if (dd->verbs_dev) { | ||
541 | ipath_unregister_ib_device(dd->verbs_dev); | ||
542 | dd->verbs_dev = NULL; | ||
543 | } | ||
544 | |||
540 | ipath_diag_remove(dd); | 545 | ipath_diag_remove(dd); |
541 | ipath_user_remove(dd); | 546 | ipath_user_remove(dd); |
542 | ipathfs_remove_device(dd); | 547 | ipathfs_remove_device(dd); |
@@ -2027,6 +2032,11 @@ static void __exit infinipath_cleanup(void) | |||
2027 | list_for_each_entry_safe(dd, tmp, &ipath_dev_list, ipath_list) { | 2032 | list_for_each_entry_safe(dd, tmp, &ipath_dev_list, ipath_list) { |
2028 | spin_unlock_irqrestore(&ipath_devs_lock, flags); | 2033 | spin_unlock_irqrestore(&ipath_devs_lock, flags); |
2029 | 2034 | ||
2035 | if (dd->verbs_dev) { | ||
2036 | ipath_unregister_ib_device(dd->verbs_dev); | ||
2037 | dd->verbs_dev = NULL; | ||
2038 | } | ||
2039 | |||
2030 | if (dd->ipath_kregbase) | 2040 | if (dd->ipath_kregbase) |
2031 | cleanup_device(dd); | 2041 | cleanup_device(dd); |
2032 | 2042 | ||