On Mon, Aug 11, 2014 at 02:34:33PM +0200, Michael Grzeschik wrote:
> Hi Peter,
> 
> On Mon, Aug 11, 2014 at 12:56:47AM +0000, Peter Chen wrote:
> > > I have seen this call is still returning EOPNOTSUPP which is also
> > > returned by usb_gadget_connect and usb_gadget_disconnect if the pullup
> > > function is not available. Should it not handle that case somehow special?
> > > 
> > > 
> > > Is it still a valid condition to bailout if vbus is not active?
> > > 
> > 
> > Hi Michael,
> > 
> > I did this for possible pullup dp without connection (eg load gadget driver 
> > before
> > vbus connect), it breaks USB spec, see 7.1.7.3 Connect and Disconnect 
> > Signaling at USB 2.0 spec.
> > 
> > I don't know what exactly problem you met, but current pullup dp during 
> > loading
> > gadget driver behavior is not suitable for webcam and android use case even 
> > vbus
> > is there.
> 
> I still work with the uvc gadget. The code in gadget/f_uvc.c calls
> usb_function_deactivate. The code of uvc_function_bind will bail out in
> the error code path, when the usb cable is not plugged (vbus not valid)
> in that situation.

I see the problem, doesn't there have problem with usb cable connected?
I don't see any places can avoid pull up dp at udc-core during loading
gadget driver.

> 
> When the spec defines that calling pullup is only allowed on valid vbus,
> we should somehow tell something different then EOPNOTSUPP so the caller
> and that can bail out differently.
> 

I will have a look for this problem

-- 
Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to