Tejun Heo wrote: > Hello, Alan, Chris. > > Alan Stern wrote: >> On Sat, 5 May 2007, Chris Rankin wrote: >> >>> --- Alan Stern <[EMAIL PROTECTED]> wrote: >>>> However it is usually the same endpoint number and the same device (even >>>> if the device number changes)? In that case we can tell the code where to >>>> look for errors, because we will always know when that particular endpoint >>>> file is created and when it is destroyed. >>> I think it's safe to say "yes, it's always ep84" here, provided I am trying >>> to provoke the bug >>> with winecfg. I have obviously seen this bug in a few other scenarios as >>> well over the months, >>> e.g. from the report in bugzilla: >> Tejun, would this help? We could create and export a pointer to kobject >> from the sysfs core, say: >> >> struct kobject *testptr; >> EXPORT_SYMBOL(testptr); >> >> Then I could add something to the USB code which would set testptr to >> point at the kobject embedded in the "ep84" device when it was created, >> and would clear testptr when the device was released. This way you could >> write a debugging patch for sysfs to monitor the sd associated with >> testptr for nefarious changes. > > Yeap, good idea. I wrote something in sysfs proper. The patch > creates a r/w module parameter /sys/module/dir/parameters/sysfs_trace_path > to which you can echo the path of sysfs node to trace. For example, > if you wanna trace tx_queue_len of dummy0, > > # echo -n "/sys/devices/virtual/net/dummy0/tx_queue_len" > > /sys/module/dir/parameters/sysfs_trace_path > > Then, you'll get trace of creation/release, get/put and open/close > which should tell us what's going on with the specific sysfs_dirent. > > Chris, can you apply this patch over 2.6.21.1 and echo > /sys/class/usb_endpoint/usbdev1.3_ep84 (or whatever the problemetic > node appears as) to it, trigger the bug and report what the kernel > says?
Ah.. one thing to note. The echo'ing should happen before the node is created, so you can... 1. unplug and replug the particular device after specifying the node to trace. 2. (unload and) load usb host module after echoing 3. boot the kernel with dir.sysfs_trace_path=/sys/devices/blah/blah -- tejun ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel