summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhci.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Make sure to mark the controller as dying in order to stop processingmpi2013-11-071-1/+2
| | | | | | | | any transfer when autoconf(9) asks for it. This brings uhci(4) in sync with ohci(4) and ehci(4). ok pirofti@
* Reduce the differences with ehci(4)'s transfer decriptors. This is ampi2013-11-011-169/+141
| | | | | | | first step to merge the code of our controllers that deal with usbd transfers. Tested with miod@
* Move the abort_task storage to the generic USB xfer structure insteadmpi2013-11-011-6/+6
| | | | of defining it in every controller specific structure.
* Bring ohci(4) and uhci(4) in sync with ehci(4) by ensuring that ampi2013-06-251-6/+3
| | | | | | | | | | transfer is submitted when a zero-length bulk or interrupt transfer is requested. This is the missing part of FreeBSD's svn r159024 that should have been committed with ehci's r1.57. ok uebayasi@
* Enforce ca_activate tree-walks over the entire heirarchy for all events,deraadt2013-05-301-18/+7
| | | | | | cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
* Remove `abort_task' from usb task queue before recycling a `structyasuoka2013-05-201-1/+4
| | | | | | | | | usbd_xfer object' which includes the `abort_task'. Otherwise usb_abort_task_thread() may try to dequeue the recycled task then it causes panic with page fault. reported by Edd Barrett and Wade, Daniel. ok mpi
* Remove allocm() and freem() from the USB bus interface now that theympi2013-04-191-20/+1
| | | | | | are only used as wrappers around usb_{alloc,free}mem(). ok deraadt@, mglocker@
* Don't be too clever when allocating a buffer for a transfer and do notmpi2013-04-161-27/+14
| | | | | | pre-allocate TDs to put them in the free list. ok deraadt@, mglocker@
* Get rid of various 'typedef struct' definitions and use plain structuremglocker2013-04-151-285/+287
| | | | | | | | | 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@
* proc.h is way too much header for usb to handle.tedu2013-03-281-2/+1
|
* Fix typos in DPRINTF() so error messages refer to correct *hci.krw2012-08-171-2/+2
| | | | Spotted by Artturi Alm. Thanks!
* Make all *_device_*_start() functions (e.g. ohci_device_intr_start())krw2012-08-071-1/+10
| | | | | | | | | | wait for an interrupt when the bus is in polling mode. Otherwise some devices like my YE-Data USB Floppy take a short sharp trip to ddb> at 'halt -p'. Most of the functions were already doing the wait. ok miod@. With modification that printf's become DPRINTF's.
* Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thingmatthew2011-07-031-3/+1
| | | | | | | | that's ever used it, and it's long since been changed to use DVACT_{QUIESCE,SUSPEND,RESUME} instead. ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it up a few weeks ago
* use the dying flag in struct usbd_bus instead of a private dying flagjakemsr2010-12-141-16/+16
| | | | | | in *hci_softc ok miod@, krw@
* * if we got an undercoverable error, set the dying flagjakemsr2010-12-061-1/+7
| | | | | | * check the dying flag in timeout and interrupt handlers fixes crash when disconnecting cardbus usb adapters
* as in ehci and ohci, delete the interrupt timeout in the detachjakemsr2010-12-061-1/+6
| | | | routine
* Properly handle when uhci_alloc_sqh() fails to allocate memory inmatthew2010-11-211-7/+15
| | | | | | uhci_device_setintr(). ok jakemsr@
* Do not allow malloc() to wait in uhci_device_setintr(), instead check formiod2010-11-191-2/+4
| | | | | failure and return USBD_NOMEM, callers will do TRT. ok jakemser@ deraadt@ kettenis@ tedu@
* create another kthread to run xfer abort tasks. xfer abort tasks cannotjakemsr2010-10-231-2/+3
| | | | | | | | | | | be run from the generic task kthread, because xfers that need to be aborted block newly queued tasks from running (i.e. the xfer to be aborted blocks the abort of that task). as there are now three types of usb tasks, add an argument to usb_init_task() and another member to struct usb_task to specify the task type. fixes boot hangs that are showing up because we now use usb tasks to attach/detach usb devices.
* If during resume we get an interrupt, sure, be a bit noisy about itderaadt2010-09-201-2/+1
| | | | | | for now. But since it is not being handled, do not ack it on the chip. Discussed with kettenis a while back
* Fix unitialised variable access in the suspend/resume casejsg2010-09-201-1/+3
| | | | | | that crept in with rev 1.77, spotted by the clang static analyser. ok deraadt@
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-19/+2
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* All PWR_{SUSPEND,RESUME} can now be replaced by DVACT_{SUSPEND,RESUME}deraadt2010-09-061-4/+4
|
* sort DVACT_ actions according to the order likely to be usedderaadt2010-08-311-5/+5
|
* uhci is apparently is unaware that it could be on a shared interruptderaadt2010-08-311-7/+2
| | | | | It is OK to return 0 in that case, but it is not OK to print a diagnostic.
* Change powerhooks into activate functions, and provide stub powerhookderaadt2010-08-301-77/+58
| | | | | functions ok kettenis
* kill PWR_STANDBY (apm can use PWR_SUSPEND instead). While here, renumberderaadt2010-08-271-2/+1
| | | | | | | 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
* put the read macros into functions so gcc4 doesn't whinge.jsg2010-05-011-4/+22
| | | | ok marco@ oga@ miod@
* Call the existing power functions with our activate function forderaadt2009-11-261-1/+7
| | | | | the suspend and resume operations ok kettenis
* Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.kettenis2009-11-041-7/+1
| | | | ok jsing@, miod@
* Get rid of devact enum, substitute it with an int and coresponding defines.pirofti2009-10-131-2/+2
| | | | | | This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
* timeout_add -> timeout_add_msecblambert2009-07-241-3/+3
| | | | ok krw@
* ehci_alloc_sqtd_chain() was doing signed math on len, thus the great codederaadt2009-06-021-10/+11
| | | | | | | | curlen -= curlen % mps; can for very large transfers result in an intermediate variable growing larger than it should. Probably can't really happen in the real world. Do the same u_int repairs to the other matching drivers ok blambert kjell miod kettenis
* if interrupt register is all 1s, we know we are dead; ok dlgderaadt2008-11-211-1/+5
|
* add usb2.0 to usb1.1(ohci/uchi) handover request to usb subsystem.yuo2008-06-291-1/+5
| | | | | | | | | | | add new quirk entry for uvideo which is required isoc transfer. Some usb2.0 devices use isochronous transfer but current usb subsystem does not support isoc transfer in ehci(usb2.0) bus. This patch introduce new psuedo usb hub request UHF_PORT_DISOWN_TO_1_1 to handover the device to ehci to usb1.1 bus(ohci or uhci). ok mglocker@ deraadt@ fgsch@
* 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@
* correct function names on some debug and panics.fgsch2008-06-221-21/+21
|
* fix probable cut and paste error when for the virtual QH link.fgsch2008-06-211-2/+2
| | | | from netbsd via dragonfly. pointed by theo. ok by many.
* spelling fixes, from Martynas Venckus;jmc2007-11-251-2/+2
|
* KNFgilles2007-09-111-2/+2
| | | | prompted and "much better" by marco@, ok pyr@
* more M_ZERO usage.fgsch2007-09-101-3/+2
|
* Don't show debug output when an interrupt is not for us.mbalmer2007-07-201-5/+5
| | | | | | From Marc Winiger <mw@msys.ch> ok dlg, claudio.
* Replace the USB_USE_SOFTINTR macro with __HAVE_GENERIC_SOFT_INTTERUPTSmbalmer2007-06-151-7/+7
| | | | | | | | (which was used to define USB_USE_SOFTINTR). No binary changes. ok dlg, mk.
* Move the mstohz macro out of ubs_port.h and to the three places where it ismbalmer2007-06-141-1/+3
| | | | | | used. ok jsg.
* Remove the definition and use of the device_ptr_t which was a struct device *.mbalmer2007-06-121-2/+2
| | | | | | No binary change. ok mk.
* Remove the definition and use of the USBDEVNAME macro.mbalmer2007-06-101-12/+12
| | | | | | | (This might look easy, but it was a big diff. Thanks to dlg and especially jsg for looking over it; we found at least four mistakes in the initial diff.) ok jsg.
* Remove definitions and usage of usb_callout and related macros. These macrosmbalmer2007-06-101-18/+26
| | | | | | | | 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-103/+103
| | | | | | | 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 le{16,32}toh macrosjsg2007-05-211-31/+31
|
* Remove ifdef __otherbsd__ mess; no binary change.jsg2007-05-211-41/+1
|