RE: [PATCH v1] USB:gadget: Fix a warning while loading g_mass_storage

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

 



 
> On 06/04/2014 09:45 AM, Peter Chen wrote:
> >
> >> commit d18f7116a5ddb8263fe62b05ad63e5ceb5875791
> >> Author: Robert Baldyga <r.baldyga@xxxxxxxxxxx>
> >> Date:   Thu Nov 21 13:49:18 2013 +0100
> >>
> >>       usb: gadget: s3c-hsotg: fix disconnect handling
> >>
> >>       This patch moves s3c_hsotg_disconnect function call from
> >> USBSusp interrupt
> >>       handler to SET_ADDRESS request handler.
> >>
> > It is a little strange we call gadget's disconnect at SET_ADDRESS?
> > How the udc calls gadget driver the disconnection has happened when
> > the usb cable is disconnected from the host?
> >
> > Usually, we call gadget's disconnect at two situations
> >
> > - udc's reset handler if udc's speed is not UNKNOWN, it is usually
> > happened when the host sends reset after enumeration.
> > - udc's disconnect handler, it is usually happened when the usb cable
> > is disconnected from host.
> 
> Hmm, usually the two situations, but according to the commit log, s3c
> hsotg does not support Disconnected interrupt for device mode, so the
> second situation does not happen for s3c hsotg, therefore, he has to
> disconnect the connection before it is connected again.
> 

Then, it seems Samsung uses other solution to detect disconnection, otherwise
how it notifies the app it has disconnected, eg, we disconnect usb cable with
pc for android phone, the usb icon should be disappeared.

Peter

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