On Tue, Dec 29, 2020 at 01:56:00PM +0800, Peter Chen wrote: > On Tue, Dec 1, 2020 at 2:45 PM Peter Chen <hzpeterchen@xxxxxxxxx> wrote: > > > BR, > > Peter Chen > > > > On Thu, Oct 29, 2020 at 6:45 PM Peter Chen <hzpeterchen@xxxxxxxxx> wrote: > > > > > > On Tue, Oct 13, 2020 at 8:01 PM Peter Chen <peter.chen@xxxxxxx> wrote: > > > > > > > > Current UDC core connects gadget during the loading gadget flow > > > > (udc_bind_to_driver->usb_udc_connect_control), but for > > > > platforms which do not connect gadget if the VBUS is not there, > > > > they call usb_gadget_disconnect, but the gadget is not connected > > > > at this time, notify disconnecton for the gadget driver is meaningless > > > > at this situation. > > > > > > > > Signed-off-by: Peter Chen <peter.chen@xxxxxxx> > > > > --- > > > > drivers/usb/gadget/udc/core.c | 3 +++ > > > > 1 file changed, 3 insertions(+) > > > > > > > > diff --git a/drivers/usb/gadget/udc/core.c > > b/drivers/usb/gadget/udc/core.c > > > > index 215ecbe8b692..8ad4203dea8c 100644 > > > > --- a/drivers/usb/gadget/udc/core.c > > > > +++ b/drivers/usb/gadget/udc/core.c > > > > @@ -672,6 +672,9 @@ int usb_gadget_connect(struct usb_gadget *gadget) > > > > goto out; > > > > } > > > > > > > > + if (!gadget->connected) > > > > + goto out; > > > > + > > > > if (gadget->deactivated) { > > > > /* > > > > * If gadget is deactivated we only save new state. > > > > -- > > > > 2.17.1 > > > > > > > > > > A gentle ping. > > > > > > > ping again. > > > > Peter > > > > Greg, would you please help to catch it up? Again, can you please resend? thanks, greg k-h