All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Cc: "peter.griffin@linaro.org" <peter.griffin@linaro.org>,
	"andre.draszik@linaro.org" <andre.draszik@linaro.org>,
	"tudor.ambarus@linaro.org" <tudor.ambarus@linaro.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@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] usb: dwc3: google: Initialise probe properties with DWC3_DEFAULT_PROPERTIES
Date: Wed, 26 Aug 2026 00:36:29 +0000	[thread overview]
Message-ID: <ao404zOD-rXKZ84C@vbox> (raw)
In-Reply-To: <20260819182158.1351869-1-radhey.shyam.pandey@amd.com>

On Wed, Aug 19, 2026, Radhey Shyam Pandey wrote:
> dwc3_google_probe() zero initialises struct dwc3_probe_data and never
> assigns its properties member. The unspecified state of gsbuscfg0_reqinfo
> is encoded as DWC3_GSBUSCFG0_REQINFO_UNSPECIFIED (0xffffffff), not as
> zero, so dwc3_get_software_properties() reads the zeroed field as a value
> the glue explicitly requested:
> 
> 	if (properties->gsbuscfg0_reqinfo !=
> 	    DWC3_GSBUSCFG0_REQINFO_UNSPECIFIED) {
> 		dwc->gsbuscfg0_reqinfo = properties->gsbuscfg0_reqinfo;
> 		return;
> 	}
> 
> Two things follow. dwc3_config_soc_bus() programs GSBUSCFG0.REQINFO with
> zero on hardware that never asked for it, and the early return skips the
> walk over the parent devices, so a swnode or device tree supplied
> snps,gsbuscfg0-reqinfo would be ignored.
> 
> Assign DWC3_DEFAULT_PROPERTIES so the unset fields carry their unspecified
> sentinels and the controller is left alone.
> 
> Fixes: 8995a37371bf ("usb: dwc3: Add Google Tensor SoC DWC3 glue driver")

Does this need Cc stable?

Regardless,
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>

Thanks,
Thinh


> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
> ---
>  drivers/usb/dwc3/dwc3-google.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc3/dwc3-google.c b/drivers/usb/dwc3/dwc3-google.c
> index 60ee4cc99b28..a01ca23cb6a8 100644
> --- a/drivers/usb/dwc3/dwc3-google.c
> +++ b/drivers/usb/dwc3/dwc3-google.c
> @@ -442,6 +442,7 @@ static int dwc3_google_probe(struct platform_device *pdev)
>  	probe_data.dwc = &google->dwc;
>  	probe_data.res = res;
>  	probe_data.ignore_clocks_and_resets = true;
> +	probe_data.properties = DWC3_DEFAULT_PROPERTIES;
>  	ret = dwc3_core_probe(&probe_data);
>  	if (ret)  {
>  		ret = dev_err_probe(dev, ret, "failed to register DWC3 Core\n");
> 
> base-commit: 6a746cd265aed59107ebdaa9ce039bb832922969
> -- 
> 2.43.0
> 

  reply	other threads:[~2026-08-26  0:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 18:21 [PATCH] usb: dwc3: google: Initialise probe properties with DWC3_DEFAULT_PROPERTIES Radhey Shyam Pandey
2026-08-26  0:36 ` Thinh Nguyen [this message]
2026-09-01 14:32   ` gregkh

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=ao404zOD-rXKZ84C@vbox \
    --to=thinh.nguyen@synopsys.com \
    --cc=andre.draszik@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=radhey.shyam.pandey@amd.com \
    --cc=tudor.ambarus@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.