aboutsummaryrefslogtreecommitdiff
path: root/src/hw
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-09-12 11:59:23 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-09-16 11:16:40 -0400
commit67d1fbef0f630e1e823f137d1bae7fa5790bcf4e (patch)
treee6ca5985cf37dbd0f2fbc8b61d209a47b043c0fd /src/hw
parent0f6813009fd8630ee89545f74f728eac742369aa (diff)
downloadseabios-67d1fbef0f630e1e823f137d1bae7fa5790bcf4e.zip
seabios-67d1fbef0f630e1e823f137d1bae7fa5790bcf4e.tar.gz
seabios-67d1fbef0f630e1e823f137d1bae7fa5790bcf4e.tar.bz2
ehci: Fix bug in hub port assignment
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>
Diffstat (limited to 'src/hw')
-rw-r--r--src/hw/usb-ehci.c2
1 files changed, 1 insertions, 1 deletions
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;