svn commit: r339397 - stable/11/sys/dev/cxgbe

Navdeep Parhar np at FreeBSD.org
Wed Oct 17 00:57:29 UTC 2018


Author: np
Date: Wed Oct 17 00:57:28 2018
New Revision: 339397
URL: https://svnweb.freebsd.org/changeset/base/339397

Log:
  MFC r333139:
  
  cxgbe(4): Destroy the cdev before disabling interrupts in driver detach.
  
  Filter work requests are submitted in the nexus cdev's ioctl which then
  blocks waiting for a reply.  If driver detach runs in this state and
  disables interrupts the ioctl will never complete and detach will hang
  in destroy_cdev.

Modified:
  stable/11/sys/dev/cxgbe/t4_main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/11/sys/dev/cxgbe/t4_main.c	Wed Oct 17 00:45:01 2018	(r339396)
+++ stable/11/sys/dev/cxgbe/t4_main.c	Wed Oct 17 00:57:28 2018	(r339397)
@@ -1308,15 +1308,15 @@ t4_detach_common(device_t dev)
 
 	sc = device_get_softc(dev);
 
+	if (sc->cdev) {
+		destroy_dev(sc->cdev);
+		sc->cdev = NULL;
+	}
+
 	sc->flags &= ~CHK_MBOX_ACCESS;
 	if (sc->flags & FULL_INIT_DONE) {
 		if (!(sc->flags & IS_VF))
 			t4_intr_disable(sc);
-	}
-
-	if (sc->cdev) {
-		destroy_dev(sc->cdev);
-		sc->cdev = NULL;
 	}
 
 	if (device_is_attached(dev)) {


More information about the svn-src-stable-11 mailing list