aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-09-12 11:59:23 -0400
committerGerd Hoffmann <kraxel@redhat.com>2014-11-10 11:30:45 +0100
commitbc8a06350c3e061bb831182e90b49e031d40bd4f (patch)
treeb163099f1396857c51174523153ced87de3e0a8b
parent7acede7842fc3e605e0ed97bd2ae1b3c87db2bda (diff)
downloadseabios-bc8a06350c3e061bb831182e90b49e031d40bd4f.zip
seabios-bc8a06350c3e061bb831182e90b49e031d40bd4f.tar.gz
seabios-bc8a06350c3e061bb831182e90b49e031d40bd4f.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> (cherry picked from commit 67d1fbef0f630e1e823f137d1bae7fa5790bcf4e)
-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 9d9427b..17a7e8b 100644
--- a/src/hw/usb-ehci.c
+++ b/src/hw/usb-ehci.c
@@ -372,7 +372,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;