USB 감지가 제대로 작동하지 않음

USB 감지가 제대로 작동하지 않음

karo 모듈용으로 만들어진 사용자 정의 yocto 이미지가 있습니다. 5.7.1 커널을 실행 중입니다.

USB 드라이브를 연결하면 예상한 대로 "lsblk" 출력에 표시되지 않습니다. "lsusb"에 표시되므로 시스템이 드라이브를 감지했다는 것을 알 수 있지만 커널이 드라이브를 처리하는 방식에 문제가 있는 것일까요?

커널에 많은 디버깅 옵션이 활성화되어 있으므로 드라이브를 연결했을 때의 출력은 다음과 같습니다.

root@txmp-1530:~# [  451.851889] usb 1-1.1: new high-speed USB device number 7 using ehci-platform
[  452.004112] usb 1-1.1: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=11.00
[  452.011016] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  452.018427] usb 1-1.1: Product: Flash Disk
[  452.022432] usb 1-1.1: Manufacturer: USB
[  452.026288] usb 1-1.1: SerialNumber: SCY0000000271192
[  452.031340] device: '1-1.1': device_add
[  452.035347] bus: 'usb': add device 1-1.1
[  452.039134] PM: Adding info for usb:1-1.1
[  452.045798] bus: 'usb': driver_probe_device: matched device 1-1.1 with driver usb
[  452.051941] bus: 'usb': really_probe: probing driver usb with device 1-1.1
[  452.058854] usb 1-1.1: no default pinctrl state
[  452.063898] device: '1-1.1:1.0': device_add
[  452.067446] bus: 'usb': add device 1-1.1:1.0
[  452.071695] PM: Adding info for usb:1-1.1:1.0
[  452.077418] bus: 'usb': driver_probe_device: matched device 1-1.1:1.0 with driver uas
[  452.084011] bus: 'usb': really_probe: probing driver uas with device 1-1.1:1.0
[  452.091073] uas 1-1.1:1.0: no default pinctrl state
[  452.095994] uas: probe of 1-1.1:1.0 rejects match -19
[  452.101346] bus: 'usb': driver_probe_device: matched device 1-1.1:1.0 with driver usb-storage
[  452.109502] bus: 'usb': really_probe: probing driver usb-storage with device 1-1.1:1.0
[  452.117436] usb-storage 1-1.1:1.0: no default pinctrl state
[  452.122991] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[  452.129639] Vendor: 0x090c, Product: 0x1000, Revision: 0x1100
[  452.134956] Interface Subclass: 0x06, Protocol: 0x50
[  452.139840] usb-storage 1-1.1:1.0: Quirks match for vid 090c pid 1000: 400
[  452.146734] Transport: Bulk
[  452.149470] Protocol: Transparent SCSI
[  452.153509] scsi host0: usb-storage 1-1.1:1.0
[  452.157617] device: 'host0': device_add
[  452.161408] bus: 'scsi': add device host0
[  452.161955] *** thread sleeping
[  452.165488] PM: Adding info for scsi:host0
[  452.173070] device: 'host0': device_add
[  452.176543] PM: Adding info for No Bus:host0
[  452.181033] usb-storage 1-1.1:1.0: waiting for device to settle before scanning
[  452.188048] driver: 'usb-storage': driver_bound: bound to device '1-1.1:1.0'
[  452.195481] bus: 'usb': really_probe: bound device 1-1.1:1.0 to driver usb-storage
[  452.202627] device: 'ep_81': device_add
[  452.206478] PM: Adding info for No Bus:ep_81
[  452.210643] device: 'ep_02': device_add
[  452.214594] PM: Adding info for No Bus:ep_02
[  452.218722] driver: 'usb': driver_bound: bound to device '1-1.1'
[  452.225409] bus: 'usb': really_probe: bound device 1-1.1 to driver usb
[  452.231297] device: 'ep_00': device_add
[  452.235675] PM: Adding info for No Bus:ep_00
[  453.191885] usb-storage 1-1.1:1.0: starting scan
[  453.195048] rq=fe rqtype=a1 value=0000 index=00 len=1
[  453.200261] GetMaxLUN command result is 1, data is 0
[  453.205490] *** thread awakened
[  453.208189] Command INQUIRY (6 bytes)
[  453.211899] bytes: 12 00 00 00 24 00
[  453.215377] Bulk Command S 0x43425355 T 0x1 L 36 F 128 Trg 0 LUN 0 CL 6
[  453.222067] xfer 31 bytes
[  453.224777] Status code 0; transferred 31/31
[  453.228833] -- transfer complete
[  453.232115] Bulk command transfer result=0
[  453.236143] xfer 36 bytes, 1 entries
[  453.338971] Status code 0; transferred 36/36
[  453.341769] -- transfer complete
[  453.345064] Bulk data transfer result 0x0
[  453.348992] Attempting to get CSW...
[  453.352595] xfer 13 bytes
[  453.355328] Status code 0; transferred 13/13
[  453.359404] -- transfer complete
[  453.362716] Bulk status result = 0
[  453.366024] Bulk Status S 0x53425355 T 0x1 R 0 Stat 0x0
[  453.371232] scsi cmd done, result=0x0
[  453.374939] *** thread sleeping
[  453.378159] scsi 0:0:0:0: Direct-Access     USB      Flash Disk       1100 PQ: 0 ANSI: 4
[  453.386162] device: 'target0:0:0': device_add
[  453.390472] bus: 'scsi': add device target0:0:0
[  453.395040] PM: Adding info for scsi:target0:0:0
[  453.400124] device: '0:0:0:0': device_add
[  453.404002] bus: 'scsi': add device 0:0:0:0
[  453.407762] PM: Adding info for scsi:0:0:0:0
[  453.412525] device: '0:0:0:0': device_add
[  453.416281] PM: Adding info for No Bus:0:0:0:0
[  453.421030] device: '0:0:0:0': device_add
[  453.424821] PM: Adding info for No Bus:0:0:0:0
[  453.430287] *** thread awakened
[  453.432560] Bad LUN (0:1)
[  453.434572] scsi cmd done, result=0x40000
[  453.438571] *** thread sleeping
[  453.438736] usb-storage 1-1.1:1.0: scan complete

