Modify

Opened 8 years ago

Last modified 4 years ago

#6853 reopened defect

USB device not detected on power-on(timming problem?)

Reported by: nunojpg Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: kernel Version: Kamikaze trunk
Keywords: Cc:

Description

Current trunk on WRT160NL fails to detect (any) Huawei E169 modem on power-up.
The problem happens most of the times router is plugged to power, while only in a few times it detects the modem.
The problem doesn't happen if the modem is inserted after boot.
The problem doesn't happen after a reboot command.

Other modems(like Huawei E220,E156,E160) or distributions never showed this behaviour.
It is some kind of incompability between E169 and openwrt EHCI.

On power-on(device not discovered):

root@OpenWrt:/# cat /sys/kernel/debug/usb/ehci/ar71xx-ehci/registers
bus platform, device ar71xx-ehci
Atheros AR91xx built-in EHCI controller
EHCI 1.00, hcd state 1
structural params 0x00010011
capability params 0x00000006
status 0088 FLR
command 010009 (park)=0 ithresh=1 period=256 RUN
intrenable 37 IAA FATAL PCD ERR INT
uframe 0878
port 1 status c001000 POWER sig=se0
irq normal 0 err 0 reclaim 0 (lost 0)
complete 0 unlink 0

On restart(device discovered):

root@OpenWrt:/# cat /sys/kernel/debug/usb/ehci/ar71xx-ehci/registers
bus platform, device ar71xx-ehci
Atheros AR91xx built-in EHCI controller
EHCI 1.00, hcd state 1
structural params 0x00010011
capability params 0x00000006
status 40088 FLR
command 010009 (park)=0 ithresh=1 period=256 RUN
intrenable 37 IAA FATAL PCD ERR INT
uframe 2f18
port 1 status 001805 POWER sig=j PE CONNECT
irq normal 13 err 0 reclaim 5 (lost 0)
complete 13 unlink 0

Attachments (0)

Change History (9)

comment:1 in reply to: ↑ description Changed 8 years ago by nunojpg

well formated now, sorry.

> On power-on(device not discovered):
>
> root@OpenWrt:/# cat /sys/kernel/debug/usb/ehci/ar71xx-ehci/registers
> bus platform, device ar71xx-ehci
> Atheros AR91xx built-in EHCI controller
> EHCI 1.00, hcd state 1
> structural params 0x00010011
> capability params 0x00000006
> status 0088 FLR
> command 010009 (park)=0 ithresh=1 period=256 RUN
> intrenable 37 IAA FATAL PCD ERR INT
> uframe 0878
> port 1 status c001000 POWER sig=se0
> irq normal 0 err 0 reclaim 0 (lost 0)
> complete 0 unlink 0
>
> On restart(device discovered):
>
> root@OpenWrt:/# cat /sys/kernel/debug/usb/ehci/ar71xx-ehci/registers
> bus platform, device ar71xx-ehci
> Atheros AR91xx built-in EHCI controller
> EHCI 1.00, hcd state 1
> structural params 0x00010011
> capability params 0x00000006
> status 40088 FLR
> command 010009 (park)=0 ithresh=1 period=256 RUN
> intrenable 37 IAA FATAL PCD ERR INT
> uframe 2f18
> port 1 status 001805 POWER sig=j PE CONNECT
> irq normal 13 err 0 reclaim 5 (lost 0)
> complete 13 unlink 0

comment:2 Changed 8 years ago by Robin Lutz <robin.m.lutz@…>

i have the same setup, and so this problem. if you need any information/ a tester, contact me.

comment:3 Changed 5 years ago by florian

Is this still an issue with current trunk?

comment:4 Changed 5 years ago by nbd

  • Resolution set to no_response
  • Status changed from new to closed

comment:5 Changed 5 years ago by Theo Markettos <openwrt@…>

  • Resolution no_response deleted
  • Status changed from closed to reopened

