Re: [PATCH] usb: dwc3: gadget: remove duplicated code from __dwc3_gadget_ep_set_halt

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

 



Hi,

On Mon, Jun 25, 2012 at 08:04:08PM +0530, Pratyush Anand wrote:
> On 6/25/2012 7:41 PM, Felipe Balbi wrote:
> >whenever we want to stall ep0, we always call
> >dwc3_ep0_stall_and_restart() which makes sure
> 
> Probably this is not correct. A control ep can also be stalled by
> calling set_halt.
> 
> So we can have
> dwc3_gadget_ep0_ops.set_halt as dwc3_ep0_stall_and_restart or some
> similar function.

I don't think we should allow gadget driver to directly stall ep0. I
don't see the point because ep0 stall should be done only in case of a
bad ctrl request or something which we found to be bogus and that we
capture through the return of ->setup().

The call in uvc_v4l2.c seems really bogus to me, as it's trying to stall
the endpoint when argument passed to ->ioctl() is screwed up. I don't
think that's correct at all.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux