On Fri, 14 Feb 2014, Stanislaw Gruszka wrote:

> On Fri, Feb 14, 2014 at 10:31:20AM -0500, Alan Stern wrote:
> > On Fri, 14 Feb 2014, Stanislaw Gruszka wrote:
> > 
> > > On Thu, Feb 13, 2014 at 11:45:16AM -0500, Alan Stern wrote:
> > > > @@ -1074,6 +1089,7 @@ static int proc_clearhalt(struct dev_sta
> > > >         ret = checkintf(ps, ret);
> > > >         if (ret)
> > > >                 return ret;
> > > > +       check_reset_of_active_ep(ps->dev, ep, "CLEAR_HALT");
> > > >         if (ep & USB_DIR_IN)
> > > >                 pipe = usb_rcvbulkpipe(ps->dev, ep & 0x7f);
> > > >         else
> > > 
> > > In documentation is written:
> > 
> > What documentation?  Where?  Maybe the documentation should be updated.
> 
> Documentation/DocBook/usb.tmpl

Heh.  That file hasn't been updated significantly since 2006!

> > > Is possible that user space driver can issue dozen of URBs , then get
> > > -EPIPE for last of them, and then call CLEAR_HALT ?
> > 
> > Certainly that is possible.  It wouldn't trigger the warning, because
> > after the last URB terminates with -EPIPE there won't be any more URBs
> > in the queue.
> > 
> > > According
> > > documentation, this behaviour should be correct.
> > 
> > And indeed, it is correct.
> > 
> > What would be incorrect is if userspace issues dozens of URBs, gets
> > -EPIPE for the third URB, and then does CLEAR_HALT without first
> > cancelling all the remaining URBs.
> 
> Now I know what to tell user space maintainers. Thank you!

You're welcome.

Alan Stern

--
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