usb_keyboard: Try clearing endpoint stall on transfer failure.
As the keyboard is used from usb_hid in the userland as well, we quite probably are not in sync with the data toggle. Clearing the stall should restore the toggle and make things work.
This commit is contained in:
@@ -206,9 +206,15 @@ debugger_getchar(void)
|
||||
set_debug_variable("_usbTransferLength", (uint64)sUSBTransferLength);
|
||||
|
||||
status_t status = evaluate_debug_command("usb_process_transfer");
|
||||
if (status != B_OK)
|
||||
if (status == B_DEV_PENDING)
|
||||
return -1;
|
||||
|
||||
if (status != B_OK) {
|
||||
// try clearing a possibly set halt due to toggle mismatches
|
||||
evaluate_debug_command("usb_clear_stall");
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool phantomState = true;
|
||||
for (size_t i = 2; i < sUSBTransferLength; i++) {
|
||||
if (sUSBTransferData[i] != 0x01) {
|
||||
|
||||
Reference in New Issue
Block a user