diff --git a/src/add-ons/kernel/busses/usb/ehci.cpp b/src/add-ons/kernel/busses/usb/ehci.cpp index 9bae7f1716..80d0315f4b 100644 --- a/src/add-ons/kernel/busses/usb/ehci.cpp +++ b/src/add-ons/kernel/busses/usb/ehci.cpp @@ -1646,19 +1646,16 @@ EHCI::FinishTransfers() if (((status >> EHCI_QTD_PID_SHIFT) & EHCI_QTD_PID_MASK) == EHCI_QTD_PID_IN && ((status >> EHCI_QTD_BYTES_SHIFT) & EHCI_QTD_BYTES_MASK) - !=0) { - // a short packet condition existed on this descriptor - if ((transfer->transfer->TransferPipe()->Type() - & USB_OBJECT_CONTROL_PIPE) != 0) { - // for control pipes, the next descriptor - // executed is the Status descriptor - while (!(descriptor->next_phy & EHCI_ITEM_TERMINATE)) { - descriptor = descriptor->next_log; - } + != 0) { + // a short packet condition existed on this descriptor, + // follow the alternate next pointer if set + if (descriptor->alt_next_log != NULL) { + descriptor = descriptor->alt_next_log; continue; } - // for bulk/interrupt pipes, no other descriptors are - // executed + + // no alternate next, transfer is done + callbackStatus = B_OK; transferDone = true; break; } diff --git a/src/add-ons/kernel/busses/usb/ehci_hardware.h b/src/add-ons/kernel/busses/usb/ehci_hardware.h index 5cd33c979b..1348303859 100644 --- a/src/add-ons/kernel/busses/usb/ehci_hardware.h +++ b/src/add-ons/kernel/busses/usb/ehci_hardware.h @@ -207,7 +207,7 @@ typedef struct ehci_qtd { // Software Part uint32 this_phy; struct ehci_qtd *next_log; - void *alt_next_log; + struct ehci_qtd *alt_next_log; size_t buffer_size; void *buffer_log; } _PACKED ehci_qtd;