提交 c78f6415 编写于 作者: B Bryan O'Sullivan 提交者: Roland Dreier

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: NBryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 2c9446a1
...@@ -536,7 +536,12 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev) ...@@ -536,7 +536,12 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev)
return; return;
dd = pci_get_drvdata(pdev); dd = pci_get_drvdata(pdev);
ipath_unregister_ib_device(dd->verbs_dev);
if (dd->verbs_dev) {
ipath_unregister_ib_device(dd->verbs_dev);
dd->verbs_dev = NULL;
}
ipath_diag_remove(dd); ipath_diag_remove(dd);
ipath_user_remove(dd); ipath_user_remove(dd);
ipathfs_remove_device(dd); ipathfs_remove_device(dd);
...@@ -2027,6 +2032,11 @@ static void __exit infinipath_cleanup(void) ...@@ -2027,6 +2032,11 @@ static void __exit infinipath_cleanup(void)
list_for_each_entry_safe(dd, tmp, &ipath_dev_list, ipath_list) { list_for_each_entry_safe(dd, tmp, &ipath_dev_list, ipath_list) {
spin_unlock_irqrestore(&ipath_devs_lock, flags); spin_unlock_irqrestore(&ipath_devs_lock, flags);
if (dd->verbs_dev) {
ipath_unregister_ib_device(dd->verbs_dev);
dd->verbs_dev = NULL;
}
if (dd->ipath_kregbase) if (dd->ipath_kregbase)
cleanup_device(dd); cleanup_device(dd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册