linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henry Lin <henryl@nvidia.com>
To: Peter Chen <peter.chen@nxp.com>
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Romain Izard <romain.izard.pro@gmail.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: gadget: f_ncm: fix wrong usb_ep
Date: Tue, 26 Nov 2019 07:26:02 +0000	[thread overview]
Message-ID: <MN2PR12MB33899F0DEEA0A22086ACE0ECAC450@MN2PR12MB3389.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20191125042039.GA10953@b29397-desktop>

>> 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.

  reply	other threads:[~2019-11-26  7:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21  4:18 [PATCH] usb: gadget: f_ncm: fix wrong usb_ep Henry Lin
2019-11-25  4:20 ` Peter Chen
2019-11-26  7:26   ` Henry Lin [this message]
2019-11-26  7:55     ` Peter Chen
2019-11-26 10:03       ` Henry Lin
2019-11-27  1:54         ` Peter Chen
2019-11-28  9:21           ` Henry Lin
2019-11-28  9:28             ` Peter Chen

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=MN2PR12MB33899F0DEEA0A22086ACE0ECAC450@MN2PR12MB3389.namprd12.prod.outlook.com \
    --to=henryl@nvidia.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@nxp.com \
    --cc=romain.izard.pro@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).