Re: [PATCH 2/2] usb: musb: notify USB_EVENT_ENUMERATED from musb_gadget_vbus_draw()

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

 



On Wed, Sep 22, 2010 at 04:34:59AM -0500, Heikki Krogerus wrote:
On Wed, Sep 22, 2010 at 11:03:16AM +0200, ext Felipe Balbi wrote:
Hi,

On Wed, Sep 22, 2010 at 04:01:03AM -0500, Heikki Krogerus wrote:
to me, you should always notify calls to usb_gadget_vbus_draw(), even if
it's enumerated with 0mA. It'll help us tracing down problems with
gadget drivers. If there are any.

Fair enough, but I would like to avoid resending notifications with
the same mA.

but why would that happen ? Only if host is selecting same configuration
twice :-p Or some driver is calling usb_gadget_vbus_draw() at the wrong
location.

If I remove the 0mA condition, I'm seeing first 100mA notification
then 0, 100 again and finally 500 from the configuration. This is a lot
of notifications, but I guess you are correct. Let's remove all
conditions.

the initial 100mA is a default state from musb, see
musb_gadget.c::musb_g_reset().

the zero, you need to check where it's coming from, but maybe from
musb_g_disconnect() (although musb_g_disconnect should be called here) ??

the other 100 is from musb_g_reset() again, and the 500mA is after a
configuration is actually chosen. So the only wrong thing is the
musb_g_disconnect().

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