I'm experiencing this on a TL-WR841N v7.2 (AR7241 chipset, same AR71xx drivers), r34498, kernel 3.6.8. This is a router I've added an internal USB port to (which seems to be otherwise reliable). I've been having difficulty with a selection (six) of mass storage devices - USB sticks and SD card readers. Most of them were generic no-brand devices, but one was a 2GB Kingston DataTraveler II Plus Migo. I was using everything on the end of a 0.8m USB extension cable to make sure there were no loose connections I was disturbing. Normally bad connections show up as USB read errors (-71 is common), so I think the wiring is good.

I think there are potentially two issues here. One is power related. I don't know the device in the OP, but I looked at the power rails of a card reader with a scope when it powered up and I was seeing glitches. I added some more decoupling on the power rails and they went away. 3G dongles tend to be quite power hungry (much more than card readers), and it's possible it's causing voltage dropouts when it tries to start the radio. It may be that the power load on boot is worse than the power load when the system has settled down.

But, after eliminating power issues, I'm still seeing the problem that a USB device usually doesn't initialise if the router is powered up with it plugged in, but will do if it's hotplugged afterwards. One of the Chinese no-brand card readers gives a brief flicker on its LED every few seconds, while normally the LED comes full on when it initialises. I tried some freezer spray in case it was thermal, but no difference. It does feel like some kind of race condition.

When a device isn't detected:

# cat /sys/kernel/debug/usb/ehci/ehci-platform/registers
bus platform, device ehci-platform
Generic Platform EHCI Controller
EHCI 1.00, rh state running
structural params 0x00010011
capability params 0x00000006
status 0088 FLR
command 0010005 (park)=0 ithresh=1 period=512 RUN
intrenable 37 IAA FATAL PCD ERR INT
uframe 27a0
port:1 status c001000 6 ACK POWER sig=se0
irq normal 0 err 0 iaa 0 (lost 0)
complete 0 unlink 0

When it is:
root@OpenWrt:/# cat /sys/kernel/debug/usb/ehci/ehci-platform/registers
bus platform, device ehci-platform
Generic Platform EHCI Controller
EHCI 1.00, rh state running
structural params 0x00010011
capability params 0x00000006
status 40088 PPCE FLR
command 0010005 (park)=0 ithresh=1 period=512 RUN
intrenable 37 IAA FATAL PCD ERR INT
uframe 3020
port:1 status 8001205 4 ACK POWER sig=se0 LPM PE CONNECT
irq normal 64 err 0 iaa 15 (lost 0)
complete 64 unlink 0

