aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usbdi_util.h
Commit message (Collapse)AuthorAgeFilesLines
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* This commit adds full support for USB 3.0 devices in host and deviceHans Petter Selasky2010-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) Notes: svn path=/head/; revision=213435
* Reduce the need to accesss struct usb_device by providing functions to accessAndrew Thompson2010-09-021-0/+7
| | | | | | | | | the product, manufacturer and serial strings. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=212136
* - Make struct usb_xfer opaque so that drivers can not access the internalsAndrew Thompson2009-06-231-0/+81
| | | | | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h Notes: svn path=/head/; revision=194677
* Move usb to a graveyard location under sys/legacy/dev, it is intended that theAndrew Thompson2009-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. Notes: svn path=/head/; revision=188939
* protect against multiple inclusion (this is useful when youLuigi Rizzo2007-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 Notes: svn path=/head/; revision=165749
* s/Static/static/gWarner Losh2006-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. Notes: svn path=/head/; revision=162095
* Merge from NetBSD.Maxim Sobolev2005-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 Notes: svn path=/head/; revision=142883
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* MFNetBSD.Lukas Ertl2004-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 Notes: svn path=/head/; revision=131139
* WARNING: white space diffJohn-Mark Gurney2003-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. Notes: svn path=/head/; revision=117213
* Implement outgoing interrupt pipes. It is part of the USB 1.1 spec.John Hay2003-02-281-0/+4
| | | | | | | The Lego Infrared Tower use it. Notes: svn path=/head/; revision=111680
* MFNetBSD: uhid.c (1.45), ums.c (1.49), usbdi_util.c (1.35), usbdi_util.h (1.23)Josef Karthauser2002-04-071-4/+4
| | | | | | | | date: 2001/10/26 17:58:21; author: augustss; s/usbd_alloc_report_desc/usbd_read_report_desc/ Notes: svn path=/head/; revision=94131
* Merge from NetBSD:Josef Karthauser2002-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. ---------------------------- Notes: svn path=/head/; revision=93543
* Tidy up the formatting so that it's in the style of NetBSD's copy ofJosef Karthauser2002-04-011-34/+26
| | | | | | | this file. Notes: svn path=/head/; revision=93542
* Remove __P prototypes to reduce diffs between the NetBSD and FreeBSDNick Hibma2000-07-171-37/+37
| | | | | | | versions. Notes: svn path=/head/; revision=63319
* Change Lennart's e-mail address.Nick Hibma2000-05-141-1/+1
| | | | Notes: svn path=/head/; revision=60545
* Synchronisation with NetBSD as of 1999/11/16:Nick 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. Notes: svn path=/head/; revision=53313
* Major synchronisation with the NetBSD USB stack:Nick 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 Notes: svn path=/head/; revision=51991
* o synchronisation with NetBSDMasahide MAEKAWA1999-08-291-3/+9
| | | | | | | | Reviewed by: Hick Hibma Obtained from: NetBSD Notes: svn path=/head/; revision=50536
* Textual changesNick Hibma1999-01-221-1/+1
| | | | Notes: svn path=/head/; revision=43025
* Major synchronisation with NetBSD USB codeNick Hibma1999-01-071-3/+20
| | | | Notes: svn path=/head/; revision=42384
* Added Id to all filesNick Hibma1998-12-141-0/+1
| | | | Notes: svn path=/head/; revision=41783
* Updated USB kernel sources to NetBSD sources of 1998-12-09.Nick 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. Notes: svn path=/head/; revision=41736
* Initial commit of ported NetBSD USB stackNick Hibma1998-11-261-0/+74
Notes: svn path=/head/; revision=41366