usb: hub port reset is also done when the port status reset bit is zero.
* encountered on QEmu 1.6.50 with nec-usb-xhci and usb-storage devices.
This commit is contained in:
@@ -157,14 +157,17 @@ Hub::ResetPort(uint8 index)
|
|||||||
if (result < B_OK)
|
if (result < B_OK)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
if (fPortStatus[index].change & PORT_STATUS_RESET) {
|
if ((fPortStatus[index].change & PORT_STATUS_RESET) != 0
|
||||||
|
|| (fPortStatus[index].status & PORT_STATUS_RESET) == 0) {
|
||||||
// reset is done
|
// reset is done
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fPortStatus[index].change & PORT_STATUS_RESET) == 0) {
|
if ((fPortStatus[index].change & PORT_STATUS_RESET) == 0
|
||||||
TRACE_ERROR("port %d won't reset\n", index);
|
&& (fPortStatus[index].status & PORT_STATUS_RESET) != 0) {
|
||||||
|
TRACE_ERROR("port %d won't reset (%#x, %#x)\n", index,
|
||||||
|
fPortStatus[index].change, fPortStatus[index].status);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user