#
a9beb1ed |
| 04-Sep-2022 |
mglocker <mglocker@openbsd.org> |
Improve periodic USB transfers (device intr, isoc) used for input devices, audio, and video. It's still not perfect, and will need further improvements.
High level, the diff contains following chan
Improve periodic USB transfers (device intr, isoc) used for input devices, audio, and video. It's still not perfect, and will need further improvements.
High level, the diff contains following changes:
* Sync up with the Linux code base, which did re-work the periodic scheduling code path. * Run the driver in IPL_VM instead of IPL_USB to prioritize us before lower/equal interrupts (same what NetBSD does). * Add two new flags to our USB stack required by the updated driver code: - 'multi' flag in the usbd_hub structure to keep track whether a hub has one Transaction Translator for all ports (single TT) or one Transaction Translator per port (multi TT). - 'hcpriv' pointer in the usbd_tt structure for the HC driver to allocate memory for the scheduling depending on single or multi TT.
"go for it" kettenis@
show more ...
|
#
8f1d17e8 |
| 12-Apr-2022 |
naddy <naddy@openbsd.org> |
constify USB host controller method tables and root hub descriptors
ok mglocker@
|
#
c28d999f |
| 21-Mar-2020 |
patrick <patrick@openbsd.org> |
Instead of passing the flags as part of a struct that's supposed to be filled by the callee, change the usb_allocmem() API to take another argument for the flags.
ok mpi@
|
#
59570397 |
| 19-Mar-2020 |
patrick <patrick@openbsd.org> |
Switch USB to use non-coherent buffers for data transfers. Since the import in '99 all buffers allocated using usb_allocmem() have been mapped COHERENT. On some ARM SoCs, where the USB controller i
Switch USB to use non-coherent buffers for data transfers. Since the import in '99 all buffers allocated using usb_allocmem() have been mapped COHERENT. On some ARM SoCs, where the USB controller is not coherent with the caches, this means the buffers were mapped uncached. This drastically reduces the performance, especially on reads.
We already added cache syncs before and after USB transfers, but so far those have essentially been no-ops. Since other drivers make use of the same allocation code, and those haven't been proven to have correct syncs, we can't just remove the COHERENT flag.
This splits the allocation into coherent and non-coherent blocks. All drivers who call usb_allocmem() themselves now pass a flag to show they require coherent blocks. Onced verified that they also work fine without coherent, or once they have been refactored, we can remove this again.
On a ure(4) connected to an i.MX8MQ, the receive performance is 10x as fast as before. The Raspberry Pi's ethernet receive speed doubled.
Debugged using dt(4) Original diff from Marius Strobl Feedback from kettenis@ Tested on an i.MX8MQ (arm64) by patrick@ Tested on a Raspberry Pi (arm64) by tobhe@ Tested on an ERL (octeon) by Janne Johansson ok mpi@ gerhard@ tobhe@
show more ...
|
#
50b656cf |
| 27-Nov-2018 |
mpi <mpi@openbsd.org> |
Free sizes for the subdevs array.
ok anton@, visa@
|
#
819de463 |
| 20-Nov-2018 |
mpi <mpi@openbsd.org> |
Revert free sizes for `subdevs' array, it is incorrect.
Reported by anton@ and Natasha Kerensikova
|
#
0fb52eb4 |
| 17-Nov-2018 |
mpi <mpi@openbsd.org> |
free(9) size for USB subdevs array.
ok ratchov@, visa@
|
#
c55860ab |
| 10-Nov-2018 |
mpi <mpi@openbsd.org> |
free(9) sizes for endpoints array.
ok okan@, tedu@, visa@
|
#
39369402 |
| 01-May-2018 |
landry <landry@openbsd.org> |
Simplify/refactor the way vendor/product/serial informations are gathered from usb devices.
Cache them early in usbd_new_device() instead of querying the device several times (the content wont chang
Simplify/refactor the way vendor/product/serial informations are gathered from usb devices.
Cache them early in usbd_new_device() instead of querying the device several times (the content wont change anyway) and uselessly generating usb traffic (which could conflict with other access..)
The heuristic stays the same, first look in the device descriptor, then try to match against usb_known_vendors/usb_known_products, then fallback to use the idVendor/idProduct codes.
Remove the now useless 'usedev' parameter from usbd_fill_deviceinfo().
Tested from bsd & bsd.rd.
suggested by and ok mpi@
show more ...
|
#
954d25e5 |
| 24-Apr-2018 |
landry <landry@openbsd.org> |
Fill the 'card' member of v4l2_capability struct with the usb product name coming from usbd_devinfo_vp() instead of the dummy "Generic USB video class device" string, makes it easier to differentiate
Fill the 'card' member of v4l2_capability struct with the usb product name coming from usbd_devinfo_vp() instead of the dummy "Generic USB video class device" string, makes it easier to differentiate multiple webcams in firefox's webrtc permission dialog.
ok/help mpi@
show more ...
|
#
4b5720c2 |
| 03-Feb-2018 |
mpi <mpi@openbsd.org> |
Add support for dumping USB transfers via bpf(4) using USBPcap headers.
ok deraadt@, dlg@
|
#
234dfda1 |
| 08-Apr-2017 |
deraadt <deraadt@openbsd.org> |
A pile of sizes to free(9). In test for a few days in snapshots. Errors will result in nice clean panic messages so we know what's wrong. Reviewed by dhill visa natano jsg.
|
#
d47d3d23 |
| 23-May-2016 |
mpi <mpi@openbsd.org> |
Get rid of usbd_get_device_strings() because we use it only once.
Return a char * rather using a void function for usbd_get_device_string()
ok patrick@
|
#
2261702e |
| 18-May-2016 |
patrick <patrick@openbsd.org> |
Cache vendor, product and serial info for each usb device. This allows ioctl(USB_DEVICEINFO) not to issue any further requests to gather information. Thus reducing stress on connected usb devices.
Cache vendor, product and serial info for each usb device. This allows ioctl(USB_DEVICEINFO) not to issue any further requests to gather information. Thus reducing stress on connected usb devices. This fixes an issue where usbdevs called in a loop causes a USB mass storage device to halt operation.
Adapted from a similar commit in NetBSD.
ok mpi@
show more ...
|
#
7603512a |
| 21-Dec-2014 |
mpi <mpi@openbsd.org> |
Always clear a port reset feature after setting it, or at least try to. Otherwise we might leave a port in an unwanted state.
Found while investigating timeout issues on xhci(4).
|
#
761ebc24 |
| 11-Nov-2014 |
mpi <mpi@openbsd.org> |
When a bus is explored, do not probe the ports which status hasn't changed. This saves a lot of I/O when attaching/detaching devices and might help with some timing related problems.
Has been in sn
When a bus is explored, do not probe the ports which status hasn't changed. This saves a lot of I/O when attaching/detaching devices and might help with some timing related problems.
Has been in snap for ten days, committing now so that people testing xhci(4) test the same thing w/ snapshots and their own kernel.
show more ...
|
#
8bfbe910 |
| 10-Nov-2014 |
mpi <mpi@openbsd.org> |
Add some fields needed for TT support.
|
#
fc259315 |
| 10-Nov-2014 |
mpi <mpi@openbsd.org> |
Remove USB locators. They are currently unused and this wont change due to the way USB buses are discovered.
|
#
41651d1a |
| 01-Nov-2014 |
mpi <mpi@openbsd.org> |
Remove the port status argument from usbd_reset_port(). We don't do anything with it and it simplifies this mess in order to implement warm reset.
|
#
32cad91b |
| 31-Oct-2014 |
mpi <mpi@openbsd.org> |
Use understandable messages when the per-xfer poison value is incorrect. Prodded by a comment from stsp@.
|
#
e476da14 |
| 30-Oct-2014 |
mpi <mpi@openbsd.org> |
XFER_FREE is not used, ciao.
|
#
eff17a6a |
| 09-Aug-2014 |
mpi <mpi@openbsd.org> |
Do not store the whole USB hub descriptor in the "struct usbd_hub" to help integrating super speed hubs that use a different descriptor.
|
#
769226ae |
| 09-Jul-2014 |
mpi <mpi@openbsd.org> |
autoconf(9) is your friend and it knows you more than you think. It even knows your children! So let him handle the seperation correctly.
Do not rewrite your own custom config_detach_children(9) a
autoconf(9) is your friend and it knows you more than you think. It even knows your children! So let him handle the seperation correctly.
Do not rewrite your own custom config_detach_children(9) and as a bonus start removing the usbd_port tentacles from the stack.
ok pirofti@, yuo@, miod@, deraadt@
show more ...
|
#
890c91c7 |
| 09-Jul-2014 |
mpi <mpi@openbsd.org> |
Adds an optional bus function to set the address of a new device and explicitly set it when required.
Right now xhci(4) does not need such function because it assigns addresses when the first pipe o
Adds an optional bus function to set the address of a new device and explicitly set it when required.
Right now xhci(4) does not need such function because it assigns addresses when the first pipe of a device is opened.
ok yuo@, pirofti@
show more ...
|
#
d7fb4754 |
| 28-May-2014 |
mpi <mpi@openbsd.org> |
Apart from the early exploration done to find a console keyboard during the boot process, USB devices must be attached or detached from the usb task thread in order to avoid races with periodical exp
Apart from the early exploration done to find a console keyboard during the boot process, USB devices must be attached or detached from the usb task thread in order to avoid races with periodical explorations issued by uhub(4) interrupts.
Respect this rule when detaching root hubs during a suspend/resume cycle and avoid some hangs due to the aforementioned race.
Tested by Mattieu Baptiste, thanks!
show more ...
|