From: Greg KH <gregkh@linuxfoundation.org>
To: hzy <hzyitc@outlook.com>
Cc: hminas@synopsys.com, fabrice.gasnier@foss.st.com,
amelie.delaunay@foss.st.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: dwc2: drd: fix inconsistent mode if role-switch-default-mode="host"
Date: Mon, 20 Feb 2023 19:58:03 +0100 [thread overview]
Message-ID: <Y/PCu8mPH8ut2/QA@kroah.com> (raw)
In-Reply-To: <SG2PR01MB2048C724CE08E7E3D6719C75C9A49@SG2PR01MB2048.apcprd01.prod.exchangelabs.com>
On Tue, Feb 21, 2023 at 02:05:35AM +0800, hzy wrote:
> Some boards might use USB-A female connector for USB ports, however,
> the port could be connected to a dual-mode USB controller, making it
> also behaves as a peripheral device if male-to-male cable is connected.
>
> In this case, the dts looks like this:
>
> &usb0 {
> status = "okay";
> dr_mode = "otg";
> usb-role-switch;
> role-switch-default-mode = "host";
> };
>
> After boot, dwc2_ovr_init() sets GOTGCTL to GOTGCTL_AVALOVAL and call
> dwc2_force_mode() with parameter host=false, which causes inconsistent
> mode - The hardware is in peripheral mode while the kernel status is
> in host mode.
>
> What we can do now is to call dwc2_drd_role_sw_set() to switch to
> device mode, and everything should work just fine now, even switching
> back to none(default) mode afterwards.
>
> Fixes: e14acb876985 ("usb: dwc2: drd: add role-switch-default-node support")
> Signed-off-by: hzy <hzyitc@outlook.com>
Signed-off-by does not match your "From:" line of your patch :(
Please fix up and use the correct name here as our documentation asks
for.
thanks,
greg k-h
prev parent reply other threads:[~2023-02-20 18:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 18:05 hzy
2023-02-20 18:58 ` Greg KH [this message]
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=Y/PCu8mPH8ut2/QA@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=amelie.delaunay@foss.st.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=hminas@synopsys.com \
--cc=hzyitc@outlook.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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®