Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X3: Storage access while charging via USB #4

Open
kokosowy opened this issue May 11, 2016 · 7 comments
Open

X3: Storage access while charging via USB #4

kokosowy opened this issue May 11, 2016 · 7 comments

Comments

@kokosowy
Copy link

Hi again, I hope you are alive. :-)

I noticed that access to storage while charging device via USB is not always possible.

Procedure to recreate the problem:

  1. Unplug device from USB, turn it off
  2. Remove SD card from device and place it to computer directly
  3. You can access the SD
  4. Remove SD card from computer and place it to device again
  5. Connect device via USB to computer
  6. It's charging and storage access via USB is possible
  7. Unpluged USB
  8. Plug USB again
  9. You cannot access storage via USB any more, you need to go to step 1 and repeat all procedure again to be able to access storage via USB one more time.

Something is clearly blocking the access once USB detached.

Thank you!
K

@davidfoerster
Copy link

I don't have this issue with build 170312 on Linux.

@kokosowy
Copy link
Author

Well it's still not working on my side. I've removed .rockbox completely and installed new version from scratch. Here's dmesg output I get on my Linux system (Linux nana 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux):

[mar16 11:13] usb 3-2: new high-speed USB device number 22 using xhci_hcd
[  +0,112204] usb 3-2: Device not responding to setup address.
[  +0,203957] usb 3-2: Device not responding to setup address.
[  +0,203829] usb 3-2: device not accepting address 22, error -71
[  +0,111928] usb 3-2: new high-speed USB device number 23 using xhci_hcd
[  +0,112099] usb 3-2: Device not responding to setup address.
[  +0,203958] usb 3-2: Device not responding to setup address.
[  +0,203935] usb 3-2: device not accepting address 23, error -71
[  +0,111930] usb 3-2: new high-speed USB device number 24 using xhci_hcd
[  +0,000123] usb 3-2: Device not responding to setup address.
[  +0,203972] usb 3-2: Device not responding to setup address.
[  +0,203883] usb 3-2: device not accepting address 24, error -71
[  +0,112027] usb 3-2: new high-speed USB device number 25 using xhci_hcd
[  +0,000163] usb 3-2: Device not responding to setup address.
[  +0,203913] usb 3-2: Device not responding to setup address.
[  +0,203829] usb 3-2: device not accepting address 25, error -71
[  +0,000026] usb usb3-port2: unable to enumerate USB device

@davidfoerster
Copy link

Did you reinstall the boot loader too? Also, apparently there are different X3 revisions. Mine is the one on the right:

@kokosowy
Copy link
Author

Thanks David. I also have the version on the right and I have v160316 bootloader which is still the most recent. Should I really reinstall it?

@davidfoerster
Copy link

davidfoerster commented Mar 16, 2017

If you already have the most recent boot loader I doubt a re-installation will make a difference.

With Linux kernel v4.4.49-67.88 (Ubuntu 14.04) I get the following dmesg output upon connection:

[110254.896028] usb 2-2.1.3: new high-speed USB device number 22 using ehci-pci
[110254.981778] usb 2-2.1.3: New USB device found, idVendor=0525, idProduct=a4a5
[110254.981783] usb 2-2.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[110254.981786] usb 2-2.1.3: Product: Rockbox media player
[110254.981788] usb 2-2.1.3: Manufacturer: Rockbox.org
[110254.982165] usb-storage 2-2.1.3:1.0: USB Mass Storage device detected
[110254.983647] usb-storage 2-2.1.3:1.0: Quirks match for vid 0525 pid a4a5: 10000
[110254.983785] scsi host18: usb-storage 2-2.1.3:1.0
[110255.984669] scsi 18:0:0:0: Direct-Access     Rockbox  Internal Storage 0.00 PQ: 0 ANSI: 4
[110255.985071] scsi 18:0:0:1: Direct-Access     Rockbox  SD Card Slot     0.00 PQ: 0 ANSI: 4
[110255.986901] sd 18:0:0:0: [sdg] 243253248 512-byte logical blocks: (125 GB/116 GiB)
[110255.987883] sd 18:0:0:0: [sdg] Write Protect is off
[110255.987887] sd 18:0:0:0: [sdg] Mode Sense: 0b 00 00 08
[110255.990283] sd 18:0:0:0: [sdg] No Caching mode page found
[110255.990288] sd 18:0:0:0: [sdg] Assuming drive cache: write through
[110255.996176]  sdg: sdg1
[110255.996904] sd 18:0:0:1: [sdh] Attached SCSI removable disk
[110255.999780] sd 18:0:0:0: [sdg] Attached SCSI removable disk

This is with a USB 2.0 host controller (EHCI) and a hub in between. Maybe try different USB ports or try to force the host controller to EHCI mode in case any of the involved parts (USB controllers and driver stacks on both ends) don't implement XHCI-to-EHCI backwards compatibility correctly. I don't remember how to do that exactly but it involves writing a value into a sysfs entry for the host controller. Should be easy enough to find on AskUbuntu or Unix & Linux SE.

@kokosowy
Copy link
Author

Lucky you, David! :-) I appreciate your help so much. I checked three USB cables and two notebooks (one of them Windows - it also reports 'USB not recognised'), so it seems problem is somewhere on x3 side.

And here's interesting part..

  • Later I've booted original software on x3 and checked on Windows whether this works. It worked! It also detected error with filesystem so I used scandisk for it. Great.
  • Switched back to Rockbox - USB drive on Windows works! Unplugged, plugged and checked there few times.
  • Plugging the same to Linux (latest Mint) it doesn't mount it automatically but now dmesg claims /dev item is now created, so there's a difference since last time.
  • I can mount it manually
  • I umount it, unplug usb, plug it again to Linux and dmesg throws same errors as initially, no /dev item created, no mount possible..

So clearly something is not right between my Linux and X3.. I will try to format SD card again and check because I also spotted some Buffer I/O errors.

Not sure what else can be done.

@davidfoerster
Copy link

My only ideas for further tests are

  • a live Linux distribution (Mint, Ubuntu, whatever…) in case there's something awry with the configuration of your Linux installation,
  • different kernel versions either trough different versions of the live distros mentioned before or, on Ubuntu/Mint via the LTS enablement stack,
  • forcing the XHCI host controller into EHCI mode via sysfs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants