From: Sean Anderson <seanga2@gmail.com>
To: qianfan <qianfanguijin@qq.com>, u-boot@lists.denx.de
Cc: lukma@denx.de, marex@denx.de, peter.chen@nxp.com, jun.li@nxp.com,
peng.fan@nxp.com
Subject: Re: [PATCH] driver: gadget: fastboot: Link endpoint and descriptors
Date: Fri, 5 Nov 2021 09:29:05 -0400 [thread overview]
Message-ID: <7fd52fb3-f312-4e03-abb4-9ec4100bbfd7@gmail.com> (raw)
In-Reply-To: <tencent_3ABA4A4D858FB53A5D93C77A3CFAD6989505@qq.com>
On 11/5/21 2:28 AM, qianfan wrote:
> 在 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.
This idiom is also present in f_thor.c, f_rockusb.c, and f_mass_storage.c
Given that a majority of otg implementations set this, I think the other should be changed to match.
--Sean
next prev parent reply other threads:[~2021-11-05 13:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tencent_81D5019A2AD62FD144C688D4716A817C2608@qq.com>
2021-11-05 6:28 ` [PATCH] driver: gadget: fastboot: Link endpoint and descriptors qianfan
2021-11-05 13:29 ` Sean Anderson [this message]
2021-11-15 5:51 ` qianfan
2021-09-16 7:02 qianfanguijin
2021-11-03 16:53 ` Sean Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7fd52fb3-f312-4e03-abb4-9ec4100bbfd7@gmail.com \
--to=seanga2@gmail.com \
--cc=jun.li@nxp.com \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=peng.fan@nxp.com \
--cc=peter.chen@nxp.com \
--cc=qianfanguijin@qq.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox