odroid-c2: USB disconnect events

Post Reply
yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

odroid-c2: USB disconnect events

Post by yur »

Hello the Hardkernel Team and Community,

We observe the sporadical losts of the USB devices connected to the `USB 2.0 Host x 4` ports of our Odroid-C2 boards. The losts (actually reconnections) are happening periodically (each ~5-10 Odroid-C2 power off/on cycle) very soon after the system is powered on (~10-15 sec).

Here are the details:
  • the issue (USB device re-connection event) is happening after several seconds (~10-15) after the system power-on
  • the issue is reproduced rather stably, each ~5-15 power off/on cycle
  • it is reproduced with two different Odroid-C2 boards we have (both Rev.0.2 20151218)
  • we reproduce this as well as with the http://de.eu.odroid.in/ubuntu_16.04lts/ ... 815.img.xz image (kernel 3.14.65-73), and with our custom kernel 3.14.29 build (commit 6ad167426f,Wed May 18 23:22:17 2016 -0300, by Mauro (mdrjr) Ribeiro <mauro.ribeiro@hardkernel.com>)
  • we observe no problems if using the `USB OTG` port for USB device connection
  • it is happening with different types (tried two different USB Memory Sticks, one USB WiFi Dongle, and one custom high-speed USB device), and number (tried one, two) of USB devices
  • forcing USB controller to full-speed mode (change port-speed to <1> in *.dts) doesn't help
  • we tried to control USB Hub reset signal (GPIOAO.BIT4) from user-space (not from the dwc2 driver), thinking that some electrical foil on this could lead to such behaviour; but it turns out that some additional kernel messages are printed-out if the disconnection event is happening due to a USB Hub reset; so since we do not see these messages in our faults, then this is not our case
  • we saw several similar topics on the forum about USB problems with other Odroid boards (e.g. XU and C2); we tried the appropriate solutions offered in that topics, but unfortunately these don't help with our problem
Here are the excerpts from the linux kernel logs demonstrating the issue:
  • the USB device is detected during boot, e.g.:

    Code: Select all

    [    3.040747] usb 1-1.3: new high-speed USB device number 3 using dwc_otg
    [    3.141656] usb-storage 1-1.3:1.0: USB Mass Storage device detected
    [    3.141882] scsi0 : usb-storage 1-1.3:1.0
    
  • then the system detects a fake device reconnection, e.g.:

    Code: Select all

    [   11.261735] usb 1-1.3: USB disconnect, device number 3
    [   11.500755] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
    [   11.601677] usb-storage 1-1.3:1.0: USB Mass Storage device detected
    [   11.601879] scsi1 : usb-storage 1-1.3:1.0
    
Attached are several dumps with the full kernel logs:
  • 1.one-dev.no.err.txt. power off/on the board with one device connected: fake device reconnection without any error messages
  • 2.two-dev.no.err.txt. power off/on the board with two devices connected to different ports of USB 2.0 Host: observe both devices reconnection events without any error messages
  • 3.one-dev.xact.err.txt. power off/on the board with one device connected: fake device reconnection preceeding with some warning
So, it looks like something wrong is happening with the GL825G USB hub mounted on the Odroid-C2 board sometimes. Did you ever observe this issue? Any thoughts about how to proceeed further to find and fix the roots of the problem? Thanks in advance for your help.

Regards,
Yuri
Attachments
1.one-dev.no.err.txt
power off/on the board with one device connected: fake device reconnection without any error messages
(87.58 KiB) Downloaded 92 times
2.two-dev.no.err.txt
power off/on the board with two devices connected to different ports of USB 2.0 Host: observe both devices reconnection events without any error messages
(90.34 KiB) Downloaded 90 times
3.one-dev.xact.err.txt
power off/on the board with one device connected: fake device reconnection preceeding some warning
(87.38 KiB) Downloaded 96 times

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

Thank you for the detail and useful feedback.
We will look into your log files carefully and try to reproduce the issue.

Meanwhile, please try the same test with an external USB hub with the OTG host port to narrow down the root causes.

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

odroid wrote:Meanwhile, please try the same test with an external USB hub with the OTG host port to narrow down the root causes.
The issue isn't reproduced in this configuration (Odroid-C2 micro USB OTG + external USB-2.0 hub + USB Flash). We've just run 30 power off/on cycles, and detected no USB Flash (or Hub) fake reconnection events. See logs with one of these successfull sessions in the 01.USB.OTG.OK.txt file attached.

Then we replug the {external USB-2.0 hub + USB Flash} to one of Odroid's `4 x USB 2.0 ports`, and the problem revealed on the 3d power off/on cycle. Here are the excerpts from the 02.USB.HOST.ER.txt file attached:

Code: Select all

[    3.337035] hub 1-1.1:1.0: USB hub found
...
[    3.660392] usb 1-1.1.4: new high-speed USB device number 4 using dwc_otg
[    3.685107] random: systemd-udevd urandom read with 90 bits of entropy available
[    3.761622] usb-storage 1-1.1.4:1.0: USB Mass Storage device detected
[    3.766950] scsi0 : usb-storage 1-1.1.4:1.0
...
[    4.771320] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Edge      1.26 PQ: 0 ANSI: 5
[    4.779338] sd 0:0:0:0: [sda] 7821312 512-byte logical blocks: (4.00 GB/3.72 GiB)
[    4.789221] sd 0:0:0:0: [sda] Write Protect is off
[    4.791302] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null)
[    4.799982] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[    4.800717] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    4.810727]  sda: sda1
[    4.813821] sd 0:0:0:0: [sda] Attached SCSI removable disk
...
[    8.861621] usb 1-1.1: USB disconnect, device number 3
[    8.861631] usb 1-1.1.4: USB disconnect, device number 4
[    9.100519] usb 1-1.1: new high-speed USB device number 5 using dwc_otg
[    9.201061] hub 1-1.1:1.0: USB hub found
[    9.201218] hub 1-1.1:1.0: 7 ports detected
[    9.480417] usb 1-1.1.4: new high-speed USB device number 6 using dwc_otg
[    9.581543] usb-storage 1-1.1.4:1.0: USB Mass Storage device detected
[    9.582603] scsi1 : usb-storage 1-1.1.4:1.0
[   10.210532] libphy: stmmac-0:00 - Link is Up - 100/Full
[   10.581248] scsi 1:0:0:0: Direct-Access     SanDisk  Cruzer Edge      1.26 PQ: 0 ANSI: 5
[   10.581726] sd 1:0:0:0: Attached scsi generic sg0 type 0
[   10.582868] sd 1:0:0:0: [sda] 7821312 512-byte logical blocks: (4.00 GB/3.72 GiB)
[   10.583990] sd 1:0:0:0: [sda] Write Protect is off
[   10.584003] sd 1:0:0:0: [sda] Mode Sense: 43 00 00 00
[   10.584597] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   10.594473]  sda: sda1
[   10.597785] sd 1:0:0:0: [sda] Attached SCSI removable disk
Attachments
01.USB.OTG.OK.txt
(85.58 KiB) Downloaded 79 times
02.USB.HOST.ER.txt
(88.58 KiB) Downloaded 89 times

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

Can you check the chipset in your USB 2.0 hub?
Is it a self-powered hub? or bus-powered one?

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

odroid wrote:Can you check the chipset in your USB 2.0 hub?
Is it a self-powered hub? or bus-powered one?
It's an ISP1521BE based, self-powered, 7-port USB 2.0 hub (D-Link DUB-H7, hw A3).

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

Hello,
odroid wrote:We will look into your log files carefully and try to reproduce the issue.
Are there any thoughts on this ticket? Have you managed to reproduce the issue?

Regards,
Yuri

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

We couldn't reproduce the issue yet.

Tested on ODROID-C2 : rev 0.2 20160226, SmartPower 5.25V
Connections : HDMI 1080P, Debug Serial, Ethernet
OS : Ubuntu 16.04 / Kernel odroid64 3.14.79-84 / eMMC

CardReader : Transcend USB2.0 + Transcend 8GB (Class 10)
USB 1.1 Memory stick / Samsung 64MB
USB 3.0 Memory stick / Sandisk 16G

Test 1 : USB 1.1 memory stick on USB Port#1, There was no issue with 20 reboot cycles.
Test 2 : USB 2.0 Cardreader on USB Port #1, There was no issue with 20 reboot cycles.
Test 3 : USB 3.0 memory stick on USB Port #1,There was no issue with 20 reboot cycles.
Test 4 : Two USB storages on USB Port #1 and #4, There was no issue with 20 reboot cycles.
Test 5 : Two USB storages on USB Port #2 and #3, There was no issue with 20 reboot cycles.
Test 6 : Wireless Mouse/Keyboard USB dongle, Two USB storages on USB port #1, #2, #3. There was no issue with 20 reboot cycles.
Test 7 : Wireless Mouse/Keyboard USB dongle, WIFI Dongle, Two USB storages on USB port #1, #2, #3, #4, There was no issue with 20 reboot cycles.

We checked "dmesg | grep usb" output every reboot cycles.
There was no "USB Disconnect" message.

Any other possible difference between your system and ours?

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

odroid wrote:Any other possible difference between your system and ours?
Thank you for the thorough testing!

Here's what's coming to mind first:
  • as you might note in my logs, the issue happens not during the system booting process, but a little later, at ~10-15 sec after the power on. Did you wait for some time (~10 seconds) after each boot before checking the 'dmesg | grep' output?
  • we're booting from SD-card (not MMC). As to me this difference shouldn't be a reason. Or not?
  • you're using 3.14.79-84 kernel; we tested with 3.14.65-73 (from http://de.eu.odroid.in/ubuntu_16.04lts/ ... 815.img.xz). Is there ubuntu image available with exactly yours version?
  • you're using rev 0.2 20160226 boards in tests, all the boards we have are from another batch (rev.0.2 20151218). Don't you have a board for test exactly from the 20151218 (our) batch?

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

yur wrote: [*] we're booting from SD-card (not MMC). As to me this difference shouldn't be a reason. Or not?
I've just reproduced the issue booting from eMMC. On the 6-th power off/no cycle. The logs are attached. So this (SD/eMMC difference) isn't a reason..
Attachments
emmc.boot.txt
(89.35 KiB) Downloaded 89 times

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

yur wrote:[*] you're using rev 0.2 20160226 boards in tests, all the boards we have are from another batch (rev.0.2 20151218). Don't you have a board for test exactly from the 20151218 (our) batch?
I've just noticed the "C2 PCB revision history" table here: http://odroid.com/dokuwiki/doku.php?id= ... on_history. And according to this table there were some USB-related PCB changes in 20160226 vs 20151218. So, it probably really makes sence for you to try to reproduce the issue with some 20151218 board exactly.

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

We will try to find PCB rev 20151218 boards and test again with 10~15 seconds of waiting.

You can update the kernel with "dist-upgrade". Please update the system and test again.
http://odroid.com/dokuwiki/doku.php?id= ... and_system

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

odroid wrote:You can update the kernel with "dist-upgrade". Please update the system and test again.
http://odroid.com/dokuwiki/doku.php?id= ... and_system
Thanks! I've tried with the {ubuntu64-16.04lts-mate-odroid-c2-20160525.img + upgrade} software, and the resultant system (3.14.79-84-based) does not demonstrate the issue on our boards anymore! I did ~25 power off/on test cycles: no USB device fake reconnections observed. So, I'll upgrade the kernel up to 3.14.79-84 in our custom system (we do not use Ubuntu), and let you know if it really helps, and if this ticket may be considered as resolved.

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

Thank you for the confirmation.
We could not reproduce the issue on 20151218 boards either. :)

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

Unfortunatelly, I'm still having this issue with my custom build :( The log file is attached.

I build from the top-of-tree commit of the `odroidc2-3.14.y` branch in the https://github.com/hardkernel/linux.git repo:

Code: Select all

commit 578b9d38bcd8851cb4273316d4aac90b2626064b
Author: Mauro (mdrjr) Ribeiro <mauro.ribeiro@hardkernel.com>
Date:   Mon Sep 26 16:04:14 2016 -0300

    defconfig: disable ICPLUS ethernet phy
    
    This is not in use
    
    Change-Id: I2a0426068b74537066b9f1f9f7f0d03260dd28cc
According to the kernel's Makefile (and log) - this is the 3.14.79 kernel. On the other hand, the kernel version reported in my successfull ubuntu64-16.04 experiments is 3.14.79-84. Does the commit 578b9d38 (above) correspond to the 3.14.79-84 kernel used with the up-to-dated ubuntu indeed? Or may be there are some changes to the kernel (80..84 subversions I mean), which haven't been commited to the sources repository yet?
Attachments
3.14.79.txt
(35.34 KiB) Downloaded 95 times

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

The 578b9d38bcd8851cb4273316d4aac90b2626064b commit was only for Gbit Ethernet PHY configuration.
It has no relation to the USB block.

We will try to find which commit could fix the USB dropping issue.

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

odroid wrote:The 578b9d38bcd8851cb4273316d4aac90b2626064b commit was only for Gbit Ethernet PHY configuration.
It has no relation to the USB block.
Sure. I just tried to understand which commit in the `odroidc2-3.14.y` repository corresponds to the 3.14.79-84 kernel.
odroid wrote:We will try to find which commit could fix the USB dropping issue.
That would be great!

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

odroid wrote:We will try to find which commit could fix the USB dropping issue.
Are there any news on this topic? Any thoughts how the Ubuntu update could hide the problem in the kernel/hw?

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

I forgot this thread even we already tested the git source code late September. Sorry about that.

Cleanly cloned the github source and built it. But we couldn't reproduce the USB disconnection issue.

Code: Select all

git clone --depth 1 https://github.com/hardkernel/linux.git -b odroidc2-3.14.y

Code: Select all

Linux odroid64 3.14.79 #1 SMP PREEMPT Fri Sep 30 12:32:48 KST 2016
Did you build your kernel on PC with cross compiler gcc 4.9.2? or natively on the board?
We've used the gcc 4.9.2 on a Linix PC.

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

We cross-compile the kernel on Linux PC with gcc 4.9.2. It's very strange, but it seems that the problem is somehow related to the user-level applications running.. Could you please try to reproduce the issue with your original minimal ubuntu image (http://odroid.in/ubuntu_16.04lts/ubuntu ... 815.img.xz)? In the start topic of this thread I sent the logs of failures we observe exactly with this *.img.

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

Because of some urgent internal tasks, we have no spare resources until end of next week.
Please understand our situation.
If you can't reproduce the issue on Ubuntu Mate image with your kernel, we may need to find a root cause on userland files.
But I have no idea at this moment.

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

Meanwhile we've done more experiments. And found that the device disconnect events are associated with the OVERCUR signal pulses.

Please find attached the following files:
  • OVCUR1#.JPG.This is the OVERCUR signal behaviour on the R95 resistor when the problem happens. We observe such pulse (duration is 3.25-3.5 msec) each time when the kernel detects fake device reconnect. Please note, that sometimes we observed this pulse on oscillograph, but the USB hub ignores it (and then the kernel does not detect USB device reconnections).
  • kern.log.txt. Kernel log with some additional print-outs from the USB device driver (this log corresponds exactly to the JPG above).
  • kern.patch.txt. The log above is obtained with the kernel patched with this patch. This is just to confirm that the hub detects overcurrent situations.
We observe such behaviour on all 15 odroid-c2 units we have. All are rev.0.2 20151218. By the way, which U19 current switches are installed on rev.0.2 20151218? According to schematic (http://dn.odroid.com/S905/Schematic/odr ... 151218.pdf) it is NCP380, but according to the information on web (http://odroid.com/dokuwiki/doku.php?id= ... on_history) it is MP62551.

We observe such behaviour in both variants of odroid-c2 powering scheme:
  • 5V DCJACK: 5V, 2.0A adapter
  • MicroUSB: 5V, 3.0A adapter
Attachments
OVCUR1#.JPG
(189.92 KiB) Downloaded 1635 times
kern.log.txt
(34.92 KiB) Downloaded 92 times
kern.patch.txt
(1.13 KiB) Downloaded 81 times

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

Hello,
odroid wrote:Because of some urgent internal tasks, we have no spare resources until end of next week.
Do you have any news or comments on this topic? Unfortunatelly, this problem is very critical for us in our odroid-based application. So, any workaround suggestion could be very appriciated..

Thanks in advance,
Yuri

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

Sorry for late reply.

The MP62551 is pin-to-pin compatible with NCP380.
So we didn't update the schematics. We will update the schematics by tomorrow.

Anyway, try to change the RILIM value to 12.4KOhms from 20Kohms to increase the USB VBUS current limit.

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

odroid wrote:Anyway, try to change the RILIM value to 12.4KOhms from 20Kohms to increase the USB VBUS current limit.
With the rev 0.2 20160226 hw (which has 12.4K RILIM installed) I still periodically see a pulse of the OVERCUR signal on oscillograph (connected to R95) if the system starts with only one USB device connected to the USB hub.There is no OVERCUR pulses detected if there are two USB devices connected (per each CON_USB-1/2 connector), or if there are no USB devices connected at all. Could you please check? What is the reason of this OVERCUR?

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

The OVERCUR pulse appears only when the VBUS load current is higher then RILIM settings.
I think your USB flash storages seem to have very high in-rush current when it starts.
But it is really mystery why two USB flash devices didn't cause the OVERCUR pulse.

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

odroid wrote:I think your USB flash storages seem to have very high in-rush current when it starts.
Admittedly, I don't think that our USB flash shorage is the reason. We observe this OVERCUR pulse on start with any of these devices:
  • different USB flash memory sticks
  • different USB WiFi dongles
  • a custom USB device
Could you please explicitly check the presence of an OVERCUR pulse in a similar to ours setup with your hw?

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

As I told you we already tested it on PCB rev 20151218 as well as 20160226. But we couldn't reproduce the issue.
http://forum.odroid.com/viewtopic.php?f ... 33#p161492

The OVERCUR is the output signal from the load-switch(MP62551/NCP380) as you may know well.

Anything else we might miss to reproduce the issue?

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

Anything else we might miss to reproduce the issue?
Yes, I remember that you tried, and I'm begging you a pardon for being annoying. But you probably miss my message in http://forum.odroid.com/posting.php?mod ... 1#pr162773: most times we observe the OVERCUR pulse on oscilloscope, but the Odroid's USB hub ignores it, and then the kernel does not detect USB device reconnections. When you tried to reproduce the problem you didn't check the OVERCUR signal with oscilloscope, but just scrutinized the kernel logs. So, I'm wondering do you see that OVERCUR pulses if testing with oscilloscope or not.

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

We will try to use an oscilloscope to check the pulse with a USB-SSD.

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

We could see 3.5msec pulse too in the boot process. :oops:
But the USB-SSD mounted well.
We can start to find what's wrong at least. :)

Can you explain the meaning of "fake device reconnect" more detail?
Your USB flash or WiFi doesn't work when "fake device reconnect" occurs?

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

It's great that you can reproduce this too! The USB devices work well after the "fake device reconnect" events. But the fact of such "reconnection" events in a running system is not acceptable for our final application (because of gaps in data flows registered/generated with our external devices connected to USB if these events happen after our application has been started, configured, and run). So, we are looking forward to the results of your investigations.

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

We guess the hub IC might generate the pulse when the host driver is being loaded in the kernel loading process.
It seems to occur once only in the booting process .

Did you observe the reconnecting issue while the system was running too?

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

We definitely observed OVERCUR with 20151218 PCB after all driver probes, and inits passed, after ~10-15 sec after power-on. See the kernel logs in the original message of this topic. Did you verify the OVERCUR signal with oscilloscope on 20151218 too?

As regarding the host/hub driver - is it an expected behaviour or a bug in the driver? And furthermore I thought that OVERCUR is an INPUT for a Hub, so how could it generate anything on it? Maybe some pull-ups are missed?

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

I meant we could not see the reconnecting issue after full booting process completition around 25 seconds later power on.

BTW, there must be an external pull-up resistor on the OVERCUR signal as per our schematics.
Let's check the strange OVERCUR behavior with this datasheet together.
http://minipcsale.ru/images/Minix-Neo-X8-h/GL852G.pdf

yur
Posts: 22
Joined: Wed Sep 21, 2016 11:21 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by yur »

odroid wrote:I meant we could not see the reconnecting issue after full booting process completition around 25 seconds later power on.
I see. We use a custom Linux built (kernel + minimal initramfs), and our boot time is 4-5 seconds. So our application is already inited and run when OVERCUR happens, and if this is detected by Hub and the kernel, then we see that fake USB device reconnections.
odroid wrote:BTW, there must be an external pull-up resistor on the OVERCUR signal as per our schematics.
Yes, now I see it - R95.
odroid wrote:Let's check the strange OVERCUR behavior with this datasheet together.
http://minipcsale.ru/images/Minix-Neo-X8-h/GL852G.pdf
According to this document the OVCUR pin is a pulled-up Input, see "3.3 Pin Descriptions" table.. The only option which comes to mind here is to cut-off the signal path before the USB Hub, to check who set OVERCUR: is it a Hub indeed, or is it a legal (not clear why though) signal from one of the Load-Switches.But this may be hard or even impossible to implement in such a high-dencity multi-layer PCB like Odroid-C2.

By the way, just a remainder about the observation that OVERCUR happens only when one of CON_USB-1/2 is used. If you insert some device into another CON_USB-1/2, then OVERCUR will disappear. Maybe this will help to understand what's wrong somehow.

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

Thank you for the hint about the number of attached devices.
We will try to find a way to check it tomorrow. One fear is the silicon bug in the Hub IC. :(

In worst case, you must need to start your application just after the pulse disappears.


Update:
Please try this script(Hub IC reset) just before running your application.

Code: Select all

echo 126 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio126/direction
sleep 1
echo 0 > /sys/class/gpio/gpio126/value
sleep 1
echo 1 > /sys/class/gpio/gpio126/value
echo 126 > /sys/class/gpio/unexport
sleep 1

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by MartB »

Any progress on this @HK ?

This is a pretty major flaw as it has the potential to corrupt attached usb devices if they get mounted with fstab. (happened twice to my external test hdds already)
The supplied workaround is not something i would like to add into my kernel i want to keep using fstab for my mounts and not play around with custom initialization scripts.

Full boot log (this is for mainline but it happens on your kernel regardless.)

Code: Select all

[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: Hardkernel ODROID-C2
[    0.000000] earlycon: meson0 at MMIO 0x00000000c81004c0 (options '115200n8')
[    0.000000] bootconsole [meson0] enabled
[    0.000000] cma: Reserved 16 MiB at 0x000000007f000000
[    0.000000] On node 0 totalpages: 520192
[    0.000000]   DMA zone: 8128 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 520192 pages, LIFO batch:31
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 23 pages/cpu @ffff80007ef78000 s56728 r8192 d29288 u94208
[    0.000000] pcpu-alloc: s56728 r8192 d29288 u94208 alloc=23*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 512064
[    0.000000] Kernel command line: console=ttyAML0,115200n8 root=/dev/mmcblk0p2 rw rootwait serialno=HKC213254DFE32C1 earlycon elevator=noop max_freq
=1536 fsck.mode=force fsck.repair=yes
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 2018828K/2080768K available (6206K kernel code, 496K rwdata, 1648K rodata, 384K init, 345K bss, 45556K reserved, 16384K cma-res
erved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffff000000000000 - 0xffff000008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000   (129022 GB)
[    0.000000]       .text : 0xffff000008080000 - 0xffff000008690000   (  6208 KB)
[    0.000000]     .rodata : 0xffff000008690000 - 0xffff000008830000   (  1664 KB)
[    0.000000]       .init : 0xffff000008830000 - 0xffff000008890000   (   384 KB)
[    0.000000]       .data : 0xffff000008890000 - 0xffff00000890c008   (   497 KB)
[    0.000000]        .bss : 0xffff00000890c008 - 0xffff000008962704   (   346 KB)
[    0.000000]     fixed   : 0xffff7dfffe7fd000 - 0xffff7dfffec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffff7e0000000000 - 0xffff800000000000   (  2048 GB maximum)
[    0.000000]               0xffff7e0000040000 - 0xffff7e0002000000   (    31 MB actual)
[    0.000000]     memory  : 0xffff800001000000 - 0xffff800080000000   (  2032 MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000003] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.008288] Console: colour dummy device 80x25
[    0.012526] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.022841] pid_max: default: 32768 minimum: 301
[    0.027520] Security Framework initialized
[    0.031614] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.038329] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.061551] ASID allocator initialised with 65536 entries
[    0.085560] smp: Bringing up secondary CPUs ...
[    0.114234] Detected VIPT I-cache on CPU1
[    0.114270] CPU1: Booted secondary processor [410fd034]
[    0.142247] Detected VIPT I-cache on CPU2
[    0.142263] CPU2: Booted secondary processor [410fd034]
[    0.170274] Detected VIPT I-cache on CPU3
[    0.170289] CPU3: Booted secondary processor [410fd034]
[    0.170317] smp: Brought up 1 node, 4 CPUs
[    0.196580] SMP: Total of 4 processors activated.
[    0.201307] CPU features: detected feature: 32-bit EL0 Support
[    0.207233] CPU: All CPU(s) started at EL2
[    0.211290] alternatives: patching kernel code
[    0.216493] devtmpfs: initialized
[    0.221275] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.228879] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.235539] pinctrl core: initialized pinctrl subsystem
[    0.240992] NET: Registered protocol family 16
[    0.248918] cpuidle: using governor menu
[    0.249236] vdso: 2 pages (1 code @ ffff000008697000, 1 data @ ffff000008894000)
[    0.256271] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.268232] DMA: preallocated 256 KiB pool for atomic allocations
[    0.269249] Serial: AMBA PL011 UART driver
[    0.279181] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.280987] SCSI subsystem initialized
[    0.283810] usbcore: registered new interface driver usbfs
[    0.289475] usbcore: registered new interface driver hub
[    0.294566] usbcore: registered new device driver usb
[    0.300037] pps_core: LinuxPPS API ver. 1 registered
[    0.304577] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.313785] PTP clock support registered
[    0.318325] clocksource: Switched to clocksource arch_sys_counter
[    0.323939] VFS: Disk quotas dquot_6.6.0
[    0.327798] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.338466] NET: Registered protocol family 2
[    0.339322] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.346427] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.353123] TCP: Hash tables configured (established 16384 bind 16384)
[    0.359607] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    0.365591] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    0.372150] NET: Registered protocol family 1
[    0.376612] RPC: Registered named UNIX socket transport module.
[    0.382366] RPC: Registered udp transport module.
[    0.387086] RPC: Registered tcp transport module.
[    0.391812] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.398749] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[    0.407239] workingset: timestamp_bits=46 max_order=19 bucket_order=0
[    0.416912] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.419216] NFS: Registering the id_resolver key type
[    0.423984] Key type id_resolver registered
[    0.428124] Key type id_legacy registered
[    0.432254] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.440513] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.446350] io scheduler noop registered (default)
[    0.451260] io scheduler cfq registered
[    0.455008] io scheduler mq-deadline registered
[    0.459539] io scheduler kyber registered
[    0.464143] GPIO line 4 (usb-hub-reset) hogged as output/high
[    0.472968] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.476385] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 12, base_baud = 1500000) is a meson_uart
[    0.485811] console [ttyAML0] enabled
[    0.487461] bootconsole [meson0] disabled
[    0.499055] loop: module loaded
[    0.499546] libphy: Fixed MDIO Bus: probed
[    0.502666] tun: Universal TUN/TAP device driver, 1.6
[    0.508588] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.514073] ehci-platform: EHCI generic platform driver
[    0.519270] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.525326] ohci-platform: OHCI generic platform driver
[    0.531045] i2c /dev entries driver
[    0.534974] sdhci: Secure Digital Host Controller Interface driver
[    0.540082] sdhci: Copyright(c) Pierre Ossman
[    0.544406] Synopsys Designware Multimedia Card Interface Driver
[    0.550887] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[    0.594473] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.595016] ledtrig-cpu: registered to indicate activity on CPUs
[    0.600715] meson-sm: secure-monitor enabled
[    0.605886] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[    0.614815] NET: Registered protocol family 17
[    0.615998] Key type dns_resolver registered
[    0.620507] registered taskstats version 1
[    0.625206] dwc2 c9000000.usb: c9000000.usb supply vusb_d not found, using dummy regulator
[    0.632456] dwc2 c9000000.usb: c9000000.usb supply vusb_a not found, using dummy regulator
[    0.641737] phy phy-c0000000.phy.0: USB ID detect failed!
[    0.645973] phy phy-c0000000.phy.0: phy poweron failed --> -22
[    0.651801] dwc2: probe of c9000000.usb failed with error -22
[    0.660826] dwc2 c9100000.usb: c9100000.usb supply vusb_d not found, using dummy regulator
[    0.665570] dwc2 c9100000.usb: c9100000.usb supply vusb_a not found, using dummy regulator
[    0.794422] dwc2 c9100000.usb: DWC OTG Controller
[    0.794454] dwc2 c9100000.usb: new USB bus registered, assigned bus number 1
[    0.800501] dwc2 c9100000.usb: irq 32, io mem 0xc9100000
[    0.806164] hub 1-0:1.0: USB hub found
[    0.809561] hub 1-0:1.0: 1 port detected
[    0.813386] meson-gx-mmc d0074000.mmc: (re)tuning...
[    0.818344] mmc0: new HS200 MMC card at address 0001
[    0.823387] mmcblk0: mmc0:0001 AGND3R 14.6 GiB 
[    0.828111] meson-gx-mmc d0072000.mmc: Got CD GPIO
[    0.832785] mmcblk0boot0: mmc0:0001 AGND3R partition 1 4.00 MiB
[    0.838677] mmcblk0boot1: mmc0:0001 AGND3R partition 2 4.00 MiB
[    0.844220] mmcblk0rpmb: mmc0:0001 AGND3R partition 3 4.00 MiB
[    0.850407]  mmcblk0: p1 p2
[    0.879704] scpi_protocol scpi: SCP Protocol 0.0 Firmware 0.0.0 version
[    0.885308] hctosys: unable to open rtc device (rtc0)
[    0.885791] USB_OTG_PWR: disabling
[    0.911063] F2FS-fs (mmcblk0p2): Mounted with checkpoint version = 29ac
[    0.912062] VFS: Mounted root (f2fs filesystem) on device 179:2.
[    0.918636] devtmpfs: mounted
[    0.921174] Freeing unused kernel memory: 384K
[    0.937402] random: fast init done
[    0.991736] systemd[1]: System time before build time, advancing clock.
[    1.014044] NET: Registered protocol family 10
[    1.014589] Segment Routing with IPv6
[    1.019882] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.039766] systemd[1]: systemd 232 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNU
TLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    1.052585] systemd[1]: Detected architecture arm64.
[    1.069534] mmc1: new high speed SDHC card at address e624
[    1.069815] mmcblk1: mmc1:e624 SU16G 14.8 GiB 
[    1.082552]  mmcblk1: p1
[    1.082713] systemd[1]: Set hostname to <controller>.
[    1.192014] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    1.214340] usb 1-1: new high-speed USB device number 2 using dwc2
[    1.214444] systemd[1]: Reached target Swap.
[    1.234456] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    1.254375] systemd[1]: Reached target Remote File Systems.
[    1.270536] systemd[1]: Listening on Network Service Netlink Socket.
[    1.290515] systemd[1]: Listening on udev Control Socket.
[    1.306488] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    1.420039] hub 1-1:1.0: USB hub found
[    1.420341] hub 1-1:1.0: 4 ports detected
[    1.710357] usb 1-1.1: new high-speed USB device number 3 using dwc2
[    1.840342] systemd-journald[793]: Received request to flush runtime journal from PID 1
[    1.912912] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[    1.914203] scsi host0: usb-storage 1-1.1:1.0
[    1.918291] usbcore: registered new interface driver usb-storage
[    1.926073] usbcore: registered new interface driver uas
[    1.944467] meson8b-dwmac c9410000.ethernet: PTP uses main clock
[    1.945888] meson8b-dwmac c9410000.ethernet: no reset control found
[    1.954605] stmmac - user ID: 0x11, Synopsys ID: 0x37
[    1.957284] meson8b-dwmac c9410000.ethernet: Ring mode enabled
[    1.963963] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
[    1.970007] rtc rtc0: invalid alarm value: 2017-6-30 31:30:0
[    1.970220] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[    1.982555] meson8b-dwmac c9410000.ethernet: Normal descriptors
[    1.988464] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
[    1.995888] meson8b-dwmac c9410000.ethernet: COE Type 2
[    2.001027] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
[    2.008017] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
[    2.014380] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    2.022427] libphy: stmmac: probed
[    2.075455] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    2.216937] F2FS-fs (mmcblk1p1): Mounted with checkpoint version = ecbe82c
[    2.589372] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[    2.745564] meson8b-dwmac c9410000.ethernet eth0: device MAC address 00:1e:06:34:7f:41
[    2.819247] RTL8211F Gigabit Ethernet stmmac-0:00: attached PHY driver [RTL8211F Gigabit Ethernet] (mii_bus:phy_addr=stmmac-0:00, irq=-1)
[    2.885880] random: crng init done
[    2.926374] meson8b-dwmac c9410000.ethernet eth0: PTP not supported by HW
[    2.927682] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    2.927694] scsi 0:0:0:0: Direct-Access     VB0250EA VER                   PQ: 0 ANSI: 2 CCS
[    2.945698] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/233 GiB)
[    2.952805] sd 0:0:0:0: [sda] Write Protect is off
[    2.957172] sd 0:0:0:0: [sda] Mode Sense: 34 00 00 00
[    2.957925] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    2.978070]  sda: sda1
[    2.980787] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.344152] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    5.144787] usb 1-1.1: USB disconnect, device number 3
[    5.150445] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[    5.153009] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 04 00 89 00 00 00 f0 00
[    5.160533] blk_update_request: I/O error, dev sda, sector 67143936
[    5.166844] JBD2: Error -5 detected when updating journal superblock for sda1-8.
[    5.166896] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[    5.166905] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 04 00 89 f0 00 00 f0 00
[    5.166910] blk_update_request: I/O error, dev sda, sector 67144176
[    5.195902] Aborting journal on device sda1-8.
[    5.200294] JBD2: Error -5 detected when updating journal superblock for sda1-8.
[    5.446396] usb 1-1.1: new high-speed USB device number 4 using dwc2
[    5.551003] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[    5.563437] scsi host0: usb-storage 1-1.1:1.0
[    6.575197] scsi 0:0:0:0: Direct-Access     VB0250EA VER                   PQ: 0 ANSI: 2 CCS
[    6.582313] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/233 GiB)
[    6.586061] sd 0:0:0:0: [sda] Write Protect is off
[    6.590230] sd 0:0:0:0: [sda] Mode Sense: 34 00 00 00
[    6.591086] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    6.615835]  sda: sda1
[    6.619118] sd 0:0:0:0: [sda] Attached SCSI disk
[    6.944751] EXT4-fs (sda1): recovery complete
[    6.944791] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    7.019166] meson8b-dwmac c9410000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.022179] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
As you can see that usb hub powercycle thingy is happening solid 2 seconds after everything is initialized.
Could this have sth to do with individual / gang mode for overcurrent detection on the IC ?
As far as i understood you are using gang mode on the ic maybe that in conjunction with how the ic is initialized by the kernel triggers a fault somehow ?

User avatar
odroid
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 1074 times
Been thanked: 821 times
Contact:

Re: odroid-c2: USB disconnect events

Post by odroid »

We already tried various different options but we couldn't solve the disconnecting issue.
We will contact Genesys Logic very soon.

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by MartB »

Nice to hear fingers crossed maybe its a bug we can fix.
I attached a usb soundcard to it i dont use just so it doesnt trigger this error anymore.
Not having only 1 device seems to be the only reliable way to fix it.

ruppi
Posts: 128
Joined: Fri Feb 22, 2013 11:13 pm
languages_spoken: korean
Location: South Korea
Has thanked: 0
Been thanked: 12 times
Contact:

Re: odroid-c2: USB disconnect events

Post by ruppi »

A test was conducted with JMS578 Based USB SATA Bridge, but it was not reproduced.
I think the overcurent signal from Genesys Logic USB HUB is irrelevant to this issue. because the USB HUB does not actually recognize the current signal.
I want to know your environment to repoduce for issue.
What is IC of the USB SATA Bridge Board you are using ?
Are you using HDD on the USB SATA Bridge Board?
If you use an HDD, what kind of model is it?

BR,
Ruppi

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by MartB »

Code: Select all

Bus 001 Device 003: ID 0475:059b Relisys/Teco Information System 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0475 Relisys/Teco Information System
  idProduct          0x059b 
  bcdDevice            0.00
  iManufacturer           1 JMicron
  iProduct                2 USB to ATA/ATAPI Bridge
  iSerial                 5 9DFFFFFFFFFF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 USB Mass Storage
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              6 MSC Bulk-Only Transfer
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0401
  Self Powered
HDD Model: Seagate baracuda salvaged from a hp server worked reliably on low load before. (swapped with 3 other models too same issue.)

Code: Select all

[    2.975634] scsi 0:0:0:0: Direct-Access     VB0250EA VER                   PQ: 0 ANSI: 2 CCS
[    2.995510] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/233 GiB)
[    2.998145] sd 0:0:0:0: [sda] Write Protect is off
[    3.002209] sd 0:0:0:0: [sda] Mode Sense: 34 00 00 00
[    3.002873] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
I dont have physical access to the site at the moment so i cant really take a look at the specific IC thats soldered onto it but i hope the lsusb output is enough.

I need to note that since i added a unused usb soundcard to it it never acted up again.

berndd
Posts: 11
Joined: Sat Dec 03, 2016 11:03 am
languages_spoken: english german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: odroid-c2: USB disconnect events

Post by berndd »

Hi,
had also problems with disconnecting usb harddisks combined with powered usb hubs. Have tested many different powered usb hub models, but that did not help. There was also a general Problem with the stability of the whole system (blue led went out and the system crashed).
My solution that helped me a lot: I took a cutter knife and opened carefully the insulation of the usb cable (from odroid to hub) an cutted off the red wire (+5V) Then I took electrical tape and shrinking tubes to insulate the cable again carefully. Now the power of the Hub/Harddrives and odroid is "absolutely" separated. That helped me a lot: I never had a "harddrive-disconnect-error" again and it also improved the overall stability of my odroid. Perhaps my tip might be useful for someone.

Greetings Bernd

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 2 guests