diff options
author | peter <peter@FreeBSD.org> | 2001-06-06 22:00:03 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-06-06 22:00:03 +0000 |
commit | 736ceb47561d46a525c9e59e2544571a4271b191 (patch) | |
tree | 7023697cf4322aed9e2442c02e9a180c340d9a26 /sys/dev/usb/usb_port.h | |
parent | 99368be5028bdd9b799bf082e93e46d97946f70c (diff) | |
download | FreeBSD-src-736ceb47561d46a525c9e59e2544571a4271b191.zip FreeBSD-src-736ceb47561d46a525c9e59e2544571a4271b191.tar.gz |
Activate the kthread mechanism for doing usb bus discovery. This means
that device add/remove will work without usbd running. usbd is still
used for execing stuff, but that is all now. Ideally it could be replaced
by a devd some day. Until now, usbd had to be running so that the
USB_DISCOVER ioctl could be called to walk the tree when an attachment
status change was noticed.
Among the changes:
- when a detach happens, remove any pending 'attach' messages or the system
suffers from whiplash from exec moused / kill moused loops if you do lots
of attach/detach and later start usbd.
- tweaks related to kthread differences
- disable the select handler for the old interface (never return success).
I have not removed it yet or old usbd's will abort. That can get removed
later once usbd is cleaned up and things have stabilized for a few weeks.
- get Giant in the kthread.
- a couple of minor potential bug fixes (usb_nevents vs malloc failure etc)
Pre-approved by: n_hibma (ages and ages ago)
Diffstat (limited to 'sys/dev/usb/usb_port.h')
-rw-r--r-- | sys/dev/usb/usb_port.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index c7a705b..3045615 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -290,9 +290,8 @@ __CONCAT(dname,_detach)(self, flags) \ #define memcpy(d, s, l) bcopy((s),(d),(l)) #define memset(d, v, l) bzero((d),(l)) #define bswap32(x) swap32(x) -#define kthread_create1(function, sc, priv, string, name) -#define kthread_create(create_function, sc) -#define kthread_exit(err) +#define kthread_create1(f, s, p, a0, a1) \ + kthread_create((f), (s), (p), RFHIGHPID, (a0), (a1)) #define usb_timeout(f, d, t, h) ((h) = timeout((f), (d), (t))) #define usb_untimeout(f, d, h) untimeout((f), (d), (h)) |