USB device not recognized,Please help me see

Hi,
USB device not recognized,Please help me see

dmesg-1.txt (135.7 KB)
syslog.txt (2.1 MB)

root@tegra:/home/robot# lsusb
Bus 002 Device 004: ID 8086:0ad4 Intel Corp.
Bus 002 Device 005: ID 0781:55ae SanDisk Corp.
Bus 002 Device 002: ID 0bda:0420 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 005: ID 046d:c21f Logitech, Inc. F710 Wireless Gamepad [XInput Mode]
Bus 001 Device 003: ID 303a:4001
Bus 001 Device 002: ID 0bda:5420 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@tegra:/home/robot# lsblk  -------------->>>>>>>>>>>No USB device recognized.
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0          7:0    0    16M  1 loop
zram0        251:0    0   970M  0 disk
zram1        251:1    0   970M  0 disk
zram2        251:2    0   970M  0 disk
zram3        251:3    0   970M  0 disk
zram4        251:4    0   970M  0 disk
zram5        251:5    0   970M  0 disk
zram6        251:6    0   970M  0 disk
zram7        251:7    0   970M  0 disk
nvme0n1      259:0    0 953.9G  0 disk
├─nvme0n1p1  259:1    0 952.4G  0 part /
├─nvme0n1p2  259:2    0   128M  0 part
├─nvme0n1p3  259:3    0   768K  0 part
├─nvme0n1p4  259:4    0  31.6M  0 part
├─nvme0n1p5  259:5    0   128M  0 part
├─nvme0n1p6  259:6    0   768K  0 part
├─nvme0n1p7  259:7    0  31.6M  0 part
├─nvme0n1p8  259:8    0    80M  0 part
├─nvme0n1p9  259:9    0   512K  0 part
├─nvme0n1p10 259:10   0    64M  0 part
├─nvme0n1p11 259:11   0    80M  0 part
├─nvme0n1p12 259:12   0   512K  0 part
├─nvme0n1p13 259:13   0    64M  0 part
├─nvme0n1p14 259:14   0   400M  0 part
└─nvme0n1p15 259:15   0 479.5M  0 part
root@tegra:/home/robot# cat /proc/partitions
major minor  #blocks  name

 259        0 1000204632 nvme0n1
 259        1  998679552 nvme0n1p1
 259        2     131072 nvme0n1p2
 259        3        768 nvme0n1p3
 259        4      32384 nvme0n1p4
 259        5     131072 nvme0n1p5
 259        6        768 nvme0n1p6
 259        7      32384 nvme0n1p7
 259        8      81920 nvme0n1p8
 259        9        512 nvme0n1p9
 259       10      65536 nvme0n1p10
 259       11      81920 nvme0n1p11
 259       12        512 nvme0n1p12
 259       13      65536 nvme0n1p13
 259       14     409600 nvme0n1p14
 259       15     491008 nvme0n1p15
   7        0      16384 loop0
 251        0     993216 zram0
 251        1     993216 zram1
 251        2     993216 zram2
 251        3     993216 zram3
 251        4     993216 zram4
 251        5     993216 zram5
 251        6     993216 zram6
 251        7     993216 zram7

root@tegra:/home/robot# lsusb
Bus 002 Device 004: ID 8086:0ad4 Intel Corp.
Bus 002 Device 005: ID 0781:55ae SanDisk Corp.
Bus 002 Device 002: ID 0bda:0420 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 005: ID 046d:c21f Logitech, Inc. F710 Wireless Gamepad [XInput Mode]
Bus 001 Device 003: ID 303a:4001
Bus 001 Device 002: ID 0bda:5420 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@tegra:/home/robot# cat /etc/nv_tegra_release
# R35 (release), REVISION: 4.1, GCID: 33958178, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug  1 19:57:35 UTC 2023


