summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi_util.h
Commit message (Collapse)AuthorAgeFilesLines
* This commit adds full support for USB 3.0 devices in host and devicehselasky2010-10-041-0/+3
| | | | | | | | | | | | | | | | mode in the USB core. The patch mostly consists of updating the USB HUB code to support USB 3.0 HUBs. This patch also add some more USB controller methods to support more active-alike USB controllers like the XHCI which needs to be informed about various device state events. USB 3.0 HUBs are not tested yet, due to lack of hardware, but are believed to work. After this update the initial device descriptor is only read twice when we know that the bMaxPacketSize is too small for a single packet transfer of this descriptor. Approved by: thompsa (mentor)
* Reduce the need to accesss struct usb_device by providing functions to accessthompsa2010-09-021-0/+7
| | | | | | the product, manufacturer and serial strings. Submitted by: Hans Petter Selasky
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-231-0/+81
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* Move usb to a graveyard location under sys/legacy/dev, it is intended that thethompsa2009-02-231-98/+0
| | | | | | | new USB2 stack will fully replace this for 8.0. Remove kernel modules, a subsequent commit will update conf/files. Unhook usbdevs from the build.
* protect against multiple inclusion (this is useful when youluigi2007-01-031-0/+3
| | | | | | | | | | | | | | start working with third party usb modules, where sometimes it is not easy to set the inclusion order so that there are no multiple inclusions, yet you want to compile with high WARNS levels). I am not sure if there is a standard for having a leading and/or trailing _ in the macro name, the usb code seems to use both. There are still several unprotected headers here so it might be useful to do the same thing on other files as well as the need arises. MFC After: 3 days
* s/Static/static/gimp2006-09-061-3/+3
| | | | | | | | | | s/device_ptr_t/device_t/g No md5 changes in the .o's # Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit # so you need to checkout -kk to get $FreeBSD$ instead of the actual value # of the keyword.
* Merge from NetBSD.sobomax2005-03-011-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o usb_subr.c, add delta 1.119: Move usb_get_string() and make it public. o usbdi.c, bring on par with 1.106, this includes: - Make an iterator abstraction for looping through all descriptors. - Whine about not being able to figure out default language if we are debugging. - Move usb_get_string() and make it public. o usbdi.h, bring on par with 1.64, this includes: - Make an iterator abstraction for looping through all descriptors. - Move usb_get_string() and make it public. o usbdi_util.c, bring on par with 1.42, this includes: - Add usbd_get_protocol(). - Use NULL instead of 0. - Fix (mostly harmless) typo. - Move utility routine from uirda.c to usbdi_util.c. o usbdi_util.h, bring on par with 1.31, this includes: - Add usbd_get_protocol(). - Move utility routine from uirda.c to usbdi_util.c. MFC after: 3 days
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* MFNetBSD.le2004-06-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | uhid.c (1.61), author: jdolecek add support for USB_GET_DEVICEINFO and USB_GET_STRING_DESC ioctls, with same meaning as for ugen(4) usbdi_util.h (1.29), usb_quirks.c (1.50), uhid.c (1.62), ugen.c (1.68), usb_subr.c (1.114) author: mycroft Yes, some devices return incorrect lengths in their string descriptors. Rather than losing, do what Windows does: just request the maximum size, and allow a shorter response. Obsoletes the need for UQ_NO_STRINGS, and therefore these "quirks" are removed. usb_subr.c (1.116), author: mycroft In the "seemed like a good idea until I found the fatal flaw" department... Attempting to read a maximum-size string descriptor causes my kue device to go completely apeshit. So, go back to the original method, but allow the device to return a shorter string than it claimed. Obtained from: NetBSD
* WARNING: white space diffjmg2003-07-041-3/+3
| | | | | | 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.
* Implement outgoing interrupt pipes. It is part of the USB 1.1 spec.jhay2003-02-281-0/+4
| | | | The Lego Infrared Tower use it.
* MFNetBSD: uhid.c (1.45), ums.c (1.49), usbdi_util.c (1.35), usbdi_util.h (1.23)joe2002-04-071-4/+4
| | | | | date: 2001/10/26 17:58:21; author: augustss; s/usbd_alloc_report_desc/usbd_read_report_desc/
* Merge from NetBSD:joe2002-04-011-8/+3
| | | | | | | | | usb_port.h (1.33), usbdi_util.c (1.32), usbdi_util.h (1.22): ---------------------------- date: 2000/06/01 14:37:51; author: augustss; Improve some portability items. ----------------------------
* Tidy up the formatting so that it's in the style of NetBSD's copy ofjoe2002-04-011-34/+26
| | | | this file.
* Remove __P prototypes to reduce diffs between the NetBSD and FreeBSDn_hibma2000-07-171-37/+37
| | | | versions.
* Change Lennart's e-mail address.n_hibma2000-05-141-1/+1
|
* Synchronisation with NetBSD as of 1999/11/16:n_hibma1999-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | | - 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
* o synchronisation with NetBSDgehenna1999-08-291-3/+9
| | | | | Reviewed by: Hick Hibma Obtained from: NetBSD
* Textual changesn_hibma1999-01-221-1/+1
|
* Major synchronisation with NetBSD USB coden_hibma1999-01-071-3/+20
|
* Added Id to all filesn_hibma1998-12-141-0/+1
|
* Updated USB kernel sources to NetBSD sources of 1998-12-09.n_hibma1998-12-131-1/+1
| | | | | 1 bug fix and several textual changes. Preparing to feed back changes for port into NetBSD to create one source base.
* Initial commit of ported NetBSD USB stackn_hibma1998-11-261-0/+74
OpenPOWER on IntegriCloud