On Thu, 12 Aug 2004, Norbert Preining wrote:

> BIngo, you are a genius!  I found what is causing me the problems: Only 
> when a specific device is plugged in, the hangs occur (in kernels after 
> 2.6.7-mm5).
> 
> It is a Benq radio mouse with emtpy device descriptor:
> T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
> D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor=0d62 ProdID=1000 Rev= 2.00
> C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
> 
> 
> In all cases, with 2.6.7-mm5 and any later I get the following syslog
> messages when I plug in the mouse or it is plugged when usb sys is
> starting:
> vmunix: drivers/usb/input/hid-core.c: ctrl urb status -2 received
> vmunix: drivers/usb/input/hid-core.c: timeout initializing reports
> vmunix: 
> kernel: input: USB HID v1.10 Mouse [0d62:1000] on usb-0000:02:09.0-1

Do you mean with 2.6.7-mm5 and any _earlier_?  With kernels after that 
your trace below shows khubd hanging in hid_init_reports before the last 
two messages are written.

> For the newer kernels the process khubd in fact is in D state:
>  khubd         D 00000000     0  1199      1          1477   348 (L-TLB)
>  df965d04 00000046 c0c5f400 00000000 1d800000 00800000 df5501fc df55020c 
>         00001726 9ea049b3 000000f4 df8ee7d0 df8ee978 0008de11 df965d18 00002710 
>         df965d64 c02da922 c0d2fc00 e08d38fd 00000282 c0388ea4 c040d398 0008de11 
>  Call Trace:
>   [<c02da922>] schedule_timeout+0x60/0xb3
>   [<e08d38fd>] unlink1+0x11/0x18 [usbcore]
>   [<c01232a1>] process_timeout+0x0/0x5
>   [<e08c8b28>] hid_wait_io+0x88/0xcc [usbhid]
>   [<c0118fd7>] default_wake_function+0x0/0xc
>   [<c0118fd7>] default_wake_function+0x0/0xc
>   [<e08c8d08>] hid_init_reports+0xd5/0x17c [usbhid]

> I hope this helps you ...
> 
> Bottom line for this, I would like to use this mouse, but with the 
> new kernels it isn't possible. 
> 
> ANother interesting point is the following, but I think this is just
> a consequence of the above: When I do NOT have plugged in the mouse
> while booting, the Synaptics TOuchpad is recognized, while when it is plugged
> in during boot, it is not recognized ... strange, at least to me!

This probably _is_ a consequence of the problem with the mouse.  Once 
khubd hangs, no new devices will be recognized.

Below is a test patch for you to try.  It will provide a lot of extra 
information in you system log, which may help to pin down where the 
problem occurs.

Alan Stern



===== drivers/usb/core/hcd.c 1.152 vs edited =====
--- 1.152/drivers/usb/core/hcd.c        Tue Aug  3 10:17:59 2004
+++ edited/drivers/usb/core/hcd.c       Thu Aug 12 12:17:05 2004
@@ -1146,6 +1146,7 @@
                        wake_up (&usb_kill_urb_queue);
                usb_put_urb (urb);
        }
+       printk(KERN_INFO "%s: urb=%p\n", __FUNCTION__, urb);
        return status;
 }
 
@@ -1185,6 +1186,7 @@
        if (value != 0)
                dev_dbg (hcd->self.controller, "dequeue %p --> %d\n",
                                urb, value);
+       printk(KERN_INFO "%s: urb=%p\n", __FUNCTION__, urb);
        return value;
 }
 
@@ -1506,6 +1508,7 @@
        }
 
        /* pass ownership to the completion handler */
+       printk(KERN_INFO "%s: urb=%p\n", __FUNCTION__, urb);
        urb->complete (urb, regs);
        atomic_dec (&urb->use_count);
        if (unlikely (urb->reject))
===== drivers/usb/input/hid-core.c 1.119 vs edited =====
--- 1.119/drivers/usb/input/hid-core.c  Fri Jul 23 09:29:18 2004
+++ edited/drivers/usb/input/hid-core.c Thu Aug 12 12:13:02 2004
@@ -25,7 +25,7 @@
 #include <asm/byteorder.h>
 #include <linux/input.h>
 
-#undef DEBUG
+#define DEBUG
 #undef DEBUG_DATA
 
 #include <linux/usb.h>
@@ -1070,7 +1070,7 @@
        hid->urbout->transfer_buffer_length = ((report->size - 1) >> 3) + 1 + 
(report->id > 0);
        hid->urbout->dev = hid->dev;
 
-       dbg("submitting out urb");
+       dbg("submitting out urb=%p", hid->urbout);
 
        if (usb_submit_urb(hid->urbout, GFP_ATOMIC)) {
                err("usb_submit_urb(out) failed");
@@ -1116,7 +1116,7 @@
        hid->cr->wIndex = cpu_to_le16(hid->ifnum);
        hid->cr->wLength = cpu_to_le16(len);
 
-       dbg("submitting ctrl urb: %s wValue=0x%04x wIndex=0x%04x wLength=%u",
+       dbg("submitting ctrl urb=%p: %s wValue=0x%04x wIndex=0x%04x wLength=%u", 
hid->urbctrl,
            hid->cr->bRequest == HID_REQ_SET_REPORT ? "Set_Report" : "Get_Report",
            hid->cr->wValue, hid->cr->wIndex, hid->cr->wLength);
 
@@ -1137,6 +1137,7 @@
        struct hid_device *hid = urb->context;
        unsigned long flags;
 
+       dbg("complete output urb=%p\n", urb);
        if (urb->status)
                warn("output irq status %d received", urb->status);
 
@@ -1166,6 +1167,7 @@
        struct hid_device *hid = urb->context;
        unsigned long flags;
 
+       dbg("complete ctrl urb=%p\n", urb);
        if (urb->status)
                warn("ctrl urb status %d received", urb->status);
 
@@ -1334,9 +1336,13 @@
        while (ret) {
                err |= ret;
                if (test_bit(HID_CTRL_RUNNING, &hid->iofl))
+{dbg("unlink ctrl urb=%p\n", hid->urbctrl);
                        usb_unlink_urb(hid->urbctrl);
+}
                if (test_bit(HID_OUT_RUNNING, &hid->iofl))
+{dbg("unlink out urb=%p\n", hid->urbout);
                        usb_unlink_urb(hid->urbout);
+}
                ret = hid_wait_io(hid);
        }
 



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to