Author: np Date: Tue May 1 14:59:38 2018 New Revision: 333139 URL: https://svnweb.freebsd.org/changeset/base/333139
Log: 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. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue May 1 13:57:08 2018 (r333138) +++ head/sys/dev/cxgbe/t4_main.c Tue May 1 14:59:38 2018 (r333139) @@ -1317,15 +1317,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)) { _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"