lkml.org 
[lkml]   [2019]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] usb: gadget: f_ncm: fix wrong usb_ep
Date
>> Gadget driver should always use config_ep_by_speed() to initialize
>> usb_ep struct according to usb device's operating speed. Otherwise,
>> usb_ep struct may be wrong if usb devcie's operating speed is changed.
>>

>Would you please share the use case how to reproduce it?
We checked again and found NCM gadget driver should not have this issue.
Please ignore this patch.

However, we still observe similar issue in ECM and RNDIS gadget driver. Take
ECM as example, if we plug ECM gadget in high-speed host port first. And,
the host only set interface with alternate setting != 1 (alt != 1 in ecm_set_alt())
for ECM gadget. Then, if we unplug gadget from high-speed host port to
another super-speed host port afterwards, we will see both in_ep->desc and
out_ep->desc in ecm->port keep values for high-speed endpoints. Although
NCM's implementation is similar to ECM in this part, NCM doesn't have same
issue as it only does config_ep_by_speed() under if alt is 1.

\
 
 \ /
  Last update: 2019-11-26 08:27    [W:0.077 / U:2.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site