|
|
|
Re: [PATCH] usb: gadget: dummy: don't disconnect on gadget removal | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
On Thu, 19 Apr 2012, Alexander Shishkin wrote:
> I'm using linux-next, and as of today, the call order is still like I
> listed before. The change that introduced this order is 8ae8090c (usb:
> gadget: udc-core: fix asymmetric calls in remove_driver), which is also
> present in "usb-linus" branch of linux-usb tree (that's how, I assume
> it's got to linux-next) and Felipe's "fixes" and "master".
>
> So no, I didn't make this up. ;)
>
> The change seems logical though: udc_stop() may have disabled the usb
> controller, and calling pullup() after that doesn't look very useful.
Have you tried out this patch? After I upgraded to 3.4-rc4 I
encountered the same problem as you did, and the patch fixed it.
The two disconnect calls may be redundant; if the UDC driver implements
a pullup method then setting the pullup to 0 ought to cause the gadget
driver's disconnect method to be called.
Alan Stern
Index: usb-3.4/drivers/usb/gadget/udc-core.c
===================================================================
--- usb-3.4.orig/drivers/usb/gadget/udc-core.c
+++ usb-3.4/drivers/usb/gadget/udc-core.c
@@ -263,8 +263,8 @@ static void usb_gadget_remove_driver(str
if (udc_is_newstyle(udc)) {
udc->driver->disconnect(udc->gadget);
- udc->driver->unbind(udc->gadget);
usb_gadget_disconnect(udc->gadget);
+ udc->driver->unbind(udc->gadget);
usb_gadget_udc_stop(udc->gadget, udc->driver);
} else {
usb_gadget_stop(udc->gadget, udc->driver);
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html

[Linux Media] [Video for Linux] [Linux Input] [Linux Audio Users] [Photo] [Yosemite News] [Yosemite Photos] [Free Online Dating] [Linux Kernel] [Linux SCSI] [Old Linux USB Devel Archive] [More Archives]
![]() |
![]() |