On Fri, 10 Jun 2005, Martin Kessler wrote:

> Here another one, btw I did pass usbfs_snoop on to the kernel during 
> boot, but have no entries in my logfile. Hmmm, usbcore is not a module 
> so usbcore.usbfs_snoop=1 should have done the job isn't it??? Currently 
> my apcupsd is hanging in state 'D' again ;-) whats next? FYI, I have 
> removed all previous patches given for testing.

Putting that string on the command should have done the trick.  So these 
control URBs don't seem to be coming through usbfs.

The next step should be to find out where they do come from.  It's not so
easy to do that, but this patch is a start.  It goes a little overboard,
because it will send a complete stack dump to the system log every time an
IN control URB is sent to a device with address 2.  There's always a bunch
of URBs like that when the device is first plugged in.  If sometime later
you really do start getting these URBs every 4 or 5 milliseconds, this
patch will completely spam your system log.  You'll probably have to
unplug the USB cable to get your computer back under control.

Don't say you weren't warned!

Alan Stern


Index: usb-2.6/drivers/usb/core/urb.c
===================================================================
--- usb-2.6.orig/drivers/usb/core/urb.c
+++ usb-2.6/drivers/usb/core/urb.c
@@ -253,6 +253,9 @@ int usb_submit_urb(struct urb *urb, int 
        temp = usb_pipetype (pipe);
        is_out = usb_pipeout (pipe);
 
+       if (temp == PIPE_CONTROL && !is_out && usb_pipedevice(pipe) == 2)
+               dump_stack();
+
        if (!usb_pipecontrol (pipe) && dev->state < USB_STATE_CONFIGURED)
                return -ENODEV;
 




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
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