All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: musb: Fix duplicate ops assignment in ti_musb_peripheral
@ 2025-06-11 17:10 Kory Maincent
  2025-06-13  9:15 ` Mattijs Korpershoek
  2025-06-16  7:10 ` Mattijs Korpershoek
  0 siblings, 2 replies; 3+ messages in thread
From: Kory Maincent @ 2025-06-11 17:10 UTC (permalink / raw)
  To: Jean-Jacques Hiblot, u-boot
  Cc: Kory Maincent, thomas.petazzoni, Marek Vasut, Tom Rini,
	Mattijs Korpershoek

Remove duplicate .ops assignment that was overriding the correct
ti_musb_gadget_ops with musb_usb_ops (host ops) in the ti_musb_peripheral
driver. This was causing U-Boot crashes when trying to call the
handle_interrupts operation since the wrong ops structure was being used.

Fixes: 7d98dbcc3dc ("usb: musb-new: Add support for DM_USB")
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
 drivers/usb/musb-new/ti-musb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index ec1baa9337d..967d0953875 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -282,7 +282,6 @@ U_BOOT_DRIVER(ti_musb_peripheral) = {
 	.ops	= &ti_musb_gadget_ops,
 	.probe = ti_musb_peripheral_probe,
 	.remove = ti_musb_peripheral_remove,
-	.ops	= &musb_usb_ops,
 	.plat_auto	= sizeof(struct ti_musb_plat),
 	.priv_auto	= sizeof(struct ti_musb_peripheral),
 	.flags = DM_FLAG_PRE_RELOC,
-- 
2.43.0


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

* Re: [PATCH] usb: gadget: musb: Fix duplicate ops assignment in ti_musb_peripheral
  2025-06-11 17:10 [PATCH] usb: gadget: musb: Fix duplicate ops assignment in ti_musb_peripheral Kory Maincent
@ 2025-06-13  9:15 ` Mattijs Korpershoek
  2025-06-16  7:10 ` Mattijs Korpershoek
  1 sibling, 0 replies; 3+ messages in thread
From: Mattijs Korpershoek @ 2025-06-13  9:15 UTC (permalink / raw)
  To: Kory Maincent, Jean-Jacques Hiblot, u-boot
  Cc: Kory Maincent, thomas.petazzoni, Marek Vasut, Tom Rini,
	Mattijs Korpershoek

Hi Kory,

Thank you for the patch.

On Wed, Jun 11, 2025 at 19:10, Kory Maincent <kory.maincent@bootlin.com> wrote:

> Remove duplicate .ops assignment that was overriding the correct
> ti_musb_gadget_ops with musb_usb_ops (host ops) in the ti_musb_peripheral
> driver. This was causing U-Boot crashes when trying to call the
> handle_interrupts operation since the wrong ops structure was being used.
>
> Fixes: 7d98dbcc3dc ("usb: musb-new: Add support for DM_USB")

I think this should also be flagged as:

Fixes: 281eaf1ed83a ("usb: gadget: musb: Convert interrupt handling to usb_gadget_generic_ops")

I can do that while applying.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>

> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
>  drivers/usb/musb-new/ti-musb.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
> index ec1baa9337d..967d0953875 100644
> --- a/drivers/usb/musb-new/ti-musb.c
> +++ b/drivers/usb/musb-new/ti-musb.c
> @@ -282,7 +282,6 @@ U_BOOT_DRIVER(ti_musb_peripheral) = {
>  	.ops	= &ti_musb_gadget_ops,
>  	.probe = ti_musb_peripheral_probe,
>  	.remove = ti_musb_peripheral_remove,
> -	.ops	= &musb_usb_ops,
>  	.plat_auto	= sizeof(struct ti_musb_plat),
>  	.priv_auto	= sizeof(struct ti_musb_peripheral),
>  	.flags = DM_FLAG_PRE_RELOC,
> -- 
> 2.43.0

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

* Re: [PATCH] usb: gadget: musb: Fix duplicate ops assignment in ti_musb_peripheral
  2025-06-11 17:10 [PATCH] usb: gadget: musb: Fix duplicate ops assignment in ti_musb_peripheral Kory Maincent
  2025-06-13  9:15 ` Mattijs Korpershoek
@ 2025-06-16  7:10 ` Mattijs Korpershoek
  1 sibling, 0 replies; 3+ messages in thread
From: Mattijs Korpershoek @ 2025-06-16  7:10 UTC (permalink / raw)
  To: Jean-Jacques Hiblot, u-boot, Kory Maincent
  Cc: thomas.petazzoni, Marek Vasut, Tom Rini

Hi,

On Wed, 11 Jun 2025 19:10:30 +0200, Kory Maincent wrote:
> Remove duplicate .ops assignment that was overriding the correct
> ti_musb_gadget_ops with musb_usb_ops (host ops) in the ti_musb_peripheral
> driver. This was causing U-Boot crashes when trying to call the
> handle_interrupts operation since the wrong ops structure was being used.
> 
> 

Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)

[1/1] usb: gadget: musb: Fix duplicate ops assignment in ti_musb_peripheral
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/e6eca9ea6457e79acb4e2a426f1e078842c17b25

--
Mattijs

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

end of thread, other threads:[~2025-06-16  7:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-11 17:10 [PATCH] usb: gadget: musb: Fix duplicate ops assignment in ti_musb_peripheral Kory Maincent
2025-06-13  9:15 ` Mattijs Korpershoek
2025-06-16  7:10 ` Mattijs Korpershoek

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.