1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

R6400. USB3 drive limited to USB2.

Discussion in 'Tomato Firmware' started by Tordenflesk, Jul 16, 2017.

  1. Tordenflesk

    Tordenflesk Addicted to LI Member

    Hi.
    I've recently purchased a NetGear R6400 and promptly installed AdvancedTomato 140 on it.
    I have attached an Seagate Expansion Desk 3TB and it appears to only be detected as a USB2 drive.
    If I disable USB 2.0 support it stops showing up in the GUI.

    LOG:
    Code:
    Jul 16 17:20:16 TomatGear kern.info kernel: xhci_hcd 0000:00:0c.0: remove, state 1
    Jul 16 17:20:16 TomatGear kern.info kernel: usb usb1: USB disconnect, address 1
    Jul 16 17:20:16 TomatGear kern.info kernel: xhci_hcd 0000:00:0c.0: USB bus 1 deregistered
    Jul 16 17:20:16 TomatGear kern.info kernel: xhci_hcd 0000:00:0c.0: xHCI Host Controller
    Jul 16 17:20:16 TomatGear kern.info kernel: xhci_hcd 0000:00:0c.0: new USB bus registered, assigned bus number 1
    Jul 16 17:20:16 TomatGear kern.info kernel: xhci_hcd 0000:00:0c.0: irq 112, io mem 0x18023000
    Jul 16 17:20:16 TomatGear kern.err kernel: xhci_hcd 0000:00:0c.0: Failed to enable MSI-X
    Jul 16 17:20:16 TomatGear user.debug hotplug[2078]: Attached USB device 1-0:1.0 [INTERFACE=9/0/0 PRODUCT=1d6b/3/206]
    Jul 16 17:20:16 TomatGear kern.err kernel: xhci_hcd 0000:00:0c.0: failed to allocate MSI entry
    Jul 16 17:20:16 TomatGear kern.warn kernel: usb usb1: No SuperSpeed endpoint companion for config 1  interface 0 altsetting 0 ep 129: using minimum values
    Jul 16 17:20:16 TomatGear kern.debug kernel: xHCI xhci_add_endpoint called for root hub
    Jul 16 17:20:16 TomatGear kern.debug kernel: xHCI xhci_check_bandwidth called for root hub
    Jul 16 17:20:16 TomatGear kern.info kernel: hub 1-0:1.0: USB hub found
    Jul 16 17:20:16 TomatGear kern.info kernel: hub 1-0:1.0: 1 port detected
    Jul 16 17:20:16 TomatGear kern.info kernel: [xhci-hub] usb2mode:[0]
    Jul 16 17:20:16 TomatGear kern.info kernel: ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    Jul 16 17:20:16 TomatGear kern.info kernel: ehci_hcd 0000:00:0b.1: EHCI Host Controller
    Jul 16 17:20:16 TomatGear kern.info kernel: ehci_hcd 0000:00:0b.1: new USB bus registered, assigned bus number 2
    Jul 16 17:20:16 TomatGear kern.info kernel: ehci_hcd 0000:00:0b.1: irq 111, io mem 0x18021000
    Jul 16 17:20:16 TomatGear kern.info kernel: ehci_hcd 0000:00:0b.1: USB 0.0 started, EHCI 1.00
    Jul 16 17:20:16 TomatGear kern.info kernel: hub 2-0:1.0: USB hub found
    Jul 16 17:20:16 TomatGear kern.info kernel: hub 2-0:1.0: 2 ports detected
    Jul 16 17:20:16 TomatGear user.info sd-idle[2089]: initialized
    Jul 16 17:20:16 TomatGear user.debug hotplug[2088]: Attached USB device 2-0:1.0 [INTERFACE=9/0/0 PRODUCT=1d6b/2/206]
    Jul 16 17:20:16 TomatGear kern.info kernel: usb 1-1: new SuperSpeed USB device using xhci_hcd and address 2
    Jul 16 17:20:16 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
    Jul 16 17:20:16 TomatGear user.debug hotplug[2103]: Attached USB device 1-1:1.0 [INTERFACE=8/6/80 PRODUCT=bc2/3312/739]
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: short transfer on control ep
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: disable burst on ep 3
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN no SS endpoint bMaxBurst
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: disable burst on ep 10
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN no SS endpoint bMaxBurst
    Jul 16 17:20:17 TomatGear kern.info kernel: scsi0 : usb-storage 1-1:1.0
    Jul 16 17:20:17 TomatGear kern.notice kernel: scsi 0:0:0:0: Direct-Access     Seagate  Expansion Desk   0739 PQ: 0 ANSI: 6
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:17 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:18 TomatGear kern.notice kernel: sd 0:0:0:0: [sda] Spinning up disk....
    Jul 16 17:20:18 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:18 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:18 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:19 TomatGear kern.warn kernel: .
    Jul 16 17:20:19 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:19 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:19 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:20 TomatGear kern.warn kernel: .
    Jul 16 17:20:20 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:20 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:20 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:22 TomatGear kern.warn kernel: .
    Jul 16 17:20:22 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:22 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:22 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:23 TomatGear kern.warn kernel: .
    Jul 16 17:20:23 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:23 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:23 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:24 TomatGear kern.warn kernel: .
    Jul 16 17:20:24 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:24 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:24 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:25 TomatGear kern.warn kernel: .
    Jul 16 17:20:25 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:25 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:25 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:26 TomatGear kern.warn kernel: .
    Jul 16 17:20:26 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:26 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:26 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:27 TomatGear kern.warn kernel: .
    Jul 16 17:20:27 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:27 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:27 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:28 TomatGear kern.warn kernel: .
    Jul 16 17:20:28 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:28 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:28 TomatGear kern.warn kernel: xhci_hcd 0000:00:0c.0: WARN: Stalled endpoint
    Jul 16 17:20:29 TomatGear kern.warn kernel: .ready
    Jul 16 17:20:29 TomatGear kern.notice kernel: sd 0:0:0:0: [sda] 732566645 4096-byte logical blocks: (3.00 TB/2.72 TiB)
    Jul 16 17:20:29 TomatGear kern.notice kernel: sd 0:0:0:0: [sda] Write Protect is off
    Jul 16 17:20:29 TomatGear kern.debug kernel: sd 0:0:0:0: [sda] Mode Sense: 2b 00 10 08
    Jul 16 17:20:29 TomatGear kern.err kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
    Jul 16 17:20:29 TomatGear kern.notice kernel: sd 0:0:0:0: [sda] 732566645 4096-byte logical blocks: (3.00 TB/2.72 TiB)
    Jul 16 17:20:29 TomatGear kern.err kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
    Jul 16 17:20:29 TomatGear kern.info kernel:  sda: sda1
    Jul 16 17:20:29 TomatGear kern.notice kernel: sd 0:0:0:0: [sda] 732566645 4096-byte logical blocks: (3.00 TB/2.72 TiB)
    Jul 16 17:20:29 TomatGear kern.err kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
    Jul 16 17:20:29 TomatGear kern.notice kernel: sd 0:0:0:0: [sda] Attached SCSI disk
    Jul 16 17:20:32 TomatGear user.info hotplug[2116]: USB ntfs fs at /dev/sda1 mounted on /tmp/mnt/BACKUP
    Jul 16 17:20:32 TomatGear kern.warn kernel: ufsd: sda1 is mounted as NTFS (without journal)
    Jul 16 17:20:35 TomatGear user.info hotplug[2138]: USB partition at /dev/sda1 already mounted on /tmp/mnt/BACKUP
     
    Last edited: Jul 16, 2017
  2. bjlockie

    bjlockie LI Guru Member

    Try a different USB connection.
    My router has a USB2 port and a USB3 port.
     
  3. bjlockie

    bjlockie LI Guru Member

    https://www.snbforums.com/threads/rt-ac68u-wd-my-passport-2tb-usb-3-0-problem.18548/
    https://ubuntuforums.org/archive/index.php/t-1642641.html

    >It's a kernel bug in the USB 3 code. The USB xhci driver was disabling the USB 3 port in such a way that it couldn't detect a SuperSpeed device, so that when the device was connected it was only detected as a High-Speed (480Mbps, USB 2 speed) device.
    >
    >The fix appears to have gone into the kernel in version 2.6.37-rc5, in commit 435a5aebf609624bdf7c5a9a7705c260d0076195 - see the changelog (http://www.kernel.org/pub/linux /kernel/v2.6/testing/ChangeLog-2.6.37-rc5) for details.

    The kernel of tomato appears to be 2.6.36.4 so it probably has lots of USB bugs.

    Just a guess but it wouldn't surpise me it has USB problems.
     
  4. Elfew

    Elfew Network Guru Member

  5. bjlockie

    bjlockie LI Guru Member

    Then I don't know.
    Does the drive work on a recent linux as USB3 (boot linux from a USB flash on your desktop).
     
  6. Tordenflesk

    Tordenflesk Addicted to LI Member

    Testing Kille72's build now.
    I'm unable to definitely confirm that USB3's working (log output's entirely foreign to me), but I'm getting about 12MB/s avg. currently so I'm guessing not.

    One of the reasons for replacing my AC66U was USB3 and the Paragon NTFS driver. Would EXT2/3/4 be faster? The same drive was formatted EXT2 when connected to the AC66U and got around 10MB/s
     
  7. Sean B.

    Sean B. Addicted to LI Member

    I've backported a ton of xhci patches into my personal builds, as the first USB 3.0 external HD dock I was using was getting the same issues showing in the log. None of them managed to actually get it to work. I bought an external enclosure with a higher end name-brand chipset instead of the bargin ones off ebay and xhci worked fine with it. However, the 3.0 speeds these routers manage to pull ended up not far enough above 2.0 IMHO to justify the jump in 2.4ghz radio interference it causes.
     
  8. Sean B.

    Sean B. Addicted to LI Member

    What are you using to check speeds? I'd recommend against file transfers as a basis. Use hdparm in a router shell and test the speeds of the drive directly. Also suggest using the --direct flag.. this bypasses the cache for read timings so all results are strictly transfer speed.

    Code:
    root@Storage:/tmp/home/root# hdparm -t --direct /dev/sda
    
    /dev/sda:
     Timing O_DIRECT disk reads:  94 MB in  3.06 seconds =  30.70 MB/sec
    root@Storage:/tmp/home/root#
    To see what driver is being used for the drive, and therefor whether or not it's recognized as 2.0 or 3.0, run lsmod in a shell and see which driver is show in the "used by" column of the usb_core module.


    root@Storage:/tmp/home/root# lsmod
    Module Size Used by Tainted: P
    ipt_web 1653 0
    nls_cp437 4474 0
    ip6table_filter 750 1
    ip6table_mangle 934 1
    xt_length 769 2
    xt_recent 6394 4
    nf_conntrack_ipv6 8583 4
    ehci_hcd 31597 0
    tntfs 439769 0
    exfat 91281 0
    vfat 8509 0
    fat 43022 1 vfat
    ext4 221882 3
    crc16 1007 1 ext4
    jbd2 48989 1 ext4
    mbcache 4599 1 ext4
    usb_storage 27130 4
    usb_libusual 9305 1 usb_storage
    sd_mod 21983 6
    scsi_wait_scan 416 0
    scsi_mod 108730 2 usb_storage,sd_mod
    usbcore 101702 4 ehci_hcd,usb_storage,usb_libusual
    nf_nat_pptp 1602 0
    nf_conntrack_pptp 3355 1 nf_nat_pptp
    nf_nat_proto_gre 887 1 nf_nat_pptp
    nf_conntrack_proto_gre 3228 1 nf_conntrack_pptp
    wl 3925788 0
    et 61321 0
    igs 11887 1 wl
    emf 14973 2 wl,igs
    root@Storage:/tmp/home/root#
     
  9. Tordenflesk

    Tordenflesk Addicted to LI Member

    Real world test moving large files over SMB using TeraCopy.
    Code:
    root@TomatGear:/tmp/home/root# hdparm -t --direct /dev/sda
    -sh: hdparm: not found
    Code:
    usbcore               101702  4 xhci_hcd,ehci_hcd,usb_storage
     
    Last edited: Jul 17, 2017
  10. Sean B.

    Sean B. Addicted to LI Member

    Sorry, keep forgetting not everyone runs optware. I made a tarball with the binary and static libraries, here's a link

    Nevermind on that, the elf versioning wont cross over. You can download the source and compile if you like. Or setup optware and install via package manager, hdparm is on the repo's. It's really the only way to test drive speeds.. file transfers have way too many other variables that can make huge differences in test results.
     
  11. Sean B.

    Sean B. Addicted to LI Member

    How is that a real world test of the USB 3.0 speed? With file transfers you have no idea what speed you're getting ( our could get ) from the drive. You have buffers in play, sockets and socket options, not to mention the receiving end and what speed it accepts.. plus everything in the middle. Until you test the drive itself, those numbers really don't mean anything in regards to USB 3.0 performance.
     
  12. Tordenflesk

    Tordenflesk Addicted to LI Member

    Real world, as in the end result. Actual use-case.
    Code:
    usbcore               101702  4 ehci_hcd,xhci_hcd,usb_storage
    Code:
    root@TomatGear:/tmp/home/root# hdparm -t --direct /dev/sda
    
    /dev/sda:
     Timing O_DIRECT disk reads: 232 MB in  3.02 seconds =  76.81 MB/sec
     
  13. Sean B.

    Sean B. Addicted to LI Member

    Real world for network transfer speed.. not for usb 3.0 speed. Your 3.0 drive could be operating with a read speed of 100MB/s yet a file transfer could show you 5MB/s, due to any number of causes that have nothing to do with the performance your 3.0 drive is delivering. Sorry, I just don't see the logic in calling speeds seen from a file transfer a real world test for usb 3.0 drive performance, .. at all.
     
  14. Elfew

    Elfew Network Guru Member

    @Sean B. - are there any important "changes" missing in kille72's repo? I mean the backported changes, thx! If yes, can you create a PR?
     
  15. Sean B.

    Sean B. Addicted to LI Member

    None of the ones I backported from kernels 2.6.37 and .38 made any improvements in speed. But I'll take a look and see if there's any I may suggest for compatibility in regards to devices.
     
  16. Elfew

    Elfew Network Guru Member

    Great, thank you!
     

Share This Page