Add extra debug message and don't release XHCI slots for non-keyboard devices.

This commit is contained in:
Martin Whitaker
2025-08-03 13:22:04 +01:00
parent 1f56b182d4
commit aa45036037
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -370,6 +370,7 @@ static bool scan_hub_ports(const usb_hcd_t *hcd, const usb_hub_t *hub, int *num_
continue;
}
#if 0
// If we didn't find any keyboards, we can disable the port and release the slot.
build_setup_packet(&setup_pkt, USB_REQ_TO_HUB_PORT | USB_REQ_CLASS, HUB_CLR_FEATURE, HUB_PORT_ENABLE, port_num, 0);
(void)hcd->methods->setup_request(hcd, hub->ep0, &setup_pkt);
@@ -377,6 +378,7 @@ static bool scan_hub_ports(const usb_hcd_t *hcd, const usb_hub_t *hub, int *num_
if (hcd->methods->release_slot) {
(void)hcd->methods->release_slot(hcd, device_id);
}
#endif
}
return keyboard_found;
+4
View File
@@ -782,6 +782,10 @@ static bool assign_address(const usb_hcd_t *hcd, const usb_hub_t *hub, int port_
print_usb_info("invalid device descriptor port=%i type=%i length=%i", port_num, desc->type, desc->length);
return false;
}
{
usb_device_desc_t *device = (usb_device_desc_t *)data_buffer;
print_usb_info("fetched length=%i max_packet_size=%i", fetch_length, device->max_packet_size);
}
if (command_flags != 0) {
usb_device_desc_t *device = (usb_device_desc_t *)data_buffer;