USB autosuspend during soft-reboot, is ok during power reboot

Hello here!

Device: Jetson NANO on the reComputer J1010 carrier board + ADATA SD600Q ssd
Task: setup system on the external USB SSD disk.

I’ve tried to increase memory for the system and attached external ssd. It works fine, but found that disk didn’t wake up after reboot (when still attached to USB, no matter what, 2 or 3 version). As a symptom - bright blue LED on the ssd is off and very weak red led inside ssd is wisible. Dist doesn’t appear in the lsusb, lsblk or fdisk commands output. After reattach usb cable all works perfectly.

Long story short, problem I found was in autosuspend feature.

[    1.174896] tegra-xusb 70090000.xusb: xHCI Host Controller
[    1.174906] tegra-xusb 70090000.xusb: new USB bus registered, assigned bus number 2
[    1.175045] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.175146] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    1.175151] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.175155] usb usb2: Product: xHCI Host Controller
[    1.175159] usb usb2: Manufacturer: Linux 4.9.299-tegra xhci-hcd
[    1.175162] usb usb2: SerialNumber: 70090000.xusb
[    1.176405] usbcore: registered new interface driver uas
[    1.176497] usbcore: registered new interface driver usb-storage
[    1.176628] usbcore: registered new interface driver usbserial
[    1.180537] tegra-xusb 70090000.xusb: Upgrade port 0 to USB3.0
[    1.180547] tegra-xusb 70090000.xusb: Upgrade port 1 to USB3.0
[    1.188701] usbcore: registered new interface driver xpad
[    1.199180] tegra-xusb-padctl 7009f000.xusb_padctl: power on UTMI pads 1
[    1.279195] usb usb2: usb_suspend_both: status 0

I’ve resolved it with append the usbcore.autosuspend=-1 into linux boot command:

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} quiet root=/dev/sda1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_b
oot_part_access=1 nv-auto-config usbcore.autosuspend=-1

tested after reboot:

$ cat /proc/cmdline | grep autos
tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,4 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1075 core_edp_ma=4000 gpt tegra_fbmem=0x800000@0x92cb4000 is_hdmi_initialised=1  earlycon=uart8250,mmio32,0x70006000  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1 nv-auto-config quiet root=/dev/sda1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1 nv-auto-config usbcore.autosuspend=-1

After that usb ssd drive still active during reboot and all was as expected. But after moving boot target to the ssd autosuspend returned, but only in case of soft reboot (sudo reboot). If I repower device - all works as expected and it perfectly boots from ssd…

Does anybody has any idea what is wrong?

Current state of disks

# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0          7:0    0    16M  1 loop 
sda            8:0    0 223,6G  0 disk 
└─sda1         8:1    0 223,6G  0 part /
mmcblk0      179:0    0  14,7G  0 disk 
├─mmcblk0p1  179:1    0    14G  0 part /mnt/mmc-DG4016_0xe130e723-part1
├─mmcblk0p2  179:2    0     1M  0 part 
├─mmcblk0p3  179:3    0     6M  0 part 
├─mmcblk0p4  179:4    0    80K  0 part 
├─mmcblk0p5  179:5    0    64M  0 part 
├─mmcblk0p6  179:6    0     1M  0 part 
├─mmcblk0p7  179:7    0     6M  0 part 
├─mmcblk0p8  179:8    0    80K  0 part 
├─mmcblk0p9  179:9    0    64M  0 part 
├─mmcblk0p10 179:10   0   192K  0 part 
├─mmcblk0p11 179:11   0   256K  0 part 
├─mmcblk0p12 179:12   0    63M  0 part 
├─mmcblk0p13 179:13   0   512K  0 part 
├─mmcblk0p14 179:14   0   256K  0 part 
├─mmcblk0p15 179:15   0   256K  0 part 
├─mmcblk0p16 179:16   0   300M  0 part 
└─mmcblk0p17 179:17   0 185,4M  0 part 
mmcblk0boot0 179:32   0     4M  1 disk 
mmcblk0boot1 179:64   0     4M  1 disk 
mmcblk0rpmb  179:96   0     4M  0 disk 
mmcblk1      179:128  0  29,4G  0 disk 
└─mmcblk1p1  179:129  0  29,4G  0 part /mnt/mmc-USD00_0x636ab60d-part1
zram0        252:0    0 494,5M  0 disk [SWAP]
zram1        252:1    0 494,5M  0 disk [SWAP]
zram2        252:2    0 494,5M  0 disk [SWAP]
zram3        252:3    0 494,5M  0 disk [SWAP]

as you can see root is on the ssd.
Version of the linux used:

# uname -r
4.9.299-tegra

Hi,

Sorry, I still don’t get what your problem is. Didn’t you already resolve issue with usbcore.autosuspend=-1? What is the next problem?

Hi. Thanks for reply.

Maybe i didn’t describe fully, sorry. So, problem is when I reboot jetson nano by the command Sudo reboot - my ssd (attached to the usb port) go to the suspend. But when I reboot jetson nano with the power switch (detach-attach power cable) - it works perfectly.

So, looks like when it reboot by the command (sudo reboot) it uses some different config file (?)…

How did you tell the ssd is set to suspend?

Also, have you tried to use hub with extra power?

Ssd has an indicator. When it operates in the normal Mode it’s bright Blue, when suspended - lightly visible red. So, I se the status. After I’ve added usbcore.autosuspend=-1 it doesn’t fall into suspend Mode, but only when it is booting after power up.

I’m sure the situation connected co the suspend. Ssd is ok even on the beginning of the soft reboot process, but then it Goes i to suspend. If I detach and then attach it again - it will be in the norma mode again. (but in the my case it is useless as i want boot from ssd. So only option now is powes swinth to reboot my jetson and boot it from ssd)

By the way, i plan to add external power supply to the ssd. Sure it will resolve the issue, but if anybode has any idea how to fix it without hardware modification - you’re welcome :)

No, I didin;t set any suspend command.

Just note. when I set boot from internal storage (or from sdCard) ssd disk doesn’t go to the suspend mode during soft reboot. Issue appears only when I booted from the ssd and then try to reboot system by command. It looks like after sudo reboot command system ignore usbcore.autosuspend=-1 option.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.