Re: [linux-usb-devel] 2.6.21-rc3-mm1
Hello, > - The wireless changes in here need a lot of testers, please. It is major > rework. Works for me ... so far ;-) Anyway to the point: When moving my laptop I reattached the usb mouse. Then I found this in syslog: usb 2-1: new low speed USB device using uhci_hcd and address 3 usb 2-1: new device found, idVendor=046d, idProduct=c00e usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-1: Product: USB-PS/2 Optical Mouse usb 2-1: Manufacturer: Logitech usb 2-1: configuration #1 chosen from 1 choice khubd: page allocation failure. order:5, mode:0xd0 [] show_trace_log_lvl+0x1a/0x30 [] show_trace+0x12/0x14 [] dump_stack+0x16/0x18 [] __alloc_pages+0x2e4/0x303 [] cache_alloc_refill+0x2e4/0x516 [] kmem_cache_zalloc+0x78/0x7c [] hid_parse_report+0xce/0x26b [] hid_probe+0x264/0xdba [] usb_probe_interface+0x5a/0x89 [] driver_probe_device+0x86/0x178 [] __device_attach+0x8/0xa [] bus_for_each_drv+0x4a/0x68 [] device_attach+0x8b/0xd2 [] bus_attach_device+0x40/0x84 [] device_add+0x5d0/0x6c8 [] usb_set_configuration+0x2d6/0x4c6 [] generic_probe+0x15c/0x251 [] usb_probe_device+0x36/0x3c [] driver_probe_device+0x86/0x178 [] __device_attach+0x8/0xa [] bus_for_each_drv+0x4a/0x68 [] device_attach+0x8b/0xd2 [] bus_attach_device+0x40/0x84 [] device_add+0x5d0/0x6c8 [] usb_new_device+0x128/0x196 [] hub_thread+0x28a/0xb4a [] kthread+0xa2/0xc9 [] kernel_thread_helper+0x7/0x18 === Mem-info: DMA per-cpu: CPU0: Hot: hi:0, btch: 1 usd: 0 Cold: hi:0, btch: 1 usd: 0 Normal per-cpu: CPU0: Hot: hi: 186, btch: 31 usd: 0 Cold: hi: 62, btch: 15 usd: 0 Active:82948 inactive:29211 dirty:18 writeback:0 unstable:0 free:1631 slab:3634 mapped:21032 pagetables:390 bounce:0 DMA free:2316kB min:92kB low:112kB high:136kB active:5248kB inactive:3696kB present:16256kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 459 459 Normal free:4208kB min:2692kB low:3364kB high:4036kB active:326544kB inactive:113148kB present:470856kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 519*4kB 30*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 2316kB Normal: 1046*4kB 3*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 4208kB Swap cache: add 36, delete 30, find 8/11, race 0+0 Free swap = 497952kB Total swap = 498004kB Free swap: 497952kB 122736 pages of RAM 0 pages of HIGHMEM 2265 reserved pages 66453 pages shared 6 pages swap cached 18 pages dirty 0 pages writeback 21032 pages mapped 3634 pages slab 390 pages pagetables Nothing unusual happening in system. Some music playing, etc. Unable to reproduce so far. Regards, Mariusz Kozlowski Linux orion 2.6.21-rc3-mm1 #2 PREEMPT Sat Mar 10 07:49:33 CET 2007 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux Gnu C 4.1.1 Gnu make 3.81 binutils 2.17 util-linux 2.12r mount 2.12r module-init-tools 3.2.2 e2fsprogs 1.39 pcmciautils014 pcmcia-cs 3.2.9 nfs-utils 1.0.6 Linux C Library> libc.2.4 Dynamic linker (ldd) 2.4 Procps 3.2.6 Net-tools 1.60 Kbd1.12 Sh-utils 6.4 udev 103 wireless-tools 29 Modules Loaded orinoco_cs orinoco hermes pcmcia firmware_class yenta_socket rsrc_nonstatic 8139too pcmcia_core fw_ohci processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Pentium(R) 4 CPU 2.40GHz stepping: 9 cpu MHz : 2392.330 cache size : 512 KB fdiv_bug: no hlt_bug : no f00f_bug: no coma_bug: no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr bogomips: 4786.55 clflush size: 64 # # Automatically generated make config: don't edit # Linux kernel version: 2.6.21-rc3-mm1 # Sat Mar 10 07:45:35 2007 # CONFIG_X86_32=y CONFIG_GENERIC_TIME=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y CONFIG_ZONE_DMA=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup # CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_SWAP=y CONFIG_SWAP_PREFETCH=y CONFIG_SYSVIPC=y # CONFIG_IPC_NS is not set CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y #
Re: [linux-usb-devel] 2.6.21-rc3-mm1
Hello, > Unable to reproduce so far. Ok I was wrong. Able to reproduce quite easily. Let me know if you need anything more. usb 2-1: new low speed USB device using uhci_hcd and address 11 usb 2-1: new device found, idVendor=046d, idProduct=c00e usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-1: Product: USB-PS/2 Optical Mouse usb 2-1: Manufacturer: Logitech usb 2-1: configuration #1 chosen from 1 choice khubd: page allocation failure. order:5, mode:0xd0 [] show_trace_log_lvl+0x1a/0x30 [] show_trace+0x12/0x14 [] dump_stack+0x16/0x18 [] __alloc_pages+0x2e4/0x303 [] cache_alloc_refill+0x2e4/0x516 [] kmem_cache_zalloc+0x78/0x7c [] hid_parse_report+0xce/0x26b [] hid_probe+0x264/0xdba [] usb_probe_interface+0x5a/0x89 [] driver_probe_device+0x86/0x178 [] __device_attach+0x8/0xa [] bus_for_each_drv+0x4a/0x68 [] device_attach+0x8b/0xd2 [] bus_attach_device+0x40/0x84 [] device_add+0x5d0/0x6c8 [] usb_set_configuration+0x2d6/0x4c6 [] generic_probe+0x15c/0x251 [] usb_probe_device+0x36/0x3c [] driver_probe_device+0x86/0x178 [] __device_attach+0x8/0xa [] bus_for_each_drv+0x4a/0x68 [] device_attach+0x8b/0xd2 [] bus_attach_device+0x40/0x84 [] device_add+0x5d0/0x6c8 [] usb_new_device+0x128/0x196 [] hub_thread+0x28a/0xb4a [] kthread+0xa2/0xc9 [] kernel_thread_helper+0x7/0x18 === Mem-info: DMA per-cpu: CPU0: Hot: hi:0, btch: 1 usd: 0 Cold: hi:0, btch: 1 usd: 0 Normal per-cpu: CPU0: Hot: hi: 186, btch: 31 usd: 0 Cold: hi: 62, btch: 15 usd: 0 Active:71402 inactive:8979 dirty:610 writeback:0 unstable:0 free:23528 slab:13478 mapped:18407 pagetables:424 bounce:0 DMA free:2160kB min:92kB low:112kB high:136kB active:9264kB inactive:0kB present:16256kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 459 459 Normal free:91952kB min:2692kB low:3364kB high:4036kB active:276344kB inactive:35916kB present:470856kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 306*4kB 83*8kB 11*16kB 1*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 2160kB Normal: 13334*4kB 3899*8kB 460*16kB 2*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 91952kB Swap cache: add 1853, delete 1558, find 498/539, race 1+0 Free swap = 496520kB Total swap = 498004kB Free swap: 496520kB 122736 pages of RAM 0 pages of HIGHMEM 2265 reserved pages 83052 pages shared 295 pages swap cached 610 pages dirty 0 pages writeback 18407 pages mapped 13461 pages slab 424 pages pagetables Regards, Mariusz Kozlowski - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] 2.6.21-rc3-mm1
> On Sat, 10 Mar 2007 09:33:35 +0100 Mariusz Kozlowski <[EMAIL PROTECTED]> > wrote: > Hello, > > > - The wireless changes in here need a lot of testers, please. It is major > > rework. > > Works for me ... so far ;-) Anyway to the point: > > When moving my laptop I reattached the usb mouse. Then I found this in syslog: > > usb 2-1: new low speed USB device using uhci_hcd and address 3 > usb 2-1: new device found, idVendor=046d, idProduct=c00e > usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0 > usb 2-1: Product: USB-PS/2 Optical Mouse > usb 2-1: Manufacturer: Logitech > usb 2-1: configuration #1 chosen from 1 choice > khubd: page allocation failure. order:5, mode:0xd0 > [] show_trace_log_lvl+0x1a/0x30 > [] show_trace+0x12/0x14 > [] dump_stack+0x16/0x18 > [] __alloc_pages+0x2e4/0x303 > [] cache_alloc_refill+0x2e4/0x516 > [] kmem_cache_zalloc+0x78/0x7c > [] hid_parse_report+0xce/0x26b > [] hid_probe+0x264/0xdba > [] usb_probe_interface+0x5a/0x89 > [] driver_probe_device+0x86/0x178 > [] __device_attach+0x8/0xa > [] bus_for_each_drv+0x4a/0x68 > [] device_attach+0x8b/0xd2 > [] bus_attach_device+0x40/0x84 > [] device_add+0x5d0/0x6c8 > [] usb_set_configuration+0x2d6/0x4c6 > [] generic_probe+0x15c/0x251 > [] usb_probe_device+0x36/0x3c > [] driver_probe_device+0x86/0x178 > [] __device_attach+0x8/0xa > [] bus_for_each_drv+0x4a/0x68 > [] device_attach+0x8b/0xd2 > [] bus_attach_device+0x40/0x84 > [] device_add+0x5d0/0x6c8 > [] usb_new_device+0x128/0x196 > [] hub_thread+0x28a/0xb4a > [] kthread+0xa2/0xc9 > [] kernel_thread_helper+0x7/0x18 > === hid_parse_report() is doing kmalloc(128k kbytes). We canot sanely support that and the code shold be rewritten to not do that. A simple though somewhat lame fix would be to switch to vmalloc(). It's been this way for some time, so it's odd that the failures have just popped up now. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] 2.6.21-rc3-mm1
On Sat, Mar 10, 2007 at 12:58:28AM -0800, Andrew Morton wrote: > > On Sat, 10 Mar 2007 09:33:35 +0100 Mariusz Kozlowski <[EMAIL PROTECTED]> > > wrote: > > Hello, > > > > > - The wireless changes in here need a lot of testers, please. It is major > > > rework. > > > > Works for me ... so far ;-) Anyway to the point: > > > > When moving my laptop I reattached the usb mouse. Then I found this in > > syslog: > > > > usb 2-1: new low speed USB device using uhci_hcd and address 3 > > usb 2-1: new device found, idVendor=046d, idProduct=c00e > > usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0 > > usb 2-1: Product: USB-PS/2 Optical Mouse > > usb 2-1: Manufacturer: Logitech > > usb 2-1: configuration #1 chosen from 1 choice > > khubd: page allocation failure. order:5, mode:0xd0 > > [] show_trace_log_lvl+0x1a/0x30 > > [] show_trace+0x12/0x14 > > [] dump_stack+0x16/0x18 > > [] __alloc_pages+0x2e4/0x303 > > [] cache_alloc_refill+0x2e4/0x516 > > [] kmem_cache_zalloc+0x78/0x7c > > [] hid_parse_report+0xce/0x26b > > [] hid_probe+0x264/0xdba > > [] usb_probe_interface+0x5a/0x89 > > [] driver_probe_device+0x86/0x178 > > [] __device_attach+0x8/0xa > > [] bus_for_each_drv+0x4a/0x68 > > [] device_attach+0x8b/0xd2 > > [] bus_attach_device+0x40/0x84 > > [] device_add+0x5d0/0x6c8 > > [] usb_set_configuration+0x2d6/0x4c6 > > [] generic_probe+0x15c/0x251 > > [] usb_probe_device+0x36/0x3c > > [] driver_probe_device+0x86/0x178 > > [] __device_attach+0x8/0xa > > [] bus_for_each_drv+0x4a/0x68 > > [] device_attach+0x8b/0xd2 > > [] bus_attach_device+0x40/0x84 > > [] device_add+0x5d0/0x6c8 > > [] usb_new_device+0x128/0x196 > > [] hub_thread+0x28a/0xb4a > > [] kthread+0xa2/0xc9 > > [] kernel_thread_helper+0x7/0x18 > > === > > hid_parse_report() is doing kmalloc(128k kbytes). We canot sanely support > that and the code shold be rewritten to not do that. A simple though > somewhat lame fix would be to switch to vmalloc(). > > It's been this way for some time, so it's odd that the failures have just > popped up now. Jiri is the person to ask about this now. Jiri, any thoughts about this? thanks, greg k-h - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] 2.6.21-rc3-mm1
On Sat, 10 Mar 2007, Greg KH wrote: > > hid_parse_report() is doing kmalloc(128k kbytes). We canot sanely > > support that and the code shold be rewritten to not do that. A simple > > though somewhat lame fix would be to switch to vmalloc(). > > It's been this way for some time, so it's odd that the failures have > > just popped up now. > Jiri is the person to ask about this now. Jiri, any thoughts about > this? Hi, I have just queued the patch below to HID tree for the next upstream merge. Mariusz, I guess it solves your issue, right? I have already been talking with Vojtech some time ago that rewritting the hid parser so that it would use less memory (but probably slightly a bit more CPU) would be a good thing to do, and it's been sitting in my TODO list for quite some time already. It's really not a straightforward rewrite, so I would incline to use the vmalloc() solution until the parser code has been rewritten. The hid_parser structure in question is living for very short time anyway, so it shouldn't be that big issue. Thanks. From: Jiri Kosina <[EMAIL PROTECTED]> Subject: [PATCH] HID: allocate hid_parser through vmalloc() hid_parser is non-trivially large structure, so it should be allocated using vmalloc() to avoid unsuccessful allocations when memory fragmentation is too high. This structue has a very short life, it's destroyed as soon as the report descriptor has been completely parsed. This should be considered a temporary solution, until the hid_parser is rewritten to consume less memory during report descriptor parsing. Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]> --- drivers/hid/hid-core.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f4ee1af..e5894a7 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -654,12 +655,13 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size) memcpy(device->rdesc, start, size); device->rsize = size; - if (!(parser = kzalloc(sizeof(struct hid_parser), GFP_KERNEL))) { + if (!(parser = vmalloc(sizeof(struct hid_parser { kfree(device->rdesc); kfree(device->collection); kfree(device); return NULL; } + memset(parser, 0, sizeof(struct hid_parser)); parser->device = device; end = start + size; @@ -668,7 +670,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size) if (item.format != HID_ITEM_FORMAT_SHORT) { dbg("unexpected long global item"); hid_free_device(device); - kfree(parser); + vfree(parser); return NULL; } @@ -676,7 +678,7 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size) dbg("item %u %u %u %u parsing failed\n", item.format, (unsigned)item.size, (unsigned)item.type, (unsigned)item.tag); hid_free_device(device); - kfree(parser); + vfree(parser); return NULL; } @@ -684,23 +686,23 @@ struct hid_device *hid_parse_report(__u8 *start, unsigned size) if (parser->collection_stack_ptr) { dbg("unbalanced collection at end of report description"); hid_free_device(device); - kfree(parser); + vfree(parser); return NULL; } if (parser->local.delimiter_depth) { dbg("unbalanced delimiter at end of report description"); hid_free_device(device); - kfree(parser); + vfree(parser); return NULL; } - kfree(parser); + vfree(parser); return device; } } dbg("item fetching failed at offset %d\n", (int)(end - start)); hid_free_device(device); - kfree(parser); + vfree(parser); return NULL; } EXPORT_SYMBOL_GPL(hid_parse_report); - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To un
Re: [linux-usb-devel] 2.6.21-rc3-mm1
Hello, > On Sat, 10 Mar 2007, Greg KH wrote: > > > > hid_parse_report() is doing kmalloc(128k kbytes). We canot sanely > > > support that and the code shold be rewritten to not do that. A simple > > > though somewhat lame fix would be to switch to vmalloc(). > > > It's been this way for some time, so it's odd that the failures have > > > just popped up now. > > Jiri is the person to ask about this now. Jiri, any thoughts about > > this? > > I have just queued the patch below to HID tree for the next upstream > merge. Mariusz, I guess it solves your issue, right? Right. Can't be 100% sure but without the patch it would have probably failed by now so I guess the patch is ok. Not sure how to make usb mouse plugging/unplugging process automatic ;-) Thanks, Mariusz Kozlowski - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] 2.6.21-rc3-mm1
On Sat, 10 Mar 2007, Mariusz Kozlowski wrote: > Right. Can't be 100% sure but without the patch it would have probably > failed by now so I guess the patch is ok. Not sure how to make usb mouse > plugging/unplugging process automatic ;-) echo FOO >/sys/bus/usb/drivers/usbhid/unbind to simulate an unplug (actually, to do an unbind), and echo FOO >/sys/bus/usb/drivers/usbhid/unbind to do a bind, where FOO is the name of the USB mouse device link present in the /sys/bus/usb/drivers/usbhid directory. Alan Stern - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] 2.6.21-rc3-mm1
Hello, > > Right. Can't be 100% sure but without the patch it would have probably > > failed by now so I guess the patch is ok. Not sure how to make usb mouse > > plugging/unplugging process automatic ;-) > > echo FOO >/sys/bus/usb/drivers/usbhid/unbind > > to simulate an unplug (actually, to do an unbind), and > > echo FOO >/sys/bus/usb/drivers/usbhid/unbind ^^ bind I guess > to do a bind, where FOO is the name of the USB mouse device link present > in the /sys/bus/usb/drivers/usbhid directory. # ls -al /sys/bus/usb/drivers/usbhid total 0 drwxr-xr-x 2 root root0 Mar 10 17:30 . drwxr-xr-x 8 root root0 Mar 10 17:14 .. lrwxrwxrwx 1 root root0 Mar 10 17:30 2-2:1.0 -> ../../../../devices/pci:00/:00:0c.0/usb2/2-2/2-2:1.0 --w--- 1 root root 4096 Mar 10 17:17 bind lrwxrwxrwx 1 root root0 Mar 10 17:17 module -> ../../../../module/usbhid --w--- 1 root root 4096 Mar 10 17:17 new_id --w--- 1 root root0 Mar 10 17:22 unbind # echo "2-2:1.0" > /sys/bus/usb/drivers/usbhid/unbind bash: echo: write error: No such device Any thoughts? Regards, Mariusz Kozlowski - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] 2.6.21-rc3-mm1
On Sat, 10 Mar 2007, Mariusz Kozlowski wrote: > Hello, > > > > Right. Can't be 100% sure but without the patch it would have probably > > > failed by now so I guess the patch is ok. Not sure how to make usb mouse > > > plugging/unplugging process automatic ;-) > > > > echo FOO >/sys/bus/usb/drivers/usbhid/unbind > > > > to simulate an unplug (actually, to do an unbind), and > > > > echo FOO >/sys/bus/usb/drivers/usbhid/unbind > ^^ bind I guess Whoops, yes. Cut & paste strikes again... > > to do a bind, where FOO is the name of the USB mouse device link present > > in the /sys/bus/usb/drivers/usbhid directory. > > # ls -al /sys/bus/usb/drivers/usbhid > total 0 > drwxr-xr-x 2 root root0 Mar 10 17:30 . > drwxr-xr-x 8 root root0 Mar 10 17:14 .. > lrwxrwxrwx 1 root root0 Mar 10 17:30 2-2:1.0 -> > ../../../../devices/pci:00/:00:0c.0/usb2/2-2/2-2:1.0 > --w--- 1 root root 4096 Mar 10 17:17 bind > lrwxrwxrwx 1 root root0 Mar 10 17:17 module -> ../../../../module/usbhid > --w--- 1 root root 4096 Mar 10 17:17 new_id > --w--- 1 root root0 Mar 10 17:22 unbind > > # echo "2-2:1.0" > /sys/bus/usb/drivers/usbhid/unbind > bash: echo: write error: No such device > > Any thoughts? Another mistake on my part. The correct command is echo -n '2-2:1.0' >/sys/bus/usb/drivers/usbhid/unbind Without the "-n", the system thinks that the newline character at the end of the line written by "echo" is part of the filename. Alan Stern - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] 2.6.21-rc3-mm1
Hello, > > Any thoughts? > > Another mistake on my part. The correct command is > > echo -n '2-2:1.0' >/sys/bus/usb/drivers/usbhid/unbind > > Without the "-n", the system thinks that the newline character at the end > of the line written by "echo" is part of the filename. Nice tip. Thanks. I've run some tests and as expected -> no failure so far. Regards, Mariusz Kozlowski - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
Re: [linux-usb-devel] 2.6.21-rc3-mm1
On Mon, 12 Mar 2007, Mariusz Kozlowski wrote: > > echo -n '2-2:1.0' >/sys/bus/usb/drivers/usbhid/unbind > > Without the "-n", the system thinks that the newline character at the end > > of the line written by "echo" is part of the filename. > Nice tip. Thanks. I've run some tests and as expected -> no failure so far. Thanks for testing. The patch fixing this already went to Linus in todays HID/USB HID update (which has not yet been merged). Thanks, -- Jiri Kosina - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel