USBスマートカードリーダー接続の問題

USBスマートカードリーダー接続の問題

私は最近、スマートカードリーダーの接続問題を解決する会社でインターンを始めました。

問題の読者はCCIDドライバを使用するDUAli DE-620で、Ubuntu 16.04を使用しています。 VMバージョンとライブインストールの両方でUSB層に問題があるように見え、次のdmesg出力が発生します。

[ 5840.680206] usb 3-2: new full-speed USB device number 73 using xhci_hcd
[ 5840.829516] usb 3-2: New USB device found, idVendor=1db2, idProduct=0630
[ 5840.829521] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5840.829524] usb 3-2: Product: DE-620
[ 5840.829526] usb 3-2: Manufacturer: DUALi
[ 5840.829529] usb 3-2: SerialNumber: B71468D80508
[ 5840.852392] usb 3-2: USB disconnect, device number 73
[ 5841.456266] usb 3-2: new full-speed USB device number 74 using xhci_hcd
[ 6352.804091] usb 3-2: new full-speed USB device number 75 using xhci_hcd
[ 6352.953382] usb 3-2: New USB device found, idVendor=1db2, idProduct=0630
[ 6352.953387] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6352.953390] usb 3-2: Product: DE-620
[ 6352.953393] usb 3-2: Manufacturer: DUALi
[ 6352.953395] usb 3-2: SerialNumber: B71468D80508
[ 6352.977508] usb 3-2: USB disconnect, device number 75
[ 6353.580077] usb 3-2: new full-speed USB device number 76 using xhci_hcd
[ 6353.729268] usb 3-2: New USB device found, idVendor=1db2, idProduct=0630
[ 6353.729273] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6353.729276] usb 3-2: Product: DE-620
[ 6353.729279] usb 3-2: Manufacturer: DUALi
[ 6353.729291] usb 3-2: SerialNumber: B71468D80508
[ 6353.750710] usb 3-2: USB disconnect, device number 76
[ 6354.352054] usb 3-2: new full-speed USB device number 77 using xhci_hcd
[ 6354.501314] usb 3-2: New USB device found, idVendor=1db2, idProduct=0630
[ 6354.501319] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6354.501322] usb 3-2: Product: DE-620
[ 6354.501325] usb 3-2: Manufacturer: DUALi
[ 6354.501328] usb 3-2: SerialNumber: B71468D80508
[ 6354.524734] usb 3-2: USB disconnect, device number 77
[ 6355.128030] usb 3-2: new full-speed USB device number 78 using xhci_hcd
[ 6355.277316] usb 3-2: New USB device found, idVendor=1db2, idProduct=0630
[ 6355.277321] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6355.277324] usb 3-2: Product: DE-620
[ 6355.277326] usb 3-2: Manufacturer: DUALi
[ 6355.277329] usb 3-2: SerialNumber: B71468D80508
[ 6355.300066] usb 3-2: USB disconnect, device number 78
[ 6355.904009] usb 3-2: new full-speed USB device number 79 using xhci_hcd
[ 6356.053320] usb 3-2: New USB device found, idVendor=1db2, idProduct=0630
[ 6356.053326] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6356.053329] usb 3-2: Product: DE-620
[ 6356.053331] usb 3-2: Manufacturer: DUALi
[ 6356.053334] usb 3-2: SerialNumber: B71468D80508
[ 6356.076448] usb 3-2: USB disconnect, device number 79
[ 6356.679934] usb 3-2: new full-speed USB device number 80 using xhci_hcd

デバイスが接続されている間は持続します。次のコマンドは、dmesg出力にVIDとPIDも表示しません。

lsusb 
usb-devices

このデバイスは、統合されたOpenSUSE PCとセカンダリブートWin10では正常に動作しますが、Ubuntu 16.04ではこの問題があります。問題を解決する試みを見つけることができます。ここ私も様々なケーブルを使ってみました。

この問題を引き起こすUSBレイヤーで何が起こり、どのように解決できますか?

編集:コメントによると、lspci -nn出力は次のようになります。

00:00.0 Host bridge [0600]: Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154] (rev 09)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:0151] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04)
00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04)
00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4)
00:1c.1 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 [8086:1e12] (rev c4)
00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation HM77 Express Chipset LPC Controller [8086:1e57] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e03] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22] (rev 04)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107M [GeForce GT 640M] [10de:0fd2] (rev a1)
02:00.0 Ethernet controller [0200]: Broadcom Corporation NetLink BCM57785 Gigabit Ethernet PCIe [14e4:16b5] (rev 10)
02:00.1 SD Host controller [0805]: Broadcom Corporation BCM57765/57785 SDXC/MMC Card Reader [14e4:16bc] (rev 10)
02:00.2 System peripheral [0880]: Broadcom Corporation BCM57765/57785 MS Card Reader [14e4:16be] (rev 10)
02:00.3 System peripheral [0880]: Broadcom Corporation BCM57765/57785 xD-Picture Card Reader [14e4:16bf] (rev 10)
03:00.0 Network controller [0280]: Qualcomm Atheros AR9462 Wireless Network Adapter [168c:0034] (rev 01)

編集2:usbmonでWiresharkを使用すると、ハブがデバイスを切断するまでデバイス記述子を取得し、ループを設定しようとするいくつかの試みが表示されます。

編集3:pcscdログは次のとおりです。

$ sudo LIBCCID_ifdLogLevel=0x000F pcscd --foreground --debug --apdu --color | tee log.txt
[sudo] password for g: 
00000000 debuglog.c:291:DebugLogSetLevel() debug level=debug
00000116 debuglog.c:312:DebugLogSetCategory() Debug options: APDU
00000015 pcscdaemon.c:268:main() Force colored logs
00000052 utils.c:84:GetDaemonPid() Can't open /var/run/pcscd/pcscd.pid: No such file or directory
00000092 configfile.l:283:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000040 configfile.l:317:DBGetReaderListDir() Skipping non regular file: ..
00000027 configfile.l:355:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000063 configfile.l:317:DBGetReaderListDir() Skipping non regular file: .
00000008 pcscdaemon.c:569:main() pcsc-lite 1.8.14 daemon ready.
00034133 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/003/001
00000144 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0003, path: /dev/bus/usb/004/001
00000143 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000109 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000113 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/001/002
00000117 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x0489, PID: 0xE04E, path: /dev/bus/usb/001/003
00000106 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x0489, PID: 0xE04E, path: /dev/bus/usb/001/003
00000075 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/001/002
00000080 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x04F2, PID: 0xB374, path: /dev/bus/usb/001/004
00000079 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x04F2, PID: 0xB374, path: /dev/bus/usb/001/004
00000075 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/001/002
00000106 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
00000071 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001
00000076 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
00000081 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x045E, PID: 0x0752, path: /dev/bus/usb/002/003
00000075 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
00000080 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x046D, PID: 0xC534, path: /dev/bus/usb/002/004
00000079 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x046D, PID: 0xC534, path: /dev/bus/usb/002/004
00000075 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
21798580 hotplug_libudev.c:623:HPEstablishUSBNotifications() USB Device add
00000327 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1DB2, PID: 0x0630, path: /dev/bus/usb/002/124
00001155 hotplug_libudev.c:617:HPEstablishUSBNotifications() USB Device removed
01029546 hotplug_libudev.c:623:HPEstablishUSBNotifications() USB Device add
00000371 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1DB2, PID: 0x0630, path: /dev/bus/usb/002/125
00001006 hotplug_libudev.c:617:HPEstablishUSBNotifications() USB Device removed
01032328 hotplug_libudev.c:623:HPEstablishUSBNotifications() USB Device add
00000627 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1DB2, PID: 0x0630, path: /dev/bus/usb/002/126
00001079 hotplug_libudev.c:617:HPEstablishUSBNotifications() USB Device removed
01030744 hotplug_libudev.c:623:HPEstablishUSBNotifications() USB Device add
00000763 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1DB2, PID: 0x0630, path: /dev/bus/usb/002/127
00000925 hotplug_libudev.c:617:HPEstablishUSBNotifications() USB Device removed
01025636 hotplug_libudev.c:623:HPEstablishUSBNotifications() USB Device add
00000639 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1DB2, PID: 0x0630, path: /dev/bus/usb/002/005
00001115 hotplug_libudev.c:617:HPEstablishUSBNotifications() USB Device removed
01030189 hotplug_libudev.c:623:HPEstablishUSBNotifications() USB Device add
00000566 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1DB2, PID: 0x0630, path: /dev/bus/usb/002/006
00001229 hotplug_libudev.c:617:HPEstablishUSBNotifications() USB Device removed
01030823 hotplug_libudev.c:623:HPEstablishUSBNotifications() USB Device add
00000565 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x1DB2, PID: 0x0630, path: /dev/bus/usb/002/007
00001138 hotplug_libudev.c:617:HPEstablishUSBNotifications() USB Device removed
01031152 hotplug_libudev.c:623:HPEstablishUSBNotifications() USB Device add
00000403 hotplug_libudev.c:296:get_driver() Looking for a driver for VID: 0x8087, PID: 0x0024, path: /dev/bus/usb/002/002
00001134 hotplug_libudev.c:617:HPEstablishUSBNotifications() USB Device removed

編集:問題は最新のカーネルのUSBドライバが原因で発生し、NTP関連のコードをコメントアウトして問題を解決しました。

ベストアンサー1

カーネルでNTPコードをコメントアウトすることで問題を解決しました。 Linuxカーネル4に追加されたルールが原因で、デバイスが無限ループになったようです。 *

おすすめ記事