On Mon, 14 Aug 2006, Pete Zaitcev wrote: > However, I see that I didn't do the due dilligence, and a replacement > is needed in a few more places, notably in input/. Please see attached > (cumulative).
In general I think this is fine. As long as you are cleaning things up, here are a few more things to correct along the way... :-) > diff -urp -X dontdiff linux-2.6.18-rc1/Documentation/usb/error-codes.txt > linux-2.6.18-rc1-lem/Documentation/usb/error-codes.txt > --- linux-2.6.18-rc1/Documentation/usb/error-codes.txt 2006-01-03 > 20:02:53.000000000 -0800 > +++ linux-2.6.18-rc1-lem/Documentation/usb/error-codes.txt 2006-07-25 > 12:56:52.000000000 -0700 There's a paragraph right at the end of this file which your update has made obsolete. It should be removed. > diff -urp -X dontdiff linux-2.6.18-rc1/drivers/isdn/hisax/hfc_usb.h > linux-2.6.18-rc1-lem/drivers/isdn/hisax/hfc_usb.h > --- linux-2.6.18-rc1/drivers/isdn/hisax/hfc_usb.h 2006-01-03 > 20:03:15.000000000 -0800 > +++ linux-2.6.18-rc1-lem/drivers/isdn/hisax/hfc_usb.h 2006-08-14 > 17:20:27.000000000 -0700 > @@ -141,7 +141,7 @@ static struct hfcusb_symbolic_list urb_e > {-EOVERFLOW, "Babble (bad cable?)"}, > {-EPROTO, "Bit-stuff error (bad cable?)"}, > {-EILSEQ, "CRC/Timeout"}, > - {-ETIMEDOUT, "NAK (device does not respond)"}, > + {-ETIME, "NAK (device does not respond)"}, This same comment ("NAK") is present in lots of drivers. Presumably somebody did it once and then it got copied over and over. It's misleading at best. This error doesn't arise because the device has sent too many NAKs, as some of the comments state; it arises because the device didn't send anything at all. (Possibly it might also arise because the device sent a NAK in response to a Setup packet, which is illegal -- but the comment is still misleading.) Best to change it here and in all the other spots simply to "device not responding". > diff -urp -X dontdiff > linux-2.6.18-rc1/drivers/media/dvb/dvb-usb/dvb-usb-urb.c > linux-2.6.18-rc1-lem/drivers/media/dvb/dvb-usb/dvb-usb-urb.c > --- linux-2.6.18-rc1/drivers/media/dvb/dvb-usb/dvb-usb-urb.c 2006-06-21 > 14:14:28.000000000 -0700 > +++ linux-2.6.18-rc1-lem/drivers/media/dvb/dvb-usb/dvb-usb-urb.c > 2006-08-14 17:17:27.000000000 -0700 > @@ -80,7 +80,7 @@ static void dvb_usb_urb_complete(struct > > switch (urb->status) { > case 0: /* success */ > - case -ETIMEDOUT: /* NAK */ > + case -ETIME: /* NAK */ See? Here it is again. > diff -urp -X dontdiff linux-2.6.18-rc1/drivers/net/irda/irda-usb.c > linux-2.6.18-rc1-lem/drivers/net/irda/irda-usb.c > --- linux-2.6.18-rc1/drivers/net/irda/irda-usb.c 2006-07-09 > 17:54:19.000000000 -0700 > +++ linux-2.6.18-rc1-lem/drivers/net/irda/irda-usb.c 2006-08-14 > 17:58:00.000000000 -0700 > @@ -673,7 +673,6 @@ static void irda_usb_net_timeout(struct > break; > case -ECONNABORTED: /* -103 */ > case -ECONNRESET: /* -104 */ > - case -ETIMEDOUT: /* -110 */ > case -ENOENT: /* -2 (urb unlinked by us) */ These numbers are arch-specific; they don't belong in the source code. That's why we have include/asm/errno.h. > diff -urp -X dontdiff linux-2.6.18-rc1/drivers/usb/host/ohci.h > linux-2.6.18-rc1-lem/drivers/usb/host/ohci.h > --- linux-2.6.18-rc1/drivers/usb/host/ohci.h 2006-01-03 20:03:35.000000000 > -0800 > +++ linux-2.6.18-rc1-lem/drivers/usb/host/ohci.h 2006-07-27 > 18:23:03.000000000 -0700 > @@ -388,6 +388,7 @@ struct ohci_hcd { > u32 hc_control; /* copy of hc control reg */ > unsigned long next_statechange; /* suspend/resume */ > u32 fminterval; /* saved register */ > + int irq_disabled; Where did that come from? > diff -urp -X dontdiff linux-2.6.18-rc1/drivers/usb/misc/auerswald.c > linux-2.6.18-rc1-lem/drivers/usb/misc/auerswald.c > --- linux-2.6.18-rc1/drivers/usb/misc/auerswald.c 2006-06-21 > 14:14:52.000000000 -0700 > +++ linux-2.6.18-rc1-lem/drivers/usb/misc/auerswald.c 2006-08-14 > 17:24:55.000000000 -0700 > @@ -806,7 +806,7 @@ static void auerbuf_releasebuf( pauerbuf > 0 Initial, OK > -EINPROGRESS during submission until end > -ENOENT if urb is unlinked > --ETIMEDOUT Transfer timed out, NAK > +-ETIME Too many NAKs (ohci only) This is even worse than the others! And that mention about "ohci only" is clearly wrong, since your patch shows that sl811 can return that error code as well. > diff -urp -X dontdiff linux-2.6.18-rc1/drivers/usb/net/usbnet.c > linux-2.6.18-rc1-lem/drivers/usb/net/usbnet.c > --- linux-2.6.18-rc1/drivers/usb/net/usbnet.c 2006-07-09 17:54:36.000000000 > -0700 > +++ linux-2.6.18-rc1-lem/drivers/usb/net/usbnet.c 2006-08-14 > 17:54:52.000000000 -0700 > @@ -413,7 +413,7 @@ static void rx_complete (struct urb *urb > // throttle down resubmits, to avoid log floods; just temporarily, > // so we still recover when the fault isn't a khubd delay. > case -EPROTO: // ehci > - case -ETIMEDOUT: // ohci > + case -ETIME: // ohci > case -EILSEQ: // uhci Best to remove those comments. They are subject to change in the future and they don't really explain anything useful. > diff -urp -X dontdiff linux-2.6.18-rc1/sound/usb/usbmidi.c > linux-2.6.18-rc1-lem/sound/usb/usbmidi.c > --- linux-2.6.18-rc1/sound/usb/usbmidi.c 2006-07-09 17:55:24.000000000 > -0700 > +++ linux-2.6.18-rc1-lem/sound/usb/usbmidi.c 2006-08-14 18:33:55.000000000 > -0700 > @@ -182,7 +182,7 @@ static int snd_usbmidi_urb_error(int sta > return -ENODEV; > /* errors that might occur during unplugging */ > case -EPROTO: /* EHCI */ > - case -ETIMEDOUT: /* OHCI */ > + case -ETIME: /* OHCI */ > case -EILSEQ: /* UHCI */ Same here. Alan Stern ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel