USB 3.0 port doesn't work after reboot/warm-boot.

Test and fix the Kernel 4.14 features
Post Reply
User avatar
odroid
Site Admin
Posts: 31297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 44 times
Been thanked: 179 times
Contact:

USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by odroid » Thu Nov 30, 2017 2:18 pm

When we do "reboot" command, the USB 3.0 hub controller is not detected from time to time.
"lsusb -t" output doesn't show

Code: Select all

|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
Cold-boot or power-cycle doesn't show this problem.
After cold-boot and plugging a USB device, there is no problem.

We are trying to fix this issue by adding a virtual USB power reset function in the kernel driver now.

If your USB device doesn't work with hot-plug, you have to do shutdown and turn it on as a workaround.

User avatar
odroid
Site Admin
Posts: 31297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 44 times
Been thanked: 179 times
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by odroid » Fri Dec 01, 2017 6:56 pm

We've fixed this issue.
https://github.com/hardkernel/linux/com ... f0c0d1c56d

Next kernel update package will include it.

rncwnd
Posts: 34
Joined: Tue Apr 11, 2017 11:18 pm
languages_spoken: english, german
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by rncwnd » Tue Dec 05, 2017 4:55 pm

odroid wrote:We've fixed this issue.
https://github.com/hardkernel/linux/com ... f0c0d1c56d

Next kernel update package will include it.
Nice, will that be backported to 4.9?

User avatar
odroid
Site Admin
Posts: 31297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 44 times
Been thanked: 179 times
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by odroid » Tue Dec 05, 2017 5:10 pm

Kernel 4.9 had no such issue.

rncwnd
Posts: 34
Joined: Tue Apr 11, 2017 11:18 pm
languages_spoken: english, german
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by rncwnd » Mon Dec 11, 2017 3:53 am

odroid wrote:Kernel 4.9 had no such issue.
I have it on every warm reboot on kernel 4.9.

User avatar
odroid
Site Admin
Posts: 31297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 44 times
Been thanked: 179 times
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by odroid » Mon Dec 11, 2017 9:22 am

Sorry. I didn't know that.

Please consider using Kernel 4.14 since we won't support 4.9 anymore.
viewtopic.php?f=29&t=28895

Kernel 4.14.4 release has included the patch.

pcfe
Posts: 5
Joined: Fri Mar 01, 2019 2:42 am
languages_spoken: english
ODROIDs: seven ODROID-HC2 used with Ceph Luminous
Has thanked: 0
Been thanked: 0
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by pcfe » Tue Mar 05, 2019 4:14 am

odroid wrote:
Fri Dec 01, 2017 6:56 pm
We've fixed this issue.
https://github.com/hardkernel/linux/com ... f0c0d1c56d

Next kernel update package will include it.
Has this fix been submitted and accepted upstream?

I'm on 4.20.11 and experience the issue.

dennyfmn
Posts: 2
Joined: Thu Jun 13, 2019 1:04 am
languages_spoken: english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by dennyfmn » Thu Jun 13, 2019 1:13 am

I have a new ODROID-XU4 and am having the same problem.

root@odroid:~# uname -a
Linux odroid 4.14.120-160 #1 SMP PREEMPT Fri May 17 01:18:14 -03 2019 armv7l armv7l armv7l GNU/Linux

I followed the instructions at
https://magazine.odroid.com/wp-content/ ... df#page=34
Page 36 and 37

to boot from SD card and run from a SSD connected with a USB3 adapter. If I do

sync
reboot

The SSD never comes up, the USB3 port is dead. I have to power down the system and power it back up to get it going.

Pushing the reset button does not help.

User avatar
odroid
Site Admin
Posts: 31297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 44 times
Been thanked: 179 times
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by odroid » Thu Jun 13, 2019 10:18 am

@dennyfmn,
We couldn't reproduce the issue with 4.14.120 Kernel.
We've used this USB-SATA bridges for the test.
https://www.hardkernel.com/shop/usb3-0- ... oard-plus/

