summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Stop generating traffic for a given endpoint when a transfer reportedmpi2013-09-241-8/+17
| | | | | | | | | | | | | | | | an I/O error. When such thing happens, the device is more likely to be already gone or non responding, but the task responsible for aborting the pipe has not been executed. Fix a problem where the ehci(4) controller would vomit^Wprint a lot of "ehci_idone:" messages in loop leaving the machine unusable, initially reported by ajacoutot@ and later by RD Thrush. Fix tested by RD Thrush and Markus Bergkvist, thanks! ok miod@
* Unify and document usbd_transfer(9).mpi2013-09-201-3/+12
| | | | | | | | | | | Get rid of the badly named usbd_bulk_transfer() and usbd_intr_transfer() they were two identical wrappers to submit a synchronous transfer. Now all synchronous transfers are submited using usbd_setup_xfer(9) and usbd_transfer(9) explicitly using the USBD_CATCH flag when signals must be checked. Previous version ok'd by mglocker@, with subtle inputs from miod@
* Fix build with USB_DEBUG defined, pipes don't have refcounters anymore.mpi2013-09-061-3/+3
| | | | From Nils Frohberg.
* Remove bogus and useless refcounting of usbd pipes that could lead tompi2013-08-131-5/+4
| | | | | | | memory leaks and abort the pipe if requests are still pending because most of our drivers don't do anything if usbd_close_pipe() fails. ok miod@
* Use the same functions to abort and close the control pipe of a devicempi2013-08-081-2/+4
| | | | | as for every other pipes instead of having another function calling the host controller method.
* Remove unused and ambiguous usbd_get_interface() function.mpi2013-04-261-14/+1
|
* Give back to usb(4) what is usb(4)'s. In other words use the usb_* prefixmpi2013-04-261-23/+1
| | | | | | | for functions related to the usb(4) driver and keep usbd_* for generic USB layer functions. ok mglocker@
* Rename three functions in usbdi.c to their right prefix (usb_* to usbd_*).mglocker2013-04-261-7/+7
| | | | ok mpi@
* Remove allocm() and freem() from the USB bus interface now that theympi2013-04-191-6/+6
| | | | | | are only used as wrappers around usb_{alloc,free}mem(). ok deraadt@, mglocker@
* Remove unused usbd_get_buffer() function.mpi2013-04-191-9/+1
|
* Get rid of various 'typedef struct' definitions and use plain structuremglocker2013-04-151-85/+85
| | | | | | | | | definitions instead. We don't change usb.h for now to stay compatible with userland. Tested by mpi@ on macppc and myself on i386. ok mpi@
* usbd_setup_default_xfer() already use the default device's pipe so there'smpi2013-04-121-3/+1
| | | | no need to reset it afterward.
* Instead of using a wrapper around usbd_transfer() when submitting ampi2013-04-121-15/+7
| | | | | | | transfer synchronously just pass the USBD_SYNCHRONOUS flag like any other flags when creating a transfer. ok sthen@, mglocker@
* Merge usbd_ar_pipe in usbd_abort_pipe, no functional change.mpi2013-04-111-31/+19
| | | | ok ratchov@, mglocker@
* When submitting a request the device's default pipe is alwaysmpi2013-04-091-11/+3
| | | | | | | used, so do not pretend to support a different one and get rid of the unused usbd_do_request_flags_pipe() function. ok mglocker@
* proc.h is way too much header for usb to handle.tedu2013-03-281-2/+1
|
* fix function names on diagnostic messages.fgsch2011-12-161-3/+3
| | | | from Tobias Ulmer (tobiasu-at-tmux-dot-org)
* * instead of NULLing pointers to interface descriptors in the uaa, markjakemsr2011-01-161-1/+19
| | | | | | | | | | | | | interfaces as being claimed in the usbd_device's copy of the interface descriptors * allow ugen(4) to be attached if there are unused interfaces in a configuration that has had drivers attached * make ugen(4) aware that it may be sharing a device with (an)other driver(s), and if so: * do not let ugen(4) change the configuration * do not let ugen(4) access the already claimed interfaces discussed with deraadt and miod
* * add a process reference counting variable to struct usbd_devicejakemsr2010-12-301-1/+21
| | | | | | * add functions to increment and decrement the reference count, and a function to wait until the reference count is zero ok martynas@
* * add dying flag to struct usbd_devicejakemsr2010-12-061-2/+17
| | | | | | | | | * add usbd_deactivate(), which should be use to set the dying flag in struct usbd_device * add usbd_is_dying(), which can be used to check if either the device or the associated bus dying flag has been set * use usbd_is_dying() to check if the deivce or bus is dying before issuing transfers or requests
* add a 'dying' flag to struct usbd_bus. use this to signify the busjakemsr2010-09-231-1/+5
| | | | | | | | | 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.
* instead of running usb_explore() from individual kthreads for eachjakemsr2010-09-231-3/+6
| | | | | | | 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
* Fix spelling in a comment.mk2010-03-051-2/+2
|
* For none interrupt endpoints call the xfer done function beforemglocker2008-10-111-11/+9
| | | | | | | | | calling the xfer callback function to allow a device driver to immediately reschedule the same xfer. This e.g. improves performance for isoc high- fullspeed xfers (ehci). From NetBSD. OK phessler@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* print the correct function name.fgsch2008-06-211-3/+3
|
* serialize usbd_probe_and_attach(); only let one usb device be match'd andderaadt2007-10-111-1/+6
| | | | attached at a time; ok kettenis
* KNF, especially re-indent prototypes. No binary change.mbalmer2007-06-181-77/+68
| | | | ok dlg.
* Remove definitions and usage of usb_callout and related macros. These macrosmbalmer2007-06-101-2/+2
| | | | | | | | were used as a layer of confusion^Wabstraction around the timeout(9) API. No binary change. ok jsg.
* Remove the "Static" declaration of many functions. It was defined to be emptymbalmer2007-06-051-7/+7
| | | | | | | and it was not consistently used. It was confusing as it suggested these functions were static, which they were not. discussed with dlg and jsg, ok jsg.
* Remove more #ifdef/#endif's that checked for other bsds. No binarymbalmer2007-05-311-36/+1
| | | | | | change, no functionality change. ok jsg
* Remove logprintf macrojsg2007-05-211-3/+3
|
* Print correct function name in diagnostic output.bluhm2007-03-311-2/+2
| | | | ok pedro
* Handle interrupted tsleep when waiting for synchronous transfer completion.pascoe2006-08-141-2/+2
| | | | ok dlg@
* add iterators for usb descriptors. from Tony Lambris and Staffan Ulfberg.dlg2005-09-201-1/+33
|
* put "do { } while (0)" wrappers on all the debug maroc functionsderaadt2004-07-081-3/+3
|
* Remove useless ``elm'' argument from the SIMPLEQ_REMOVE_HEAD macro.grange2004-05-041-2/+2
| | | | | | This matches our SLIST behaviour and NetBSD's SIMPLEQ as well. ok millert krw deraadt
* Sync USB code with NetBSD.nate2003-07-081-25/+88
| | | | This includes numerous fixes and paves the way for usb 2.0 support.
* make this function available to othersnate2003-05-171-2/+1
|
* Remove more '\n's from panic() statements. Both trailing and leading.krw2002-10-121-2/+2
| | | | Diff generated by Chris Kuethe.
* get rid of trailing whitespacenate2002-07-251-33/+33
|
* make the timeout a function parameternate2002-07-091-6/+8
| | | | From NetBSD
* Meant to commit only ulpt and committed everything. Most things weren't readynate2002-05-071-89/+22
|
* Sync ulpt driver with NetBSDnate2002-05-071-22/+89
|
* prefix structure members to avoid name clashes.nate2002-05-021-2/+2
| | | | From NetBSD
* Add support for a bunch of new adapters.nate2002-04-011-1/+19
| | | | Sync with NetBSD. ok deraadt
* Sync with NetBSD. Tested with a USB keyboard, USB mouse, and three differentaaron2001-05-031-21/+9
| | | | kue(4) Ethernet devices.
* Another USB sync with NetBSD. We are still lacking an up-to-date umass(4)aaron2001-01-281-2/+2
| | | | | | driver. I would appreciate it if someone with the hardware looked into it. I also have to take a closer look at changes to the USB Ethernet drivers, as well as import some drivers we are missing (uftdi, if_upl, yap, etc.)
* Sync with NetBSD. Too many changes to mention. For now I have skippedaaron2000-11-081-174/+87
| | | | umass.c and ukbd.c as the diffs are a bit hairier.
* sync with NetBSD... well almost. someone w/ the hw should check umass.fgsch2000-07-041-7/+21
|