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

FS#2567 - [ATH79] USB speed degradation on WDR4300 #7548

Open
openwrt-bot opened this issue Oct 25, 2019 · 8 comments
Open

FS#2567 - [ATH79] USB speed degradation on WDR4300 #7548

openwrt-bot opened this issue Oct 25, 2019 · 8 comments
Labels
flyspray kernel pull request/issue with Linux kernel related changes release/19.07 pull request/issue targeted (also) for OpenWrt 19.07 release

Comments

@openwrt-bot
Copy link

vinibali:

Hello!

I experience huge speed loss on the lastest build (Thu Oct 24 21:58:18 2019) using the ath79 snapshot image builder. I had the same problem on the ~2 weeks earlier build as well, just wanted to have a try on the up to date version now.
Built configuration on both 18.04.6 and 19.07:
PROFILE=tplink_tl-wdr4300-v1 PACKAGES="block-mount diffutils f2fs-tools kmod-fs-f2fs kmod-mtd-rw kmod-usb-storage luci mailsend-nossl minidlna nfs-kernel-server ppp-mod-pppoe shadow-su transmission-daemon-mbedtls transmission-remote-mbedtls vsftpd usbreset zram-swap -ip6tables -kmod-ip6tables -kmod-ipv6 -kmod-nf-conntrack6 -kmod-nf-ipt6 -libopenssl1.1 -odhcp6c -odhcpd-ipv6only -luci-proto-ipv6 -libip6tc2"

Drive: Kingston DT G3 32GB (old one, better quality with Intel MLC flash)
Firewall: w and w/o flow offload on 19.07
Model: TP-Link WDR4300 v1

File read speeds:
18.06.4 orig vstpd 542M 75s 7,2MB/s
18.06.4 pepe2k vstpd 542M 64s 7,2MB/s
19.07 pepe2k vstpd 542M 543s 1,0MB/s
19.07 pepe2k dd+nc 256M 321s 0,8MB/s

  • During the measurement, no root overlay was in use, just a general filesystem was attached
  • lower speeds are really close to USB 1.x standard
  • measurements took on fresh installations
  • the degradation exists if only one drive is attached
  • the degradation exists on both filesystem and block level.

I'm using pepe2k's uboot image (CPU clocked to 600MHz). However I didn't revert the uboot partition now, I did for a few weeks, nothing has changed.

Let me know if I can help the troubleshooting anyway. Dmesg logs are attached for all mentioned configurations (18.06.4 orig, 18.06.4 pepe2k, 19.07 pepe2k).

Best regards

@openwrt-bot
Copy link
Author

vinibali:

tree view of lsusb
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 12M
|__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 12M
|__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 12M

verbose output from lsusb
Bus 001 Device 005: ID 0781:5583 SanDisk Corp. Ultra Fit
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0781 SanDisk Corp.
idProduct 0x5583 Ultra Fit
bcdDevice 1.00
iManufacturer 1 SanDisk
iProduct 2 Ultra Fit
iSerial 3 XXXXXXXX
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 224mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 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 0x0040 1x 64 bytes
bInterval 0
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 22
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 1
Lowest fully-functional device speed is Full Speed (12Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 256 micro seconds
Device Status: 0x0000
(Bus Powered)

Bus 001 Device 003: ID 13fe:5500 Kingston Technology Company Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x13fe Kingston Technology Company Inc.
idProduct 0x5500
bcdDevice 1.00
iManufacturer 1 Kingston
iProduct 2 DataTraveler 3.0
iSerial 3 XXXXXXXX
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 150mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 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 0x0040 1x 64 bytes
bInterval 0
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 22
bNumDeviceCaps 2
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
Link Power Management (LPM) Supported
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
wSpeedsSupported 0x000e
Device can operate at Full Speed (12Mbps)
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 2
Lowest fully-functional device speed is High Speed (480Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 2047 micro seconds
Device Status: 0x0000
(Bus Powered)

Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x05e3 Genesys Logic, Inc.
idProduct 0x0608 Hub
bcdDevice 85.36
iManufacturer 0
iProduct 1 USB2.0 Hub
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0001 1x 1 bytes
bInterval 255
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x00e9
Per-port power switching
Per-port overcurrent protection
Port indicators
bPwrOn2PwrGood 50 * 2 milli seconds
bHubContrCurrent 100 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.1103 indicator power enable connect
Port 2: 0000.1103 indicator power enable connect
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 4.19
iManufacturer 3 Linux 4.19.79 ehci_hcd
iProduct 2 EHCI Host Controller
iSerial 1 1b000000.usb
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 1
wHubCharacteristic 0x0009
Per-port power switching
Per-port overcurrent protection
TT think time 8 FS bits
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0103 power enable connect
Device Status: 0x0001
Self Powered

@openwrt-bot
Copy link
Author

vinibali:

The read and write speed are exactely the same with a Sandisk Ultra Fit (3.0), TDK Speedboard (2.0) and Transcend 790K (3.1).

@openwrt-bot
Copy link
Author

vinibali:

With ar71xx target and 19.07-RC1 USB throughput is normal, somewhere around 8-10MB/s.
In case of 19.07-RC1 and snapshot, ath79 is still broken.
Related forum topics:
[[https://forum.openwrt.org/t/usb-wdr4300-low-speed-on-external-storage/46794|[USB] WDR4300 low speed on external storage ]]

[[https://forum.openwrt.org/t/gcc-toolchain-downgrade-on-19-07-snapshot-and-rc1/48955|GCC toolchain downgrade on 19.07 snapshot and RC1]]

@openwrt-bot
Copy link
Author

jneuhauser:

Fix available and PR created on GitHub for master branch

#2630

Will do a second PR for 19.07 if this one get accepted.

@openwrt-bot
Copy link
Author

vinibali:

Hello Johann!

If you want, I'll test once a snapshot build is available.
Thanks for your time.

Regards

@openwrt-bot
Copy link
Author

jneuhauser:

Fix is accepted and snapshot builds are already build with included fixes...

PR for 19.07 is created #2683
Hopefully we get it into the 19.07.1 release.

@openwrt-bot
Copy link
Author

jneuhauser:

Fix is cherry-picked on the 19.07 branch and should be in the 19.07.2 release.

@openwrt-bot
Copy link
Author

vinibali:

Hello Johann, sorry for the so late answer.
19.07.7 is still affected witha somewhat different device [[https://bugs.openwrt.org/index.php?do=details&task_id=3862|FS#3862 - [ATH79][19.07.7] unstable USB on Archer C7 v1/v2/v4]]

@aparcar aparcar added release/19.07 pull request/issue targeted (also) for OpenWrt 19.07 release kernel pull request/issue with Linux kernel related changes labels Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray kernel pull request/issue with Linux kernel related changes release/19.07 pull request/issue targeted (also) for OpenWrt 19.07 release
Projects
None yet
Development

No branches or pull requests

2 participants