[2-17]: SanDisk Extreme 55AE - D:\
SanDisk Extreme 55AE SCSI Disk Device - 磁盘驱动器 - Disk1 - 4 TB
Friendly Name            : SanDisk Extreme 55AE SCSI Disk Device
Device Description       : 磁盘驱动器
Device Path              : \\?\SCSI#Disk&Ven_SanDisk&Prod_Extreme_55AE#7&47ca036&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b} (GUID_DEVINTERFACE_DISK)
Kernel Name              : \Device\0000023d
Win32 Name               : \\.\PhysicalDrive1
Kernel Name              : \Device\Harddisk1\DR4
Device ID                : SCSI\DISK&VEN_SANDISK&PROD_EXTREME_55AE\7&47CA036&0&000000
Hardware IDs             : SCSI\DiskSanDisk_Extreme_55AE____8055 SCSI\DiskSanDisk_Extreme_55AE____ SCSI\DiskSanDisk_ SCSI\SanDisk_Extreme_55AE____8 SanDisk_Extreme_55AE____8 GenDisk
Driver KeyName           : {4d36e967-e325-11ce-bfc1-08002be10318}\0006 (GUID_DEVCLASS_DISKDRIVE)
Driver                   : System32\drivers\disk.sys (Version: 10.0.22621.3672  Date: 2024-07-08  Company: Microsoft Corporation)
Driver Inf               : C:\Windows\inf\disk.inf
Legacy BusType           : Internal
Class                    : DiskDrive
Class GUID               : {4d36e967-e325-11ce-bfc1-08002be10318} (GUID_DEVCLASS_DISKDRIVE)
Service                  : disk
Enumerator               : SCSI
Location Info            : Bus Number 0, Target Id 0, LUN 0
Address                  : 0
Manufacturer Info        : (标准磁盘驱动器)
Capabilities             : 0xE0 (SilentInstall, RawDeviceOK, SurpriseRemovalOK)
Status                   : 0x0180200A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER)
Problem Code             : 0
EnhancedPowerMgmtEnabled : 0
Power State              : D0 (supported: D0, D3, wake from D0)
Size                     : 4 TB / 3.6 TiB / 4,000,753,467,904 Bytes

Is this custom board or devkit?

What is the device you are speaking of? If you are referring to the description on the right side of the lsusb that shows this:
Bus 001 Device 003: ID 303a:4001
…then that is the device itself not providing a description. If there is no USB listing at all, then run “dmesg --follow”, and note which log lines occur as a result of inserting that USB device plug. Then post the log lines specific to only the USB insert event.

Hi Linuxdev:


root@tegra:/home/robot# dmesg
[18595.896676] usb 1-2.3: new high-speed USB device number 4 using tegra-xusb
[18596.036519] usb 1-2.3: New USB device found, idVendor=0781, idProduct=55ae, bcdDevice=80.55
[18596.036523] usb 1-2.3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[18596.036525] usb 1-2.3: Product: Extreme 55AE
[18596.036526] usb 1-2.3: Manufacturer: SanDisk
[18596.036528] usb 1-2.3: SerialNumber: 32333337394D343032333931
[18596.040384] scsi host0: uas
[18597.272865] scsi 0:0:0:0: Direct-Access     SanDisk  Extreme 55AE     8055 PQ: 0 ANSI: 6
[18597.282817] scsi 0:0:0:1: Enclosure         SanDisk  SES Device       8055 PQ: 0 ANSI: 6
[18597.291955] sd 0:0:0:0: [sda] 7813971617 512-byte logical blocks: (4.00 TB/3.64 TiB)
[18597.300108] sd 0:0:0:0: [sda] Write Protect is off
[18597.305057] sd 0:0:0:0: [sda] Mode Sense: 37 00 10 00
[18597.305379] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[18597.314384] sd 0:0:0:0: [sda] Optimal transfer size 1048576 bytes
[18597.368126]  sda: sda1
[18597.370090] sd 0:0:0:0: [sda] Attached SCSI disk
root@tegra:/home/robot# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0          7:0    0    16M  1 loop
sda            8:0    0   3.7T  0 disk
└─sda1         8:1    0   3.7T  0 part
zram0        251:0    0   970M  0 disk [SWAP]
zram1        251:1    0   970M  0 disk [SWAP]
zram2        251:2    0   970M  0 disk [SWAP]
zram3        251:3    0   970M  0 disk [SWAP]
zram4        251:4    0   970M  0 disk [SWAP]
zram5        251:5    0   970M  0 disk [SWAP]
zram6        251:6    0   970M  0 disk [SWAP]
zram7        251:7    0   970M  0 disk [SWAP]
nvme0n1      259:0    0 953.9G  0 disk
├─nvme0n1p1  259:1    0 952.4G  0 part /
├─nvme0n1p2  259:2    0   128M  0 part
├─nvme0n1p3  259:3    0   768K  0 part
├─nvme0n1p4  259:4    0  31.6M  0 part
├─nvme0n1p5  259:5    0   128M  0 part
├─nvme0n1p6  259:6    0   768K  0 part
├─nvme0n1p7  259:7    0  31.6M  0 part
├─nvme0n1p8  259:8    0    80M  0 part
├─nvme0n1p9  259:9    0   512K  0 part
├─nvme0n1p10 259:10   0    64M  0 part
├─nvme0n1p11 259:11   0    80M  0 part
├─nvme0n1p12 259:12   0   512K  0 part
├─nvme0n1p13 259:13   0    64M  0 part
├─nvme0n1p14 259:14   0   400M  0 part
└─nvme0n1p15 259:15   0 479.5M  0 part
root@tegra:/home/robot# lsusb
Bus 002 Device 002: ID 0bda:0420 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 004: ID 0781:55ae SanDisk Corp. EC20-CE-FHLG
Bus 001 Device 002: ID 0bda:5420 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@tegra:/home/robot# cat /proc/partitions
major minor  #blocks  name

 259        0 1000204632 nvme0n1
 259        1  998679552 nvme0n1p1
 259        2     131072 nvme0n1p2
 259        3        768 nvme0n1p3
 259        4      32384 nvme0n1p4
 259        5     131072 nvme0n1p5
 259        6        768 nvme0n1p6
 259        7      32384 nvme0n1p7
 259        8      81920 nvme0n1p8
 259        9        512 nvme0n1p9
 259       10      65536 nvme0n1p10
 259       11      81920 nvme0n1p11
 259       12        512 nvme0n1p12
 259       13      65536 nvme0n1p13
 259       14     409600 nvme0n1p14
 259       15     491008 nvme0n1p15
   7        0      16384 loop0
 251        0     993220 zram0
 251        1     993220 zram1
 251        2     993220 zram2
 251        3     993220 zram3
 251        4     993220 zram4
 251        5     993220 zram5
 251        6     993220 zram6
 251        7     993220 zram7
   8        0 3906985808 sda
   8        1 3906983760 sda1
