[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR12MB33894E3D1D9AC14B8C9E2966AC450@MN2PR12MB3389.namprd12.prod.outlook.com>
Date: Tue, 26 Nov 2019 10:03:35 +0000
From: Henry Lin <henryl@...dia.com>
To: Peter Chen <peter.chen@....com>
CC: Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Romain Izard <romain.izard.pro@...il.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: gadget: f_ncm: fix wrong usb_ep
>> >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.
>Does your UDC driver call composite_disconnect when disconnect from the host?
>It should set all desc to NULL at related function ->disable.
For ECM case, if ecm_set_alt() gets called with alt == 0, in_ep->desc and
out_ep->desc will be set up. But these two ep will not be enabled as gether_connect()
is not executed. During disconnect from the host, ecm_disable() gets called with ep
disabled. In this case, gether_disconnect() will not get called to set desc to NULL.
Powered by blists - more mailing lists