
在 2021/11/4 0:53, Sean Anderson 写道:
On 9/16/21 3:02 AM, qianfanguijin@163.com wrote:
From: qianfan Zhao qianfanguijin@163.com
If the downloading file size is equal to the partition size, "fastboot flash" can't work, at least in sunxi platform, because used an uninitalized point: ep->desc.
Hm, I think that usb_ep_ops->enable needs to set ep->desc = desc on success.
Of the existing drivers, only musb-new and mtu3 skip this.
I checked the udc driver and found that not all the udc driver set "ep->desc = desc", such as atmel_usba_udc, dwc2_udc_otg, musb-new and mtu3. Those drivers save "desc" to bsp driver's private data only, such as "msub_ep->desc = desc", but the common usb_ep's desc is an invalid point.
And I'm not find any documents declare the behaves how usb_ep_ops->enable did, save desc or not. So I'd prefect save desc in the fastboot level, and the udc driver can also save desc again if they want.
--Sean