aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usbdi_util.c
Commit message (Collapse)AuthorAgeFilesLines
* Move usb to a graveyard location under sys/legacy/dev, it is intended that theAndrew Thompson2009-02-231-539/+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
* s/logprintf/printf/gWarner Losh2007-06-201-2/+2
| | | | | | | Approved by: re@ Notes: svn path=/head/; revision=170960
* First pass at removing __OtherBSD__. We can't blindly remove all ofWarner Losh2007-06-121-5/+0
| | | | | | | | | them in bulk because there is at least one feature that's unimplemented on FreeBSD that needs to be done and these are good placeholders. Notes: svn path=/head/; revision=170629
* More removing compatibility macros.Warner Losh2006-09-071-4/+4
| | | | | | | | | md5 still the same. "Dave, stop. I feel my mind slipping away." -- hal Notes: svn path=/head/; revision=162097
* s/Static/static/gWarner Losh2006-09-061-7/+7
| | | | | | | | | | | | | 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-6/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-301-0/+1
| | | | Notes: svn path=/head/; revision=129879
* Use __FBSDID().David E. O'Brien2003-08-241-1/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Make note that we already have these NetBSD patches.Josef Karthauser2003-07-141-1/+1
| | | | Notes: svn path=/head/; revision=117591
* WARNING: white space diffJohn-Mark Gurney2003-07-041-9/+9
| | | | | | | | | 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
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).Dag-Erling Smørgrav2003-03-021-2/+2
| | | | Notes: svn path=/head/; revision=111748
* Implement outgoing interrupt pipes. It is part of the USB 1.1 spec.John Hay2003-02-281-0/+42
| | | | | | | The Lego Infrared Tower use it. Notes: svn path=/head/; revision=111680
* Replace (ab)uses of "NULL" where "0" is really meant.Archie Cobbs2002-08-221-1/+1
| | | | Notes: svn path=/head/; revision=102291
* MFNetBSD: uhid.c (1.45), ums.c (1.49), usbdi_util.c (1.35), usbdi_util.h (1.23)Josef Karthauser2002-04-071-8/+7
| | | | | | | | date: 2001/10/26 17:58:21; author: augustss; s/usbd_alloc_report_desc/usbd_read_report_desc/ Notes: svn path=/head/; revision=94131
* MFNetBSD: usbdi.c (1.85), usbdi.h (1.54), usbdi_util.c (1.37)Josef Karthauser2002-04-071-27/+7
| | | | | | | | date: 2001/11/15 15:15:59; author: augustss; usbd_interface2device_handle() cannot fail. Notes: svn path=/head/; revision=94064
* Update $NetBSD$ idents to reflect reality.Josef Karthauser2002-04-011-1/+1
| | | | Notes: svn path=/head/; revision=93558
* Merge from NetBSD:Josef Karthauser2002-04-011-7/+2
| | | | | | | | | | | | 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
* Use ANSI prototypes and declarations.Josef Karthauser2002-04-011-98/+35
| | | | Notes: svn path=/head/; revision=93538
* Merge from NetBSD:Josef Karthauser2002-04-011-10/+12
| | | | | | | | | | | ---------------------------- revision 1.26 date: 1999/11/28 22:49:53; author: augustss; state: Exp; lines: +12 -8 More USB_DEBUG and DIAGNOSTIC output. ---------------------------- Notes: svn path=/head/; revision=93536
* Don't free memory that has been freed already.Nick Hibma2001-06-301-0/+1
| | | | | | | | | | | Null the pointer after freeing the memory. PR: 27370 Submitted by: Alec Barea <alec@barea.org> MFC after: 5 days Notes: svn path=/head/; revision=79024
* Remove __P prototypes to reduce diffs between the NetBSD and FreeBSDNick Hibma2000-07-171-2/+2
| | | | | | | 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
* OpenBSD has a broken debugger that does not grok static. Use aNick Hibma2000-04-031-2/+2
| | | | | | | | | #define Static static that the OpenBSD folks can define it to be empty if they like. Notes: svn path=/head/; revision=58986
* Synchronisation with NetBSD 1999/11/27Nick Hibma1999-11-281-4/+4
| | | | | | | | | | | | | | | | | | | | - more req[uest]->xfer changes. - get the corresponding NetBSD Id's right ohci.c - move untimeout above print statement - remove usb_delay that panics the system (tsleep in intr context) when ohcidebug > 5. ugen.c - create the devices for endpoints with make_dev. uhub.c - change from using usbdebug to uhubdebug - add more debugging statements Notes: svn path=/head/; revision=53853
* Synchronisation with NetBSD as of 1999/11/16:Nick Hibma1999-11-171-70/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove superfluous header file includes.Nick Hibma1999-11-081-1/+1
| | | | | | | Pushed-By: phk Notes: svn path=/head/; revision=53027
* Major synchronisation with the NetBSD USB stack:Nick Hibma1999-10-071-12/+10
| | | | | | | | | | | | | | - 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
* Only NetBSD needs sys/device.h.Nick Hibma1999-08-291-1/+2
| | | | Notes: svn path=/head/; revision=50560
* o synchronisation with NetBSDMasahide MAEKAWA1999-08-291-8/+57
| | | | | | | | Reviewed by: Hick Hibma Obtained from: NetBSD Notes: svn path=/head/; revision=50536
* Descriptors can be delivered with short transfers.Nick Hibma1999-05-031-1/+1
| | | | Notes: svn path=/head/; revision=46380
* 1) Make debugging more selective.Nick Hibma1999-04-111-2/+2
| | | | | | | | | | 2) create function usbd_errstr which turns a usbd_status into a sensible error message 3) Change the printf in DPRINTF to logprintf which is a define for log(KERN_DEBUG, x) Notes: svn path=/head/; revision=45604
* Textual changesNick Hibma1999-01-221-1/+1
| | | | Notes: svn path=/head/; revision=43025
* Sync with NetBSD sources. Almost there. Mostly style fixes.Nick Hibma1999-01-101-5/+5
| | | | Notes: svn path=/head/; revision=42490
* Major synchronisation with NetBSD USB codeNick Hibma1999-01-071-12/+99
| | | | 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-5/+12
| | | | | | | | 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/+416
Notes: svn path=/head/; revision=41366