Re: [PATCH] usb: gadget: dummy: don't disconnect on gadget removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Apr 2012, Felipe Balbi wrote:

> > You'd be right except for one thing: You listed the code from
> > udc-core.c:usb_gadget_remove_driver() wrongly.  In my tree it actually
> > looks like this:
> > 
> > 	if (udc_is_newstyle(udc)) {
> > 		udc->driver->disconnect(udc->gadget);
> > 		udc->driver->unbind(udc->gadget);
> > 		usb_gadget_udc_stop(udc->gadget, udc->driver);
> > 		usb_gadget_disconnect(udc->gadget);
> > 	} else {
> > 		usb_gadget_stop(udc->gadget, udc->driver);
> > 	}
> > 
> > Notice the relative order of the usb_gadget_disconnect() and 
> > usb_gadget_udc_stop() calls.  This hasn't been changed since 3.4-rc2, 
> > has it?  I hope not -- if it has changed then it is now wrong.
> 
> you need to fetch Greg's usb-linus branch ;-)

In fact I have it -- the code listed above is the most recent version
in the usb-linus branch.

(Argh!  It turns out one of my scripts needs to be fixed.  It depends
on there not being any tags reachable from the main linus branch other
than the vX.Y and vX.Y-rcN tags created by Linus himself.  But now
Greg's usb-X.Y-rcN tags are there too.  That fooled me into thinking I
was using 3.4-rc2 with only slight additions when in fact I was using
usb-3.4-rc2 with slight additions.  I'll have to restrict the script to
match only tag names beginning with 'v'.)

Anyway, apparently Alexander hasn't gotten commit
8ae8090c82eb407267001f75b3d256b3bd4ae691 (usb: gadget: udc-core: fix
asymmetric calls in remove_driver) yet.  Presumably that will take care
of his problem.

Alan Stern

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux