On Mon, 13 Feb 2006, Peter Wippich wrote:
> thank you for your response. Trying to actualy run the driver with
> PTD_TRACE enabled is not realy possible. As soon as I open my device I get
> flooded with repeated messages:
> 
> [  122.480000] td: f 8i2 0,64,64  0 101
> .....................

You can cut the amount of log very much down by adding to 
the beginning of dump_ptd() in isp116x.h the following 
check:

        if (PTD_GET_CC(ptd) == 0xf)
                return;

> 
> I will try to set up some other debugging environment on Wendesday (I'm
> out off office tomorrow) and than get back to you.

I thought a little bit more about it. It would be good to 
print out some more info right before the BUG() is hit. 
Could you please apply the patch below (I didn't test it, 
hopefully it is clean).

Olav

PS! I am wondering whether the driver in newer kernels might 
work better.


--- linux-2.6.14-or/drivers/usb/host/isp116x-hcd.c.or   2006-02-14 
10:09:23.000000000 +0200
+++ linux-2.6.14-or/drivers/usb/host/isp116x-hcd.c      2006-02-14 
10:41:56.000000000 +0200
@@ -532,11 +532,13 @@ static void start_atl_transfers(struct i
                } else if (ep->nextpid == USB_PID_ACK) {
                        len = 0;
                } else {
+                       int len1, len2, len3 = -77777, len4 = -77777;
+
                        /* Find current free length ... */
-                       len = (MAX_LOAD_LIMIT - load) / byte_time;
+                       len1 = len = (MAX_LOAD_LIMIT - load) / byte_time;
 
                        /* ... then limit it to configured max size ... */
-                       len = min(len, speed == USB_SPEED_LOW ?
+                       len2 = len = min(len, speed == USB_SPEED_LOW ?
                                  MAX_TRANSFER_SIZE_LOWSPEED :
                                  MAX_TRANSFER_SIZE_FULLSPEED);
 
@@ -546,11 +548,25 @@ static void start_atl_transfers(struct i
                            (urb->transfer_buffer_length -
                             urb->actual_length)) {
                                len -= len % ep->maxpacket;
+                               len3 = len;
                                if (!len)
                                        continue;
                        } else
-                               len = urb->transfer_buffer_length -
+                               len4 = len = urb->transfer_buffer_length -
                                    urb->actual_length;
+                       if (len < 0)
+                               printk("-- len: %d %d %d %d\n"
+                                       "load %d  byte_time %d  speed %d\n"
+                                       "transfer_buffer_length %d  "
+                                       "actual_length %d\n"
+                                       "ep: %d %d %d %d %d\n"
+                                       len1, len2, len3, len4,
+                                       (int)load, byte_time, speed,
+                                       urb->transfer_buffer_length,
+                                       urb->actual_length,
+                                       (int)ep->maxpacket, (int)ep->epnum,
+                                       (int)ep->nextpid, (int)ep->error_count,
+                                       (int)ep->length);
                        BUG_ON(len < 0);
                }
 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&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