summaryrefslogtreecommitdiff
path: root/sys/dev/usb
AgeCommit message (Collapse)Author
2010-09-23rename uyurex(4) to utwitch(4)Yojiro Uo
ok deraadt@
2010-09-23returning here can cause the usb task thread to go to sleep forever,Jacob Meuser
becaue it skips a wakeup() later on. this is the only error condition that returns before the wakeup. not sure why this particular case is handled differently, and not certain what the error code should be, but this is better than breaking all of usb because of a problem on one port. dicussed with deraadt
2010-09-23add two members to struct usb_taskJacob Meuser
* usbd_device_handle dev - the device responsible for the task. use this to not run the task if the device's hub is dying. * int running - a flag to be set when the task is running. add usb_rem_wait_task(), a wrapper for usb_rem_task() that waits for the task to complete if the task is already running. s/usb_rem_task/usb_rem_wait_task/ in usb_detach(). probably most drivers using usb_tasks should do this as well. although device attach/detach is serialized in normal cases, in the special case where the usb bus is hotpluggable (like cardbus/pcmcia), devices are not detached in the task thread.
2010-09-23add a 'dying' flag to struct usbd_bus. use this to signify the busJacob Meuser
is dying, instead of setting a flag in struct usb_softc. as usbd_device_handle has a pointer to the usbd_bus it's attached to, usb devices, and functions they run or functions run on their behalf, can now easily check if their bus is dying. use this to stop usbd_do_request* from running and the usb task thread from adding new tasks when a device's bus is dying.
2010-09-23instead of waiting the full power-up-to-power-steady time for rootJacob Meuser
hubs before their first port explore, check how long it's actually been since power up and only wait as necessary. saves a little time on boot, especially now that explore tasks are serialized. ok yuo@
2010-09-23instead of running usb_explore() from individual kthreads for eachJacob Meuser
USB bus, make usb_explore() a usb_task. reduces races during normal USB device detach, since now usb_tasks and detach happen in the same process. ok yuo@, matthew@ helped with the task thread loop
2010-09-23rename usb_discover to usb_explore for consistency.Jacob Meuser
OK krw
2010-09-22as dying flag didn't set in aue_detach(), set it.Yojiro Uo
ok jsg@
2010-09-21The size of sc_status[] (the buffer for USB hub's interrupt pipe) will besasano
determined by bNbrPorts in hub descriptor. USB hub sends status packet to host, it contains status bits for each port and hub itself. So, the packet size is ceil((port + 1) / 8) bytes. If host requests smaller than that size, the hub behavior is undefined. Some hub (Intel's RMH for example) sends whole status every time, it makes babble of USB. This is the reason that uhub_intr() of old code was suffered from USBD_IOERROR, Okay deraadt@ and yuo@.
2010-09-21Better PHY probing adapted from FreeBSD by Laurent GhigonisJonathan Gray
fixes problems seen with Linksys USB300M.
2010-09-21umass is set up to only handle one command on the bus at any pointDavid Gwynne
in time, which is a problem if your umass device has multiple luns on it. if multiple commands are issued at the same time then they step on some shared state, which in turn causes some interesting panics. this diff introduces an iopool in umass so only one command can be "allocated" and scheduled at a time. found, reproduced and investigated by krw@ fix verified by krw@ ok matthew@ krw@
2010-09-20If during resume we get an interrupt, sure, be a bit noisy about itTheo de Raadt
for now. But since it is not being handled, do not ack it on the chip. Discussed with kettenis a while back
2010-09-20Fix unitialised variable access in the suspend/resume caseJonathan Gray
that crept in with rev 1.77, spotted by the clang static analyser. ok deraadt@
2010-09-15- prevent about then dots from being emitted by my rum(4) upon attach.Jasper Lievisse Adriaanse
2010-09-12anonymous unions aren't standard C and don't work with gcc2. name theJacob Meuser
anonymous unions "un". delete some obsolete mpeg/jpeg compression methods that have never been supported, and will not need to be supported.
2010-09-07remove the powerhook code. All architectures now use the ca_activate treeTheo de Raadt
traversal code to suspend/resume ok oga kettenis blambert
2010-09-06All PWR_{SUSPEND,RESUME} can now be replaced by DVACT_{SUSPEND,RESUME}Theo de Raadt
2010-08-31Add DVACT_QUIECE support. This is called before splhigh() and beforeTheo de Raadt
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
2010-08-31sort DVACT_ actions in order of useTheo de Raadt
2010-08-31annotate that this driver needs sc_dying codeTheo de Raadt
2010-08-31sort DVACT_ actions according to the order likely to be usedTheo de Raadt
2010-08-31In xxactivate() DVACT_DEACTIVATE, when calling a series of config_deactivate()Theo de Raadt
for sub-devices, return the last error return value instead of |'ing the failures together and creating some value that is non-0 (bravo!) but potentially loses the specific error value...
2010-08-31activate functions should not return EOPNOTSUPPTheo de Raadt
2010-08-31uhci is apparently is unaware that it could be on a shared interruptTheo de Raadt
It is OK to return 0 in that case, but it is not OK to print a diagnostic.
2010-08-30Change powerhooks into activate functions, and provide stub powerhookTheo de Raadt
functions ok kettenis
2010-08-29regenMiod Vallat
2010-08-29Translation code for Fn-key sequences on the Gdium Liberty internal keyboard,Miod Vallat
which reports Fn as a regular key.
2010-08-28regenMiod Vallat
2010-08-27remove the unused if_init callback in struct ifnetJonathan Gray
ok deraadt@ henning@ claudio@
2010-08-27Delete comments about these drivers needing powerhook support; they don't.Theo de Raadt
2010-08-27kill PWR_STANDBY (apm can use PWR_SUSPEND instead). While here, renumberTheo de Raadt
PWR_{SUSPEND,RESUME} so that they match the values of DAVCT_{SUSPEND,RESUME} so that we can eventually (many more steps...) kill the powerhook garbage and use the activate mechanism. no objections
2010-08-21Match the Huawei E1820, from David Zeillinger.Jonathan Gray
2010-08-21regenJonathan Gray
2010-08-21Huawei E1820, from David Zeillinger.Jonathan Gray
2010-08-21- add a quirk for the apple clear orb usb speakersJasper Lievisse Adriaanse
2010-08-20regenDamien Bergamini
2010-08-20The Hercules HWNUP-150 is a urtwn (Realtek RTL8192SU).Damien Bergamini
It makes even the smallest run(4) devices look ridiculously huge.
2010-08-18* indentation fixJacob Meuser
* use the correct variable in a DPRINTF
2010-08-18* the detach and drain functions do the same waiting for channels toJacob Meuser
complete outstanding requests, so use uaudio_drain in uaudio_detach. * the channel alt index can still be -1 at detach. check for this.
2010-08-17regenJasper Lievisse Adriaanse
2010-08-17- TI doesn't mean Texas IntelJasper Lievisse Adriaanse
2010-08-07No "\n" needed at the end of panic() strings.Kenneth R Westerback
Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
2010-08-02Handle USB_GET_REPORT, USB_GET_REPORT_DESC, USB_GET_REPORT_ID andMiod Vallat
USB_SET_REPORT ioctls in ukbd and ums. This allows usbhidctl to be used on these devices e.g. to dump the report descriptor of troublesome models. ok deraadt@
2010-08-02Quirk for USB_PRODUCT_MICROSOFT_WLINTELLIMOUSE turns out not to beMiod Vallat
required; PR 6436 ok deraadt@
2010-08-01Be more generous when parsing the report descriptor:Miod Vallat
- parts of the report descriptor not in a format we expect are now ignored, instead of preventing attachment (e.g. hypothetical multi-bit modifiers). - modifiers beyond MAXMOD are ignored. - keycode arrays larger than MAXKEYCODE are clamped to MAXKEYCODE instead of being rejected. - multiple keycode arrays are ignored. This should allow rogue keyboards to attach and be usable up to a certain extent. Adapted from a diff sent by Loganaden Velvindron (first name at gmail), who has a keyboard which keycode array is larger than MAXKEYCODE (but, like most if not all USB keyboards out there, can only report up to three simultaneous keypresses anyway).
2010-07-31regenMiod Vallat
2010-07-31Support extra F-keys (up to F24) on HID keyboards.Miod Vallat
2010-07-31Factorization of the bluetooth and usb hid input driver logic, to reduce codeMiod Vallat
duplication and divergence. Thanks to mlarkin@ for bluetooth devices tests.
2010-07-31The code referencing urndis_watchdog() is #if 0'd out, but the actualMichael Knudsen
function is not. This change #if 0's urndis_watchdog() and some functions that are only called from here. At some point we probably want to use the watchdog functionality but the current code is completely untested so disable it entirely rather than enabling it this close to release.
2010-07-31Break some really long lines.Michael Knudsen