Boot messages when present but not detected:
[ 3.030000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 3.040000] ehci_hcd: block sizes: qh 60 qtd 96 itd 160 sitd 96
[ 3.040000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[ 3.040000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 3.050000] ehci-platform ehci-platform: reset hcs_params 0x10011 dbg=0 ind cc=0 pcc=0 ordered po1
[ 3.050000] ehci-platform ehci-platform: reset hcc_params 0006 thresh 0 uframes 256/512/1024 park
[ 3.050000] ehci-platform ehci-platform: park 0
[ 3.050000] ehci-platform ehci-platform: reset command 0080b02 park=3 ithresh=8 period=1024 ReseT
[ 3.050000] ehci-platform ehci-platform: ...powerdown ports...
[ 3.080000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[ 3.080000] ehci-platform ehci-platform: init command 0010005 (park)=0 ithresh=1 period=512 RUN
[ 3.100000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 3.100000] usb usb1: default language 0x0409
[ 3.100000] usb usb1: udev 1, busnum 1, minor = 0
[ 3.100000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 3.110000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.120000] usb usb1: Product: Generic Platform EHCI Controller
[ 3.120000] usb usb1: Manufacturer: Linux 3.6.8 ehci_hcd
[ 3.130000] usb usb1: SerialNumber: ehci-platform
[ 3.130000] usb usb1: usb_probe_device
[ 3.130000] usb usb1: configuration #1 chosen from 1 choice
[ 3.130000] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[ 3.130000] hub 1-0:1.0: usb_probe_interface
[ 3.130000] hub 1-0:1.0: usb_probe_interface - got id
[ 3.130000] hub 1-0:1.0: USB hub found
[ 3.140000] hub 1-0:1.0: 1 port detected
[ 3.140000] hub 1-0:1.0: standalone hub
[ 3.140000] hub 1-0:1.0: individual port power switching
[ 3.140000] hub 1-0:1.0: individual port over-current protection
[ 3.140000] hub 1-0:1.0: Single TT
[ 3.140000] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
[ 3.140000] hub 1-0:1.0: power on to power good time: 20ms
[ 3.140000] hub 1-0:1.0: local power source is good
[ 3.140000] hub 1-0:1.0: enabling power on all ports
[ 3.140000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 3.150000] ohci_hcd: block sizes: ed 64 td 64
snip...
[ 15.560000] Initializing USB Mass Storage driver...
[ 15.560000] usbcore: registered new interface driver usb-storage
[ 15.570000] USB Mass Storage support registered.

When not present at all:
[ 3.030000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 3.040000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[ 3.040000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 3.080000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[ 3.100000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 3.100000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 3.110000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 3.120000] usb usb1: Product: Generic Platform EHCI Controller
[ 3.120000] usb usb1: Manufacturer: Linux 3.6.8 ehci_hcd
[ 3.130000] usb usb1: SerialNumber: ehci-platform
[ 3.130000] hub 1-0:1.0: USB hub found
[ 3.140000] hub 1-0:1.0: 1 port detected
[ 3.140000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
snip...
[ 12.710000] Initializing USB Mass Storage driver...
[ 12.720000] usbcore: registered new interface driver usb-storage
[ 12.720000] USB Mass Storage support registered.
(no extra output when hotplug)
Then comes up later:
[ 356.370000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 356.520000] usb 1-1: New USB device found, idVendor=0951, idProduct=1601
[ 356.530000] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 356.530000] usb 1-1: Product: DataTraveler II+
[ 356.540000] usb 1-1: Manufacturer: Kingston
[ 356.540000] usb 1-1: SerialNumber: 5B731C88C30E
[ 356.550000] scsi0 : usb-storage 1-1:1.0
[ 357.560000] scsi 0:0:0:0: Direct-Access Kingston DataTraveler II+ PMAP PQ: 0 ANSI: 0 CCS
[ 357.890000] sd 0:0:0:0: [sda] 4029440 512-byte logical blocks: (2.06 GB/1.92 GiB)
[ 357.900000] sd 0:0:0:0: [sda] Write Protect is off
[ 357.900000] sd 0:0:0:0: [sda] No Caching mode page present
[ 357.910000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 357.920000] sd 0:0:0:0: [sda] No Caching mode page present
[ 357.920000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 357.930000] sda: sda1 sda2
[ 357.940000] sd 0:0:0:0: [sda] No Caching mode page present
[ 357.950000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 357.950000] sd 0:0:0:0: [sda] Attached SCSI removable disk

Interesting the difference about hub detection - might that be related in some way?

Am happy to test things (best to email me - openwrt@<lastname>.org.uk as I might not see this thread)

comment:6 Changed 5 years ago by Theo Markettos <openwrt@…>

The above was trunk=r34498 btw.

comment:7 Changed 5 years ago by Theo Markettos <openwrt@…>

Noticed there were some ar71xx changes so went up to 3.6.9 (trunk r34586) with no change. I should mention I'm using this http://mysicka.ics.muni.cz/openwrt/usb-patch-final.patch patch to enable USB on the TL-WR841N.

comment:8 Changed 4 years ago by razvan.dragomirescu@…

I am experiencing the exact same issue on a RT5350-based board, with kernel 3.8.13. I've posted a new thread on the forums http://forum.openwrt.org/viewtopic.php?id=47796 .

comment:9 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.