드라이브는 그대로 유지되며 다음과 같은 두 가지 명령 출력이 있습니다.

root@txmp-1530:~# lsusb
Bus 001 Device 004: ID 125b:0158  
Bus 001 Device 003: ID 125b:0159  
Bus 001 Device 007: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@txmp-1530:~# 
root@txmp-1530:~# 
root@txmp-1530:~# 
root@txmp-1530:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0      179:0    0  3.5G  0 disk 
|-mmcblk0p1  179:1    0    2M  0 part 
|-mmcblk0p2  179:2    0   64M  0 part 
|-mmcblk0p3  179:3    0  373M  0 part /
|-mmcblk0p4  179:4    0  373M  0 part 
`-mmcblk0p5  179:5    0  2.8G  0 part /opt/videx
mmcblk0boot0 179:16   0    2M  1 disk 
mmcblk0boot1 179:32   0    2M  1 disk 

그런 다음 장치를 제거하면 다음과 같은 출력이 표시됩니다.

root@txmp-1530:~# [  542.214305] usb 1-1.1: USB disconnect, device number 7
[  542.218038] device: 'ep_81': device_unregister
[  542.222600] PM: Removing info for No Bus:ep_81
[  542.226870] device: 'ep_02': device_unregister
[  542.231375] PM: Removing info for No Bus:ep_02
[  542.235879] bus: 'usb': remove device 1-1.1:1.0
[  542.240270] device: '0:0:0:0': device_unregister
[  542.245121] PM: Removing info for No Bus:0:0:0:0
[  542.252005] device: '0:0:0:0': device_create_release
[  542.255531] device: '0:0:0:0': device_unregister
[  542.260516] PM: Removing info for No Bus:0:0:0:0
[  542.266061] bus: 'scsi': remove device 0:0:0:0
[  542.269352] PM: Removing info for scsi:0:0:0:0
[  542.274491] bus: 'scsi': remove device target0:0:0
[  542.278569] PM: Removing info for scsi:target0:0:0
[  542.283727] device: 'host0': device_unregister
[  542.287905] PM: Removing info for No Bus:host0
[  542.292759] bus: 'scsi': remove device host0
[  542.296442] PM: Removing info for scsi:host0
[  542.300931] -- sending exit command to thread
[  542.305293] *** thread awakened
[  542.307980] -- exiting
[  542.342645] PM: Removing info for usb:1-1.1:1.0
[  542.346463] device: 'ep_00': device_unregister
[  542.350428] PM: Removing info for No Bus:ep_00
[  542.355071] bus: 'usb': remove device 1-1.1
[  542.359538] PM: Removing info for usb:1-1.1

다시 한번 참조를 위해 두 개의 ls 명령을 제거했습니다.

root@txmp-1530:~# lsusb
Bus 001 Device 004: ID 125b:0158  
Bus 001 Device 003: ID 125b:0159  
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@txmp-1530:~# 
root@txmp-1530:~# 
root@txmp-1530:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0      179:0    0  3.5G  0 disk 
|-mmcblk0p1  179:1    0    2M  0 part 
|-mmcblk0p2  179:2    0   64M  0 part 
|-mmcblk0p3  179:3    0  373M  0 part /
|-mmcblk0p4  179:4    0  373M  0 part 
`-mmcblk0p5  179:5    0  2.8G  0 part /opt/videx
mmcblk0boot0 179:16   0    2M  1 disk 
mmcblk0boot1 179:32   0    2M  1 disk 
root@txmp-1530:~# 

이 문제를 추적하는 데 도움이 되도록 포함해야 할 다른 정보가 있으면 알려주시기 바랍니다. 감사해요

관련 정보