Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions USBDDOS/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,21 @@ BOOL USB_InitDevice(HCD_HUB* pHub, uint8_t portIndex, uint16_t portStatus)
{
//early return
if(pHub->pHCI->bDevCount >= USB_MAX_HC_COUNT)
{
_LOG("USB: bDevCount >= USB_MAX_HC_COUNT (%d) on HC; refusing device on port %d\n",
USB_MAX_HC_COUNT, portIndex);
return FALSE;
}
if(USBT.DeviceCount >= USB_MAX_DEVICE_COUNT)
{
/* F-AUDIT-2: silent reject was a real-world support nightmare.
* Make it visible in COM1 capture so users can identify the cause.
*/
_LOG("USB: DeviceCount >= USB_MAX_DEVICE_COUNT (%d); refusing device on port %d. "
"Hint: bump USB_MAX_DEVICE_COUNT in usbcfg.h\n",
USB_MAX_DEVICE_COUNT, portIndex);
return FALSE;
}

USB_Device* pDevice = NULL;
uint8_t address;
Expand Down