mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Prashanth K <prashanth.k@oss.qualcomm.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Vladyslav Tymoshchuk <tvlad744@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>,
	Faisal Hassan <faisal.hassan@oss.qualcomm.com>,
	Abel Vesa <abelvesa@kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] usb: dwc3: qcom: Defer VBUS override update during system suspend
Date: Wed, 4 Nov 2026 10:06:15 +0530	[thread overview]
Message-ID: <f9d27fd8-cf33-4e6a-a9fc-6770a933cfb3@oss.qualcomm.com> (raw)
In-Reply-To: <auqXyUxc9cRIuYou@vbox>



On 11/4/2026 8:07 AM, Thinh Nguyen wrote:
> On Fri, Oct 23, 2026, Vladyslav Tymoshchuk wrote:
>> dwc3_qcom_set_role_notifier() updates the VBUS override in QSCRATCH
>> synchronously, from the context of the usb_role_switch_set_role()
>> caller. The glue assumes that role switches only happen from a
>> freezable workqueue, but that holds for the dwc3 core's mode switch,
>> not for this notifier: the UCSI connector work, for one, runs on the
>> non-freezable system workqueue.
>>
> 
> ....
> 
> Good catch. However, this should be fixed in the dwc3 core. The
> pre_set_role notifier can be called from the freezable __dwc3_set_mode()
> work instead of from the role switch caller. Then glue drivers won't be
> notified while suspended. This is simpler and applies to all glue
> drivers.

I think the problem with that is, dwc3_set_mode doesn't know USB_ROLE
(especially NONE mode).
It only knows the mode which is gadget/host/otg. Thats why vendor hooks
are used in drd.c instead. Perhaps we can cache USB_ROLE into dwc3
struct and use it later on __dwc3_set_mode.

Regards,
Prashanth K


      reply	other threads:[~2026-11-04  4:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 22:42 Vladyslav Tymoshchuk
2026-11-02  7:58 ` Krishna Kurapati
2026-11-04  2:37 ` Thinh Nguyen
2026-11-04  4:36   ` Prashanth K [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=f9d27fd8-cf33-4e6a-a9fc-6770a933cfb3@oss.qualcomm.com \
    --to=prashanth.k@oss.qualcomm.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=abelvesa@kernel.org \
    --cc=faisal.hassan@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krishna.kurapati@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tvlad744@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

all inboxes | Powered by JetHome®