Re: [PATCH v2 2/5] usb: chipidea: udc: add OTG status request handling

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

 



On Fri, Mar 13, 2015 at 09:41:13PM +0800, Li Jun wrote:
> On Fri, Mar 13, 2015 at 11:01:47AM +0800, Peter Chen wrote:
> > On Thu, Mar 12, 2015 at 10:30:21AM +0800, Li Jun wrote:
> > > From: Li Jun <b47624@xxxxxxxxxxxxx>
> > > 
> > > Peripheral answers OTG status selector request from host according to
> > > host_request_flag of gadget, length is 1.
> > > 
> > > Signed-off-by: Li Jun <jun.li@xxxxxxxxxxxxx>
> > > ---
> > >  drivers/usb/chipidea/udc.c |   28 +++++++++++++++++++++++-----
> > >  1 file changed, 23 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> > > index 4254792..eed66bc 100644
> > > --- a/drivers/usb/chipidea/udc.c
> > > +++ b/drivers/usb/chipidea/udc.c
> > > @@ -831,7 +831,17 @@ __acquires(hwep->lock)
> > >  		return -ENOMEM;
> > >  
> > >  	req->complete = isr_get_status_complete;
> > > -	req->length   = 2;
> > > +	if (setup->wIndex == OTG_STS_SELECTOR) {
> > 
> > It seems you define OTG_STS_SELECTOR at your 4/5, move it
> > to this one to avoid 'git bisect' problem.
> > 
> 
> I will resolve this.
> 
> Li Jun
> > > +		if (ci_otg_is_fsm_mode(ci)) {
> > > +			req->length = 1;
> > > +		} else {
> > > +			retval = -ENOTSUPP;
> > > +			goto err_free_req;
> > > +		}
> > 
> > If we don't support it, why not stall it?
> > 
> 
> This error handling will stall/halt it, isn't it?
> 

Oh, yes, it will.

-- 

Best Regards,
Peter Chen
--
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