aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_process.h
Commit message (Collapse)AuthorAgeFilesLines
* runq: More selective includes of <sys/runq.h> to reduce pollutionOlivier Certner2025-06-181-1/+0
| | | | | | | | | | | <sys/proc.h> doesn't need <sys/runq.h>. Remove this include and add it back for kernel files that relied on the pollution. Reviewed by: kib MFC after: 1 month Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45387
* usb: serial: allow the open/close sleep to be interruptibleKyle Evans2024-12-111-0/+1
| | | | | | | | | | | ucom_queue_command will issue commands for open/close, then wait on them to be finished. In the spirit of playing it safe, allow ucom_queue_command's wait to be interrupted in case the usb process gets jammed up waiting on the hardware -- we can at least recover the user thread that initiated it, even if we can't recover the usb process. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D47951
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-161-1/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* usb: purge EOL release compatibilityElliott Mitchell2023-02-041-4/+0
| | | | | | | | Remove conditionsals for FreeBSD 6, 7, 8 and 9 compatibility. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560
* 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
* Improve the realtime properties of USB transfers for embedded systemsHans Petter Selasky2015-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | like RPI-B and RPI-2. Description of problem: USB transfers can process data in their callbacks sometimes causing unacceptable latency for other USB transfers. Separate BULK completion callbacks from CONTROL, INTERRUPT and ISOCHRONOUS callbacks, and give BULK completion callbacks lesser execution priority than the others. This way USB audio won't be interfered by heavy USB ethernet usage for example. Further serve USB transfer completion in a round robin fashion, instead of only serving the most CPU hungry. This has been done by adding a third flag to USB transfer queue structure which keeps track of looping callbacks. The "command" callback function then decides what to do when looping. MFC after: 2 weeks Notes: svn path=/head/; revision=286773
* Try to resolve a possible deadlock when detaching USB devices whichHans Petter Selasky2014-03-201-0/+1
| | | | | | | | | | | | | | | | | create character devices. The deadlock can happen if an application is issuing IOCTLs which require USB refcounting, at the same time the USB device is detaching. There is already a counter in place in the USB device structure to detect this situation, but it was not always checked ahead of invoking functions that might destroy character devices, like detach, set configuration, set alternate interface or detach active kernel driver. Reported by: Daniel O'Connor <doconnor@gsoft.com.au> MFC after: 1 week Notes: svn path=/head/; revision=263423
* Add convenience wrapper functions to run callbacks in the context of theHans Petter Selasky2013-04-231-0/+6
| | | | | | | USB explore thread. Notes: svn path=/head/; revision=249795
* Modify the FreeBSD USB kernel code so that it can be compiled directlyHans Petter Selasky2013-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 Notes: svn path=/head/; revision=246122
* Use software interrupt priorities for USB kthreads instead of hardwareJohn Baldwin2011-01-131-2/+4
| | | | | | | | | | interrupt priorities. Reviewed by: hps MFC after: 2 weeks Notes: svn path=/head/; revision=217350
* - Patch to allow USB controller to resume operation afterAlfred Perlstein2009-08-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | being polled. - Remove the need for Giant from the USB HUB driver. - Leave device unconfigured instead of disabling the USB port when Huawei Autoinstall disk detection triggers. This should fix problems that the Huawei device is not detected after Autoinstall eject is issued. - Reported by: Nikolay Antsiferov - Fix memory use after free race for USB character devices. - Reported by: Lucius Windschuh - Factor out the enumeration lock into three functions to make the coming newbus lock conversion more easy. - usbd_enum_lock - usbd_enum_unlock - usbd_enum_is_locked Submitted by: hps Notes: svn path=/head/; revision=196498
* Change the usb workers from kernel processes to threads, this is mostly aAndrew Thompson2009-08-161-0/+4
| | | | | | | | | | | | cosmetic change to reduce cruft in the proc table. Also change the idle wait message to `-` like how taskqueues are. Reviewed by: julian Approved by: re (kib) Notes: svn path=/head/; revision=196274
* - Make struct usb_xfer opaque so that drivers can not access the internalsAndrew Thompson2009-06-231-13/+0
| | | | | | | - 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
* Fix _USB2_* refernces in the header protection defines.Andrew Thompson2009-06-151-3/+3
| | | | Notes: svn path=/head/; revision=194230
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.Andrew Thompson2009-06-151-6/+6
| | | | Notes: svn path=/head/; revision=194228
* Revert the size_t part of the last commit for the moment, this blows up theAndrew Thompson2009-05-301-2/+2
| | | | | | | USB_ADD_BYTES macro. Notes: svn path=/head/; revision=193074
* s/usb2_/usb_/ on all typedefs for the USB stack.Andrew Thompson2009-05-291-4/+4
| | | | Notes: svn path=/head/; revision=193045
* s/usb2_/usb_/ on all C structs for the USB stack.Andrew Thompson2009-05-281-12/+12
| | | | Notes: svn path=/head/; revision=192984
* MFp4 //depot/projects/usb @159431,159437,159438Andrew Thompson2009-03-201-2/+2
| | | | | | | | | | - start using the new USB typedefs in the USB core - Remove usage of USB_ADD_BYTES() Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=190181
* Move the new USB stack into its new home.Andrew Thompson2009-02-231-0/+88
Notes: svn path=/head/; revision=188942