svn commit: r268080 - head/sys/dev/usb/serial
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Jul 1 07:30:30 UTC 2014
Author: hselasky
Date: Tue Jul 1 07:30:29 2014
New Revision: 268080
URL: http://svnweb.freebsd.org/changeset/base/268080
Log:
Fix order of USB serial layer uninit. Currently module dependency
rules prevent the USB serial module to be unloaded before any client
modules. This patch ensures that the "ucom_mtx" mutex is destroyed
last when doing a system uninit in a monotolith build aswell.
MFC after: 3 days
Modified:
head/sys/dev/usb/serial/usb_serial.c
head/sys/dev/usb/serial/usb_serial.h
Modified: head/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- head/sys/dev/usb/serial/usb_serial.c Tue Jul 1 07:29:42 2014 (r268079)
+++ head/sys/dev/usb/serial/usb_serial.c Tue Jul 1 07:30:29 2014 (r268080)
@@ -200,7 +200,7 @@ ucom_uninit(void *arg)
mtx_destroy(&ucom_mtx);
}
-SYSUNINIT(ucom_uninit, SI_SUB_KLD - 2, SI_ORDER_ANY, ucom_uninit, NULL);
+SYSUNINIT(ucom_uninit, SI_SUB_KLD - 3, SI_ORDER_ANY, ucom_uninit, NULL);
/*
* Mark a unit number (the X in cuaUX) as in use.
Modified: head/sys/dev/usb/serial/usb_serial.h
==============================================================================
--- head/sys/dev/usb/serial/usb_serial.h Tue Jul 1 07:29:42 2014 (r268079)
+++ head/sys/dev/usb/serial/usb_serial.h Tue Jul 1 07:30:29 2014 (r268080)
@@ -195,7 +195,7 @@ struct ucom_softc {
#define UCOM_MTX_LOCK(sc) mtx_lock((sc)->sc_mtx)
#define UCOM_MTX_UNLOCK(sc) mtx_unlock((sc)->sc_mtx)
#define UCOM_UNLOAD_DRAIN(x) \
-SYSUNINIT(var, SI_SUB_KLD - 3, SI_ORDER_ANY, ucom_drain_all, 0)
+SYSUNINIT(var, SI_SUB_KLD - 2, SI_ORDER_ANY, ucom_drain_all, 0)
#define ucom_cfg_do_request(udev,com,req,ptr,flags,timo) \
usbd_do_request_proc(udev,&(com)->sc_super->sc_tq,req,ptr,flags,NULL,timo)
More information about the svn-src-head
mailing list