Here is a copy of the usbmon output and /var/logmessages output from plugging in, scanning a barcode, and unplugging the device. I also commented out some of the error checking in hid_reset but that didn't work either. Nov 16 12:54:39 eliza kernel: usb 7-1: Product: Metrologic Scanner Nov 16 12:54:39 eliza kernel: usb 7-1: Manufacturer: Metrologic Nov 16 12:54:39 eliza kernel: input: Metrologic Metrologic Scanner as /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input10 Nov 16 12:54:40 eliza kernel: usb 7-1: USB disconnect, address 9 Nov 16 12:54:43 eliza kernel: usb 7-1: new low speed USB device using uhci_hcd and address 10 Nov 16 12:54:43 eliza kernel: usb 7-1: New USB device found, idVendor=0c2e, idProduct=0700 Nov 16 12:54:43 eliza kernel: usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Nov 16 12:54:43 eliza kernel: usb 7-1: Product: Metrologic Scanner Nov 16 12:54:43 eliza kernel: usb 7-1: Manufacturer: Metrologic Nov 16 12:54:53 eliza kernel: usb 7-1: USB disconnect, address 10 Nov 16 12:55:21 eliza kernel: usb 7-1: new low speed USB device using uhci_hcd and address 11 Nov 16 12:55:21 eliza kernel: usb 7-1: New USB device found, idVendor=0c2e, idProduct=0200 Nov 16 12:55:21 eliza kernel: usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Nov 16 12:55:21 eliza kernel: usb 7-1: Product: Metrologic Scanner Nov 16 12:55:21 eliza kernel: usb 7-1: Manufacturer: Metrologic Nov 16 12:55:21 eliza kernel: input: Metrologic Metrologic Scanner as /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input11 Nov 16 12:55:21 eliza kernel: usb 7-1: USB disconnect, address 11 Nov 16 12:55:25 eliza kernel: usb 7-1: new low speed USB device using uhci_hcd and address 12 Nov 16 12:55:25 eliza kernel: usb 7-1: New USB device found, idVendor=0c2e, idProduct=0700 Nov 16 12:55:25 eliza kernel: usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Nov 16 12:55:25 eliza kernel: usb 7-1: Product: Metrologic Scanner Nov 16 12:55:25 eliza kernel: usb 7-1: Manufacturer: Metrologic Nov 16 12:56:20 eliza kernel: usb 7-1: USB disconnect, address 12 ffff88007e555bc0 1912958231 C Ii:7:001:1 0:128 1 = 02 ffff88007e555bc0 1912958241 S Ii:7:001:1 -115:128 2 < ffff88007ddc2e40 1912988243 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1912988249 C Ci:7:001:0 0 4 = 01030100 ffff88007ddc2e40 1912988250 S Co:7:001:0 s 23 01 0010 0001 0000 0 ffff88007ddc2e40 1912988253 C Co:7:001:0 0 0 ffff88007ddc2e40 1912988255 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1912988259 C Ci:7:001:0 0 4 = 01030000 ffff88007ddc2e40 1913028224 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913028230 C Ci:7:001:0 0 4 = 01030000 ffff88007ddc2e40 1913068222 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913068228 C Ci:7:001:0 0 4 = 01030000 ffff88007ddc2e40 1913108221 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913108227 C Ci:7:001:0 0 4 = 01030000 ffff88007ddc2e40 1913148221 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913148226 C Ci:7:001:0 0 4 = 01030000 ffff88007ddc2e40 1913148233 S Co:7:001:0 s 23 03 0004 0001 0000 0 ffff88007ddc2e40 1913148237 C Co:7:001:0 0 0 ffff88007ddc2e40 1913208249 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913208254 C Ci:7:001:0 0 4 = 03030000 ffff88007ddc2e40 1913268228 S Co:7:001:0 s 23 01 0014 0001 0000 0 ffff88007ddc2e40 1913268235 C Co:7:001:0 0 0 ffff88007ddc2e40 1913268246 S Ci:7:000:0 s 80 06 0100 0000 0040 64 < ffff88007ddc2e40 1913275172 C Ci:7:000:0 0 18 = 12011001 00000008 2e0c0002 00010102 0001 ffff88007ddc2e40 1913275189 S Co:7:001:0 s 23 03 0004 0001 0000 0 ffff88007ddc2e40 1913275194 C Co:7:001:0 0 0 ffff88007ddc2e40 1913328288 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913328313 C Ci:7:001:0 0 4 = 03030000 ffff88007ddc2e40 1913388262 S Co:7:001:0 s 23 01 0014 0001 0000 0 ffff88007ddc2e40 1913388266 C Co:7:001:0 0 0 ffff88007ddc2e40 1913388269 S Co:7:000:0 s 00 05 000b 0000 0000 0 ffff88007ddc2e40 1913391160 C Co:7:000:0 0 0 ffff88007ddc2e40 1913408262 S Ci:7:011:0 s 80 06 0100 0000 0012 18 < ffff88007ddc2e40 1913414157 C Ci:7:011:0 0 18 = 12011001 00000008 2e0c0002 00010102 0001 ffff88007ddc2e40 1913414179 S Ci:7:011:0 s 80 06 0200 0000 0009 9 < ffff88007ddc2e40 1913419156 C Ci:7:011:0 0 9 = 09022200 01010380 96 ffff88007ddc2e40 1913419177 S Ci:7:011:0 s 80 06 0200 0000 0022 34 < ffff88007ddc2e40 1913427157 C Ci:7:011:0 0 34 = 09022200 01010380 96090400 00010301 01000921 11010001 223f0007 05810308 ffff88007ddc2e40 1913427187 S Ci:7:011:0 s 80 06 0300 0000 00ff 255 < ffff88007ddc2e40 1913432154 C Ci:7:011:0 0 4 = 04030904 ffff88007ddc2e40 1913432175 S Ci:7:011:0 s 80 06 0302 0409 00ff 255 < ffff88007ddc2e40 1913441154 C Ci:7:011:0 0 38 = 26034d00 65007400 72006f00 6c006f00 67006900 63002000 53006300 61006e00 ffff88007ddc2e40 1913441176 S Ci:7:011:0 s 80 06 0301 0409 00ff 255 < ffff88007ddc2e40 1913448154 C Ci:7:011:0 0 22 = 16034d00 65007400 72006f00 6c006f00 67006900 6300 ffff88007caafc80 1913448294 S Co:7:011:0 s 00 09 0001 0000 0000 0 ffff88007caafc80 1913451155 C Co:7:011:0 0 0 ffff88007caafc80 1913451182 S Ci:7:011:0 s 80 06 0303 0409 00ff 255 < ffff88007caafc80 1913458348 C Ci:7:011:0 0 26 = 1a034800 49004400 20004b00 65007900 62006f00 61007200 6400 ffff88007caaf080 1913458507 S Ii:7:011:1 -115:8 8 < ffff88007caaf080 1913623141 C Ii:7:011:1 -84:8 0 ffff88007caaf080 1913623145 S Ii:7:011:1 -115:8 8 < ffff88007caaf080 1913647137 C Ii:7:011:1 -84:8 0 ffff88007caaf080 1913647141 S Ii:7:011:1 -115:8 8 < ffff88007caaf080 1913671132 C Ii:7:011:1 -84:8 0 ffff88007caaf080 1913671135 S Ii:7:011:1 -115:8 8 < ffff88007caaf080 1913695132 C Ii:7:011:1 -84:8 0 ffff88007caaf080 1913695134 S Ii:7:011:1 -115:8 8 < ffff88007e555bc0 1913708311 C Ii:7:001:1 0:128 1 = 02 ffff88007e555bc0 1913708316 S Ii:7:001:1 -115:128 2 < ffff88007d2d2cc0 1913708340 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007d2d2cc0 1913708346 C Ci:7:001:0 0 4 = 00010300 ffff88007d2d2cc0 1913708349 S Co:7:001:0 s 23 01 0010 0001 0000 0 ffff88007d2d2cc0 1913708353 C Co:7:001:0 0 0 ffff88007d2d2cc0 1913708355 S Co:7:001:0 s 23 01 0011 0001 0000 0 ffff88007d2d2cc0 1913708359 C Co:7:001:0 0 0 ffff88007caaf080 1913710131 C Ii:7:011:1 -108:8 0 ffff88007ddc2e40 1913767274 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913767281 C Ci:7:001:0 0 4 = 00010000 ffff88007ddc2e40 1913802343 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913802350 C Ci:7:001:0 0 4 = 00010000 ffff88007ddc2e40 1913847030 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913847035 C Ci:7:001:0 0 4 = 00010000 ffff88007ddc2e40 1913886190 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913886196 C Ci:7:001:0 0 4 = 00010000 ffff88007ddc2e40 1913923481 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2e40 1913923487 C Ci:7:001:0 0 4 = 00010000 ffff88007e555bc0 1916957078 C Ii:7:001:1 0:128 1 = 02 ffff88007e555bc0 1916957084 S Ii:7:001:1 -115:128 2 < ffff88007caafec0 1916957137 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafec0 1916957142 C Ci:7:001:0 0 4 = 01030100 ffff88007caafec0 1916957145 S Co:7:001:0 s 23 01 0010 0001 0000 0 ffff88007caafec0 1916957149 C Co:7:001:0 0 0 ffff88007caafec0 1916957151 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafec0 1916957155 C Ci:7:001:0 0 4 = 01030000 ffff88007caafec0 1916997009 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafec0 1916997014 C Ci:7:001:0 0 4 = 01030000 ffff88007caafec0 1917037008 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafec0 1917037013 C Ci:7:001:0 0 4 = 01030000 ffff88007caafec0 1917077008 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafec0 1917077013 C Ci:7:001:0 0 4 = 01030000 ffff88007caafec0 1917117008 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafec0 1917117013 C Ci:7:001:0 0 4 = 01030000 ffff88007caafec0 1917117019 S Co:7:001:0 s 23 03 0004 0001 0000 0 ffff88007caafec0 1917117023 C Co:7:001:0 0 0 ffff88007caafec0 1917178260 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafec0 1917178281 C Ci:7:001:0 0 4 = 03030000 ffff88007caafec0 1917236987 S Co:7:001:0 s 23 01 0014 0001 0000 0 ffff88007caafec0 1917236990 C Co:7:001:0 0 0 ffff88007caafec0 1917236999 S Ci:7:000:0 s 80 06 0100 0000 0040 64 < ffff88007caafec0 1917243815 C Ci:7:000:0 0 18 = 12011001 00000008 2e0c0007 00010102 0001 ffff88007caafec0 1917243824 S Co:7:001:0 s 23 03 0004 0001 0000 0 ffff88007caafec0 1917243829 C Co:7:001:0 0 0 ffff88007caafec0 1917297027 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafec0 1917297048 C Ci:7:001:0 0 4 = 03030000 ffff88007caafec0 1917356984 S Co:7:001:0 s 23 01 0014 0001 0000 0 ffff88007caafec0 1917356987 C Co:7:001:0 0 0 ffff88007caafec0 1917356990 S Co:7:000:0 s 00 05 000c 0000 0000 0 ffff88007caafec0 1917359805 C Co:7:000:0 0 0 ffff88007caafec0 1917377009 S Ci:7:012:0 s 80 06 0100 0000 0012 18 < ffff88007caafec0 1917382802 C Ci:7:012:0 0 18 = 12011001 00000008 2e0c0007 00010102 0001 ffff88007caafec0 1917382814 S Ci:7:012:0 s 80 06 0200 0000 0009 9 < ffff88007caafec0 1917387803 C Ci:7:012:0 0 9 = 09022900 01010380 96 ffff88007caafec0 1917387823 S Ci:7:012:0 s 80 06 0200 0000 0029 41 < ffff88007caafec0 1917396801 C Ci:7:012:0 0 41 = 09022900 01010380 96090400 0002ff00 00000921 11010001 223f0007 05020308 ffff88007caafe00 1917396812 S Ci:7:012:0 s 80 06 0300 0000 00ff 255 < ffff88007caafe00 1917401801 C Ci:7:012:0 0 4 = 04030904 ffff88007caafe00 1917401819 S Ci:7:012:0 s 80 06 0302 0409 00ff 255 < ffff88007caafe00 1917410800 C Ci:7:012:0 0 38 = 26034d00 65007400 72006f00 6c006f00 67006900 63002000 53006300 61006e00 ffff88007caafe00 1917410827 S Ci:7:012:0 s 80 06 0301 0409 00ff 255 < ffff88007caafe00 1917417800 C Ci:7:012:0 0 22 = 16034d00 65007400 72006f00 6c006f00 67006900 6300 ffff88007caafd40 1917417931 S Co:7:012:0 s 00 09 0001 0000 0000 0 ffff88007caafd40 1917420800 C Co:7:012:0 0 0 ffff88007caafd40 1917420826 S Ci:7:012:0 s 80 06 0303 0409 00ff 255 < ffff88007caafd40 1917427799 C Ci:7:012:0 0 16 = 10035000 4f005300 20005500 53004200 ffff88007e555bc0 1972206995 C Ii:7:001:1 0:128 1 = 02 ffff88007e555bc0 1972207006 S Ii:7:001:1 -115:128 2 < ffff88007ddc2840 1972207059 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007ddc2840 1972207067 C Ci:7:001:0 0 4 = 00010300 ffff88007ddc2840 1972207070 S Co:7:001:0 s 23 01 0010 0001 0000 0 ffff88007ddc2840 1972207074 C Co:7:001:0 0 0 ffff88007ddc2840 1972207077 S Co:7:001:0 s 23 01 0011 0001 0000 0 ffff88007ddc2840 1972207080 C Co:7:001:0 0 0 ffff88007caafe00 1972207253 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafe00 1972207260 C Ci:7:001:0 0 4 = 00010000 ffff88007caafe00 1972247052 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafe00 1972247060 C Ci:7:001:0 0 4 = 00010000 ffff88007caafe00 1972287008 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafe00 1972287014 C Ci:7:001:0 0 4 = 00010000 ffff88007caafe00 1972326987 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafe00 1972326993 C Ci:7:001:0 0 4 = 00010000 ffff88007caafe00 1972366987 S Ci:7:001:0 s a3 00 0000 0001 0004 4 < ffff88007caafe00 1972366993 C Ci:7:001:0 0 4 = 00010000 On 11/16/2010 11:29 AM, Alan Stern wrote: > On Tue, 16 Nov 2010, Charles Tassell wrote: > >> Hi Greg, >> >> No, I don't think that is it. The device is powered via USB, and it >> maintains power until I unplug it. Also, the device works fine in >> Windows on the same box, and if you look at the udevmon section the >> kernel removes it as a HID device right after udev finishes processing >> it, then adds it back as a generic USB device with no drivers. Here's >> an annotated description of the process: > Part of the problem is that your original kernel log doesn't have > timestamps. > > Anyway, it would help to have a usbmon trace showing what happens when > the scanner is plugged in. Instructions are in the kernel source file > Documentation/usb/usbmon.txt. This ought to show what's going on with > that disconnect & reconnect. > >> Plug in the device. Kernel recognizes it: >> KERNEL[1289756866.849673] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1 (usb) >> KERNEL[1289756866.859563] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0 (usb) >> KERNEL[1289756866.859674] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/0003:0C2E:0200.000A (hid) >> KERNEL[1289756866.872800] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input13 (input) >> KERNEL[1289756866.872891] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input13/event7 >> (input) >> KERNEL[1289756866.872909] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/0003:0C2E:0200.000A/hidraw/hidraw3 >> (hidraw) >> >> All the devices are registered, so UDEV creates the /dev entries... >> >> UDEV [1289756866.873915] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1 (usb) >> UDEV [1289756866.874327] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0 (usb) >> UDEV [1289756866.874441] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/0003:0C2E:0200.000A (hid) >> UDEV [1289756866.874724] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/0003:0C2E:0200.000A/hidraw/hidraw3 >> (hidraw) >> >> Something triggers the kernel to unregister the device from the input >> layer... > usbmon might show the trigger. > >> KERNEL[1289756867.166734] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input13/event7 >> (input) >> KERNEL[1289756867.216580] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input13 (input) >> KERNEL[1289756867.216609] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/0003:0C2E:0200.000A/hidraw/hidraw3 >> (hidraw) >> KERNEL[1289756867.216703] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/0003:0C2E:0200.000A (hid) >> KERNEL[1289756867.216741] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0 (usb) >> KERNEL[1289756867.216834] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1 (usb) >> >> UDEV deletes the devices... >> >> UDEV [1289756867.216935] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/0003:0C2E:0200.000A/hidraw/hidraw3 >> (hidraw) >> UDEV [1289756867.217063] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/0003:0C2E:0200.000A (hid) >> UDEV [1289756867.271298] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input13 (input) >> UDEV [1289756867.303544] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input13/event7 >> (input) >> UDEV [1289756867.303727] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input13/event7 >> (input) >> UDEV [1289756867.303820] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input13 (input) >> UDEV [1289756867.303965] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0 (usb) >> UDEV [1289756867.304191] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1 (usb) >> >> The kernel then adds it back as some sort of generic device... >> >> KERNEL[1289756870.808673] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1 (usb) >> KERNEL[1289756870.817600] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0 (usb) >> >> UDEV sees this but doesn't create any /dev entries. >> >> UDEV [1289756870.818662] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1 (usb) >> UDEV [1289756870.837532] add >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0 (usb) >> >> Physically unplugging the device then causes this: >> >> KERNEL[1289919402.423327] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0 (usb) >> KERNEL[1289919402.423414] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1 (usb) >> UDEV [1289919402.423536] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0 (usb) >> UDEV [1289919402.424162] remove >> /devices/pci0000:00/0000:00:1d.1/usb7/7-1 (usb) >> >> >> It seems to be something in either the kernel itself or UDEV is telling >> the system that this is not a keyboard, so not to treat it as such. But >> grepping for the vendor and device IDs in both the udev and kernel >> sources dirs doesn't seem to show why it's getting blacklisted. > Maybe something in the _device_ is responsible. > > Alan Stern > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html