Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932498AbXBWSMB (ORCPT ); Fri, 23 Feb 2007 13:12:01 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932500AbXBWSMB (ORCPT ); Fri, 23 Feb 2007 13:12:01 -0500 Received: from firewall.rowland.harvard.edu ([140.247.233.35]:29674 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S932498AbXBWSMB (ORCPT ); Fri, 23 Feb 2007 13:12:01 -0500 Date: Fri, 23 Feb 2007 13:11:59 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Duncan Sands cc: Pete Zaitcev , Linux Kernel Mailing List , , Simon Arlott <254ad70138dc1cdf241hjzcr0007jhhw@thunder.lp0.eu> Subject: Re: [linux-usb-devel] [PATCH 2/2] usbatm: Detect usb device shutdown and ignore failed urbs. In-Reply-To: <200702231805.44397.duncan.sands@math.u-psud.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 29 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/