root@tegra:/home/robot#


Hi WayneWWW:
custom board

Is the device in question the SanDisk? If so, then it is working. Plug-in shows ID of “0781:55ae”. You could list this by itself with:
lsusb -d '0781:55ae'

Your earlier lsusb shows:
Bus 002 Device 005: ID 0781:55ae SanDisk Corp.

This is the job of USB. Then USB announces the device (it is hot plug) and a driver sees it and takes ownership. That ownership is only indirectly related to USB. In this case dmesg could not have shown this if the driver was not loaded for the SD card controller plus SD card:

[18596.040384] scsi host0: uas
[18597.272865] scsi 0:0:0:0: Direct-Access     SanDisk  Extreme 55AE     8055 PQ: 0 ANSI: 6
[18597.282817] scsi 0:0:0:1: Enclosure         SanDisk  SES Device       8055 PQ: 0 ANSI: 6
[18597.291955] sd 0:0:0:0: [sda] 7813971617 512-byte logical blocks: (4.00 TB/3.64 TiB)
[18597.300108] sd 0:0:0:0: [sda] Write Protect is off
[18597.305057] sd 0:0:0:0: [sda] Mode Sense: 37 00 10 00
[18597.305379] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[18597.314384] sd 0:0:0:0: [sda] Optimal transfer size 1048576 bytes
[18597.368126]  sda: sda1
[18597.370090] sd 0:0:0:0: [sda] Attached SCSI disk

There is yet more that might go on related to drivers. For example, there is a driver scheme for the partitioning. Once partitioning is covered, then there is another driver for the filesystem type. It is quite possible that if there is no partition, then something listing partitions might not show anything.

Something to illustrate and consider: The file “/dev/sda” shows up. That is not a real file, it is a driver pretending to be a file and lives only in RAM. Without the disk as a whole (it might be an SD card, but it is still a disk so far as the software cares at that level), there would be no “/dev/sda”. There is one partition, it is “/dev/sda1”. This also shows up in your lsblk:

sda            8:0    0   3.7T  0 disk
└─sda1         8:1    0   3.7T  0 part

You might get more use if you also have this list the filesystem type:
lsblk -f /dev/sda
(you could just “lsblk -f”, and see everything)

If partition sda1 is formatted, then maybe it can be mounted. If it is a VFAT filesystem, or an ext4 filesystem, or anything else, then that filesystem driver must first be present. If not formatted, then no mount can do anything, although it could be treated as binary data. What do you see from “lsblk -f /dev/sda”?

Yes… as linuxdev said, your device is already showed up. Not sure what question you are trying to ask here.

as follows:

請問如果用中文的話你能不能把你的問題表達的清楚一點… 說實話真的不知道你到底在說什麼

左边是不正常的,右边是正常的。
出问题的时候,左边lsblk没有sda信息,右边正常的有sda信息。

OK.

  1. 請問讀不到裝置的時候lsusb有顯示那個裝置嗎

  2. 請問讀不到的時候插拔這個硬碟dmesg會有新的log印出嗎?

上面是日志。
lsblk读不到的时候,lsusb是可以读的。

請問你能拿同樣這個USB storage在NV devkit上複製嗎?

Please note that you won’t see sda or sda1 unless the SD card itself has those partitions. If you see the device in lsusb, then it is not a USB issue, but is instead related to some subset:

  • The SD card itself might fail.
  • The partitioning might be wrong.
  • A filesystem might not be properly formatted.
  • The signal quality to the controller is insufficient for the usual commands to actually succeed. This can happen even if the USB itself is working.

Remember that a block device detection is not the same as the USB cable which the device has data piped through. Many devices, such as “/dev/sda”, “/dev/sdb”, or “/dev/sdc” are enumerated as they are discovered. It is then and only then when their existence will show up. No SD card is an example of one reason why they won’t show up. The actual lettering or numbering is simply a case of the order the devices are discovered.

/dev/sda1” (the first partition in a GPT partition scheme) would be a special case since it implies that “/dev/sda” (a block device capable of GPT partitioning) was found.

It is more likely that the SD card itself is failing, or perhaps the wiring to the SD card is not within spec for impedance (which leads to reflections).

Sector size 0 reported, assuming 512.
---->The device reported a sector size of 0, which is usually not normal. The system assumes a sector size of 512 bytes, but this may mean that the device was not initialized correctly or there is a problem.
0 512-byte logical blocks: (0 B/0 B)
---->This indicates that the number of logical blocks is 0, meaning that the system cannot recognize any free storage space in the device.
b.txt (1.8 KB)
a.txt (2.3 KB)

The left side is normal and the right side is abnormal.

使用金斯顿的,反复插拔不存在问题。
使用sandisk的,反复插拔就会出现问题。
正常的识别的情况,两种型号对比:

你貼這種diff沒有什麼幫助 如果要給log就把兩種不同SSD的完整log都貼上
另外, 如果你的測試是在NV devkit上面, 接下來得請你抓USB bus trace, 如果你沒辦法抓. 就請你先把能給的log給完整.

我是建議你抓log之前做一次重開機. 開機之後等30秒之後單獨熱插拔這個SSD. 這樣log比較清楚解讀.

我做了如下改动:

还是有问题,情况如下:
journalctl.txt (668.5 KB)
日志如上.

root@tegra:/home/robot# journalctl -b 0 | grep scsi
Dec 13 17:30:42 tegra kernel: scsi host0: usb-storage 2-1.1:1.0
Dec 13 17:30:47 tegra kernel: scsi 0:0:0:0: Direct-Access     SanDisk  Extreme 55AE     8055 PQ: 0 ANSI: 6
Dec 13 17:30:47 tegra kernel: scsi 0:0:0:1: Enclosure         SanDisk  SES Device       8055 PQ: 0 ANSI: 6
root@tegra:/home/robot# lsusb
Bus 002 Device 004: ID 8086:0ad4 Intel Corp.
Bus 002 Device 008: ID 0781:55ae SanDisk Corp. 4-Port USB 3.0 Hub
Bus 002 Device 002: ID 0bda:0420 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 005: ID 046d:c21f Logitech, Inc. F710 Wireless Gamepad [XInput Mode]
Bus 001 Device 003: ID 303a:4001 Generic 4-Port USB 2.0 Hub
Bus 001 Device 002: ID 0bda:5420 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@tegra:/home/robot# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0          7:0    0    16M  1 loop
sda            8:0    0   184G  0 disk   ---------下面缺少sda1         8:1    0   3.7T  0 part
zram0        251:0    0   970M  0 disk
zram1        251:1    0   970M  0 disk
zram2        251:2    0   970M  0 disk
zram3        251:3    0   970M  0 disk
zram4        251:4    0   970M  0 disk
zram5        251:5    0   970M  0 disk
zram6        251:6    0   970M  0 disk
zram7        251:7    0   970M  0 disk
nvme0n1      259:0    0 953.9G  0 disk
├─nvme0n1p1  259:1    0 952.4G  0 part /
├─nvme0n1p2  259:2    0   128M  0 part
├─nvme0n1p3  259:3    0   768K  0 part
├─nvme0n1p4  259:4    0  31.6M  0 part
├─nvme0n1p5  259:5    0   128M  0 part
├─nvme0n1p6  259:6    0   768K  0 part
├─nvme0n1p7  259:7    0  31.6M  0 part
├─nvme0n1p8  259:8    0    80M  0 part
├─nvme0n1p9  259:9    0   512K  0 part
├─nvme0n1p10 259:10   0    64M  0 part
├─nvme0n1p11 259:11   0    80M  0 part
├─nvme0n1p12 259:12   0   512K  0 part
├─nvme0n1p13 259:13   0    64M  0 part
├─nvme0n1p14 259:14   0   400M  0 part
└─nvme0n1p15 259:15   0 479.5M  0 part
root@tegra:/home/robot#

