All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
@ 2021-10-04 14:18 Andy Shevchenko
  2021-10-04 20:35 ` Ferry Toth
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2021-10-04 14:18 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-usb, linux-kernel
  Cc: Felipe Balbi, Ferry Toth, Michael Grzeschik, Andy Shevchenko

The commit c6e23b89a95d ("usb: dwc3: gadget: set gadgets parent to the right
controller") changed the device for the UDC and broke the user space scripts
that instantiate the USB gadget(s) via ConfigFS.

Revert it for now until the better solution will be proposed.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/usb/dwc3/gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 8e66a70adae6..13664609ed3c 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -4253,7 +4253,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
 	}
 
 
-	usb_initialize_gadget(dwc->sysdev, dwc->gadget, dwc_gadget_release);
+	usb_initialize_gadget(dwc->dev, dwc->gadget, dwc_gadget_release);
 	dev				= &dwc->gadget->dev;
 	dev->platform_data		= dwc;
 	dwc->gadget->ops		= &dwc3_gadget_ops;
-- 
2.33.0


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

* Re: [PATCH v1 1/1] usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
  2021-10-04 14:18 [PATCH v1 1/1] usb: dwc3: gadget: Revert "set gadgets parent to the right controller" Andy Shevchenko
@ 2021-10-04 20:35 ` Ferry Toth
  2021-10-05  8:51   ` Michael Grzeschik
  0 siblings, 1 reply; 6+ messages in thread
From: Ferry Toth @ 2021-10-04 20:35 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, linux-usb, linux-kernel
  Cc: Felipe Balbi, Michael Grzeschik

Hi,

Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
> The commit c6e23b89a95d ("usb: dwc3: gadget: set gadgets parent to the right
> controller") changed the device for the UDC and broke the user space scripts
> that instantiate the USB gadget(s) via ConfigFS.

I confirm this regression on Intel Edison since at least 5.15-rc2 while 
in 5.14.0 it was working fine.

This patch resolves the issue as tested on 5.15-rc4.

Tested-by: Ferry Toth<fntoth@gmail.com>

> Revert it for now until the better solution will be proposed.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>   drivers/usb/dwc3/gadget.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 8e66a70adae6..13664609ed3c 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -4253,7 +4253,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
>   	}
>   
>   
> -	usb_initialize_gadget(dwc->sysdev, dwc->gadget, dwc_gadget_release);
> +	usb_initialize_gadget(dwc->dev, dwc->gadget, dwc_gadget_release);
>   	dev				= &dwc->gadget->dev;
>   	dev->platform_data		= dwc;
>   	dwc->gadget->ops		= &dwc3_gadget_ops;

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

* Re: [PATCH v1 1/1] usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
  2021-10-04 20:35 ` Ferry Toth
@ 2021-10-05  8:51   ` Michael Grzeschik
  2021-10-05  9:17     ` Andy Shevchenko
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michael Grzeschik @ 2021-10-05  8:51 UTC (permalink / raw)
  To: Ferry Toth
  Cc: Andy Shevchenko, Greg Kroah-Hartman, linux-usb, linux-kernel,
	Felipe Balbi

[-- Attachment #1: Type: text/plain, Size: 1957 bytes --]

On Mon, Oct 04, 2021 at 10:35:57PM +0200, Ferry Toth wrote:
>Hi,
>
>Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
>>The commit c6e23b89a95d ("usb: dwc3: gadget: set gadgets parent to the right
>>controller") changed the device for the UDC and broke the user space scripts
>>that instantiate the USB gadget(s) via ConfigFS.
>
>I confirm this regression on Intel Edison since at least 5.15-rc2 
>while in 5.14.0 it was working fine.
>
>This patch resolves the issue as tested on 5.15-rc4.
>
>Tested-by: Ferry Toth<fntoth@gmail.com>

NACK! Why should we resolv an issue by reverting it to solve not working
userspace. We already have this patch as a solution for solving a deeper
Problem, regarding the allocator addressing the right device.

>>Revert it for now until the better solution will be proposed.

So, I think fixing the userspace would be the right fix, not changing
the kernel. Otherwise we should find a proper solution.

>>
>>Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>---
>>  drivers/usb/dwc3/gadget.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
>>index 8e66a70adae6..13664609ed3c 100644
>>--- a/drivers/usb/dwc3/gadget.c
>>+++ b/drivers/usb/dwc3/gadget.c
>>@@ -4253,7 +4253,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
>>  	}
>>-	usb_initialize_gadget(dwc->sysdev, dwc->gadget, dwc_gadget_release);
>>+	usb_initialize_gadget(dwc->dev, dwc->gadget, dwc_gadget_release);
>>  	dev				= &dwc->gadget->dev;
>>  	dev->platform_data		= dwc;
>>  	dwc->gadget->ops		= &dwc3_gadget_ops;
>

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v1 1/1] usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
  2021-10-05  8:51   ` Michael Grzeschik
@ 2021-10-05  9:17     ` Andy Shevchenko
  2021-10-05 10:49     ` Felipe Balbi
  2021-10-05 11:04     ` Greg Kroah-Hartman
  2 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2021-10-05  9:17 UTC (permalink / raw)
  To: Michael Grzeschik
  Cc: Ferry Toth, Andy Shevchenko, Greg Kroah-Hartman, USB,
	Linux Kernel Mailing List, Felipe Balbi

On Tue, Oct 5, 2021 at 11:52 AM Michael Grzeschik <mgr@pengutronix.de> wrote:
> On Mon, Oct 04, 2021 at 10:35:57PM +0200, Ferry Toth wrote:
> >Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
> >>The commit c6e23b89a95d ("usb: dwc3: gadget: set gadgets parent to the right
> >>controller") changed the device for the UDC and broke the user space scripts
> >>that instantiate the USB gadget(s) via ConfigFS.
> >
> >I confirm this regression on Intel Edison since at least 5.15-rc2
> >while in 5.14.0 it was working fine.
> >
> >This patch resolves the issue as tested on 5.15-rc4.
> >
> >Tested-by: Ferry Toth<fntoth@gmail.com>
>
> NACK! Why should we resolv an issue by reverting it to solve not working
> userspace.

Huh?!

It is
 a) used to work;
 b) stopped working after your commit.

To me it's a clear regression. Whatever deeper problem is there, I
really don't care. The change broke my _user space_ case!

> We already have this patch as a solution for solving a deeper
> Problem, regarding the allocator addressing the right device.

Then rework it. You have still time. Your case wasn't working and one
more release of not working is not an issue here.

> >>Revert it for now until the better solution will be proposed.
>
> So, I think fixing the userspace would be the right fix,

Huh?!
https://www.kernel.org/doc/html/latest/process/4.Coding.html#regressions

> not changing
> the kernel. Otherwise we should find a proper solution.

So, please do. v5.15 should still work on our devices with
distribution that uses ConfigFS, no?


-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1 1/1] usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
  2021-10-05  8:51   ` Michael Grzeschik
  2021-10-05  9:17     ` Andy Shevchenko
@ 2021-10-05 10:49     ` Felipe Balbi
  2021-10-05 11:04     ` Greg Kroah-Hartman
  2 siblings, 0 replies; 6+ messages in thread
From: Felipe Balbi @ 2021-10-05 10:49 UTC (permalink / raw)
  To: Michael Grzeschik
  Cc: Ferry Toth, Andy Shevchenko, Greg Kroah-Hartman, linux-usb, linux-kernel


Michael Grzeschik <mgr@pengutronix.de> writes:

> [[PGP Signed Part:Undecided]]
> On Mon, Oct 04, 2021 at 10:35:57PM +0200, Ferry Toth wrote:
>>Hi,
>>
>>Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
>>>The commit c6e23b89a95d ("usb: dwc3: gadget: set gadgets parent to the right
>>>controller") changed the device for the UDC and broke the user space scripts
>>>that instantiate the USB gadget(s) via ConfigFS.
>>
>> I confirm this regression on Intel Edison since at least 5.15-rc2
>> while in 5.14.0 it was working fine.
>>
>>This patch resolves the issue as tested on 5.15-rc4.
>>
>>Tested-by: Ferry Toth<fntoth@gmail.com>
>
> NACK! Why should we resolv an issue by reverting it to solve not working
> userspace. We already have this patch as a solution for solving a deeper

heh, there is only one rule in this community: thou shalt not break
userspace :-)

-- 
balbi

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

* Re: [PATCH v1 1/1] usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
  2021-10-05  8:51   ` Michael Grzeschik
  2021-10-05  9:17     ` Andy Shevchenko
  2021-10-05 10:49     ` Felipe Balbi
@ 2021-10-05 11:04     ` Greg Kroah-Hartman
  2 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-10-05 11:04 UTC (permalink / raw)
  To: Michael Grzeschik
  Cc: Ferry Toth, Andy Shevchenko, linux-usb, linux-kernel, Felipe Balbi

On Tue, Oct 05, 2021 at 10:51:00AM +0200, Michael Grzeschik wrote:
> On Mon, Oct 04, 2021 at 10:35:57PM +0200, Ferry Toth wrote:
> > Hi,
> > 
> > Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
> > > The commit c6e23b89a95d ("usb: dwc3: gadget: set gadgets parent to the right
> > > controller") changed the device for the UDC and broke the user space scripts
> > > that instantiate the USB gadget(s) via ConfigFS.
> > 
> > I confirm this regression on Intel Edison since at least 5.15-rc2 while
> > in 5.14.0 it was working fine.
> > 
> > This patch resolves the issue as tested on 5.15-rc4.
> > 
> > Tested-by: Ferry Toth<fntoth@gmail.com>
> 
> NACK! Why should we resolv an issue by reverting it to solve not working
> userspace. We already have this patch as a solution for solving a deeper
> Problem, regarding the allocator addressing the right device.
> 
> > > Revert it for now until the better solution will be proposed.
> 
> So, I think fixing the userspace would be the right fix, not changing
> the kernel. Otherwise we should find a proper solution.

We only really have one rule in Linux kernel development:

	If a kernel change breaks userspace, the kernel change needs to
	be reverted.

Go fix up the userspace tools first, ensure everyone has updated, and
then we can consider taking the change back into the kernel tree.

thanks,

greg k-h

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

end of thread, other threads:[~2021-10-05 11:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04 14:18 [PATCH v1 1/1] usb: dwc3: gadget: Revert "set gadgets parent to the right controller" Andy Shevchenko
2021-10-04 20:35 ` Ferry Toth
2021-10-05  8:51   ` Michael Grzeschik
2021-10-05  9:17     ` Andy Shevchenko
2021-10-05 10:49     ` Felipe Balbi
2021-10-05 11:04     ` Greg Kroah-Hartman

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.