svn commit: r299560 - user/ngie/ntb-hacking/sys/dev/ntb/if_ntb
Garrett Cooper
ngie at FreeBSD.org
Thu May 12 19:47:39 UTC 2016
Author: ngie
Date: Thu May 12 19:47:37 2016
New Revision: 299560
URL: https://svnweb.freebsd.org/changeset/base/299560
Log:
Restore some of the previous teardown logic in ntb_teardown_interface(..) removed in
r290684
I suspect this might fix some of the panics on detach by clearing the queue. We'll see..
Sponsored by: EMC / Isilon Storage Division
Modified:
user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c
Modified: user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c
==============================================================================
--- user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c Thu May 12 19:42:13 2016 (r299559)
+++ user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c Thu May 12 19:47:37 2016 (r299560)
@@ -450,19 +450,21 @@ static int
ntb_teardown_interface(void)
{
- if (net_softc.qp != NULL) {
+ /* Bring the link down before detaching everything */
+ if (net_softc.qp != NULL)
ntb_transport_link_down(net_softc.qp);
- ntb_transport_free_queue(net_softc.qp);
- ntb_transport_free(&net_softc);
- }
-
if (net_softc.ifp != NULL) {
ether_ifdetach(net_softc.ifp);
if_free(net_softc.ifp);
net_softc.ifp = NULL;
}
+ if (net_softc.qp != NULL) {
+ ntb_transport_free_queue(net_softc.qp);
+ ntb_transport_free(&net_softc);
+ }
+
return (0);
}
More information about the svn-src-user
mailing list