root@tegra:/home/robot# lsusb
Bus 002 Device 004: ID 8086:0ad4 Intel Corp.
Bus 002 Device 008: ID 0781:55ae SanDisk Corp. 4-Port USB 3.0 Hub ----识别了
Bus 002 Device 002: ID 0bda:0420 Realtek Semiconductor Corp. 4-Port USB 3.0 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 005: ID 046d:c21f Logitech, Inc. F710 Wireless Gamepad [XInput Mode]
Bus 001 Device 003: ID 303a:4001 Generic 4-Port USB 2.0 Hub
Bus 001 Device 002: ID 0bda:5420 Realtek Semiconductor Corp. 4-Port USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@tegra:/home/robot# cat /proc/partitions
major minor  #blocks  name

 259        0 1000204632 nvme0n1
 259        1  998679552 nvme0n1p1
 259        2     131072 nvme0n1p2
 259        3        768 nvme0n1p3
 259        4      32384 nvme0n1p4
 259        5     131072 nvme0n1p5
 259        6        768 nvme0n1p6
 259        7      32384 nvme0n1p7
 259        8      81920 nvme0n1p8
 259        9        512 nvme0n1p9
 259       10      65536 nvme0n1p10
 259       11      81920 nvme0n1p11
 259       12        512 nvme0n1p12
 259       13      65536 nvme0n1p13
 259       14     409600 nvme0n1p14
 259       15     491008 nvme0n1p15
   7        0      16384 loop0
 251        0     993220 zram0
 251        1     993220 zram1
 251        2     993220 zram2
 251        3     993220 zram3
 251        4     993220 zram4
 251        5     993220 zram5
 251        6     993220 zram6
 251        7     993220 zram7
   8        0  192940032 sda


