mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
To: Faisal Hassan <faisal.hassan@oss.qualcomm.com>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Sriram Dash <sriram.dash@oss.qualcomm.com>,
	Jack Pham <jack.pham@oss.qualcomm.com>,
	Shazad Hussain <shazad.hussain@oss.qualcomm.com>,
	linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Wesley Cheng <wesley.cheng@oss.qualcomm.com>
Subject: Re: [PATCH v2 5/7] usb: dwc3: add xhci-reset-on-resume property for power-loss resume
Date: Fri, 4 Sep 2026 11:39:46 +0530	[thread overview]
Message-ID: <fd9f1fac-e4e7-453e-a830-a32e8be2f965@oss.qualcomm.com> (raw)
In-Reply-To: <20260903153827.3463313-6-faisal.hassan@oss.qualcomm.com>



On 9/3/2026 9:08 PM, Faisal Hassan wrote:
> On platforms where the USB controller loses power during system
> suspend, like SA8255P, resume triggers a Host Controller Error
> requiring full reinitialization.
> 
> The xhci driver supports XHCI_RESET_ON_RESUME to handle this,
> but dwc3 previously lacked platform-specific quirk configuration.
> Add a device property "xhci-reset-on-resume" that enables this
> quirk for controllers needing complete reinitialization after
> power loss during suspend.
> 
> Let dwc3 manage the quirk for the usb controller using
> software properties.
> 
> Co-developed-by: Sriram Dash <sriram.dash@oss.qualcomm.com>
> Signed-off-by: Sriram Dash <sriram.dash@oss.qualcomm.com>
> Signed-off-by: Faisal Hassan <faisal.hassan@oss.qualcomm.com>
> ---
>   drivers/usb/dwc3/core.c | 4 ++++
>   drivers/usb/dwc3/core.h | 5 +++++
>   drivers/usb/dwc3/host.c | 5 ++++-
>   3 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index fd5c2cd36c59..eb6ffd5148a7 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1712,6 +1712,10 @@ static void dwc3_get_software_properties(struct dwc3 *dwc,
>   					       &gsbuscfg0_reqinfo);
>   		if (!ret)
>   			dwc->gsbuscfg0_reqinfo = gsbuscfg0_reqinfo;
> +
> +		if (!dwc->xhci_reset_on_resume &&
> +		    device_property_read_bool(tmpdev, "xhci-reset-on-resume"))
> +			dwc->xhci_reset_on_resume = true;
>   	}

xHCI plat does look for properties in xhci device node as well as the 
ones above it in the parent chain:

"
	/* Iterate over all parent nodes for finding quirks */
	for (tmpdev = &pdev->dev; tmpdev; tmpdev = tmpdev->parent) {
"

So adding device_add_software_node in dwc3_qcom must be sufficient.

Regards,
Krishna,

  reply	other threads:[~2026-09-04  6:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 15:38 [PATCH v2 0/7] usb: dwc3: qcom: Add firmware-managed resource support for SA8255P Faisal Hassan
2026-09-03 15:38 ` [PATCH v2 1/7] usb: dwc3: qcom: re-enable wakeup interrupts on failed resume Faisal Hassan
2026-09-03 15:38 ` [PATCH v2 2/7] usb: dwc3: qcom: Distinguish PM and runtime suspend/resume paths Faisal Hassan
2026-09-03 15:38 ` [PATCH v2 3/7] dt-bindings: usb: Add qcom,sa8255p-dwc3 for firmware-managed resources Faisal Hassan
2026-09-03 15:38 ` [PATCH v2 4/7] usb: host: xhci-plat: Support XHCI_RESET_ON_RESUME via device property Faisal Hassan
2026-09-03 15:38 ` [PATCH v2 5/7] usb: dwc3: add xhci-reset-on-resume property for power-loss resume Faisal Hassan
2026-09-04  6:09   ` Krishna Kurapati [this message]
2026-09-03 15:38 ` [PATCH v2 6/7] usb: dwc3: qcom: Support broken suspend for SA8255P Faisal Hassan
2026-09-03 15:38 ` [PATCH v2 7/7] usb: dwc3: qcom: Support firmware-managed resource states for power management Faisal Hassan

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=fd9f1fac-e4e7-453e-a830-a32e8be2f965@oss.qualcomm.com \
    --to=krishna.kurapati@oss.qualcomm.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=faisal.hassan@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack.pham@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=shazad.hussain@oss.qualcomm.com \
    --cc=sriram.dash@oss.qualcomm.com \
    --cc=wesley.cheng@oss.qualcomm.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®