summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_request.c
Commit message (Collapse)AuthorAgeFilesLines
* Style change.hselasky2011-11-121-1/+1
| | | | | | | | | | | | - Make it easier to port the USB code to other platforms by only using one set of memory functions for clearing and copying memory. None of the memory copies are overlapping. This means using bcopy() is not required. - Fix a compile warning when USB_HAVE_BUSDMA=0 - Add missing semicolon in avr32dci. - Update some comments. MFC after: 1 week
* Add sysctl to not reset the device on clear stall failures, tohselasky2011-08-191-1/+13
| | | | | | | temporarily mitigate problems with VMs. Approved by: re (kib) MFC after: 1 week
* Do not block zero report ID. It is correct value for devices with singlemav2011-08-091-1/+1
| | | | | | | | | ID. This fixes USB_SET_IMMED call (synchronous operation) of the uhid(4) driver on devices with single report ID. Reviewed by: hselasky Approved by: re (kib) MFC after: 1 week
* Fix for VirtualBox 4.x and other virtual machines that failhselasky2011-07-161-7/+28
| | | | | | to generate a port reset change event. MFC after: 1 weeks
* Improve enumeration of Low- and Full-speed devices connected through ahselasky2011-06-061-1/+99
| | | | | | | | | High-speed USB HUB by resetting the transaction translator (TT) before trying re-enumeration. Also when clear-stall fails multiple times try a re-enumeration. Suggested by: Trevor Blackwell MFC after: 14 days
* Remove unneeded includes of <sys/linker_set.h>. Other headers that usejhb2011-01-111-1/+0
| | | | | | it internally contain nested includes. Reviewed by: bde
* Re-add a status check which sneaked out during r214804.hselasky2010-12-071-0/+4
| | | | | | | | This change can fix some USB error messages showing up during bootup. MFC after: 3 days Approved by: thompsa (mentor)
* Add code to warm reset a USB 3.0 port.hselasky2010-11-041-4/+97
| | | | Approved by: thompsa (mentor)
* This commit adds full support for USB 3.0 devices in host and devicehselasky2010-10-041-24/+187
| | | | | | | | | | | | | | | | 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)
* Add more strict USB string filtering.hselasky2010-10-041-6/+13
| | | | Approved by: thompsa (mentor)
* Reduce diffs to p4.thompsa2010-05-121-24/+163
| | | | | | | Add test code for delaying or failing usb control requests, disabled by default under ifdef USB_REQ_DEBUG. Submitted by: Hans Petter Selasky
* If a USB device is suspended and a USB set config request is issued when thethompsa2010-05-121-6/+18
| | | | | | | | | | USB enumeration lock is locked, then the USB stack fails to resume the device because locking the USB enumeration lock is part of the resume procedure. To solve this issue a new lock is introduced which only protects the suspend and resume callbacks, which can be dropped inside the usbd_do_request_flags() function, to allow suspend and resume during so-called enumeration operations. Submitted by: Hans Petter Selasky
* Use a more obvious prefix for the USB control (endpoint 0) transfers ratherthompsa2010-04-221-2/+2
| | | | than default_*.
* Properly name the sxlocks, mutexes and condvars.thompsa2010-04-221-4/+4
|
* Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this hadthompsa2010-04-221-6/+6
| | | | | | the illusion of a tunable setting but was always turned on regardless. MFC after: 1 week
* Remove overuse of exclamation marks in kernel printfs, there mere fact athompsa2009-11-261-2/+2
| | | | | | message has been printed is enough to get someones attention. Also remove the line number for DPRINTF/DPRINTFN, it already prints the funtion name and a unique message.
* USB core:alfred2009-07-301-4/+4
| | | | | | | | | | | | | | | - add support for defragging of written device data. - improve handling of alternate settings in device side mode. - correct return value from usbd_get_no_alts() function. - reported by: HPS - P4 ID: 166156, 166168 - report USB device release information to devd and pnpinfo. - reported by: MIHIRA Sanpei Yoshiro - P4 ID: 166221 Submitted by: hps Approved by: re
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-231-9/+29
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.thompsa2009-06-151-152/+152
|
* Remove usb2_cv_* and just use the kernel condvar implementation, it was neededthompsa2009-06-151-2/+2
| | | | | earlier since condition variables didnt work with Giant but this was fixed 10 months ago.
* Rename usb pipes to endpoints as it better represents what they are, and structthompsa2009-06-071-25/+25
| | | | usb_pipe may be used for a different purpose later on.
* Reorgansise the logic for tranversing the pipe list.thompsa2009-06-021-9/+9
| | | | Submitted by: Hans Petter Selasky
* s/usb2_/usb_/ on all typedefs for the USB stack.thompsa2009-05-291-48/+48
|
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-281-86/+86
|
* Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.thompsa2009-05-211-3/+3
| | | | Submitted by: Hans Petter Selasky
* - rename usb2_mode to usb_mode [1]thompsa2009-05-211-2/+2
| | | | | | - change variable types to use the enum Submitted by: Hans Petter Selasky [1]
* Track the usb device state as its powered on, addressed and configured. This ↵thompsa2009-04-251-0/+6
| | | | | | | | | helps to avoid touching the device when it is not going to respond and would otherwise timeout. Implement the suspend tracking as a udev state too.
* MFp4 //depot/projects/usb@160930thompsa2009-04-221-56/+59
| | | | | | | Change the roothub exec functions to take the usb request and data pointers directly rather than placing them on the parent bus struct. Submitted by: Hans Petter Selasky
* Provide a better commit log for r190735, forced by making a whitespace change.thompsa2009-04-061-1/+1
| | | | | | | | | | | | Refactor how we interface with the root HUB. This is achieved by making a direct call from usb2_do_request to the host controller for root hub requests, this call will perform the controller specific register read/writes and return the error code. This cuts out a lot of code in the host controller files and saves one thread per USB bus. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159948thompsa2009-04-051-5/+8
| | | | | | Add more debugging output on enumeration failures. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159922thompsa2009-04-051-6/+58
| | | | | | | Refactor how we interface with the root HUB. This cuts around 1200 lines of code totally and saves one thread per USB bus. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159909thompsa2009-04-051-6/+7
| | | | | | | | | | | | | - make usb2_power_mask_t 16-bit - remove "usb2_config_sub" structure from "usb2_config". To compensate for this "usb2_config" has a new field called "usb_mode" which select for which mode the current xfer entry is active. Options are: a) Device mode only b) Host mode only (default-by-zero) c) Both modes. This change was scripted using the following sed script: "s/\.mh\././g". - the standard packet size table in "usb_transfer.c" is now a function, hence the code for the function uses less memory than the table itself. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159871thompsa2009-04-051-3/+4
| | | | | | | | - bugfixes after the memory usage reduction patch - Use "udev->pipes_max" instead of USB_EP_MAX - Use correct "bmRequestType" for getting the config descriptor. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159811thompsa2009-04-051-0/+34
| | | | | | First patch in a series of memory save patches. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb @159431,159437,159438thompsa2009-03-201-7/+7
| | | | | | | - start using the new USB typedefs in the USB core - Remove usage of USB_ADD_BYTES() Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159392thompsa2009-03-201-7/+15
| | | | | | Add ifdefs for making parts of usb conditional. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb @159430thompsa2009-03-201-1/+0
| | | | | | | | | | - Move tunable defines into usb_core.h and dependancy towards usb_defs.h - Leave hardcoded defines in "usb_defs.h". - Allow overriding all tunable defines. - Add more customisable typedefs. - Correct maximum device number. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@157909thompsa2009-02-241-14/+27
| | | | | | Changes to make implementing USB NDIS easier. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@157853thompsa2009-02-241-10/+2
| | | | | | | Clean up old way of polling the USB hardware. The existing polling support was a bit hackish. Submitted by: Hans Petter Selasky
* Move the new USB stack into its new home.thompsa2009-02-231-0/+1486
OpenPOWER on IntegriCloud