Sorry it took a few days to get back to you...

On Sat, 13 Mar 2004, Matthias Andree wrote:

> > yet, can you post both the strace output and the dmesg output for the same 
> > run?
> 
> Not on the list, too large. I can show the URL of a bzip2ed copy of the
> logs on some FTP/HTTP server once I've had the leisure to reboot the
> machine several times, and I can mail them off-list.

I looked at your logs.  Interestingly, the problems occur with control 
transfers, not bulk transfers, but the strace only shows USBDEVFS_BULK 
ioctls, not USBDEVFS_CONTROL.  I can't imagine what that means or how it 
happened.  (Unless it's a bug in strace?)

The syslog includes some information about the failed control transfers.  
They are Get_Descriptor requests, but exactly which descriptor isn't
shown.  Below is a patch that will provide more complete information.  
Try running it as before.  The strace log may or may not help, it's hard
to say; you might as well include it too.

Ultimately your downfall was caused by the reply to one of those control
transfers.  The program requested a 9-byte descriptor from the scanner and
the reply was longer than 9 bytes (that's the "Babble" near the end of
your syslog).  Many VIA USB controllers have a bug that causes them to
stop working when they receive an unexpectedly long packet, and that
happened to you.  When the controller dies it takes everything along with
it.  (When I have a chance I'll change the UHCI driver so that doesn't
happen -- but for now it does.)

This patch will quite likely apply to a 2.4.recent kernel as well as to
2.6.4, although you will have to edit the third line to take out the
"/core" element in the pathname.  It would be a good idea for you to try
running it under 2.4 too, so I can compare the resulting syslogs and see
what has changed.

Alan Stern


===== devio.c 1.87 vs edited =====
--- 1.87/drivers/usb/core/devio.c       Mon Mar  1 06:40:11 2004
+++ edited/drivers/usb/core/devio.c     Tue Mar 16 17:06:27 2004
@@ -549,6 +549,9 @@
        if (!(tbuf = (unsigned char *)__get_free_page(GFP_KERNEL)))
                return -ENOMEM;
        tmo = (ctrl.timeout * HZ + 999) / 1000;
+       printk(KERN_INFO "usbfs: proc_control: dev %d rqt %x rq %x val %x ind %x len 
%u\n",
+               dev->devnum, ctrl.bRequestType, ctrl.bRequest, ctrl.wValue, 
ctrl.wIndex,
+               ctrl.wLength); 
        if (ctrl.bRequestType & 0x80) {
                if (ctrl.wLength && !access_ok(VERIFY_WRITE, ctrl.data, ctrl.wLength)) 
{
                        free_page((unsigned long)tbuf);



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to