drivers: usb_dc_mcux_ehci: re-enable reception after clear stall
Re-enable reception after clear an endpoint stall. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
parent
e0b2227c39
commit
085e58faf8
1 changed files with 14 additions and 0 deletions
|
@ -266,6 +266,20 @@ int usb_dc_ep_clear_stall(const u8_t ep)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
if ((EP_ADDR2IDX(ep) != USB_CONTROL_ENDPOINT) &&
|
||||
(EP_ADDR2DIR(ep) == USB_EP_DIR_OUT)) {
|
||||
status = dev_data.interface->deviceRecv(
|
||||
dev_data.controllerHandle, ep,
|
||||
(u8_t *)dev_data.eps[ep_abs_idx].block.data,
|
||||
(uint32_t)dev_data.eps[ep_abs_idx].ep_mps);
|
||||
if (kStatus_USB_Success != status) {
|
||||
LOG_ERR("Failed to enable reception on 0x%02x", ep);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
dev_data.eps[ep_abs_idx].ep_occupied = true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue