LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Duncan Sands <duncan.sands@math.u-psud.fr>
Cc: Pete Zaitcev <zaitcev@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	<linux-usb-devel@lists.sourceforge.net>,
	Simon Arlott <254ad70138dc1cdf241hjzcr0007jhhw@thunder.lp0.eu>
Subject: Re: [linux-usb-devel] [PATCH 2/2] usbatm: Detect usb device shutdown and ignore failed urbs.
Date: Fri, 23 Feb 2007 13:11:59 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.0702231306450.14262-100000@netrider.rowland.org> (raw)
In-Reply-To: <200702231805.44397.duncan.sands@math.u-psud.fr>

On Fri, 23 Feb 2007, Duncan Sands wrote:

> Thanks Alan.  The original question was: if an urb fails with an error,
> is there any point in resubmitting it after a delay (which is what the
> driver usually does) if the error was -ESHUTDOWN?  It sounds like there
> is no point to it.

No, there isn't.

>  And if the device is not disconnected, then it could
> even be harmful since the urb will be resubmitted endlessly...  While on
> the topic, are there any other error codes for which an urb should not be
> resubmitted?

Let's see...  ENOENT and ECONNRESET indicate the URB was unlinked, so you
probably don't want to resubmit it.  EPIPE indicates a problem on the 
device end, so you would want to fix the problem before resubmitting (at 
the very least you would want to clear the halt).  EOVERFLOW is 
questionable; if the device sent too much data once then it might do so 
again.  Ditto for EREMOTEIO (the device sent too little data).  ENODEV 
means the device was removed, so you definitely don't want to resubmit.

Alan Stern


      reply	other threads:[~2007-02-23 18:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21 21:39 Simon Arlott
2007-02-22 10:43 ` Duncan Sands
2007-02-22 23:53   ` Pete Zaitcev
2007-02-23  9:36     ` Duncan Sands
2007-02-23 16:16       ` [linux-usb-devel] " Alan Stern
2007-02-23 17:05         ` Duncan Sands
2007-02-23 18:11           ` Alan Stern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44L0.0702231306450.14262-100000@netrider.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=254ad70138dc1cdf241hjzcr0007jhhw@thunder.lp0.eu \
    --cc=duncan.sands@math.u-psud.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=zaitcev@redhat.com \
    --subject='Re: [linux-usb-devel] [PATCH 2/2] usbatm: Detect usb device shutdown and ignore failed urbs.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).