From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Alan Stern <stern@rowland.harvard.edu>, Felipe Balbi <balbi@kernel.org>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
Roger Quadros <rogerq@ti.com>, zhengbin <zhengbin13@huawei.com>,
John Youn <John.Youn@synopsys.com>
Subject: Re: [RFC PATCH 02/14] usb: gadget: Add callback to set lane and transfer rate
Date: Thu, 12 Dec 2019 22:33:14 +0000 [thread overview]
Message-ID: <f315858e-4a47-aeaa-1976-577ff781bf0e@synopsys.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1912121047120.14053-100000@netrider.rowland.org>
Hi,
Alan Stern wrote:
> On Thu, 12 Dec 2019, Felipe Balbi wrote:
>
>> Hi,
>>
>> Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:
>>> Introduce gadget opts udc_set_sublink_speed callback to set the lane
>>> count and transfer rate (in lane speed mantissa of Gbps) for SuperSpeed
>>> Plus capable gadgets. In the same way udc_set_speed, this function can
>>> control the gadget's sublink attributes for SuperSpeed Plus.
>>>
>>> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
>>> ---
>>> drivers/usb/gadget/composite.c | 2 ++
>>> drivers/usb/gadget/legacy/mass_storage.c | 2 ++
>> I would rather not add new features to the legacy gadgets and focus on
>> our configfs interface for anything new. Moreover, using the feature
>> you introduced could, arguably, be done as a separate patch.
>>
>>> diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
>>> index 3b4f67000315..a4de5a8c0f19 100644
>>> --- a/drivers/usb/gadget/composite.c
>>> +++ b/drivers/usb/gadget/composite.c
>>> @@ -2353,6 +2353,8 @@ int usb_composite_probe(struct usb_composite_driver *driver)
>>> gadget_driver->function = (char *) driver->name;
>>> gadget_driver->driver.name = driver->name;
>>> gadget_driver->max_speed = driver->max_speed;
>>> + gadget_driver->max_lane_count = driver->max_lane_count;
>>> + gadget_driver->max_lsm = driver->max_lsm;
>>>
>>> return usb_gadget_probe_driver(gadget_driver);
>>> }
>>> diff --git a/drivers/usb/gadget/legacy/mass_storage.c b/drivers/usb/gadget/legacy/mass_storage.c
>>> index f18f77584fc2..a0912c5afffc 100644
>>> --- a/drivers/usb/gadget/legacy/mass_storage.c
>>> +++ b/drivers/usb/gadget/legacy/mass_storage.c
>>> @@ -223,6 +223,8 @@ static struct usb_composite_driver msg_driver = {
>>> .name = "g_mass_storage",
>>> .dev = &msg_device_desc,
>>> .max_speed = USB_SPEED_SUPER_PLUS,
>>> + .max_lane_count = 2,
>>> + .max_lsm = 10,
>> Right, as mentioned, I'd prefer not touch the legacy gadgets. But in any
>> case, why is it so that the gadget is telling you about max lane count
>> and lsm? That should be abstracted away from the gadget driver. Gadget
>> driver shouldn't have knowledge of number of lanes because, at the end
>> of the day, that doesn't really change anything in practice. Unlike HS
>> vs SS which changes a bunch of things.
> I agree completely. Furthermore, it isn't at all clear where those two
> numbers came from. Why would g-mass-storage care that lane_count <= 2
> and lsm <= 10?
>
> Alan Stern
>
Right, I'll remove this and update according to Felipe's suggestions.
Thanks,
Thinh
next prev parent reply other threads:[~2019-12-12 22:33 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 2:48 [RFC PATCH 00/14] usb: dwc3: Introduce DWC_usb32 Thinh Nguyen
2019-12-12 2:49 ` [RFC PATCH 01/14] usb: gadget: Add lane count and lsm Thinh Nguyen
2019-12-12 2:49 ` [RFC PATCH 02/14] usb: gadget: Add callback to set lane and transfer rate Thinh Nguyen
2019-12-12 7:58 ` Felipe Balbi
2019-12-12 15:49 ` Alan Stern
2019-12-12 22:33 ` Thinh Nguyen [this message]
2019-12-12 22:10 ` Thinh Nguyen
2019-12-12 2:49 ` [RFC PATCH 03/14] usb: composite: Properly report lsm Thinh Nguyen
2019-12-12 7:59 ` Felipe Balbi
2019-12-12 22:10 ` Thinh Nguyen
2019-12-12 2:49 ` [RFC PATCH 04/14] usb: dwc3: Implement new id check for DWC_usb32 Thinh Nguyen
2019-12-12 2:49 ` [RFC PATCH 05/14] usb: dwc3: Update IP checks to support DWC_usb32 Thinh Nguyen
2019-12-12 8:05 ` Felipe Balbi
2019-12-12 22:12 ` Thinh Nguyen
2019-12-12 2:49 ` [RFC PATCH 06/14] usb: devicetree: dwc3: Add max lane and lsm Thinh Nguyen
2019-12-12 8:06 ` Felipe Balbi
2019-12-19 22:09 ` Rob Herring
2019-12-19 22:49 ` Thinh Nguyen
2019-12-12 2:49 ` [RFC PATCH 07/14] usb: dwc3: gadget: Set lane count " Thinh Nguyen
2019-12-12 8:14 ` Felipe Balbi
2019-12-12 22:15 ` Thinh Nguyen
2019-12-12 2:49 ` [RFC PATCH 08/14] usb: dwc3: gadget: Track connected lane count and speed Thinh Nguyen
2019-12-12 2:49 ` [RFC PATCH 09/14] usb: dwc3: gadget: Limit the setting of speed Thinh Nguyen
2019-12-12 2:50 ` [RFC PATCH 10/14] usb: dwc3: Update HWPARAMS0.MDWIDTH for DWC_usb32 Thinh Nguyen
2019-12-12 2:50 ` [RFC PATCH 11/14] usb: devicetree: dwc3: Add TRB prefetch count Thinh Nguyen
2019-12-12 8:18 ` Felipe Balbi
2019-12-12 22:16 ` Thinh Nguyen
2019-12-12 2:50 ` [RFC PATCH 12/14] usb: dwc3: gadget: Set number of TRB prefetch Thinh Nguyen
2019-12-12 2:50 ` [RFC PATCH 13/14] usb: devicetree: dwc3: Add property to disable mult TRB fetch Thinh Nguyen
2019-12-12 8:19 ` Felipe Balbi
2019-12-12 22:28 ` Thinh Nguyen
2019-12-13 7:04 ` Felipe Balbi
2019-12-13 20:10 ` Thinh Nguyen
2019-12-19 22:17 ` Rob Herring
2019-12-19 22:51 ` Thinh Nguyen
2019-12-20 22:11 ` Rob Herring
2019-12-20 23:52 ` Thinh Nguyen
2019-12-12 2:50 ` [RFC PATCH 14/14] usb: dwc3: gadget: Implement disabling of " Thinh Nguyen
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=f315858e-4a47-aeaa-1976-577ff781bf0e@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=John.Youn@synopsys.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=rogerq@ti.com \
--cc=stern@rowland.harvard.edu \
--cc=zhengbin13@huawei.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).