From: Krishna Kurapati PSSNV <quic_kriskura@quicinc.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"quic_ppratap@quicinc.com" <quic_ppratap@quicinc.com>,
"quic_wcheng@quicinc.com" <quic_wcheng@quicinc.com>,
"quic_jackp@quicinc.com" <quic_jackp@quicinc.com>,
"quic_ugoswami@quicinc.com" <quic_ugoswami@quicinc.com>
Subject: Re: [PATCH v2] usb: dwc3: core: set force_gen1 bit in USB31 devices if max speed is SS
Date: Thu, 6 Jul 2023 19:18:53 +0530 [thread overview]
Message-ID: <fb973659-c645-a4f2-e0fe-a40536e8b9fc@quicinc.com> (raw)
In-Reply-To: <20230517001105.v74dyo6asqtcrpii@synopsys.com>
On 5/17/2023 5:41 AM, Thinh Nguyen wrote:
> On Sun, May 14, 2023, Krishna Kurapati wrote:
>> Currently for dwc3_usb31 controller, if maximum_speed is limited to
>> super-speed in DT, then device mode is limited to SS, but host mode
>> still works in SSP.
>>
>> The documentation for max-speed property is as follows:
>>
>> "Tells USB controllers we want to work up to a certain speed.
>> Incase this isn't passed via DT, USB controllers should default to
>> their maximum HW capability."
>>
>> It doesn't specify that the property is only for device mode.
>> There are cases where we need to limit the host's maximum speed to
>> SuperSpeed only. Use this property for host mode to contrain host's
>> speed to SuperSpeed.
>>
>> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
>> ---
>> Link to v1: https://urldefense.com/v3/__https://lore.kernel.org/all/20230512170107.18821-1-quic_kriskura@quicinc.com/__;!!A4F2R9G_pg!dCg_3WK2oNXNb6d0a_VuyjkeeZJTU1aY4dik6g35XB7mtG7EJeR1uPMfxFja49OfXp7Yhsg1yqjnylCYYEg7YCAhqfAZ0Q$
>>
>> Discussion regarding the same at:
>> https://urldefense.com/v3/__https://lore.kernel.org/all/e465c69c-3a9d-cbdb-d44e-96b99cfa1a92@quicinc.com/__;!!A4F2R9G_pg!dCg_3WK2oNXNb6d0a_VuyjkeeZJTU1aY4dik6g35XB7mtG7EJeR1uPMfxFja49OfXp7Yhsg1yqjnylCYYEg7YCDRLUrJWg$
>>
>> drivers/usb/dwc3/core.c | 8 ++++++++
>> drivers/usb/dwc3/core.h | 5 +++++
>> 2 files changed, 13 insertions(+)
>>
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index 278cd1c33841..33bc72595e74 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -1262,6 +1262,14 @@ static int dwc3_core_init(struct dwc3 *dwc)
>> }
>> }
>>
>> + if ((hw_mode != DWC3_GHWPARAMS0_MODE_GADGET) &&
>> + (DWC3_IP_IS(DWC31)) &&
>> + (dwc->maximum_speed == USB_SPEED_SUPER)) {
>> + reg = dwc3_readl(dwc->regs, DWC3_LLUCTL);
>> + reg |= DWC3_LLUCTL_FORCE_GEN1;
>> + dwc3_writel(dwc->regs, DWC3_LLUCTL, reg);
>> + }
>> +
>
> Perhaps this should be done for every usb3 port rather than just the
> port_0. This patch can go after your multi-port series is added to
> Greg's branch where you can check for number of usb3 ports.
>
> Thanks,
> Thinh
>
Hi Thinh,
Seems like multiport would take little more time and I need this
patch to be ported to ACK for fixing customer issue. Would it be
possible to take this patch as is ? Once multiport is done, I will send
another patch to include the changes for mutliport as well.
Regards,
Krishna,
next prev parent reply other threads:[~2023-07-06 13:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-14 14:51 Krishna Kurapati
2023-05-17 0:11 ` Thinh Nguyen
2023-05-17 0:30 ` Thinh Nguyen
2023-05-17 3:25 ` Krishna Kurapati PSSNV
2023-05-17 23:32 ` Thinh Nguyen
2023-07-06 13:48 ` Krishna Kurapati PSSNV [this message]
2023-07-06 22:34 ` 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=fb973659-c645-a4f2-e0fe-a40536e8b9fc@quicinc.com \
--to=quic_kriskura@quicinc.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=quic_jackp@quicinc.com \
--cc=quic_ppratap@quicinc.com \
--cc=quic_ugoswami@quicinc.com \
--cc=quic_wcheng@quicinc.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
all inboxes | Powered by JetHome®