aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2020-03-12 22:02:01 +0100
committerLubomir Rintel <lkundrak@v3.sk>2020-03-23 18:40:24 +0100
commita1a14e1efd5f66450256b03875d560be416d4d18 (patch)
tree2c40cfe0b94be90e99821e7971bf7f67e15dfad0
parent134d83a6165e2b605fa75c92bd09b13e94f2d6c5 (diff)
downloadopenfirmware-a1a14e1efd5f66450256b03875d560be416d4d18.tar.gz
dev/usb2: use @1 for root hub port index
A hub is an USB device and devices' "port numbers range from 1 to 255" according to Open Firmware, Recommended Practice: Universal Serial Bus (Version 1, June 1, 1998). Linux thinks the same and if we kept indexing from zero it wouldn't associate the Device Tree firmware node with the device instance. Before: USB devices: /usb@d4208000/hub@0,0 /usb@d4208000/hub@0,0/scsi@4,0 /usb@d4208000/hub@0,0/ethernet@3,0 /usb@d4208000/hub@0,0/scsi@4,0/disk After: USB devices: /usb@d4208000/hub@1,0 /usb@d4208000/hub@1,0/scsi@4,0 /usb@d4208000/hub@1,0/ethernet@3,0 /usb@d4208000/hub@1,0/scsi@4,0/disk
-rw-r--r--dev/usb2/hcd/ehci/probe.fth2
1 files changed, 1 insertions, 1 deletions
diff --git a/dev/usb2/hcd/ehci/probe.fth b/dev/usb2/hcd/ehci/probe.fth
index 1461c978..43b82029 100644
--- a/dev/usb2/hcd/ehci/probe.fth
+++ b/dev/usb2/hcd/ehci/probe.fth
@@ -12,7 +12,7 @@ headers
dup reset-port ( port )
- port-speed ( port speed )
+ 1+ port-speed ( port speed )
\ hub-port and hub-dev route USB 1.1 transactions through USB 2.0 hubs
over get-hub20-port get-hub20-dev ( port speed hub-port hub-dev )