mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
006c702688
handle_setup() currently assumes that the response to a Setup transaction will be an OUT transaction, and any subsequent packet (if any) will be an IN transaction. This appears to be valid in many cases; both USB enumeration and Mass Storage work OK with this restriction. However, DFU uses ep0 to transfer data in both directions. This renders the assumption invalid; when sending data from device to host, the Data Stage is an IN transaction, and the Status Stage is an OUT transaction. Enhance handle_setup() to deduce the correct direction for the USB transactions based on Setup transaction data. ep0's request object only needs to be automatically re-queued when the Data Stage completes, in order to implement the Status Stage. Once the Status Stage transaction is complete, there is no need to re-queue the USB request, so don't do that. Don't sent USB request completion callbacks for Status Stage transactions. These were queued by ci_udc itself, and only serve to confuse the USB function code. For example, f_dfu attempts to interpret the 0-length data buffers for Status Stage transactions as DFU packets. These buffers contain stale data from the previous transaction. This causes f_dfu to complain about a sequence number mismatch. Signed-off-by: Stephen Warren <swarren@nvidia.com> |
||
---|---|---|
.. | ||
atmel_usba_udc.c | ||
atmel_usba_udc.h | ||
ci_udc.c | ||
ci_udc.h | ||
composite.c | ||
config.c | ||
core.c | ||
designware_udc.c | ||
ep0.c | ||
ep0.h | ||
epautoconf.c | ||
ether.c | ||
f_dfu.c | ||
f_dfu.h | ||
f_fastboot.c | ||
f_mass_storage.c | ||
f_thor.c | ||
f_thor.h | ||
fotg210.c | ||
g_dnl.c | ||
gadget_chips.h | ||
Makefile | ||
mpc8xx_udc.c | ||
ndis.h | ||
omap1510_udc.c | ||
pxa25x_udc.c | ||
pxa25x_udc.h | ||
pxa27x_udc.c | ||
regs-otg.h | ||
rndis.c | ||
rndis.h | ||
s3c_udc_otg.c | ||
s3c_udc_otg_xfer_dma.c | ||
storage_common.c | ||
usbstring.c |