Re: [PATCH 2/3] usb: dwc3: gadget: implement ->reset notification

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

 



On Thu, 16 Aug 2012, Felipe Balbi wrote:

> After introducing the new ->reset method on
> struct usb_gadget_driver, UDC drivers are
> required to implement proper handling for it.
> 
> This patch adds proper ->reset handling for
> dwc3 driver.

After working on the equivalent change for net2280, I see what you
meant about "don't call disconnect if we get a reset when gadget never
enumerated".  (Actually the check is for whether we negotiated a speed, 
not whether we got all the way through enumeration.)

In fact we should keep this rule.  The reason is simple: VBUS can 
bounce when a cable is plugged in or unplugged.  We want to report only 
the first disconnect event to the gadget driver.

Also, there's no reason to report the very first reset, or the first 
reset following a disconnect.  At such times the gadget driver should 
already be in an appropriately initialized state.

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