On Thursday 10 February 2005 8:13 am, Alan Stern wrote:
> On Wed, 9 Feb 2005, David Brownell wrote:
>
> > > Do you mind using a different error
> > > code for no-response?
> >
> > I thought about it at one point, but didn't see a good choice about
> > what a better code would be. Got a suggested patch to catch up to
> > your doc change?
>
> Here's one. Admittedly, -EPROTO might not be a great choice. But on UHCI
> and EHCI you can't do any better, and it's documented. What do you think?
I don't like the idea of discarding fault details like that; they've been
too useful for tracking down the root causes of bugs. I also think that
EPROTO is way overused. How about ETIME, to avoid discarding the details?
But just reverting that particular doc change would be simplest, since
this doesn't update the various drivers that know ETIMEDOUT gets returned
in various cases.
In fact we should maybe use ETIME in usbcore not ETIMEDOUT (for the
request timer expiring). Likewise, ECANCELED rather than ECONNRESET
(for unlinking). Overall though, I don't much like changing the fault
behavior for existing calls; it's likely to add hard-to-find bugs.
- Dave
>
> Alan Stern
>
>
> ===== drivers/usb/host/ohci.h 1.63 vs edited =====
> --- 1.63/drivers/usb/host/ohci.h 2005-01-24 12:04:18 -05:00
> +++ edited/drivers/usb/host/ohci.h 2005-02-10 11:06:55 -05:00
> @@ -159,7 +159,7 @@
> /* Bit Stuff */ -EPROTO,
> /* Data Togg */ -EILSEQ,
> /* Stall */ -EPIPE,
> - /* DevNotResp */ -ETIMEDOUT,
> + /* DevNotResp */ -EPROTO,
> /* PIDCheck */ -EPROTO,
> /* UnExpPID */ -EPROTO,
> /* DataOver */ -EOVERFLOW,
> ===== drivers/usb/host/sl811-hcd.c 1.7 vs edited =====
> --- 1.7/drivers/usb/host/sl811-hcd.c 2005-01-28 17:14:07 -05:00
> +++ edited/drivers/usb/host/sl811-hcd.c 2005-02-10 11:08:38 -05:00
> @@ -600,9 +600,7 @@
>
> /* error? retry, until "3 strikes" */
> } else if (++ep->error_count >= 3) {
> - if (status & SL11H_STATMASK_TMOUT)
> - urbstat = -ETIMEDOUT;
> - else if (status & SL11H_STATMASK_OVF)
> + if (status & SL11H_STATMASK_OVF)
> urbstat = -EOVERFLOW;
> else
> urbstat = -EPROTO;
>
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel