History log of /haiku/headers/os/drivers/USB3.h
Revision Date Author Comments
# 55a46882 30-May-2023 Augustin Cavalier <waddlesplash@gmail.com>

USB: Support physical-vector bulk requests.

Introduce a new utility method, "generic_memcpy", which takes
generic_addr_t plus indications of whether these specify virtual or
physical addresses (and potentially user addresess) and calls the
appropriate memcpy variant depending.

All bus drivers adjusted to support this at once. We don't actually
take advantage of the physical addresses in any way (yet), as USB
controllers have some pretty specific requirements that would have
to be carefully validated to use these directly.

All bus drivers tested and confirmed to still be working.

Change-Id: I66326667e148091147bb2b3d0843a26fb7e5bda6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6479
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 76ddb69a 13-Dec-2022 Jérôme Duval <jerome.duval@gmail.com>

usb_raw: abort transfers cleanly on kill, fix use-after-free

* aborted transfers will release the notify semaphore when the cancel is notified.
* the allocated buffer would be freed on return, while the usb stack eventually copied
data in the buffer in our back, leading to KDL crashes, because the freed buffer would
be right reallocated for some kernel team structures.
* regression introduced by hrev55806, the transfers didn't need to be cancelled before.

Change-Id: Ifb6e941f71d05c37c36f878059c33883bb72a67c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5905
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# e755ecb5 01-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

USB: Move usb_iso_packet_descriptor to a separate header.

The USB Kit uses it, so this allows the USB Kit to stop including
USB3.h.

Change-Id: Ifde025ec41bef92013fda0440d60b7216cfdbe4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4413
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 7e1490e0 28-Sep-2008 Michael Lotz <mmlr@mlotz.ch>

Introduce some extensions to the USB v3 module API that allow for device
enumeration (getting roothubs, enumerating child devices and detecting device
topology) and hub port management (resetting and disabling ports). These were
laying around for quite some time.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac9d1195 25-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Commiting patch by Salvatore Benedetto. This adds isochronous handling to the USB bus manager and enables inbound isochronous support in the UHCI driver. Thanks!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21503 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a630146 23-Jan-2007 Michael Lotz <mmlr@mlotz.ch>

* Minor cleanup
* Fixed wrong wording in comment

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19915 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17f83b21 24-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Switched from the old v2 callback status codes to the new v3 codes
This means that the usb_callback_func now takes a status_t instead of a uint32 status.
Also the error codes are now different. I don't see this as a real problem in binary compatibility, as the status codes were never really documented and most drivers just assumed that a nonzero status meant an error.
Source compatibility breaks for callback functions and error defines. I fixed (hopefully) all places in the tree that are currenty included in the image and affected by the change.
* Corrected error reporting in UHCI and EHCI using the new status codes.
* Fixed a memory leak in EHCI where the async advance interrupt was not triggered in time.
* Fixed another race condition in usb_raw that could cause a crash when a device is removed while a transfer is pending.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18916 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 12cf623f 16-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

unified callback parameter definition of size_t and uint32, now uses size_t


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 641309e8 29-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

Obviously forgot this in the last commit...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18701 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b0ec61f 19-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Added USB API Version 3. It's put into USB3.h while the v2 API resides in USB2.h. USB.h just includes USB2.h for now.
* Rewrote both headers on the way.
* The usb module now exports both, the v2 and v3 module_info.
* Changed the internals of the USB Stack to give out usb_ids instead of opaque handles to internal classes.
* Cleaned up some more of the Stack by moving members into other classes and removing unused stuff.
* Updated the usb_raw driver from v2 to v3 API.

Since both usb_hid (which still uses the v2 API) and usb_raw (which now uses the v3 API) work, I'd call it a success ;-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18539 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7e1490e0ad111a858589c95cc80bdde85424e530 28-Sep-2008 Michael Lotz <mmlr@mlotz.ch>

Introduce some extensions to the USB v3 module API that allow for device
enumeration (getting roothubs, enumerating child devices and detecting device
topology) and hub port management (resetting and disabling ports). These were
laying around for quite some time.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac9d119566e5c19de0279483c4847996b2f1a879 25-Jun-2007 Michael Lotz <mmlr@mlotz.ch>

Commiting patch by Salvatore Benedetto. This adds isochronous handling to the USB bus manager and enables inbound isochronous support in the UHCI driver. Thanks!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21503 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a630146d24272d7a4d80ea75c310a9f9bfda8b4 23-Jan-2007 Michael Lotz <mmlr@mlotz.ch>

* Minor cleanup
* Fixed wrong wording in comment

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19915 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17f83b219d63eae4de462d6868e7d26ad6c3949e 24-Sep-2006 Michael Lotz <mmlr@mlotz.ch>

* Switched from the old v2 callback status codes to the new v3 codes
This means that the usb_callback_func now takes a status_t instead of a uint32 status.
Also the error codes are now different. I don't see this as a real problem in binary compatibility, as the status codes were never really documented and most drivers just assumed that a nonzero status meant an error.
Source compatibility breaks for callback functions and error defines. I fixed (hopefully) all places in the tree that are currenty included in the image and affected by the change.
* Corrected error reporting in UHCI and EHCI using the new status codes.
* Fixed a memory leak in EHCI where the async advance interrupt was not triggered in time.
* Fixed another race condition in usb_raw that could cause a crash when a device is removed while a transfer is pending.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18916 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 12cf623f5c41fb7a68a11f82d3bac2dcf9772694 16-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

unified callback parameter definition of size_t and uint32, now uses size_t


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18869 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 641309e8d091f85587b07c2a4443a85c99a8c482 29-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

Obviously forgot this in the last commit...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18701 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b0ec61f972bca106675a66c37354e38efb8016d 19-Aug-2006 Michael Lotz <mmlr@mlotz.ch>

* Added USB API Version 3. It's put into USB3.h while the v2 API resides in USB2.h. USB.h just includes USB2.h for now.
* Rewrote both headers on the way.
* The usb module now exports both, the v2 and v3 module_info.
* Changed the internals of the USB Stack to give out usb_ids instead of opaque handles to internal classes.
* Cleaned up some more of the Stack by moving members into other classes and removing unused stuff.
* Updated the usb_raw driver from v2 to v3 API.

Since both usb_hid (which still uses the v2 API) and usb_raw (which now uses the v3 API) work, I'd call it a success ;-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18539 a95241bf-73f2-0310-859d-f6bbb57e9c96