From c01d52185208015b77b752bcde65090085ab4fa4 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 23 Aug 2014 10:57:13 -0700 Subject: [PATCH] ucom - Hack unref to fix infinite 1-second wait loop. * ucom depended on the .tsw_* switch to decomission ports, which we do not use currently. This was preventing the ucom from being properly dereferenced and resulted in an infinite 1-second wait loop on close. * Move the unref elsewhere to hopefully solve the problem. --- sys/bus/u4b/serial/usb_serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/bus/u4b/serial/usb_serial.c b/sys/bus/u4b/serial/usb_serial.c index 98bde3c4b7..c202330709 100644 --- a/sys/bus/u4b/serial/usb_serial.c +++ b/sys/bus/u4b/serial/usb_serial.c @@ -555,6 +555,7 @@ ucom_detach_tty(struct ucom_super_softc *ssc, struct ucom_softc *sc) } UCOM_MTX_UNLOCK(sc); } + ucom_unref(ssc); } void @@ -1700,7 +1701,7 @@ ucom_free(void *xsc) if (sc->sc_callback->ucom_free != NULL) sc->sc_callback->ucom_free(sc); else - ucom_unref(sc->sc_super); + /*ucom_unref(sc->sc_super) XXX hack, see end of ucom_detach_tty() */; lockmgr(&ucom_lock, LK_EXCLUSIVE); ucom_close_refs--; -- 2.41.0