summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-09-11 22:43:51 +0800
committersakumisu <[email protected]>2022-09-11 22:43:51 +0800
commit88b7f9a2fff3a732ef9a8174d435cd02b21a0244 (patch)
treece346792007ebc618c43144053767206770e39d3
parent525d4b8ebff8a87441c437e9612cc2219b44a6ed (diff)
enable all hub port power
-rw-r--r--class/hub/usbh_hub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/class/hub/usbh_hub.c b/class/hub/usbh_hub.c
index d91b9090..e4ce5a43 100644
--- a/class/hub/usbh_hub.c
+++ b/class/hub/usbh_hub.c
@@ -312,7 +312,7 @@ static int usbh_hub_connect(struct usbh_hubport *hport, uint8_t intf)
}
for (uint8_t port = 0; port < hub->hub_desc.bNbrPorts; port++) {
- ret = usbh_hub_set_feature(hub, 1, HUB_PORT_FEATURE_POWER);
+ ret = usbh_hub_set_feature(hub, port + 1, HUB_PORT_FEATURE_POWER);
if (ret < 0) {
return ret;
}