hrev56230 adds 1 changeset to branch 'master'
old head: 5b5da451b3b1e4432b2c52c26a2f592dceba136f
new head: 00096a9d1f9da329e941083a1620d2222c2688aa
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=00096a9d1f9d+%5E5b5da451b3b1
----------------------------------------------------------------------------
00096a9d1f9d: USB: Add default max packet size for SuperSpeed bulk endpoints.
We already had one for High-Speed endpoints, but SuperSpeed endpoints
also have a fixed size, similar to Control endpoints.
May help with some devices failing to configure.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev56230
Commit: 00096a9d1f9da329e941083a1620d2222c2688aa
URL: https://git.haiku-os.org/haiku/commit/?id=00096a9d1f9d
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Wed Jun 29 14:36:36 2022 UTC
----------------------------------------------------------------------------
1 file changed, 14 insertions(+), 5 deletions(-)
src/add-ons/kernel/bus_managers/usb/Pipe.cpp | 19 ++++++++++++++-----
----------------------------------------------------------------------------
diff --git a/src/add-ons/kernel/bus_managers/usb/Pipe.cpp
b/src/add-ons/kernel/bus_managers/usb/Pipe.cpp
index 5006ed308d..bd54c17e4f 100644
--- a/src/add-ons/kernel/bus_managers/usb/Pipe.cpp
+++ b/src/add-ons/kernel/bus_managers/usb/Pipe.cpp
@@ -186,9 +186,18 @@ BulkPipe::InitCommon(int8 deviceAddress, uint8
endpointAddress,
usb_speed speed, pipeDirection direction, size_t maxPacketSize,
uint8 interval, int8 hubAddress, uint8 hubPort)
{
- // some devices have bogus descriptors
- if (speed == USB_SPEED_HIGHSPEED && maxPacketSize != 512)
- maxPacketSize = 512;
+ // See comments in ControlPipe::InitCommon.
+ switch (speed) {
+ case USB_SPEED_HIGHSPEED:
+ maxPacketSize = 512;
+ break;
+ case USB_SPEED_SUPERSPEED:
+ maxPacketSize = 1024;
+ break;
+
+ default:
+ break;
+ }
Pipe::InitCommon(deviceAddress, endpointAddress, speed, direction,
maxPacketSize, interval, hubAddress, hubPort);
@@ -355,8 +364,8 @@ ControlPipe::InitCommon(int8 deviceAddress, uint8
endpointAddress,
uint8 interval, int8 hubAddress, uint8 hubPort)
{
// The USB 2.0 spec section 5.5.3 gives fixed max packet sizes for the
- // different speeds. The USB 3.1 specs defines the max packet size to a
- // fixed 512 for control endpoints in 9.6.6. Some devices ignore these
+ // different speeds. The USB 3.1 specs defines some fixed max packet
sizes,
+ // including for control endpoints in 9.6.6. Some devices ignore these
// values and use bogus ones, so we restrict them here.
switch (speed) {
case USB_SPEED_LOWSPEED: