Date: Wed, 17 Oct 2018 00:57:28 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339397 - stable/11/sys/dev/cxgbe Message-ID: <201810170057.w9H0vSnX059512@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810170057.w9H0vSnX059512>