summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-07-24 21:00:21 +0800
committersakumisu <[email protected]>2025-07-24 21:00:21 +0800
commitd3a5aae7afa967ccc1d5e8ed6e84fb12ade946b6 (patch)
tree9b996c05101bcb965bf866c5a25c712c1ad770b9
parent7153fb975617482e70348e4188b300580921e20d (diff)
fix(class/hub/usbh_hub): fix port to port+1
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--class/hub/usbh_hub.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/class/hub/usbh_hub.c b/class/hub/usbh_hub.c
index 9e2f99c1..97818eca 100644
--- a/class/hub/usbh_hub.c
+++ b/class/hub/usbh_hub.c
@@ -562,7 +562,7 @@ static void usbh_hub_events(struct usbh_hub *hub)
if (portstatus & HUB_PORT_STATUS_CONNECTION) {
ret = usbh_hub_set_feature(hub, port + 1, HUB_PORT_FEATURE_RESET);
if (ret < 0) {
- USB_LOG_ERR("Failed to reset port %u,errorcode:%d\r\n", port, ret);
+ USB_LOG_ERR("Failed to reset port %u, errorcode: %d\r\n", port + 1, ret);
continue;
}
@@ -580,7 +580,8 @@ static void usbh_hub_events(struct usbh_hub *hub)
if (portchange & HUB_PORT_STATUS_C_RESET) {
ret = usbh_hub_clear_feature(hub, port + 1, HUB_PORT_FEATURE_C_RESET);
if (ret < 0) {
- USB_LOG_ERR("Failed to clear port %u reset change, errorcode: %d\r\n", port, ret);
+ USB_LOG_ERR("Failed to clear port %u reset change, errorcode: %d\r\n", port + 1, ret);
+ continue;
}
}