Hello, Kernels 4.1.35 and 4.4.39, on Gentoo boxes. We are trying to set up Yubikey-compatible (made by Plugup) U2F usb keys on our systems, and the keys seems to be randomly detected by the usbhid driver. Since it's for authentication, this seemingly random behaviour is bothersome... Sometimes, the key is detected properly. It may be almost instantly (ie plug the key and it's detected) or after a 5-second delay as below : 11:17:35 kernel: usb 3-2: new full-speed USB device number 9 using xhci_hcd 11:17:35 kernel: usb 3-2: New USB device found, idVendor=2581, idProduct=f1d0 11:17:35 kernel: usb 3-2: New USB device strings: Mfr=1, Product=1, SerialNumber=1 11:17:35 kernel: usb 3-2: Product: Plug-up 11:17:35 kernel: usb 3-2: Manufacturer: Plug-up 11:17:35 kernel: usb 3-2: SerialNumber: Plug-up 11:17:40 kernel: hid-generic 0003:2581:F1D0.0004: hiddev0,hidraw3: USB HID v1.01 Device [Plug-up Plug-up] on usb-0000:00:14.0-2/input0 More often than not, the key isn't detected at all and we get an error after a 20-second delay : 11:17:52 kernel: usb 3-2: new full-speed USB device number 10 using xhci_hcd 11:17:53 kernel: usb 3-2: New USB device found, idVendor=2581, idProduct=f1d0 11:17:53 kernel: usb 3-2: New USB device strings: Mfr=1, Product=1, SerialNumber=1 11:17:53 kernel: usb 3-2: Product: Plug-up 11:17:53 kernel: usb 3-2: Manufacturer: Plug-up 11:17:53 kernel: usb 3-2: SerialNumber: Plug-up 11:18:13 kernel: usbhid 3-2:1.0: can't add hid device: -110 11:18:13 kernel: usbhid: probe of 3-2:1.0 failed with error -110 This happens on all USB ports (USB2 or USB3), on several computers. When the key is properly detected, usb-devices says T: Bus=03 Lev=02 Prnt=13 Port=02 Cnt=03 Dev#= 16 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1 P: Vendor=2581 ProdID=f1d0 Rev=00.01 S: Manufacturer=Plug-up S: Product=Plug-up S: SerialNumber=Plug-up C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid And, when it's not, we get T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 8 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1 P: Vendor=2581 ProdID=f1d0 Rev=00.01 S: Manufacturer=Plug-up S: Product=Plug-up S: SerialNumber=Plug-up C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=(none) (note the 'Driver=(none)' on the last line). After activating dynamic_debug on the kernel, here is what we get when the key is detected : 09:06:13 kernel: usb 3-6: new full-speed USB device number 13 using xhci_hcd 09:06:13 kernel: usb 3-6: New USB device found, idVendor=2581, idProduct=f1d0 09:06:13 kernel: usb 3-6: New USB device strings: Mfr=1, Product=1, SerialNumber=1 09:06:13 kernel: usb 3-6: Product: Plug-up 09:06:13 kernel: usb 3-6: Manufacturer: Plug-up 09:06:13 kernel: usb 3-6: SerialNumber: Plug-up 09:06:13 kernel: usbhid_restart_ctrl_queue:238: hid-generic 0003:2581:F1D0.0008: Kicking head 1 tail 0 09:06:13 kernel: hid-generic 0003:2581:F1D0.0008: hiddev0,hidraw0: USB HID v1.01 Device [Plug-up Plug-up] on usb-0000:00:14.0-6/input0 And when it is not : 09:08:02 kernel: usb 3-6: new full-speed USB device number 14 using xhci_hcd 09:08:02 kernel: usb 3-6: New USB device found, idVendor=2581, idProduct=f1d0 09:08:02 kernel: usb 3-6: New USB device strings: Mfr=1, Product=1, SerialNumber=1 09:08:02 kernel: usb 3-6: Product: Plug-up 09:08:02 kernel: usb 3-6: Manufacturer: Plug-up 09:08:02 kernel: usb 3-6: SerialNumber: Plug-up 09:08:22 kernel: usbhid 3-6:1.0: can't add hid device: -110 09:08:22 kernel: usbhid: probe of 3-6:1.0 failed with error -110 The 'usbhid_restart_ctrl_queue' line is present when everything is ok, absent otherwise. During the 20-second delay, no other USB activity will be taken into account (meaning, if we insert a USB storage key, it will be detected after the 'blocking-delay' will be over). We configured dynamic_debug for a more verbosity, but the output is a little too long (around 1000 lines for the ok and nok cases) for this mailing list. We will send it directly if requested. Has anyone some idea of what's going on and, more importantly, how to correct this ? If needed, we can test patches and perform any test you wizards may find useful to pinpoint (and hopefully correct) this really annoying behaviour. Tia, -- B&A Consultants - Sécurité informatique - Conseils et audits www.ba-consultants.fr Tél : (0) 563 277 241 - Fax : (0) 567 737 829 -- 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