USB OHCI: Fix finalizing of STALL-ed control request transfers
In case control transfer is finished with STALL answer from device only the setup TD is retired into the Done Queue but other TDs (data and status) are left in the ED queue. HC set the endpoint halted - so we process such endpoint regardless of it's non-empty queue. PS: cleanup some trailing spaces.
This commit is contained in:
@@ -217,7 +217,7 @@ OHCI::OHCI(pci_info *info, Stack *stack)
|
|||||||
// interrupts during handover. Therefore we disable interrupts before
|
// interrupts during handover. Therefore we disable interrupts before
|
||||||
// requesting ownership. We have to keep the ownership change interrupt
|
// requesting ownership. We have to keep the ownership change interrupt
|
||||||
// enabled though, as otherwise the SMM will not be notified of the
|
// enabled though, as otherwise the SMM will not be notified of the
|
||||||
// ownership change request we trigger below.
|
// ownership change request we trigger below.
|
||||||
_WriteReg(OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTERRUPTS &
|
_WriteReg(OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTERRUPTS &
|
||||||
~OHCI_OWNERSHIP_CHANGE) ;
|
~OHCI_OWNERSHIP_CHANGE) ;
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ OHCI::OHCI(pci_info *info, Stack *stack)
|
|||||||
|
|
||||||
if ((control & OHCI_INTERRUPT_ROUTING) != 0) {
|
if ((control & OHCI_INTERRUPT_ROUTING) != 0) {
|
||||||
TRACE_ERROR("smm does not respond.\n");
|
TRACE_ERROR("smm does not respond.\n");
|
||||||
|
|
||||||
// TODO: Enable this reset as soon as the non-specified
|
// TODO: Enable this reset as soon as the non-specified
|
||||||
// reset a few lines later is replaced by a better solution.
|
// reset a few lines later is replaced by a better solution.
|
||||||
//_WriteReg(OHCI_CONTROL, OHCI_HC_FUNCTIONAL_STATE_RESET);
|
//_WriteReg(OHCI_CONTROL, OHCI_HC_FUNCTIONAL_STATE_RESET);
|
||||||
@@ -1040,7 +1040,9 @@ OHCI::_FinishTransfers()
|
|||||||
MutexLocker endpointLocker(endpoint->lock);
|
MutexLocker endpointLocker(endpoint->lock);
|
||||||
|
|
||||||
if ((endpoint->head_physical_descriptor & OHCI_ENDPOINT_HEAD_MASK)
|
if ((endpoint->head_physical_descriptor & OHCI_ENDPOINT_HEAD_MASK)
|
||||||
!= endpoint->tail_physical_descriptor) {
|
!= endpoint->tail_physical_descriptor
|
||||||
|
&& (endpoint->head_physical_descriptor
|
||||||
|
& OHCI_ENDPOINT_HALTED) == 0) {
|
||||||
// there are still active transfers on this endpoint, we need
|
// there are still active transfers on this endpoint, we need
|
||||||
// to wait for all of them to complete, otherwise we'd read
|
// to wait for all of them to complete, otherwise we'd read
|
||||||
// a potentially bogus data toggle value below
|
// a potentially bogus data toggle value below
|
||||||
|
|||||||
Reference in New Issue
Block a user