7b77e0fa50
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)