summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-11-13 22:04:20 +0800
committersakumisu <[email protected]>2025-11-13 22:05:52 +0800
commit999ddb1a9d1bedf9ad6976feba9b315468f3401b (patch)
treee91f1c1680371fdb122f48451593865577bc6df5
parent01b22bb138305ee818ec3077e7241f22907496c6 (diff)
update(core/usbh_core): print interface num when load driver
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--core/usbh_core.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/usbh_core.c b/core/usbh_core.c
index 211636de..79c6cf95 100644
--- a/core/usbh_core.c
+++ b/core/usbh_core.c
@@ -546,15 +546,15 @@ int usbh_enumerate(struct usbh_hubport *hport)
struct usbh_class_driver *class_driver = (struct usbh_class_driver *)usbh_find_class_driver(intf_desc->bInterfaceClass, intf_desc->bInterfaceSubClass, intf_desc->bInterfaceProtocol, hport->device_desc.idVendor, hport->device_desc.idProduct);
if (class_driver == NULL) {
- USB_LOG_ERR("do not support Class:0x%02x,Subclass:0x%02x,Protocl:0x%02x\r\n",
+ USB_LOG_ERR("Do not support Class:0x%02x, Subclass:0x%02x, Protocl:0x%02x on interface %u\r\n",
intf_desc->bInterfaceClass,
intf_desc->bInterfaceSubClass,
- intf_desc->bInterfaceProtocol);
-
+ intf_desc->bInterfaceProtocol,
+ i);
continue;
}
hport->config.intf[i].class_driver = class_driver;
- USB_LOG_INFO("Loading %s class driver\r\n", class_driver->driver_name);
+ USB_LOG_INFO("Loading %s class driver on interface %u\r\n", class_driver->driver_name, i);
ret = CLASS_CONNECT(hport, i);
}
@@ -570,6 +570,7 @@ void usbh_hubport_release(struct usbh_hubport *hport)
{
if (hport->connected) {
hport->connected = false;
+ usbh_kill_urb(&hport->ep0_urb);
usbh_free_devaddr(hport);
for (uint8_t i = 0; i < hport->config.config_desc.bNumInterfaces; i++) {
if (hport->config.intf[i].class_driver && hport->config.intf[i].class_driver->disconnect) {
@@ -577,7 +578,6 @@ void usbh_hubport_release(struct usbh_hubport *hport)
}
}
hport->config.config_desc.bNumInterfaces = 0;
- usbh_kill_urb(&hport->ep0_urb);
if (hport->mutex) {
usb_osal_mutex_delete(hport->mutex);
}