lkml.org 
[lkml]   [2023]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[BUG REPORT] USB UDC/gadget regression
Hi,

After commit fc274c1e9973 ("USB: gadget: Add a new bus for gadgets"),
g_ether started to crash on modprobe when used with OMAP UDC.

It seems that because of drv->bus getting set to NULL in the middle of
bus_add_driver() things go wrong.

The below simple change seems to fix it, but I'm not sure if this is
the correct way? Many drivers seem to be doing the same in UDC start -
are they really all broken?

diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c
index 6e9314e95be3..47d83bbb09e3 100644
--- a/drivers/usb/gadget/udc/omap_udc.c
+++ b/drivers/usb/gadget/udc/omap_udc.c
@@ -2062,7 +2062,6 @@ static int omap_udc_start(struct usb_gadget *g,
udc->softconnect = 1;

/* hook up the driver */
- driver->driver.bus = NULL;
udc->driver = driver;
spin_unlock_irqrestore(&udc->lock, flags);

A.
\
 
 \ /
  Last update: 2023-03-27 00:06    [W:0.033 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site