diff options
author | Peter Chen <peter.chen@freescale.com> | 2012-02-29 20:19:46 +0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-04-10 19:11:44 +0300 |
commit | f79a60b8785409f5a77767780315ce6d3ea04a44 (patch) | |
tree | 4289b1e4502ab9c1eb80b1af84a35ca7809ec8d7 /include | |
parent | c04352a590538123f8c93bd87ef1d4bb9e3a64c7 (diff) |
usb: fsl_udc_core: prime status stage once data stage has primed
- For Control Read transfer, the ACK handshake on an IN transaction
may be corrupted, so the device may not receive the ACK for data
stage, the complete irq will not occur at this situation.
Therefore, we need to move prime status stage from complete irq
routine to the place where the data stage has just primed, or the
host will never get ACK for status stage.
The above issue has been described at USB2.0 spec chapter 8.5.3.3.
- After adding prime status stage just after prime the data stage,
there is a potential problem when the status dTD is added before the data stage
has primed by hardware. The reason is the device's dTD descriptor has NO direction bit,
if data stage (IN) prime hasn't finished, the status stage(OUT)
dTD will be added at data stage dTD's Next dTD Pointer, so when the data stage
transfer has finished, the status dTD will be primed as IN by hardware,
then the host will never receive ACK from the device side for status stage.
- Delete below code at fsl_ep_queue:
/* Update ep0 state */
if ((ep_index(ep) == 0))
udc->ep0_state = DATA_STATE_XMIT;
the udc->ep0_state will be updated again after udc->driver->setup
finishes.
It is tested at i.mx51 bbg board with g_mass_storage, g_ether, g_serial.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions