c4 usb port speeds

Post Reply
ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

c4 usb port speeds

Post by ichanjz »

I observed recently that one of the 4 usb ports of my C4 is obviously a lot slower then the others. To verify my observation, I did the following experiment:
1. disconnected all peripherals from the c4
2. power-on with one sata drive connected to the bottom-left usb port (thru a sata-usb bridge)
3. wrote 2GB of zeros to the drive:

Code: Select all

dd if=/dev/zero of=/dev/sda bs=1G count=2
4. power-off
5. repeated 2 to 4 using a different usb port each time

Here are the results I observed:
bottom-left port:

Code: Select all

2147483648 bytes (2.1 GB, 2.0 GiB) copied, 11.8732 s, 181 MB/s
top-right port:

Code: Select all

2147483648 bytes (2.1 GB, 2.0 GiB) copied, 12.7615 s, 168 MB/s
(suspected) bottom-right port:

Code: Select all

2147483648 bytes (2.1 GB, 2.0 GiB) copied, 102.557 s, 20.9 MB/s
top-left port:

Code: Select all

2147483648 bytes (2.1 GB, 2.0 GiB) copied, 12.7894 s, 168 MB/s
Is the above bottom-right usb port having some problems? or is it in fact a usb2 port (dispite my understanding that the only usb2 port onboard c4 being the OTG)?

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: c4 usb port speeds

Post by odroid »

I think there could be some uncertain particles on the USB 3.0 signal pads in the USB host connector.
Try cleaning the problematic bottom-right port something like this.
viewtopic.php?p=218401#p218401

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

odroid wrote:
Wed Jul 07, 2021 5:35 pm
I think there could be some uncertain particles on the USB 3.0 signal pads in the USB host connector.
Try cleaning the problematic bottom-right port something like this.
viewtopic.php?p=218401#p218401
Thanks. Couldn't find the right tool to clean the suspected bad contacts as suggested in the link. Instead, I replaced the c4 with another brand new one which I received from HK only a week ago and repeated the same test as before. Surprisingly, the same problem was duplicated on the same bottom-right port while all other 3 were just as good as before. Could that suggest something more than just a manufacturing defect/imperfection?

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: c4 usb port speeds

Post by odroid »

Very weird.
Can you show me "lsusb -t" outputs with four ports connections?

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

Thanks for your quick response.
There was only one port connected (to a sata3 drive via a jms578 class sata-usb bridge) at any one time throughout the test. The same test was repeated with the same sata drive and bridge cables plugged into each different port, also one at a time. The following is what 'lsusb -t' reported with each different port loaded:

bottom-right:

Code: Select all

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
bottom-left:

Code: Select all

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
top-left:

Code: Select all

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
top-right:

Code: Select all

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
What I could have but haven't done was to measure the actual current consumption of the sata-usb bridge to make sure it's not overloading the 5V rail of the usb ports although I haven't the slightest idea what this has to do with the current problem (and I couldn't find a convenient point in the hardware to measure this current anyway). What do you think?

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: c4 usb port speeds

Post by odroid »

Your bottom-right port is working in USB 3.0 super-speed(5Gbps) mode.
Port 3: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
But, your performance test result looks like a USB 2.0 high-speed mode. It is very weird.
I don't think you need to measure the power consumption.

Can you compare "lsusb -t" outputs before and after "dd" tests?
Also show us "dmesg" output if that port is still slow.

BTW, add oflag=direct iflag=direct flags in the dd test parameter string to reduce any cache side effects.

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

sata-usb drive plugged into bottom-right port:

Code: Select all

lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

dd if=/dev/zero of=/dev/sda bs=1G count=2
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 67.0687 s, 32.0 MB/s

dd iflag=direct if=/dev/zero oflag=direct of=/dev/sda bs=1G count=2
dd: failed to open '/dev/zero': Invalid argument

dd if=/dev/zero oflag=direct of=/dev/sda bs=1G count=2
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 60.3738 s, 35.6 MB/s

lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
dmesg|tail -n200 (irrelevant lines removed for clarity)

Code: Select all

[ 5574.824746] usb 2-1.3: new SuperSpeed USB device number 4 using xhci-hcd
[ 5574.845707] usb 2-1.3: New USB device found, idVendor=152d, idProduct=0578
[ 5574.847108] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5574.855052] usb 2-1.3: Product: USB to ATA/ATAPI Bridge
[ 5574.859956] usb 2-1.3: Manufacturer: JMicron
[ 5574.864371] usb 2-1.3: SerialNumber: 0123456789ABCDEF
[ 5574.870422] usb-storage 2-1.3:1.0: USB Mass Storage device detected
[ 5574.876202] usb-storage 2-1.3:1.0: Quirks match for vid 152d pid 0578: 1000000
[ 5574.883492] scsi host0: usb-storage 2-1.3:1.0
[ 5575.903041] scsi 0:0:0:0: Direct-Access     JMicron  Generic          3102 PQ: 0 ANSI: 6
[ 5575.908032] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 5580.078035] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 5580.080028] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 5580.087786] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 5580.093551] sd 0:0:0:0: [sda] Write Protect is off
[ 5580.098097] sd 0:0:0:0: [sda] Mode Sense: 47 00 00 08
[ 5580.098706] sd 0:0:0:0: [sda] Disabling FUA
[ 5580.102438] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 5580.113321] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 5580.123599] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 5580.127320] sd 0:0:0:0: [sda] Attached SCSI disk
[ 6088.313081] usb 2-1.3: reset SuperSpeed USB device number 4 using xhci-hcd
***same message repeated 39 times***
[ 6134.286785] usb 2-1.3: reset SuperSpeed USB device number 4 using xhci-hcd
[ 6135.267485] Now can use cma, free:3778, wm:3837
[ 6135.434706] usb 2-1.3: reset SuperSpeed USB device number 4 using xhci-hcd
***same message repeated 16 times***
[ 6151.925894] usb 2-1.3: reset SuperSpeed USB device number 4 using xhci-hcd
[ 6154.082421] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 6233.371715] usb 2-1.3: reset SuperSpeed USB device number 4 using xhci-hcd
***same message repeated 54 times***
[ 6291.383781] usb 2-1.3: reset SuperSpeed USB device number 4 using xhci-hcd
[ 6292.877040] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
sata-usb drive plugged into top-right port:

Code: Select all

lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
dd if=/dev/zero oflag=direct of=/dev/sda bs=1G count=2
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 11.8316 s, 182 MB/s
lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
dmesg|tail -n200 (irrelevant lines removed):

Code: Select all

[ 8002.779024] usb 2-1.3: USB disconnect, device number 4
[ 8002.782364] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 8002.785046] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[ 8014.810688] usb 2-1.2: new SuperSpeed USB device number 5 using xhci-hcd
[ 8014.831223] usb 2-1.2: New USB device found, idVendor=152d, idProduct=0578
[ 8014.832622] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8014.840579] usb 2-1.2: Product: USB to ATA/ATAPI Bridge
[ 8014.845659] usb 2-1.2: Manufacturer: JMicron
[ 8014.849892] usb 2-1.2: SerialNumber: 0123456789ABCDEF
[ 8014.855674] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[ 8014.861697] usb-storage 2-1.2:1.0: Quirks match for vid 152d pid 0578: 1000000
[ 8014.868967] scsi host0: usb-storage 2-1.2:1.0
[ 8015.899481] scsi 0:0:0:0: Direct-Access     JMicron  Generic          3102 PQ: 0 ANSI: 6
[ 8015.903696] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 8023.091844] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 8023.094093] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[ 8023.101598] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 8023.108029] sd 0:0:0:0: [sda] Write Protect is off
[ 8023.111910] sd 0:0:0:0: [sda] Mode Sense: 47 00 00 08
[ 8023.112543] sd 0:0:0:0: [sda] Disabling FUA
[ 8023.116309] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 8023.126040] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 8023.137187] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
[ 8023.141123] sd 0:0:0:0: [sda] Attached SCSI disk
[ 8077.431392] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
A bit messy but I guess that's what you wanted ;) . While the outputs from 'lsusb -t' and 'dd' were more or less as expected, the 'dmesg' output seems a lot more interesting, particularly, the (39+16+54)lines of:

Code: Select all

[......] usb 2-1.3: reset SuperSpeed USB device number 4 using xhci-hcd
which only appeared when 'dd' to to problematic bottom-right port. Does it give any clue?

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: c4 usb port speeds

Post by odroid »

Thank you for the detail test.
Right. 'reset' messages should not exist.

We will try reproducing the issue tomorrow with our JMS578 bridge board. https://www.hardkernel.com/shop/usb3-0- ... oard-plus/
Which kernel version do you run?
Are you running our Ubuntu 20.04 + Kernel 4.9.241?

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

previous emmc module (archlinux):

Code: Select all

uname -r
4.9.218-1-ARCH
Same setup except emmc module replaced (new from HK) :

Code: Select all

Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 4.9.241-68 aarch64)
...
uname -r
4.9.241-68
sata-usb drive at top-right port:

Code: Select all

dd if=/dev/zero of=/dev/sda oflag=direct bs=1G count=2
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 11.545 s, 186 MB/s
sata-usb drive at bottom-right port:

Code: Select all

dd if=/dev/zero of=/dev/sda oflag=direct bs=1G count=2
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 38.0214 s, 56.5 MB/s
Still many 'resets' reported by 'dmesg' :

Code: Select all

[...]usb 2-1.3: reset SuperSpeed USB device number 4 using xhci-hcd
One thing I observed was: the time taken to dd 2GB of zeros to the normal ports was quite consistent (~12 seconds), but that of the 'problem' port could vary from 50 seconds to infinity(ie. need to kill the 'dd' process manually to stop it).
I'll wait for results of your tests. Many thanks for your works.

User avatar
neal
Posts: 254
Joined: Fri Apr 14, 2017 10:02 am
languages_spoken: Korean, English
Has thanked: 10 times
Been thanked: 18 times
Contact:

Re: c4 usb port speeds

Post by neal »

Hi @ichanjz,

I had the same test with my ODROID-C4.
Its LOT number is 2105. You can check followed LOT number what differences is at this wiki.

All of 4 ports are yielded the speed over 300 MB/s when I connected each at a time.
Here is my log. It is bottom-right USB3.0 port (Not next to Ethernet Port).
Please check below mount point, mount options, and disk filesystem on your side and try.
Let me know your result.

Code: Select all

root@odroid:/media# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 10, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
root@odroid:/media#
root@odroid:/media#
root@odroid:/media# mount | grep sda
/dev/sda on /media/usb0 type ext4 (rw,nodev,noexec,noatime,nodiratime,sync,data=ordered)
root@odroid:/media#
root@odroid:/media#
root@odroid:/media# cd usb0
root@odroid:/media/usb0#
root@odroid:/media/usb0# dd if=/dev/zero of=./test_2G.bin oflag=direct bs=1G count=2 & tail -f /var/log/kern.log
[1] 3270
Jul  9 06:13:55 odroid kernel: [ 2625.695113@0] scsi host0: usb-storage 2-1.3:1.0
Jul  9 06:13:56 odroid kernel: [ 2626.715740@1] scsi 0:0:0:0: Direct-Access     JMicron                   0105 PQ: 0 ANSI: 6
Jul  9 06:13:56 odroid kernel: [ 2626.716461@0] sd 0:0:0:0: Attached scsi generic sg0 type 0
Jul  9 06:13:56 odroid kernel: [ 2626.717280@3] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/112 GiB)
Jul  9 06:13:56 odroid kernel: [ 2626.717601@2] sd 0:0:0:0: [sda] Write Protect is off
Jul  9 06:13:56 odroid kernel: [ 2626.717607@2] sd 0:0:0:0: [sda] Mode Sense: 47 00 00 08
Jul  9 06:13:56 odroid kernel: [ 2626.717907@2] sd 0:0:0:0: [sda] Disabling FUA
Jul  9 06:13:56 odroid kernel: [ 2626.717912@2] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jul  9 06:13:56 odroid kernel: [ 2626.722310@3] sd 0:0:0:0: [sda] Attached SCSI disk
Jul  9 06:13:57 odroid kernel: [ 2627.367751@0] EXT4-fs (sda): mounted filesystem with ordered data mode. Opts: (null)

2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 6.61641 s, 325 MB/s
^C
[1]+  Done                    dd if=/dev/zero of=./test_2G.bin oflag=direct bs=1G count=2
root@odroid:/media/usb0# ls -lt
total 2097172
-rw-r--r-- 1 root root 2147483648 Jul  9 06:14 test_2G.bin
drwx------ 2 root root      16384 Jul  9 05:48 lost+found
root@odroid:/media/usb0# uname -a
Linux odroid 4.9.241-70 #1 SMP PREEMPT Sat Apr 24 15:17:51 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
root@odroid:/media/usb0# fdisk -l /dev/sda
Disk /dev/sda: 111.81 GiB, 120034123776 bytes, 234441648 sectors
Disk model:
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

Hello @neal,
Thank your for your participation. The following is a cut and paste of the screen contents after executing the commands you suggested (hard drive plugged into bottom-right usb port):

Code: Select all

root@odroid:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
root@odroid:~# mount |grep sda 
/dev/sda on /media/usb0 type ext4 (rw,nodev,noexec,noatime,nodiratime,sync,data=ordered)
root@odroid:~# cd /media/usb0
root@odroid:/media/usb0# dd if=/dev/zero of=./test_2G.bin oflag=direct bs=1G count=2 & tail -f /var/log/kern.log
[1] 3852
Jul 10 02:50:18 odroid kernel: [  180.084441@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:50:33 odroid kernel: [  195.091606@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:51:40 odroid kernel: [  261.969443@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:52:02 odroid kernel: [  283.668482@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:52:03 odroid kernel: [  285.008413@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:52:08 odroid kernel: [  289.588208@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:52:16 odroid kernel: [  298.191853@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:52:19 odroid kernel: [  300.527759@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:52:50 odroid kernel: [  331.602575@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:03 odroid kernel: [  344.910132@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:08 odroid kernel: [  350.193954@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:09 odroid kernel: [  350.805933@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:10 odroid kernel: [  351.897910@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:11 odroid kernel: [  353.165864@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:12 odroid kernel: [  353.925835@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:14 odroid kernel: [  356.137787@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:16 odroid kernel: [  358.125707@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:18 odroid kernel: [  359.441667@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:19 odroid kernel: [  360.349636@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:21 odroid kernel: [  362.677567@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:22 odroid kernel: [  363.561540@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:23 odroid kernel: [  365.269510@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:25 odroid kernel: [  366.809443@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:27 odroid kernel: [  368.573387@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:28 odroid kernel: [  369.657358@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:30 odroid kernel: [  371.513304@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:31 odroid kernel: [  372.861297@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:33 odroid kernel: [  374.717206@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:35 odroid kernel: [  376.685161@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:36 odroid kernel: [  378.189103@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:53:38 odroid kernel: [  379.345074@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 32.8842 s, 65.3 MB/s
Jul 10 02:53:50 odroid kernel: [  391.760724@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:54:05 odroid kernel: [  406.704295@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:54:33 odroid kernel: [  435.023533@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:54:37 odroid kernel: [  438.347467@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:54:55 odroid kernel: [  456.650974@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:54:56 odroid kernel: [  457.638947@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:54:58 odroid kernel: [  459.630907@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:54:58 odroid kernel: [  460.134886@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:55:09 odroid kernel: [  470.474632@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:55:15 odroid kernel: [  477.162455@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:55:25 odroid kernel: [  486.666211@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
Jul 10 02:56:00 odroid kernel: [  521.737341@0] usb 2-1.3: reset SuperSpeed USB device number 3 using xhci-hcd
^C
[1]+  Done                    dd if=/dev/zero of=./test_2G.bin oflag=direct bs=1G count=2
root@odroid:/media/usb0# ls -lt
total 2097172
-rw-r--r-- 1 root root 2147483648 Jul 10 02:53 test_2G.bin
drwx------ 2 root root      16384 Jul 10 01:20 lost+found
root@odroid:/media/usb0# uname -a
Linux odroid 4.9.241-68 #1 SMP PREEMPT Mon Jan 25 13:22:26 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
root@odroid:/media/usb0# fdisk -l /dev/sda
Disk /dev/sda: 3.65 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: Generic         
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Very different from what you got. So I repeated the test with the same drive (and sata-usb bridge) plugged into the top-right usb port. Then the results were much closer to yours:

Code: Select all

root@odroid:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
root@odroid:~# mount |grep sda
/dev/sda on /media/usb0 type ext4 (rw,nodev,noexec,noatime,nodiratime,sync,data=ordered)
root@odroid:~# cd /media/usb0
root@odroid:/media/usb0# dd if=/dev/zero of=./test_2G.bin oflag=direct bs=1G count=2 & tail -f /var/log/kern.log
[1] 4016
Jul 10 03:20:36 odroid kernel: [ 1997.427129@1] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
Jul 10 03:20:36 odroid kernel: [ 1997.427132@1] sd 0:0:0:0: [sda] 4096-byte physical blocks
Jul 10 03:20:36 odroid kernel: [ 1997.427430@1] sd 0:0:0:0: [sda] Write Protect is off
Jul 10 03:20:36 odroid kernel: [ 1997.427434@1] sd 0:0:0:0: [sda] Mode Sense: 47 00 00 08
Jul 10 03:20:36 odroid kernel: [ 1997.427735@1] sd 0:0:0:0: [sda] Disabling FUA
Jul 10 03:20:36 odroid kernel: [ 1997.427740@1] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jul 10 03:20:36 odroid kernel: [ 1997.428574@2] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
Jul 10 03:20:36 odroid kernel: [ 1997.439283@2] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
Jul 10 03:20:36 odroid kernel: [ 1997.440027@1] sd 0:0:0:0: [sda] Attached SCSI disk
Jul 10 03:20:37 odroid kernel: [ 1998.617867@0] EXT4-fs (sda): mounted filesystem with ordered data mode. Opts: (null)
2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 12.7357 s, 169 MB/s
^C
[1]+  Done                    dd if=/dev/zero of=./test_2G.bin oflag=direct bs=1G count=2
root@odroid:/media/usb0# ls -lt
total 2097172
-rw-r--r-- 1 root root 2147483648 Jul 10 03:22 test_2G.bin
drwx------ 2 root root      16384 Jul 10 01:20 lost+found
root@odroid:/media/usb0# uname -a
Linux odroid 4.9.241-68 #1 SMP PREEMPT Mon Jan 25 13:22:26 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
root@odroid:/media/usb0# fdisk -l /dev/sda
Disk /dev/sda: 3.65 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: Generic         
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

For your info:
1. the lot number of the c4 throughout the above tests was EL2105 (as shown on a sticker at the back of the c4 pcb)
2. the /dev/sda used, being sata3, is an old fashion 3.5" mechanical drive

User avatar
neal
Posts: 254
Joined: Fri Apr 14, 2017 10:02 am
languages_spoken: Korean, English
Has thanked: 10 times
Been thanked: 18 times
Contact:

Re: c4 usb port speeds

Post by neal »

Hi @ichanjz,

The above test with a hard drive was Samsung SSD 120G.
Before dd command, I did mkfs.ext4 to have my SSD clean and well aligned filesystem.
As you can see, my disk has sector size and I/O size are all 512 bytes.
At this moment I could say as see your logs, I just guess the size affected the system which read and write to the disk at the kernel.
So, I want you to try making align the filesystem like mine.
And please let me know your result again.

Thanks~

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

Hello @neal
I'm not sure if I understood your post. Let's go through its contents line by line:
neal wrote:
Sat Jul 10, 2021 11:55 pm
The above test with a hard drive was Samsung SSD 120G.
Suggest you use a slower and bigger mechanical drive like what I used if your objective is, as @odroid said above, to "reproduce the issue with our JMS578 bridge board" .
Before dd command, I did mkfs.ext4 to have my SSD clean and well aligned filesystem.
I already did the same before the 'dd' command, ie:

Code: Select all

mkfs.ext4 /dev/sda # no partition, fs start at sector 0
As you can see, my disk has sector size and I/O size are all 512 bytes.
Unfortunately, while the sector size was already 512 bytes as you asked for, the I/O size was dictated by my 4TB HDD. As far as I'm aware of, I/O size of 4096 bytes seems to be the norm among all big volume (multi-TB) drives. I don't have the knowledge to change that to 512 to match the sector size if that's what you meant.
At this moment I could say as see your logs, I just guess the size affected the system which read and write to the disk at the kernel.
So, I want you to try making align the filesystem like mine.
And please let me know your result again.
Looks like we are stuck. I googled the Internet during the weekend just past. It seems that the problem we are facing has been existing for some time. While remedies such as cleaning the usb port contacts, using better usb bride/cables, etc., had been suggested, I'd tend to believe the real problem (hence the more positive remedy) is in the JMS578 firmware or, more likely, one of its upstream kernel modules which initiated those 'reset SuperSpeed USB device' messages found in the 'dmesg' log. Unfortunately, I'm not a linux kernel hecker, nor have I any access to the JMS578 firmware source code. I guess I have to leave the issue to the experts.

User avatar
neal
Posts: 254
Joined: Fri Apr 14, 2017 10:02 am
languages_spoken: Korean, English
Has thanked: 10 times
Been thanked: 18 times
Contact:

Re: c4 usb port speeds

Post by neal »

ichanjz wrote:
Mon Jul 12, 2021 9:56 am
Suggest you use a slower and bigger mechanical drive like what I used if your objective is, as @odroid said above, to "reproduce the issue with our JMS578 bridge board" .
Okay, I will have more further test with some mechanical drive and get back here with the result.

User avatar
neal
Posts: 254
Joined: Fri Apr 14, 2017 10:02 am
languages_spoken: Korean, English
Has thanked: 10 times
Been thanked: 18 times
Contact:

Re: c4 usb port speeds

Post by neal »

ichanjz wrote:
Mon Jul 12, 2021 9:56 am
Unfortunately, while the sector size was already 512 bytes as you asked for, the I/O size was dictated by my 4TB HDD. As far as I'm aware of, I/O size of 4096 bytes seems to be the norm among all big volume (multi-TB) drives. I don't have the knowledge to change that to 512 to match the sector size if that's what you meant.
I'm sorry for being confusing and I shamed for my dumb reply.
As you suggested I have tested with 2.5" 5TB BarraCuda / HGST 1TB / TOSHIBA/WD Blue 500GB mechanical HDDs. but I got the result exploded is nothing has changed.
But, when I tested it with another samsung 240G SSD has happened is similar behavior to you.
There is no "reset SuperSpeed USB device ..." but, the right-bottom port speed had been down about a third than the right-top one. Anyhow after some of the same tests, I couldn't see that behavior.
so, now I suggest you do is,
1. As @odroid replied, clean the port. As my result from the further test, I think this is very close to solving this issue.
2. Make well aligned filesystem like using mkfs.ext4 command in another HDD and try again.
3. I'm using jms578 USB-to-SATA chip which has a firmware version is v0.1.0.5. and I wonder that version can make difference.
( if you want to see the version of jms578, go and check at this wiki )

please let me know your result.

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

Hi @neal,
Thank your for work.
neal wrote:
Mon Jul 12, 2021 4:15 pm
1. As @odroid replied, clean the port. As my result from the further test, I think this is very close to solving this issue.
Honestly, as I had said earlier, I've no confidence in doing the job properly. That having said, I might as well have a go if that's the last resort. I'll come back if there is any success.
3. I'm using jms578 USB-to-SATA chip which has a firmware version is v0.1.0.5. and I wonder that version can make difference.
( if you want to see the version of jms578, go and check at this wiki )
I already tried all the versions in the link plus another 2 from the jms578 bridge supplier (not HK because this product was labeled 'discontinued' in HK's online store). None of them helped though :(

User avatar
neal
Posts: 254
Joined: Fri Apr 14, 2017 10:02 am
languages_spoken: Korean, English
Has thanked: 10 times
Been thanked: 18 times
Contact:

Re: c4 usb port speeds

Post by neal »

The same behavior has happened on my side.
I have four USB SATA cables. One of four cables caused the issue.
The right-bottom port had exposed log "reset SuperSpeed USB device..." and copy speed is slower than right-top one.
It seems that the usb 3.0 signal integrity of the right-bottom is not as good as the right-top one. But changing into a good cable also could be a solution.
Sorry for the bad news.

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

neal wrote:
Mon Jul 12, 2021 6:21 pm
The same behavior has happened on my side.
...
Sorry for the bad news.
No, on the contrary, I reckon this is GOOD news now that the issue was successfully reproduced at your side. As long as this has been proved a reproduceable issue rather than an isolated case, I'm sure someone more intelligent than me will get interested and the problem will, sooner ore later, be solved. :D

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

Hello @neal,
Here I'm back and sorry to bother you again. Going back to your test report posted 'Fri Jul 09, 2021 4:46 pm', there was a line like this:

Code: Select all

root@odroid:/media/usb0# dd if=/dev/zero of=./test_2G.bin oflag=direct bs=1G count=2 & tail -f /var/log/kern.log
Would you mind repeating the same with the above line changed like this:

Code: Select all

root@odroid:/media/usb0# dd if=/dev/zero of=./test_2G.bin oflag=direct bs=1G count=2 & tail -n20 -f /var/log/kern.log
What I'm after in fact is the vendorId:productId of your sata-usb bridge, and whether or not it's in the kernel's usb-storage.quirks list. These are supposed to be logged immediately before what you had captured earlier. I'd like to be sure whether or not we were doing the same tests with the same setup when comparing the results.
Hope this will not cause too much hardship on your side. Thanks again for your time.
Note: Alternatively, instead of repeating the whole test, it could easier if you simply give me the last 100 lines in /var/log/kern.log *immediately* after plugging in your sata-usb drive. :D

User avatar
neal
Posts: 254
Joined: Fri Apr 14, 2017 10:02 am
languages_spoken: Korean, English
Has thanked: 10 times
Been thanked: 18 times
Contact:

Re: c4 usb port speeds

Post by neal »

Sure, no problem.

The last 50 lines kernel log you want is here.
With 5T BarraCuda mechanical drive connected to a right-bottom USB port via good USB SATA cable.

Code: Select all

[1] 2595
Jul 12 05:08:25 odroid kernel: [   64.521599@2] fb: mem_free_work, free memory: addr:800000
Jul 12 05:08:40 odroid kernel: [   79.538113@0] usb 2-1.3: new SuperSpeed USB device number 3 using xhci-hcd
Jul 12 05:08:40 odroid kernel: [   79.558651@0] usb 2-1.3: New USB device found, idVendor=152d, idProduct=0578
Jul 12 05:08:40 odroid kernel: [   79.558657@0] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 12 05:08:40 odroid kernel: [   79.558659@0] usb 2-1.3: Product: USB to SATA bridge
Jul 12 05:08:40 odroid kernel: [   79.558662@0] usb 2-1.3: Manufacturer: JMicron
Jul 12 05:08:40 odroid kernel: [   79.558664@0] usb 2-1.3: SerialNumber: DB00000000013B
Jul 12 05:08:40 odroid kernel: [   79.560431@0] usb-storage 2-1.3:1.0: USB Mass Storage device detected
Jul 12 05:08:40 odroid kernel: [   79.561119@0] usb-storage 2-1.3:1.0: Quirks match for vid 152d pid 0578: 1000000
Jul 12 05:08:40 odroid kernel: [   79.561198@0] scsi host0: usb-storage 2-1.3:1.0
Jul 12 05:08:41 odroid kernel: [   80.587684@1] scsi 0:0:0:0: Direct-Access     JMicron                   0105 PQ: 0 ANSI: 6
Jul 12 05:08:41 odroid kernel: [   80.588439@0] sd 0:0:0:0: Attached scsi generic sg0 type 0
Jul 12 05:08:41 odroid kernel: [   80.588699@1] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
Jul 12 05:08:41 odroid kernel: [   80.588859@1] sd 0:0:0:0: [sda] 9767541168 512-byte logical blocks: (5.00 TB/4.55 TiB)
Jul 12 05:08:41 odroid kernel: [   80.588863@1] sd 0:0:0:0: [sda] 4096-byte physical blocks
Jul 12 05:08:41 odroid kernel: [   80.589159@1] sd 0:0:0:0: [sda] Write Protect is off
Jul 12 05:08:41 odroid kernel: [   80.589164@1] sd 0:0:0:0: [sda] Mode Sense: 47 00 00 08
Jul 12 05:08:41 odroid kernel: [   80.589461@1] sd 0:0:0:0: [sda] Disabling FUA
Jul 12 05:08:41 odroid kernel: [   80.589466@1] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jul 12 05:08:41 odroid kernel: [   80.596528@1] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
Jul 12 05:08:41 odroid kernel: [   80.699377@1]  sda: sda1
Jul 12 05:08:41 odroid kernel: [   80.700360@2] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
Jul 12 05:08:41 odroid kernel: [   80.701482@2] sd 0:0:0:0: [sda] Attached SCSI disk
Jul 12 05:08:48 odroid kernel: [   87.376876@0] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Jul 12 05:15:04 odroid kernel: [  463.231509@0] usb 2-1.3: USB disconnect, device number 3
Jul 12 05:15:04 odroid kernel: [  463.236239@0] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Jul 12 05:15:04 odroid kernel: [  463.236289@0] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Jul 12 05:15:22 odroid kernel: [  481.597660@0] usb 2-1.3: new SuperSpeed USB device number 4 using xhci-hcd
Jul 12 05:15:22 odroid kernel: [  481.618645@0] usb 2-1.3: New USB device found, idVendor=152d, idProduct=0578
Jul 12 05:15:22 odroid kernel: [  481.618651@0] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 12 05:15:22 odroid kernel: [  481.618654@0] usb 2-1.3: Product: USB to SATA bridge
Jul 12 05:15:22 odroid kernel: [  481.618656@0] usb 2-1.3: Manufacturer: JMicron
Jul 12 05:15:22 odroid kernel: [  481.618659@0] usb 2-1.3: SerialNumber: DB00000000013B
Jul 12 05:15:22 odroid kernel: [  481.619135@0] usb-storage 2-1.3:1.0: USB Mass Storage device detected
Jul 12 05:15:22 odroid kernel: [  481.620411@0] usb-storage 2-1.3:1.0: Quirks match for vid 152d pid 0578: 1000000
Jul 12 05:15:22 odroid kernel: [  481.620491@0] scsi host0: usb-storage 2-1.3:1.0
Jul 12 05:15:23 odroid kernel: [  482.637667@1] scsi 0:0:0:0: Direct-Access     JMicron                   0105 PQ: 0 ANSI: 6
Jul 12 05:15:23 odroid kernel: [  482.638379@2] sd 0:0:0:0: Attached scsi generic sg0 type 0
Jul 12 05:15:23 odroid kernel: [  482.639483@1] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
Jul 12 05:15:23 odroid kernel: [  482.639690@1] sd 0:0:0:0: [sda] 9767541168 512-byte logical blocks: (5.00 TB/4.55 TiB)
Jul 12 05:15:23 odroid kernel: [  482.639694@1] sd 0:0:0:0: [sda] 4096-byte physical blocks
Jul 12 05:15:23 odroid kernel: [  482.639984@1] sd 0:0:0:0: [sda] Write Protect is off
Jul 12 05:15:23 odroid kernel: [  482.639989@1] sd 0:0:0:0: [sda] Mode Sense: 47 00 00 08
Jul 12 05:15:23 odroid kernel: [  482.640261@1] sd 0:0:0:0: [sda] Disabling FUA
Jul 12 05:15:23 odroid kernel: [  482.640265@1] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jul 12 05:15:23 odroid kernel: [  482.641155@0] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
Jul 12 05:15:24 odroid kernel: [  482.744250@1]  sda: sda1
Jul 12 05:15:24 odroid kernel: [  482.745233@2] sd 0:0:0:0: [sda] Very big device. Trying to use READ CAPACITY(16).
Jul 12 05:15:24 odroid kernel: [  482.746463@0] sd 0:0:0:0: [sda] Attached SCSI disk
Jul 12 05:15:30 odroid kernel: [  489.421928@2] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

2+0 records in
2+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 19.1885 s, 112 MB/s
^C
[1]+  Done                    dd if=/dev/zero of=./test_2G.bin oflag=direct bs=1G count=2

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

Hello @neal,
Thank you for your quick feedback. I found an article here:
https://www.raspberrypi.org/forums/view ... p?t=245931
which seems to explain what we observed in our tests.
I also repeated the test with the sata drive and usb bridge moved to a usb3 port of my desktop, which is a x86_64 linux box. Here, the kernel (5.12.14-arch1-1) 'correctly' detected jms578 bridge as a uasp compliant device, hence enabled uas and did NOT complain with any 'Quirk match...' message as before:

Code: Select all

[    1.475793] usb 2-6: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[    1.493237] usb 2-6: New USB device found, idVendor=152d, idProduct=0578, bcdDevice=31.02
[    1.493243] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.493245] usb 2-6: Product: USB to ATA/ATAPI Bridge
[    1.493247] usb 2-6: Manufacturer: JMicron
[    1.493249] usb 2-6: SerialNumber: 0123456789ABCDEF
[    1.839637] scsi host6: uas
[    1.839723] usbcore: registered new interface driver uas
[    1.840224] scsi 6:0:0:0: Direct-Access     JMicron  Generic          3102 PQ: 0 ANSI: 6
[    1.841518] sd 6:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
I'm thinking of sourcing another sata-usb bridge with a different chipset. ASM1153e seems to be the only alternative I'm aware of and I have no idea whether my odroid C4's not-so-mainline kernel will like it (no quirk) at all. Any suggestion from the folks here?

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: c4 usb port speeds

Post by odroid »

Have you tried @tobetter's Ubuntu 21.04 + Kernel 5.13?
viewtopic.php?f=52&t=42300

BTW, as far as I know, USB host controller silicon design IP in the x86 platform is different from generic ARM platforms.
So, the USB driver behaviors are slightly different from time to time.

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

odroid wrote:
Wed Jul 14, 2021 11:49 am
Have you tried @tobetter's Ubuntu 21.04 + Kernel 5.13?
viewtopic.php?f=52&t=42300
Good idea! I should have thought of that. Yes, I'll try that before anything else :) Thank you for reminding.
BTW, as far as I know, USB host controller silicon design IP in the x86 platform is different from generic ARM platforms.
So, the USB driver behaviors are slightly different from time to time.
Yes, I'm aware of that. I tried that on my x86_64 platform just to prove that the jms578 bridge was 'innocent' :D
These users thanked the author ichanjz for the post:
odroid (Wed Jul 14, 2021 2:35 pm)

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

While I was examining the usb sockets trying to figure out a way of cleaning the contacts inside, I spotted, by mere chance or whatever, something right underneath the target socket, at the back of the PCB, seemed to have fallen off. After comparing with the other new c4, I believed this was, most likely, a surface-mounted capacitor (labeled as C217A on the pcb). I guess this must have happened unnoticed some time after (or before) the c4 was put into use last year.
@odroid: do you think this could be the answer to the peculiar speed drop only in the bottom-right port? Unfortunately, nowhere could I find the missing part and solder it back to prove my hypothesis (let alone the skill I'm lack of in handling tiny SMT parts like these).
Note: I've taken a closeup picture of the pcb in case you (or anyone here) is interested. But don't know how to upload it to this forum.

User avatar
odroid
Site Admin
Posts: 37793
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1919 times
Been thanked: 1185 times
Contact:

Re: c4 usb port speeds

Post by odroid »

I believe that capacitor would not directly affect the issue.
Anyway, @neal will check and get back to you soon.

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

Thanks.

User avatar
neal
Posts: 254
Joined: Fri Apr 14, 2017 10:02 am
languages_spoken: Korean, English
Has thanked: 10 times
Been thanked: 18 times
Contact:

Re: c4 usb port speeds

Post by neal »

Hi @ichanjz,

I think that the only way to resolve this issue is by using a good quality SATA cable at this moment.
by the way, you can upload your pictures go to "Full Editor & Preview" and using the below tabs "attachments" and "Imgur".

ichanjz
Posts: 44
Joined: Sat Jun 18, 2016 9:41 am
languages_spoken: english
ODROIDs: odroid c2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: c4 usb port speeds

Post by ichanjz »

Thank you for your time. I guess the best solution is, as you said, to source a better sata-usb bridge/cable.
Cheers for now.

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests