summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usbdi.h
Commit message (Collapse)AuthorAgeFilesLines
* Resolve a deadlock setting the USB configuration index from userspacehselasky2014-06-081-0/+2
| | | | | | | | | | on USB HUBs by moving the code into the USB explore threads. The deadlock happens because child devices of the USB HUB don't have the expected reference count when called from outside the explore thread. Only the HUB device itself, which the IOCTL interface locks, gets the correct reference count. MFC after: 3 days
* Workaround for USB MIDI adapters which use non-supported values ofhselasky2014-03-141-0/+1
| | | | | | wMaxPacketSize for BULK endpoints. MFC after: 1 week
* USB method structures for USB controllers and USB pipes should behselasky2013-12-111-1/+1
| | | | | constant and does not need to be modified. This also saves a small amount of RAM.
* Make use of USB ID sections configurable.hselasky2013-02-011-0/+9
|
* Modify the FreeBSD USB kernel code so that it can be compiled directlyhselasky2013-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* Allocate separate USB buffers for DMA'ed data, so thathselasky2012-12-201-2/+2
| | | | | | | | | | | | | DMA data does not reside next to non DMA data. This might cause more memory to be allocated, but solves problems on platforms using manual cache synchronization. Add a convenience function to get the buffer only from a USB transfer's page cache structure. MFC after: 1 week Suggested by: imp
* Add support for the so-called streams feature of BULK endpointshselasky2012-08-121-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in SUPER-speed mode, USB 3.0. This feature has not been tested yet, due to lack of hardware. This feature is useful when implementing protocols like UASP, USB attached SCSI which promises higher USB mass storage throughput. This patch also implements support for hardware processing of endpoints for increased performance. The switching to hardware processing of an endpoint is done via a callback to the USB controller driver. The stream feature is implemented like a variant of a hardware USB protocol. USB controller drivers implementing device mode needs to be updated to implement the new "xfer_stall" USB controller method and remove the "xfer" argument from the "set_stall" method. The API's toward existing USB drivers are preserved. To setup a USB transfer in stream mode, set the "stream_id" field of the USB config structure to the desired value. The maximum number of BULK streams is currently hardcoded and limited to 8 via a define in usb_freebsd.h. All USB drivers should be re-compiled after this change. LibUSB will be updated next week to support streams mode. A new IOCTL to setup BULK streams as already been implemented. The ugen device nodes currently only supports stream ID zero. The FreeBSD version has been bumped. MFC after: 2 weeks
* Fix compiler warnings, mostly signed issues,hselasky2012-04-021-1/+1
| | | | | | when USB modules are compiled with WARNS=9. MFC after: 1 weeks
* Refactor auto-quirk solution so that we break as few externalhselasky2011-09-101-1/+0
| | | | | | | | | drivers as possible. PR: usb/160299 Approved by: re (kib) Suggested by: rwatson MFC after: 0 days
* This patch adds automatic detection of USB mass storage deviceshselasky2011-09-021-0/+3
| | | | | | | | | | | | which does not support the no synchronize cache SCSI command. The __FreeBSD_version version macro has been bumped and external kernel modules needs to be recompiled after this patch. Approved by: re (kib) MFC after: 1 week PR: usb/160299
* Use synchronous device destruction instead of asynchronous, so that a newhselasky2011-08-111-1/+2
| | | | | | | | | device having the same name like a previous one is not created before the old one is gone. This fixes some panics due to asserts in the devfs code which were added recently. Approved by: re (kib) MFC after: 1 week
* - Export the USB device ID format to userspace tools.hselasky2011-06-251-1/+7
| | | | MFC after: 14 days
* - Move all USB device ID arrays into so-called sections,hselasky2011-06-241-0/+12
| | | | | | | | | | | | sorted according to the mode which they support: host, device or dual mode - Add generic tool to extract these data: tools/bus_autoconf Discussed with: imp Suggested by: Robert Millan <rmh@debian.org> PR: misc/157903 MFC after: 14 days
* Improve enumeration of Low- and Full-speed devices connected through ahselasky2011-06-061-0/+1
| | | | | | | | | 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
* usb: change to one-pass probing of device driversavg2011-05-181-1/+0
| | | | | | | | | | | | | | | | | | | | | This brings USB bus more in line with how newbus is supposed to be used. Also, because of the two-pass probing the following message was produced by devd in default configuration when almost any USB device was connected: Unknown USB device: vendor <> product <> bus <> This should be fixed now. Note that many USB device drivers pass some information from probe method to attach method via ivars. For this to continue working we rely on the fact that the subr_bus code calls probe method of a winning driver again before calling its attach method in the case where multiple drivers claim to support a device. This is done because device description is set in successful probe methods and we want to get a correct device description from a winning driver. So now this logic is re-used for setting ivars too. Reviewed by: hselasky MFC after: 1 month
* - Improvements to USB PF solutionhselasky2011-04-031-0/+2
| | | | | | | | | | | | | | - Add more fields for USB device and host mode - Add more information to USB PF header so that decoding can easily be done by software analyzer tools like Wireshark. - Optimise usbdump to display USB streams in text format more efficiently. - Software using USB PF must be recompiled after this commit, due to structure changes. MFC after: 7 days Approved by: thompsa (mentor)
* - Add support for software pre-scaling of ISOCHRONOUS transfers.hselasky2011-02-281-0/+10
| | | | | MFC after: 14 days Approved by: thompsa (mentor)
* Add support for setting per-interface PnP information.hselasky2010-10-271-0/+3
| | | | | Submitted by: Nick Hibma Approved by: thompsa (mentor)
* This commit adds full support for USB 3.0 devices in host and devicehselasky2010-10-041-0/+1
| | | | | | | | | | | | | | | | 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 support for power mode filtering as some USB hardware does not supportthompsa2010-09-021-0/+1
| | | | | | power saving. Submitted by: Hans Petter Selasky
* Use the EVENTHANDLER system to hook into the usb device configuration andthompsa2009-12-171-0/+12
| | | | | | | perform a function such as ejecting a 3G autoinstaller disk. The eventhandler system properly tracks threads and is safe to unload, remove the setting/clearing of a function pointer in the kernel by u3g(4) which included a tsleep for safety.
* Improve High Speed slot allocation mechanism by moving the computation to thethompsa2009-11-221-1/+10
| | | | | | endpoint rather than per xfer and provide functions around get/free of resources. Submitted by: Hans Petter Selasky
* improve support for high speed isochronous endpoints which does not run 1:1,thompsa2009-11-081-0/+1
| | | | | | but needs intervalling 1:2, 1:4 or 1:8 Submitted by: Hans Petter Selasky
* Missed this file for r195963:alfred2009-07-301-0/+3
| | | | | | | | | | | | | | | | USB core: - 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
* Sync to p4thompsa2009-06-271-0/+3
| | | | | | | | | - Add support for devices that handle set and clear stall in hardware. - Add missing get timestamp function - Add more xfer flags Submitted by: Hans Petter Selasky Approved by: re (kib)
* Fix a typeo in the frame len function to unbreak the build, make it shorterthompsa2009-06-231-2/+2
| | | | while I am here.
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-231-0/+532
| | | | - 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-289/+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.
* Merge WIP from p4:sam2008-12-131-1/+2
| | | | | | | | | | | | | | | | | | o recognize ixp435 cpu o change memory layout for for ixp4xx to not assume memory is aliases to 0x10000000 (Cambria/ixp435 memory starts at zero) o handle 64 irqs for ixp435 o dual EHCI USB 2.0 controller integral to ixp435 o overhaul NPE code for ixp435 and better MAC+MII naming o updated NPE firmware (including NPE-A image for ixp435/ixp465) o Gateworks Cambria board support: - IDE compact flash - MCU - front panel LED on i2c bus - Octal LED latch Sanity-tested with NFS-root on Avila and Cambria boards. Requires pending boot2 mods for CF-boot on Cambria.
* Add a reset device command to ugen.c.n_hibma2008-11-131-0/+1
| | | | | This is needed to make some devices work that require a firmware upload and a USB reset afterwards.
* add support for %b printing of request + xfer flagssam2008-03-201-0/+2
|
* Fix two more PRs:imp2007-06-301-1/+2
| | | | | | | | | | (1) Add size parameter to usbd_get_string() (2) Properly limit speed when a full speed hub is plugged into a high speed hub. Submitted by: Hans Petter Selasky PR: 80773, 79725 Approved by: re@ (kensmith)
* First pass at removing __OtherBSD__. We can't blindly remove all ofimp2007-06-121-28/+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.
* Use a different task queue for host controller and peripheral driveriedowse2006-10-191-3/+7
| | | | | | | | | | | | tasks. Since the host controllers rely on tasks to process transfer timeouts, if a synchronous transfer from a driver was invoked from a task and timed out, it would never complete because the single task thread was stuck performing the synchronous transfer so couldn't process the timeout. This affected the axe, udav and ural drivers. Problem hardware provided by: guido
* s/Static/static/gimp2006-09-061-1/+1
| | | | | | | | | | 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.
* Add convenience functions to get port and interface.imp2005-05-161-0/+15
|
* Add /* _FOO_H_ */ after the final #endif to make danfe happy.sobomax2005-03-251-1/+1
|
* Protect against multiple inclusions.sobomax2005-03-251-0/+5
|
* Merge from NetBSD.sobomax2005-03-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a new function usbd_abort_default_pipe() that aborts any transfersiedowse2005-02-141-0/+1
| | | | | on the default pipe. This is helpful in device detach routines to stop any active control transfers.
* When attached to a high-speed device, report a more appropriateiedowse2005-02-131-0/+1
| | | | | | base transfer speed to CAM. The actual value used (40MB/s) is fairly arbitrary, but assumes the same 33% overhead as was implied by the 1MB/s figure we used for USB1 devices.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Might as well get the right $NetBSD$ string while we are at it.julian2004-12-131-1/+1
| | | | MFC after: 1 week
* Diff reduction to NetBSD.julian2004-12-131-67/+59
| | | | | | | | | Now only things that are different between us and NetBSD show up. Means that these files are more of NetBSD style in some places but since thay are NetBSD files, um, that's ok. Obtained from: NetBSD MFC after: 1 week
* Tweak the compatibility macros a little so that the device printing isimp2004-08-151-0/+3
| | | | moved into them.
* Device megapatch 1/6:phk2004-02-211-1/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* Update to reflect the NetBSD patches that are already included.joe2003-07-141-1/+1
|
* 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.
* MFNetBSD: ugen.c (1.57), ulpt.c (1.48), usb.c (1.67), usbdi.c (1.96),joe2002-05-061-3/+4
| | | | | | | | usbdi.h (1.60) (and local changes compatibility changes to ufm.c and urio.c) date: 2002/02/11 15:11:49; author: augustss; Give usbd_do_request_flags() an extra argument for the timeout.
* Update $NetBSD$ idents.joe2002-04-071-1/+1
|
OpenPOWER on IntegriCloud