From 4d21f567e77bd131fdb1afb3f9bc40acc52ad9fc Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 15 Sep 2021 19:20:25 -0400 Subject: [PATCH] XHCI: Fix up 3a71862e998410fd3b2b823b26281be81dfa5b70. Now the logic is actually identical. --- src/add-ons/kernel/busses/usb/xhci.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/xhci.cpp b/src/add-ons/kernel/busses/usb/xhci.cpp index 64abc7afae..157de3d366 100644 --- a/src/add-ons/kernel/busses/usb/xhci.cpp +++ b/src/add-ons/kernel/busses/usb/xhci.cpp @@ -1395,17 +1395,18 @@ XHCI::AllocateDevice(Hub *parent, int8 hubAddress, uint8 hubPort, _WriteContext(&device->input_ctx->input.addFlags, 3); uint8 rhPort = hubPort; - uint32 route = rhPort; + uint32 route = 0; for (Device *hubDevice = parent; hubDevice != RootObject(); hubDevice = (Device *)hubDevice->Parent()) { if (hubDevice->Parent() == RootObject()) break; - rhPort = hubDevice->HubPort(); if (rhPort > 15) rhPort = 15; route = route << 4; route |= rhPort; + + rhPort = hubDevice->HubPort(); } uint32 dwslot0 = SLOT_0_NUM_ENTRIES(1) | SLOT_0_ROUTE(route);