summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdivar.h
Commit message (Collapse)AuthorAgeFilesLines
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Merge recent USB2/EHCI related changes from NetBSD:iedowse2004-11-031-1/+6
| | | | | | | | | | | | | | | | o Reduce the interrupt delay to 2 microframes. o Follow the spec more closely when updating the overlay qTD in the QH. o No need to generate an interrupt at the data part of a control transfer, it's generated by the status transfer. o Make sure to update the data toggle on short transfers. o Turn the printf about needing toggle update into a DPRINTF. o Keep track of what high speed port (if any) a device belongs to so we can set the transaction translator fields for the transfer. o Verbosely refuse to open low/full speed pipes that depend on unimplemented split transaction support. o Fix various typos in comments. Obtained from: NetBSD
* Add pnpinfo and location information to uhub. We also keep track ofimp2004-06-301-0/+1
| | | | | | the subdevices of uhub better now to accomplish this. Submitted by: Bernd Walter
* make usb bus_dma aware.jmg2003-07-151-2/+0
| | | | Reviewed by: joe among others
* Update to reflect the NetBSD patches that are already included.joe2003-07-141-1/+1
|
* WARNING: white space diffjmg2003-07-041-2/+2
| | | | | | This code reduces the number of trailing white space to be more in line w/ NetBSD. I don't regenerate usbdevs, saving that for when it really changes.
* Synchronise the code style with NetBSD. (No functional changes).joe2002-04-071-15/+14
|
* MFNetBSD:joe2002-04-071-3/+3
| | | | | | revision 1.69 date: 2001/12/27 18:43:46; author: augustss; state: Exp; lines: +3 -3 Change some DIAGNOSTIC #defines.
* MFNetBSD:joe2002-04-071-1/+2
| | | | | | | revision 1.68 date: 2001/12/24 21:36:16; author: augustss; state: Exp; lines: +2 -1 Add some more DIAGNOSTIC tests. Make usb_match_device() match on USB_PRODUCT_ANY.
* MFNetBSD:joe2002-04-071-1/+3
| | | | | | revision 1.67 date: 2001/11/21 13:44:47; author: augustss; state: Exp; lines: +3 -1 Wrap dump routine prototypes in #ifdef USB_DEBUG
* MFNetBSD: ohci.c (1.109), uhci.c (1.144), uhub.c (1.56), usb.c (1.57),joe2002-04-071-2/+4
| | | | | | | | usbdi.c (1.86), usbdivar.h (1.66) [Some partial, because most of this was merged in a while ago] date: 2001/11/20 13:48:03; author: augustss; Keep track of device speed for USB 2.0.
* MFNetBSD: usbdi.c (1.82), usbdivar.h (1.64)joe2002-04-071-1/+7
| | | | | date: 2001/11/10 16:54:56; author: augustss; Add some dump routines for debugging.
* MFNetBSD: usb_subr.c (1.90), usbdi.c (1.83), usbdivar.h (1.65)joe2002-04-071-2/+0
| | | | | date: 2001/11/10 17:11:38; author: augustss; state: Exp; lines: +1 -2 Get rid of unused abort_handle.
* MFNetBSD: uhub.c (1.49), usb.c (1.51), usbdi.h (1.48), usbdivar.h (1.63)joe2002-04-021-2/+2
| | | | | | | | | date: 2001/01/21 19:00:06; author: augustss; Change the operation of the USB event thread. Before it only performed USB device discovery, now it can also perform (short) tasks for device drivers that need a process context, but don't have one. This is not pretty, but better than using busy-wait in an interrupt context.
* MFNetBSD: ohci.c (1.99), uhci.c (1.133), usb.c (1.49), usb_port.hjoe2002-04-011-3/+11
| | | | | | | | | (1.39), usbdi.c (1.79), usbdi.h (1.47), usbdivar.h (1.62) date: 2001/01/21 02:39:52; author: augustss; Add code to use soft interrupt to handle USB interrupt processing. Don't enable the code since it doesn't work with the kludgy Ethernet drivers.
* MFNetBSD: Update many URLs.joe2002-04-011-1/+1
|
* MFNetBSD:joe2002-04-011-1/+2
| | | | | | revision 1.60 date: 2000/12/28 10:40:36; author: augustss; state: Exp; lines: +2 -1 #define for USB_2_0
* MFNetBSD:joe2002-04-011-2/+5
| | | | | | | revision 1.58 date: 2000/06/24 04:12:53; author: thorpej; state: Exp; lines: +5 -2 Kill SPLUSBCHECK -- it's not portable, and quite annoying on some platforms which otherwise function just fine.
* Use ANSI prototypes and declarations.joe2002-04-011-1/+1
| | | | Update $NetBSD$ idents to better reflect reality.
* Update $NetBSD$ idents to better reflect reality.joe2002-04-011-1/+1
|
* Remove __P.alfred2002-03-201-2/+2
|
* Huge merge from NetBSD:joe2002-03-161-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usbdi.c (1.61): =================================================================== revision 1.61 date: 2000/01/31 20:13:07; author: augustss; lines: +20 -4 Change the way the HC done method is invoked a little. =================================================================== usbdi.c (1.65): =================================================================== revision 1.65 date: 2000/03/08 15:34:10; author: augustss; lines: +4 -2 Get the status right when a polled transfer times out. =================================================================== ohci.c (1.79), uhci.c (1.89), uhcivar.h (1.24), usb_port.h (1.22), usbdivar.h (1.48): =================================================================== date: 2000/03/23 07:01:46; author: thorpej; New callout mechanism with two major improvements over the old timeout()/untimeout() API: - Clients supply callout handle storage, thus eliminating problems of resource allocation. - Insertion and removal of callouts is constant time, important as this facility is used quite a lot in the kernel. The old timeout()/untimeout() API has been removed from the kernel. =================================================================== uhci.c (1.80), usbdi.c (1.66): =================================================================== date: 2000/03/23 18:59:10; author: thorpej; Shake out some bugs from the callout changes. =================================================================== ohci.c (1.80), uhci.c (1.91), uhcivar.h (1.25), usb_port.h (1.23), usbdi.c (1.67), usbdivar.h (1.49): =================================================================== date: 2000/03/24 22:03:30; author: augustss; Some cleanup and renaming of the callouts used in USB drivers. =================================================================== uhci.c (1.92), uhcivar.h (1.26): =================================================================== date: 2000/03/24 22:57:58; author: augustss; Two major changes: Make each xfer have its own intr_info. This is necessary if we want to queue multiple xfers on an endpoint. This should get rid of the (mostly harmless) DIAGNOSTICs about intr_infos (not) being done. Change (again!) how xfers are aborted. Aborting a TD is a nightmare on the braindead UHCI controller. (Unless you stop the HC, thereby losing isoc traffic.) Hopefully I got it right this time. =================================================================== usbdivar.h (1.50): =================================================================== revision 1.50 date: 2000/03/25 00:10:19; author: augustss; lines: +4 -2 GC an unsued field and add some DIAGNOSTIC in xfer. =================================================================== ums.c: Use the callout functions instead of the timeout ones. uhci.c (1.93): =================================================================== revision 1.93 date: 2000/03/25 00:11:21; author: augustss; lines: +26 -1 Add more DIAGNOSTIC when aborting isoc. =================================================================== uhci.c (1.94), usbdivar.h (1.51): =================================================================== date: 2000/03/25 07:13:05; author: augustss; More DIAGNOSTIC. Initialize a callout handle I forgot. =================================================================== uhci.c (1.95): =================================================================== revision 1.95 date: 2000/03/25 07:23:12; author: augustss; Exp; lines: +24 -7 Improve uhci_dump_ii(). =================================================================== ohci.c (1.81), uhci.c (1.96), uhcivar.h (1.27), usb_subr.c (1.68), usbdi.c (1.68), usbdivar.h (1.52): =================================================================== date: 2000/03/25 18:02:33; author: augustss; Rename and move around callout handles to make it more sane. Add some DIAGNOSTIC. Fix buglet in isoc abort on UHCI. =================================================================== uhci.c (1.98): =================================================================== revision 1.98 date: 2000/03/27 07:39:48; author: augustss; lines: +12 -4 Make it compile without DIAGNOSTIC. =================================================================== uhci.c (1.99): =================================================================== revision 1.99 date: 2000/03/27 08:01:09; author: augustss; lines: +1 -5 Remove some debug nonsense. =================================================================== uhci.c (1.100): =================================================================== revision 1.100 date: 2000/03/27 09:41:36; author: augustss; lines: +13 -3 Don't mess with QH in bulk abort for the moment. =================================================================== uhci.c (1.102): =================================================================== revision 1.102 date: 2000/03/27 22:42:57; author: augustss; lines: +66 -26 Be a little more careful when aborting. Preallocate some TDs for large buffers. =================================================================== uhci.c (1.103): =================================================================== date: 2000/03/28 09:47:10; author: augustss; lines: +11 -1 Another patch for xfer abort... XXX The current xfer queueing and aborting semantics should really XXX be changed. It cannot be implemented in a sane way on UHCI. XXX One day when I have lots of time I'll redesign it... =================================================================== uhci.c (1.104): Correct a debug message. uhci.c (1.105): Be more defensive in a DIAGNOSTIC test. uhci.c (1.106): =================================================================== revision 1.106 date: 2000/03/29 01:49:13; author: augustss; lines: +14 -309 *SIGH* Revert back to the old method of aborting xfers. I had tested the new stuff for two months now, but as soon as I commited it the problems started to appear. Murphy, no doubt... =================================================================== usb_subr.c (1.70), usbdi.c (1.71), usbdivar.h (1.53): =================================================================== revision 1.70 date: 2000/03/29 01:45:20; author: augustss; lines: +2 -1 Do not accept new xfers for queuing while a pipe is aborting. ===================================================================
* Merge from NetBSD:joe2002-02-161-1/+1
| | | | | | Pave the way for USB2, by replacing 'lowspeed' with 'speed', so that it can take the values USB_SPEED_LOW, USB_SPEED_FULL or in time USB_SPEED_HIGH.
* Merge from NetBSD:joe2002-01-261-2/+3
| | | | | | | | | | | | | | | | | | ohci.c: revision 1.72 and 1.73 ohcivar.h: revision 1.19 and 1.20 uhci.c: revision 1.85 usbdi.h: a small part of revision 1.40 usbdivar.h: revision 1.47 Relevant commit messages from NetBSD are: date: 2000/02/22 11:30:54; author: augustss; state: Exp; Prepare a little for having USB interrupt processing done outside the hard interrupt level (in a thread or a softintr). No real soft processing done yet. ---------------------------- date: 2000/02/01 05:42:53; author: augustss; state: Exp; Put some #ifdefs around power and shutdown hooks.
* Pull in the most recent version of usb_quirks.h and propagate the necessaryn_hibma2001-07-051-2/+1
| | | | | | changes to the various files. Also, pull in most of the current usb_subr.c file.
* Remove __P prototypes to reduce diffs between the NetBSD and FreeBSDn_hibma2000-07-171-38/+38
| | | | versions.
* Back out the previous change to the queue(3) interface.jake2000-05-261-4/+4
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-4/+4
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Change Lennart's e-mail address.n_hibma2000-05-141-1/+1
|
* remove "extern int cold" from SPLUSBCHECK - it causes a heap of warnings.peter2000-01-231-1/+0
|
* More USB ethernet tweaks:wpaul2000-01-201-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Sync ohci, uhci and usbdi modules with NetBSD in order to obtain the following improvements: o New USBD_NO_TSLEEP flag can be used in place of UQ_NO_TSLEEP quirk. This allows drivers to specify busy waiting only for certain transfers (namely control transfers for reading/writing registers and stuff). o New USBD_FORCE_SHORT_XFER flag can be used to deal with devices like the ADMtek Pegasus that sense the end of bulk OUT transfers in a special way (if a transfer is exactly a multiple of 64 bytes in size, you need to send an extra empty packet to terminate the transfer). o usbd_open_pipe_intr() now accepts an interval argument which can be used to change the rate at which the interrupt callback routine is invoked. Specifying USBD_DEFAULT_INTERVAL uses the value specified in the device's config data, but drivers can override it if needed. - Change if_aue to use USBD_FORCE_SHORT_XFER for packet transmissions. - Change if_aue, if_kue and if_cue to use USBD_NO_TSLEEP for all control transfers. We no longer force the non-tsleep hack for bulk transfers since these are done asynchronously anyway. - Removed quirk entry fiddling from if_aue and if_kue since we don't need it anymore now that we have the USBD_NO_TSLEEP flag. - Tweak ulpt, uhid, ums and ukbd drivers to use the new arg to usbd_open_pipe_intr(). - Add a flag to the softc struct in the ethernet drivers to indicate when a device has been detached, and use this flag to perform tests to prevent the drivers from trying to do control transfers if this is the case. This is necessary because calling if_detach() with INET6 enabled will eventually result in a call to the driver's ioctl() routine to delete the multicast groups on the interface, which will result in attempts to perform control transfers. (It's possible this also happens even without INET6 support enabled.) This is pointless since we know that if the detach method has been called, the hardware has been unplugged. - Changed watchdog timeout routines to just call the driver init routines to initialize the device states without trying to close and re-open the pipes. This is partly because we don't want to frob things at interrupt context, but also because this doesn't seem to work right and I don't want to panic the system just because a USB device may have stopped responding. - Fix aue_rxeof() to be a little smarter about detecting when a double transfer is needed. Unfortunately, the design of the chip makes it hard to get this exactly right. Hopefully, this will go away once either Nick or Lennart finds the bug in the uhci driver that makes this ugly hack necessary. - Also sync usbdevs with NetBSD.
* Add USB revision strings and numbers.n_hibma1999-11-281-2/+9
|
* Synchronisation with NetBSD as of 1999/11/16:n_hibma1999-11-171-13/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up the code: - Declare many functions static - Change variable names to make them more self explanatory - Change usbd_request_handle -> usbd_xfer_handle - Syntactical changes - Remove some unused code - Other KNF changes Interrupt context handling - Change delay to usbd_delay_ms were possible (takes polling mode into account) - Change detection mechanism for interrupt context Add support for pre-allocation DMA-able memory by device driver Add preliminary support for isochronous to the UHCI driver (not for OHCI yet). usb.c, uhci.c, ohci.c - Initial attempt at detachable USB host controllers - Handle the use_polling flag with a lttle more care and only set it if we are cold booting. usb.c, uhci.c ohci.c, usbdi.c usbdi_util.c usb_subr.c - Make sure an aborted pipe is marked as not running. - Start queued request in the right order. - Insert some more DIAGNOSTIC sanity checks. - Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN. usb.c, usb_subr.c - Add an event mechanism so that a userland process can watch devices come and go. ohci.c - Handle the case when a USB transfer is so long that it crosses two page (4K) boundaries. OHCI cannot do that with a single TD so we make a chain. ulpt.c - Use a bigger buffer when transferring data. - Pre-allocate the DMA buffer. This makes the driver slightly more efficient. - Comment out the GET_DEVICE_ID code, because for some unknown reason it causes printing to fail sometimes. usb.h - Add a macro to extract the isoc type. - Add a macro to check whether the routine has been entered after splusb and if not, complain. usbdi.c - Fix a glitch in dequeueing and aborting requests on interrupt pipes. - Add a flag in the request to determine if the data copying is done by the driver or the usbdi layer.
* Major synchronisation with the NetBSD USB stack:n_hibma1999-10-071-36/+64
| | | | | | | | | | | - Some cleanup and improvements in the uhci and ohci drivers - Support for plugging and unplugging devices improved - Now available is bulk transport over OHCI controllers - Resume and suspend have been temporarily been disabled again. Proper support for it is available in the uhci.c and ohci.c files but I have not yet spent the brain cycles to use it. - OpenBSD now uses the USB stack as well - Add FreeBSD tags
* Add comments, change variable names to make them consistent (r -> err,n_hibma1999-07-251-1/+1
| | | | timo_handle -> timeout_handle, p -> pipe, *pipe -> *rpipe, etc.)
* Textual changesn_hibma1999-01-221-2/+4
|
* Sync with NetBSD sources. Almost there. Mostly style fixes.n_hibma1999-01-101-6/+2
|
* Major synchronisation with NetBSD USB coden_hibma1999-01-071-43/+37
|
* Added Id to all filesn_hibma1998-12-141-0/+2
|
* Updated USB kernel sources to NetBSD sources of 1998-12-09.n_hibma1998-12-131-0/+5
| | | | | 1 bug fix and several textual changes. Preparing to feed back changes for port into NetBSD to create one source base.
* Various bug fixes:n_hibma1998-12-091-3/+2
| | | | | | | | 1) Removed 'emulation' of bitmaps in printfs, FreeBSD seems to have caught up on that one 2) Fixed a few bugs in the timeout/timo timeout variables 3) First attempt at fixing a bug mentioned by Kazu: uhci_run is not able start/stop his USB host on his motherboard.
* Initial commit of ported NetBSD USB stackn_hibma1998-11-261-0/+231
OpenPOWER on IntegriCloud