On Mon, 25 Sep 2006, Vivek Dharmadhikari wrote:

> > The driver _did_ enqueue commands after the timeout errors.
> 
> Got it ! The USB analyzer indicates that same CBW was repeated three
> times in row because the device did not generate ACK for the CBW. After
> three failed attempts, usb_stor_Bulk_reset is invoked. Is there a way to
> increase the retry count from its current value of 3 ?

Not easily.  The retry count is limited in the hardware to 3, or it can be
disabled so that you get unlimited retries.  Maybe this would help you, I
don't know.  In my experience when a device fails to send an ACK or a NAK
in response to a packet, more retries don't help -- the device usually
needs to be reset.  But perhaps your case is different.

The patch for unlimited retries is below.  Note this patch is for 2.6.18; 
it may need some adjusting to apply to your old kernel.

> Note also that when the same key attached to a linux PC, successfully
> generates ACK for all the CBW.

This indicates that the problem is a small hardware incompatibility, as I 
have said before.  For whatever reason, sometimes the device isn't able to 
understand the signals coming from the computer.  Maybe the embedded 
device (or something near it) puts out just a little too much 
electromagnetic interference.

Alan Stern


Index: mm/drivers/usb/host/ohci-q.c
===================================================================
--- mm.orig/drivers/usb/host/ohci-q.c
+++ mm/drivers/usb/host/ohci-q.c
@@ -625,8 +625,8 @@ static void td_submit_urb (
                /* FALLTHROUGH */
        case PIPE_BULK:
                info = is_out
-                       ? TD_T_TOGGLE | TD_CC | TD_DP_OUT
-                       : TD_T_TOGGLE | TD_CC | TD_DP_IN;
+                       ? TD_T_TOGGLE | TD_CC | TD_DP_OUT | TD_EC
+                       : TD_T_TOGGLE | TD_CC | TD_DP_IN | TD_EC;
                /* TDs _could_ transfer up to 8K each */
                while (data_len > 4096) {
                        td_fill (ohci, info, data, 4096, urb, cnt);


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to