svn commit: r227217 - stable/8/sys/dev/usb
Hans Petter Selasky
hselasky at FreeBSD.org
Sun Nov 6 15:13:02 UTC 2011
Author: hselasky
Date: Sun Nov 6 15:13:01 2011
New Revision: 227217
URL: http://svn.freebsd.org/changeset/base/227217
Log:
MFC r227075:
Fix for panic at USB controller attach failure during cold boot.
Modified:
stable/8/sys/dev/usb/usb_process.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/dev/usb/usb_process.c
==============================================================================
--- stable/8/sys/dev/usb/usb_process.c Sun Nov 6 15:06:04 2011 (r227216)
+++ stable/8/sys/dev/usb/usb_process.c Sun Nov 6 15:13:01 2011 (r227217)
@@ -67,11 +67,13 @@ static int usb_pcount;
#define USB_THREAD_CREATE(f, s, p, ...) \
kproc_kthread_add((f), (s), &usbproc, (p), RFHIGHPID, \
0, "usb", __VA_ARGS__)
+#define USB_THREAD_SUSPEND_CHECK() kthread_suspend_check()
#define USB_THREAD_SUSPEND(p) kthread_suspend(p,0)
#define USB_THREAD_EXIT(err) kthread_exit()
#else
#define USB_THREAD_CREATE(f, s, p, ...) \
kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__)
+#define USB_THREAD_SUSPEND_CHECK() kthread_suspend_check()
#define USB_THREAD_SUSPEND(p) kthread_suspend(p,0)
#define USB_THREAD_EXIT(err) kthread_exit(err)
#endif
@@ -98,6 +100,9 @@ usb_process(void *arg)
struct usb_proc_msg *pm;
struct thread *td;
+ /* in case of attach error, check for suspended */
+ USB_THREAD_SUSPEND_CHECK();
+
/* adjust priority */
td = curthread;
thread_lock(td);
More information about the svn-src-stable-8
mailing list