The usbdev->port field is zero indexed, while the USB spec expects the port values to start at one.
Signed-off-by: Kevin O'Connor kevin@koconnor.net ---
This problem was causing intermittent detection failures with low speed devices on my c720. It seems that most hubs don't care about this field, as the code has never been correct but it hasn't shown up as a problem prior to now. (And even on the c720, it would still work much of the time.)
This patch is also available for testing at: https://github.com/KevinOConnor/seabios/tree/testing
--- src/hw/usb-ehci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hw/usb-ehci.c b/src/hw/usb-ehci.c index 20e387b..f5ee5bf 100644 --- a/src/hw/usb-ehci.c +++ b/src/hw/usb-ehci.c @@ -366,7 +366,7 @@ ehci_desc2pipe(struct ehci_pipe *pipe, struct usbdevice_s *usbdev struct ehci_pipe *hpipe = container_of( hubdev->defpipe, struct ehci_pipe, pipe); if (hpipe->pipe.speed == USB_HIGHSPEED) - pipe->qh.info2 |= ((usbdev->port << QH_HUBPORT_SHIFT) + pipe->qh.info2 |= (((usbdev->port+1) << QH_HUBPORT_SHIFT) | (hpipe->pipe.devaddr << QH_HUBADDR_SHIFT)); else pipe->qh.info2 = hpipe->qh.info2;
On 09/12/2014 12:10 PM, Kevin O'Connor wrote:
The usbdev->port field is zero indexed, while the USB spec expects the port values to start at one.
Signed-off-by: Kevin O'Connor kevin@koconnor.net
This problem was causing intermittent detection failures with low speed devices on my c720. It seems that most hubs don't care about this field, as the code has never been correct but it hasn't shown up as a problem prior to now. (And even on the c720, it would still work much of the time.)
The tip of the testing tree works reliable for me. While rebooting my Acer C720 several times I bisected the max. amount of memory to pass to the kernel to mem=1983M.
Stefan
On Fri, Sep 12, 2014 at 12:10:49PM -0400, Kevin O'Connor wrote:
The usbdev->port field is zero indexed, while the USB spec expects the port values to start at one.
Signed-off-by: Kevin O'Connor kevin@koconnor.net
This problem was causing intermittent detection failures with low speed devices on my c720. It seems that most hubs don't care about this field, as the code has never been correct but it hasn't shown up as a problem prior to now. (And even on the c720, it would still work much of the time.)
This patch is also available for testing at: https://github.com/KevinOConnor/seabios/tree/testing
FYI, I have pushed this change along with the two other USB patch series to master.
-Kevin