Dec 13 17:46:53 tegra kernel: usb 2-1.1: new SuperSpeedPlus Gen 2 USB device number 7 using tegra-xusb
Dec 13 17:46:53 tegra kernel: usb 2-1.1: unable to read config index 0 descriptor/all
Dec 13 17:46:53 tegra kernel: usb 2-1.1: can't read configurations, error -71
Dec 13 17:46:54 tegra kernel: usb 2-1.1: new SuperSpeed Gen 1 USB device number 8 using tegra-xusb
Dec 13 17:46:54 tegra kernel: usb 2-1.1: New USB device found, idVendor=0781, idProduct=55ae, bcdDevice=80.55
Dec 13 17:46:54 tegra kernel: usb 2-1.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Dec 13 17:46:54 tegra kernel: usb 2-1.1: Product: Extreme 55AE
Dec 13 17:46:54 tegra kernel: usb 2-1.1: Manufacturer: SanDisk
Dec 13 17:46:54 tegra kernel: usb 2-1.1: SerialNumber: 32333337394D343032333931
Dec 13 17:46:54 tegra kernel: usb-storage 2-1.1:1.0: USB Mass Storage device detected
Dec 13 17:46:54 tegra kernel: scsi host0: usb-storage 2-1.1:1.0
Dec 13 17:46:54 tegra mtp-probe[27980]: checking bus 2, device 8: "/sys/devices/platform/3610000.xhci/usb2/2-1/2-1.1"
Dec 13 17:46:54 tegra mtp-probe[27980]: bus: 2, device: 8 was not an MTP device
Dec 13 17:46:54 tegra mtp-probe[27989]: checking bus 2, device 8: "/sys/devices/platform/3610000.xhci/usb2/2-1/2-1.1"
Dec 13 17:46:54 tegra mtp-probe[27989]: bus: 2, device: 8 was not an MTP device
Dec 13 17:47:01 tegra CRON[28095]: pam_unix(cron:session): session opened for user root by (uid=0)
Dec 13 17:47:01 tegra CRON[28096]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 10 6)
Dec 13 17:47:02 tegra kernel: scsi 0:0:0:0: Direct-Access     SanDisk  Extreme 55AE     8055 PQ: 0 ANSI: 6
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] Unsupported sector size 1526726656.-----这里为啥报异常呢?
Dec 13 17:47:02 tegra kernel: scsi 0:0:0:1: Enclosure         SanDisk  SES Device       8055 PQ: 0 ANSI: 6
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)  ------这里不对
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] 1526726656-byte physical blocks
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] Write Protect is off
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] Mode Sense: 17 00 10 00
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] No Caching mode page found
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] 385880065 512-byte logical blocks: (198 GB/184 GiB)
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] 2684760064-byte physical blocks
Dec 13 17:47:02 tegra kernel: sd 0:0:0:0: [sda] Attached SCSI disk

我是建議你抓log之前做一次重開機. 開機之後等30秒之後單獨熱插拔這個SSD. 這樣log比較清楚解讀.

請你照著我要的東西提供log. 另外我們只需要dmesg. 不用給我們journalctl
另外,請用NV devkit複製這個問題

For the defconfig, I see “CONFIG_USB_UAS” is removed. Any time you change a feature which is integrated into the kernel (not a module, in other words, “=y” changes or is added), then I would expect previous modules would not work in the current kernel, at least “often”. Make sure modules you are using actually load, including in any modules which might be in an initrd if you are using an initrd.

Please note that CONFIG_USB_UAS support SCSI. I can’t say I know whether or not your case requires this, but SCSI is used even in hardware which has not (long ago) used SCSI. SCSI is a protocol, and not a physical interface in most cases, and when one switches from a parallel transport mechanism for disks to instead be a serial transport (such as serial ATA) you will find SCSI is used for that serialized stream. I am now curious why CONFIG_USB_UAS changed? What is the motivation to changing CONFIG_USB_UAS?

Also I want to suggest that although the SD card itself is hot plug, this isn’t the whole story. Technically, the SD card itself is “warm” plug, and software is used to extend this to become “hot” plug. Warm plug won’t fail electrically from plug-in and unplug events, but it doesn’t mean software won’t fail. The filesystem itself might be expected to corrupt from plug/unplug without proper software commands. This possible corruption includes the partition table in some cases.

If there is any attempt by the system to automount, then you can expect possible changes or corruption of the data actually on the SD card. If there is zero automount, and the SD card does not even attempt to mount upon plug-in, then this is read-only and you are guaranteed that no corruption will occur (there will be no change other than the availabiliity to mount). This is rather important because it isn’t the hardware which is failing to show up, it is instead the software in the form of partition and/or filesystem.

The “error -71” might have some meaning regardless of whether or not the SD card has anything wrong with it. This is a failure to read the descriptor, but this can itself be from a lot of reasons. An example is if you are doing this and autosuspend kicks in, then there would be some bug in how autosuspend handles hot plug.

You might try adding this to the APPEND key/value pair (space delimited) of your boot command line within /boot/extlinux/extlinux.conf just while testing:
usbcore.autosuspend=-1

I can also imagine scenarios where the unplug and replug is occurring to quickly and the unplug or replug event is still being processed when the reverse operation begins. Perhaps there is a bug with handling one event not properly stopping in time when the second event starts? I don’t know, but that is a possibility. You might watch dmesg and not go on to the next unplug or re-plug until the messages complete.

This could also be the SD card failing. There could also be a power issue. Anything at all which causes a descriptor read to fail includes a very large set of possibilities. Imagine something as simple as an atomic section of code in a driver being run when the SD card is unplugged, and then a re-plug occurs while the atomic section is still running (just a contrived example).