On Thu, 7 Sep 2006, Pete Zaitcev wrote:

> On Tue, 15 Aug 2006 11:37:49 -0400 (EDT), Alan Stern <[EMAIL PROTECTED]> 
> wrote:
> 
> > As long as you are cleaning things up, here are a few more things to 
> > correct along the way...  :-)
> 
> How about now?

I'd still prefer to see the excessive comments trimmed out:

> diff -urp -X dontdiff linux-2.6.18-rc6/drivers/net/irda/irda-usb.c 
> linux-2.6.18-rc6-lem/drivers/net/irda/irda-usb.c
> --- linux-2.6.18-rc6/drivers/net/irda/irda-usb.c      2006-09-06 
> 21:56:16.000000000 -0700
> +++ linux-2.6.18-rc6-lem/drivers/net/irda/irda-usb.c  2006-09-07 
> 22:17:03.000000000 -0700
> @@ -673,7 +673,6 @@ static void irda_usb_net_timeout(struct 
>                       break;
>               case -ECONNABORTED:             /* -103 */

This code can't ever occur.  It's part of the gadget API but not the host 
API.

>               case -ECONNRESET:               /* -104 */
> -             case -ETIMEDOUT:                /* -110 */
>               case -ENOENT:                   /* -2 (urb unlinked by us)  */
>               default:                        /* ??? - Play safe */
>                       urb->status = 0;
> @@ -714,7 +713,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)  */
>               default:                        /* ??? - Play safe */
>                       if(skb != NULL) {
> @@ -845,14 +843,14 @@ static void irda_usb_receive(struct urb 
>                       self->stats.rx_crc_errors++;    
>                       /* Also precursor to a hot-unplug on UHCI. */
>                       /* Fallthrough... */
> -             case -ECONNRESET:               /* -104 */
> +             case -ECONNRESET:
>                       /* Random error, if I remember correctly */
>                       /* uhci_cleanup_unlink() is going to kill the Rx
>                        * URB just after we return. No problem, at this
>                        * point the URB will be idle ;-) - Jean II */
> -             case -ESHUTDOWN:                /* -108 */
> +             case -ESHUTDOWN:
>                       /* That's usually a hot-unplug. Submit will fail... */
> -             case -ETIMEDOUT:                /* -110 */
> +             case -ETIME:
>                       /* Usually precursor to a hot-unplug on OHCI. */
>               default:
>                       self->stats.rx_errors++;

All those -104's, -108's, and so on are unnecessary, distracting, and on
some architectures completely wrong.

> diff -urp -X dontdiff linux-2.6.18-rc6/drivers/usb/net/usbnet.c 
> linux-2.6.18-rc6-lem/drivers/usb/net/usbnet.c
> --- linux-2.6.18-rc6/drivers/usb/net/usbnet.c 2006-09-06 21:56:33.000000000 
> -0700
> +++ linux-2.6.18-rc6-lem/drivers/usb/net/usbnet.c     2006-09-07 
> 22:19:42.000000000 -0700
...
> @@ -798,7 +798,7 @@ static void tx_complete (struct urb *urb
>               // like rx, tx gets controller i/o faults during khubd delays
>               // and so it uses the same throttling mechanism.
>               case -EPROTO:           // ehci
> -             case -ETIMEDOUT:        // ohci
> +             case -ETIME:            // ohci
>               case -EILSEQ:           // uhci
>                       if (!timer_pending (&dev->delay)) {
>                               mod_timer (&dev->delay,

Those "// [eou]hci" comments aren't any good either.

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

Reply via email to