Do you use the original old CloudShell?
https://wiki.odroid.com/accessory/add-o ... cloudshell

Show us "lsusb" and "lsusb -t" outputs before/after warm-boot.

dennyfmn
Posts: 2
Joined: Thu Jun 13, 2019 1:04 am
languages_spoken: english
ODROIDs: ODROID-XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by dennyfmn » Sat Jun 15, 2019 6:11 am

First to answer your questions:

I am using this USB3 to SATA enclosure:
https://smile.amazon.com/gp/product/B01 ... UTF8&psc=1
Sabrent USB 3.0 to SSD / 2.5-Inch SATA Hard Drive Adapter [Optimized for SSD, Support UASP SATA III] (EC-SSHD)
with this SSD
https://smile.amazon.com/Kingston-120GB ... Caps%2C155
Kingston 120GB A400 SSD 2.5'' SATA 7MM 2.5-Inch SA400S37/120G

I am not using Cloudshell, I use a USB KVM for keyboard, mouse and HDMI video to a 22" monitor.

Boot and run from purchased eMMC card
root@odroid:~# uname -a
Linux odroid 4.14.120-160 #1 SMP PREEMPT Fri May 17 01:18:14 -03 2019 armv7l armv7l armv7l GNU/Linux

root@odroid:~# cat /etc/debian_version
buster/sid

SSD connected but not mounted

root@odroid:~# lsusb
Bus 006 Device 002: ID 0bda:8153 Realtek Semiconductor Corp.
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 152d:1561 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 004 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0557:2213 ATEN International Co., Ltd CS682 2-Port USB 2.0 DVI KVM Switch
Bus 001 Device 003: ID 0557:8021 ATEN International Co., Ltd CS1764A [CubiQ DVI KVMP Switch]
Bus 001 Device 002: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@odroid:~# lsusb -t
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
|__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 12M
|__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M

Now mount the SSD:

root@odroid:~# mount /dev/sda2 /mnt

root@odroid:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 927M 0 927M 0% /dev
tmpfs 200M 6.3M 194M 4% /run
/dev/mmcblk0p2 15G 4.6G 9.7G 32% /
tmpfs 998M 0 998M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 998M 0 998M 0% /sys/fs/cgroup
/dev/mmcblk0p1 128M 18M 111M 14% /media/boot
tmpfs 200M 24K 200M 1% /run/user/1000
tmpfs 200M 0 200M 0% /run/user/0
/dev/sda2 15G 4.6G 9.7G 32% /mnt

with SSD mounted:

root@odroid:~# lsusb
Bus 006 Device 002: ID 0bda:8153 Realtek Semiconductor Corp.
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 152d:1561 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 004 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0557:2213 ATEN International Co., Ltd CS682 2-Port USB 2.0 DVI KVM Switch
Bus 001 Device 003: ID 0557:8021 ATEN International Co., Ltd CS1764A [CubiQ DVI KVMP Switch]
Bus 001 Device 002: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@odroid:~# lsusb -t
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
|__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 12M
|__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M

Now reboot:

sync
reboot

23 packages can be updated.
22 updates are security updates.

Last login: Wed Jun 12 10:59:40 2019 from 192.168.1.87
root@odroid:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 927M 0 927M 0% /dev
tmpfs 200M 6.2M 194M 4% /run
/dev/sda2 15G 4.6G 9.7G 32% /
tmpfs 998M 0 998M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 998M 0 998M 0% /sys/fs/cgroup
/dev/sda1 128M 18M 111M 14% /media/boot
tmpfs 200M 4.0K 200M 1% /run/user/110
tmpfs 200M 0 200M 0% /run/user/0

root@odroid:~# lsusb
Bus 006 Device 002: ID 0bda:8153 Realtek Semiconductor Corp.
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 152d:1561 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 004 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 0557:2213 ATEN International Co., Ltd CS682 2-Port USB 2.0 DVI KVM Switch
Bus 001 Device 003: ID 0557:8021 ATEN International Co., Ltd CS1764A [CubiQ DVI KVMP Switch]
Bus 001 Device 002: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@odroid:~# lsusb -t
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
|__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 12M
|__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M

/media/boot/boot.ini
setenv bootrootfs "console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes

root@odroid:~# blkid
/dev/mmcblk0: PTUUID="3cedfd53" PTTYPE="dos"
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="52AA-6867" TYPE="vfat" PARTUUID="3cedfd53-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="e139ce78-9841-40fe-8823-96a304a09859" TYPE="ext4" PARTUUID="3cedfd53-02"
/dev/sda1: SEC_TYPE="msdos" LABEL="boot" UUID="52AA-6867" TYPE="vfat" PARTUUID="3cedfd53-01"
/dev/sda2: LABEL="rootfs" UUID="e139ce78-9841-40fe-8823-96a304a09859" TYPE="ext4" PARTUUID="3cedfd53-02"

root@odroid:~# cat /etc/fstab
UUID=e139ce78-9841-40fe-8823-96a304a09859 / ext4 errors=remount-ro,noatime 0 1
LABEL=boot /media/boot vfat defaults 0 1

Power down, cold start with SSD connected. Had to unplug HDMI to get full power down.

To my surprise it booted from the eMMC module and ran from the SSD on sda.

1 package can be updated.
0 updates are security updates.

Last login: Fri Jun 14 06:43:57 2019 from 192.168.1.87
root@odroid:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 927M 0 927M 0% /dev
tmpfs 200M 6.3M 194M 4% /run
/dev/sda2 15G 4.6G 9.7G 32% / <-----
tmpfs 998M 0 998M 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 998M 0 998M 0% /sys/fs/cgroup
/dev/sda1 128M 18M 111M 14% /media/boot <------------
tmpfs 200M 16K 200M 1% /run/user/1000
/dev/mmcblk0p1 128M 18M 111M 14% /media/odroid/boot
tmpfs 200M 0 200M 0% /run/user/0

The SSD is a clone of the eMMC module. After I set up the 16GB eMMC module I bought with the XU4, I made an image of it using the eMMC adapter card and a Trancend USB3 reader/writer using Win32Diskimager. I then used Etcher to put the image on the 120GB SSD. So, the SSD is an exact clone of the eMMC module with the same UUID. When I posted my first message on 6/12, I was booting from an SD card that I had also cloned with the same image from the eMMC module. I had followed the instructions in the link below and had changed the boot.ini file and /etc/fstab as instructed. This configuration would boot from the SD card and run from the SSD but the reboot command would hang.

After I discovered that the unmodified eMMC module would boot and run the SSD drive from a cold start and also respond properly to a reboot command, I reverted the two changes I had made to the boot.ini and fstab files on the SD card to the original settings. Now the system runs properly with the SD card to boot and the SSD to run from. It works from a cold start and also from a reboot command.

So in summary, it seems like something in the new kernel/firmware will automatically switch over to an SSD if it is a clone of the boot media. This works for me for both the original eMMC module and a cloned SD card to boot from and a cloned SSD to run from. Running from the SSD seems quite fast.

This is the result I was looking for. The only thing that would be better would be booting directly from the USB drive and not requiring an eMMC or SD card at all. I do this on my Raspberry Pi 3B+'s.

If there is an easier/better way to run from an SSD, please let me know. Thanks for your help!

User avatar
odroid
Site Admin
Posts: 31297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 44 times
Been thanked: 179 times
Contact:

Re: USB 3.0 port doesn't work after reboot/warm-boot.

Unread post by odroid » Mon Jun 17, 2019 12:23 pm

Might need to check the UUID values.
https://wiki.odroid.com/odroid-xu4/soft ... r#etcfstab

Post Reply

Return to “Linux Kernel 4.14 Debugging Party”

Who is online

Users browsing this forum: No registered users and 0 guests