[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1406051018580.1103-100000@iolanthe.rowland.org>
Date: Thu, 5 Jun 2014 10:21:19 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Peter Chen <Peter.Chen@...escale.com>
cc: "Yang,Wei" <Wei.Yang@...driver.com>,
Michal Nazarewicz <mina86@...a86.com>,
Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
Felipe Balbi <balbi@...com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
USB list <linux-usb@...r.kernel.org>,
Kernel development list <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v1] USB:gadget: Fix a warning while loading g_mass_storage
On Thu, 5 Jun 2014, Peter Chen wrote:
> > > > 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.
> >
> > Why does he need to do that? Why not just skip the disconnect
> > notification if the hardware can't detect a disconnect?
> >
>
> We must call gadget driver's disconnect, otherwise, there at least
> has a warning when unload module, please refer to __composite_unbind
> at drivers/usb/gadget/composite.c
The disconnect callback can run just before unbind. That's not a valid
reason for doing a disconnect notification as part of SET_ADDRESS.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists