Update stall state on set and clear feature

Call USBDevice::endpoint_stall/unstall in the request to set/clear
halt so the endpoint state is properly updated in the array
_endpoint_info.
pull/9768/head
Russ Butler 2018-03-15 20:10:36 -05:00 committed by Russ Butler
parent 23f3c01633
commit ff157a237a
1 changed files with 4 additions and 4 deletions

View File

@ -460,10 +460,10 @@ bool USBDevice::_request_set_feature()
/* TODO: Remote wakeup feature not supported */
break;
case ENDPOINT_RECIPIENT:
if (!EP_VALID(_transfer.setup.wIndex)) {
if (!EP_INDEXABLE(_transfer.setup.wIndex)) {
break;
} else if (_transfer.setup.wValue == ENDPOINT_HALT) {
_phy->endpoint_stall(_transfer.setup.wIndex);
endpoint_stall(_transfer.setup.wIndex);
success = true;
}
break;
@ -492,10 +492,10 @@ bool USBDevice::_request_clear_feature()
/* TODO: Remote wakeup feature not supported */
break;
case ENDPOINT_RECIPIENT:
if (!EP_VALID(_transfer.setup.wIndex)) {
if (!EP_INDEXABLE(_transfer.setup.wIndex)) {
break;
} else if (_transfer.setup.wValue == ENDPOINT_HALT) {
_phy->endpoint_unstall(_transfer.setup.wIndex);
endpoint_unstall(_transfer.setup.wIndex);
success = true;
}
break;