usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
Subsystems (2)
PATCH 1/1 usb: dwc3: gadget: Revert "set gadgets parent to the right controller"
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.
--- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/gadget.c +1 -1
@@ -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;
Signature · 1 line
2.33.0
Hi,
Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
Quoted 3 lines
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.
Quoted 20 lines
Revert it for now until the better solution will be proposed.
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/dwc3/gadget.c +1
-1@@ -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;
Quoted 7 lines · Ferry Toth
Hi,
Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
Quoted 3 lines
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.
Quoted 5 lines
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<[email protected]>
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.
Quoted 1 line
Quoted 1 line
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.
Quoted 18 lines
Quoted 17 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/dwc3/gadget.c +1
-1@@ -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;
Signature · 4 lines
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 |
Quoted 9 lines · Michael Grzeschik
Quoted 8 lines · Ferry Toth
Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
Quoted 3 lines
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.
Quoted 6 lines
Quoted 3 lines
This patch resolves the issue as tested on 5.15-rc4.
Tested-by Ferry Toth<[email protected]>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!
Quoted 2 lines
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.
Quoted 3 lines
Quoted 1 line
Quoted 1 line
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
Quoted 2 lines
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?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 12 lines · Michael Grzeschik
[[PGP Signed Part:Undecided]]
Quoted 10 lines · Ferry Toth
Hi,
Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
Quoted 3 lines
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.
Quoted 6 lines
Quoted 3 lines
This patch resolves the issue as tested on 5.15-rc4.
Tested-by Ferry Toth<[email protected]>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 :-)
Signature · 1 line
balbi
Greg Kroah-Hartman
maintainerQuoted 15 lines · Michael Grzeschik
Quoted 7 lines · Ferry Toth
Hi,
Op 04-10-2021 om 16:18 schreef Andy Shevchenko:
Quoted 3 lines
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.Quoted 6 lines
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<[email protected]>
Quoted 8 lines
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.
Quoted 1 line
Quoted 1 line
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