linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: dwc3-qcom: Fix registration when tx-fifo-resize exists
@ 2021-12-05 10:45 Baruch Siach
  2021-12-17  9:58 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2021-12-05 10:45 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson
  Cc: Felipe Balbi, Greg Kroah-Hartman, linux-usb, linux-arm-msm,
	Baruch Siach, Wesley Cheng

Commit cefdd52fa04 ("usb: dwc3: dwc3-qcom: Enable tx-fifo-resize
property by default") added the tx-fifo-resize property. But when this
property exists already, of_add_property() fails with -EEXIST, thus
breaking core registration. This regresses the IPQ6018 platform that has
tx-fifo-resize in its device-tree.

Don't fail when tx-fifo-resize exists.

Fixes: cefdd52fa045 ("usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by default")
Cc: Wesley Cheng <wcheng@codeaurora.org>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/usb/dwc3/dwc3-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index 9abbd01028c5..bbd8e401a82c 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -667,7 +667,7 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
 
 	prop->name = "tx-fifo-resize";
 	ret = of_add_property(dwc3_np, prop);
-	if (ret) {
+	if (ret && ret != -EEXIST) {
 		dev_err(dev, "unable to add property\n");
 		goto node_put;
 	}
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: dwc3: dwc3-qcom: Fix registration when tx-fifo-resize exists
  2021-12-05 10:45 [PATCH] usb: dwc3: dwc3-qcom: Fix registration when tx-fifo-resize exists Baruch Siach
@ 2021-12-17  9:58 ` Greg Kroah-Hartman
  2021-12-17 10:55   ` Baruch Siach
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2021-12-17  9:58 UTC (permalink / raw)
  To: Baruch Siach
  Cc: Andy Gross, Bjorn Andersson, Felipe Balbi, linux-usb,
	linux-arm-msm, Wesley Cheng

On Sun, Dec 05, 2021 at 12:45:45PM +0200, Baruch Siach wrote:
> Commit cefdd52fa04 ("usb: dwc3: dwc3-qcom: Enable tx-fifo-resize
> property by default") added the tx-fifo-resize property. But when this
> property exists already, of_add_property() fails with -EEXIST, thus
> breaking core registration. This regresses the IPQ6018 platform that has
> tx-fifo-resize in its device-tree.
> 
> Don't fail when tx-fifo-resize exists.
> 
> Fixes: cefdd52fa045 ("usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by default")
> Cc: Wesley Cheng <wcheng@codeaurora.org>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  drivers/usb/dwc3/dwc3-qcom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
> index 9abbd01028c5..bbd8e401a82c 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -667,7 +667,7 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
>  
>  	prop->name = "tx-fifo-resize";
>  	ret = of_add_property(dwc3_np, prop);
> -	if (ret) {
> +	if (ret && ret != -EEXIST) {
>  		dev_err(dev, "unable to add property\n");
>  		goto node_put;
>  	}
> -- 
> 2.33.0
> 

This commit does not apply to my tree at all.  What tree/branch did you
make it against?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: dwc3: dwc3-qcom: Fix registration when tx-fifo-resize exists
  2021-12-17  9:58 ` Greg Kroah-Hartman
@ 2021-12-17 10:55   ` Baruch Siach
  0 siblings, 0 replies; 3+ messages in thread
From: Baruch Siach @ 2021-12-17 10:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Andy Gross, Bjorn Andersson, Felipe Balbi, linux-usb,
	linux-arm-msm, Wesley Cheng

Hi Greg,

On Fri, Dec 17 2021, Greg Kroah-Hartman wrote:
> On Sun, Dec 05, 2021 at 12:45:45PM +0200, Baruch Siach wrote:
>> Commit cefdd52fa04 ("usb: dwc3: dwc3-qcom: Enable tx-fifo-resize
>> property by default") added the tx-fifo-resize property. But when this
>> property exists already, of_add_property() fails with -EEXIST, thus
>> breaking core registration. This regresses the IPQ6018 platform that has
>> tx-fifo-resize in its device-tree.
>> 
>> Don't fail when tx-fifo-resize exists.
>> 
>> Fixes: cefdd52fa045 ("usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by default")
>> Cc: Wesley Cheng <wcheng@codeaurora.org>
>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>> ---
>>  drivers/usb/dwc3/dwc3-qcom.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
>> index 9abbd01028c5..bbd8e401a82c 100644
>> --- a/drivers/usb/dwc3/dwc3-qcom.c
>> +++ b/drivers/usb/dwc3/dwc3-qcom.c
>> @@ -667,7 +667,7 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev)
>>  
>>  	prop->name = "tx-fifo-resize";
>>  	ret = of_add_property(dwc3_np, prop);
>> -	if (ret) {
>> +	if (ret && ret != -EEXIST) {
>>  		dev_err(dev, "unable to add property\n");
>>  		goto node_put;
>>  	}
>
> This commit does not apply to my tree at all.  What tree/branch did you
> make it against?

This is against v5.16-rc3. As of -rc5 commit 6a97cee39d reverted the
offending commit. So all is good now.

Thanks,
baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-17 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-05 10:45 [PATCH] usb: dwc3: dwc3-qcom: Fix registration when tx-fifo-resize exists Baruch Siach
2021-12-17  9:58 ` Greg Kroah-Hartman
2021-12-17 10:55   ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).