summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/template
Commit message (Collapse)AuthorAgeFilesLines
* MFC r305421:hselasky2016-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Resolve deadlock between device_detach() and usbd_do_request_flags() by reviving the SX control request lock and refining which lock protects the common scratch area in "struct usb_device". The SX control request lock was removed by r246759 because it caused a lock order reversal with the USB enumeration lock inside usbd_transfer_setup() as a function of r246616. It was thought that reducing the number of locks would resolve the LOR, but because some USB device drivers use usbd_do_request_flags() inside callback functions, like in taskqueues, a deadlock may occur when these are drained from device_detach(). By restoring the SX control request lock usbd_do_request_flags() is allowed to complete its execution when a USB device driver is detaching. By using the SX control request lock to protect the scratch area, the LOR introduced by r246616 is also resolved. Bump the FreeBSD version while at it to force recompilation of all USB kernel modules. Found by: avos@
* MFC r269567:hselasky2014-08-133-3/+426
| | | | Add new USB phone descriptor template for USB device side mode.
* - Add more defines to limit USB memory usage and number of allocationshselasky2013-05-031-7/+4
| | | | | | | | in reduced memory systems. - Split allocation and freeing of the configuration descriptor into a separate function, so that the configuration descriptor can be made fixed size to save memory allocations. This applies for both device and host mode.
* - Move scratch data from the USB bus structure to the USB device structurehselasky2013-02-101-26/+39
| | | | | | | | | | so that simultaneous access cannot happen. Protect scratch area using the enumeration lock. Also reduce stack usage in usbd_transfer_setup() by moving some big stack members to the scratch area. This saves around 200 bytes of stack. - Fix a whitespace. MFC after: 1 week
* Use string literals in string descriptors for marginallyhselasky2013-01-307-101/+30
| | | | | | better readability. Submitted by: Christoph Mallon
* Provide one global language string descriptor forhselasky2013-01-307-42/+22
| | | | | | | american english instead of giving each module its own. Submitted by: Christoph Mallon
* Modify the FreeBSD USB kernel code so that it can be compiled directlyhselasky2013-01-308-21/+39
| | | | | | | | | | | | | | | | | | | | | | into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems or embedded platforms. This is also useful for out of the system compilation of the FreeBSD USB stack for various purposes. The USB kernel files can now optionally include a global header file which should include all needed definitions required to compile the FreeBSD USB stack. When the global USB header file is included, no other USB header files will be included by default. Add new file containing the USB stack configuration for the FreeBSD loader build. Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all USB files follow the same style. Use cases: - console in loader via USB - loading kernel via USB Discussed with: Hiroki Sato, hrs @ EuroBSDCon
* Remove some extra and not needed space characters.hselasky2013-01-283-3/+3
| | | | MFC after: 1 week
* Fix compiler warnings, mostly signed issues,hselasky2012-04-021-1/+1
| | | | | | when USB modules are compiled with WARNS=9. MFC after: 1 weeks
* Correct some bInterval USB template descriptor values.hselasky2011-12-064-10/+10
| | | | MFC after: 3 days
* Style change.hselasky2011-11-121-2/+2
| | | | | | | | | | | | - 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 some comments about the origin of some USB descriptors.hselasky2011-06-233-1/+10
| | | | MFC after: 7 days
* - Add more USB templates for various USB device classeshselasky2011-06-239-11/+1155
| | | | | | | - Add basic template support for USB 3.0 - Export definition of template sysctl numbers through usb_ioctl.h MFC after: 7 days
* Minor cleanup:hselasky2011-02-091-1/+1
| | | | | | | | - use device_printf() instead of printf() to give more accurate warnings. - use memcpy() instead of bcopy(). - add missing #if's for non-FreeBSD compilation. Approved by: thompsa (mentor)
* Remove unneeded includes of <sys/linker_set.h>. Other headers that usejhb2011-01-114-4/+0
| | | | | | it internally contain nested includes. Reviewed by: bde
* isochronous endpoint descriptors should have two more bytes which are zero bythompsa2010-03-111-7/+16
| | | | | | default. Submitted by: Hans Petter Selasky
* - make the usb_temp_setup() and usb_temp_unsetup() functions public so thatthompsa2010-03-113-21/+17
| | | | | | | | | other modules can generate USB descriptors. - extend the vendor specific request function by one length pointer argument, because not all descriptors store the length in the first byte. For example HID descriptors. Submitted by: Hans Petter Selasky
* Remove overuse of exclamation marks in kernel printfs, there mere fact athompsa2009-11-261-3/+3
| | | | | | 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.
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-234-19/+91
| | | | - 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-155-130/+130
|
* s/usb2_/usb_/ on all typedefs for the USB stack.thompsa2009-05-291-9/+9
|
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-285-149/+149
|
* Use enums for speed and rev data types.thompsa2009-05-211-8/+8
|
* MFp4 //depot/projects/usb@160930thompsa2009-04-221-3/+4
| | | | | | | 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
* 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
* Also use proper capitalisation of FreeBSD in other source files.ed2009-02-244-4/+4
| | | | Approved by: thompsa
* Move the new USB stack into its new home.thompsa2009-02-235-0/+2167
OpenPOWER on IntegriCloud