Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 May 2016 19:47:38 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r299560 - user/ngie/ntb-hacking/sys/dev/ntb/if_ntb
Message-ID:  <201605121947.u4CJlcWk032036@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605121947.u4CJlcWk032036>