Modify

Opened 5 years ago

Closed 21 months ago

#9351 closed defect (fixed)

usb2 doesn't work on brcm63xx

Reported by: anonymous Owned by: florian
Priority: high Milestone: Chaos Calmer 15.05
Component: kernel Version: Backfire 10.03.1 RC4
Keywords: usb2, brcm63xx, agpf, ohci Cc:

Description

Hello, if booting with ohci-hcd disabled, my HD connected to usb port of Alige Gate Voip 2 Plus Wifi ( brcm63xx ) is not recognized; see the dmesg log:

usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
bcm63xx_ehci bcm63xx_ehci.0: BCM63XX integrated EHCI controller
bcm63xx_ehci bcm63xx_ehci.0: new USB bus registered, assigned bus number 1
bcm63xx_ehci bcm63xx_ehci.0: irq 18, io mem 0xfffe1300
bcm63xx_ehci bcm63xx_ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
nf_conntrack version 0.5.0 (466 buckets, 1864 max)
hub 1-0:1.0: over-current change on port 2
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.

Then when I insmod ohci-hcd, HD is mounted and works correctly, but then performance are poor because of the usb 1.1:

ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
bcm63xx_ohci bcm63xx_ohci.0: BCM63XX integrated OHCI controller
bcm63xx_ohci bcm63xx_ohci.0: new USB bus registered, assigned bus number 2
bcm63xx_ohci bcm63xx_ohci.0: irq 13, io mem 0xfffe1400
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usb 2-1: new full speed USB device using bcm63xx_ohci and address 2
usb 2-1: not running at top speed; connect to a high speed hub
usb 2-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
scsi 0:0:0:0: Direct-Access     Generic  USB Disk         9.02 PQ: 0 ANSI: 2
usb-storage: device scan complete
sd 0:0:0:0: [sda] 156301488 512-byte logical blocks: (80.0 GB/74.5 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1 sda2 sda3
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI disk
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
Adding 131064k swap on /dev/sda3.  Priority:-1 extents:1 across:131064k

I'm using backfire branch r26774

Attachments (0)

Change History (37)

comment:1 Changed 5 years ago by zaic20@…

try to install kmod-usb-storage and kmod-usb-storage-extras

--zaic

comment:2 Changed 5 years ago by florian

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

comment:3 Changed 5 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

why have you closed the ticket? I posted two logs that demontrate it doesn't works. I tried also installing kmod-usb-storage-extras, but hd is recognized only in usb 1.1.

Regards

comment:4 Changed 5 years ago by anonymous

Did you install kmod-usb2?

comment:5 Changed 5 years ago by anonymous

yes I did

comment:6 Changed 5 years ago by Elphidium

Your hard drive has a cable ? if it has, change it or try another usb hd or flash and post the logs.

comment:7 Changed 4 years ago by anonymous

I have exactly the same problem on a huawei hg553 with a snapshot from December 11th 2011, it works with ohci but it does not work with usb2. Nevertheless, i have two more hg553 working perfectly (usb 2.0) with a snapshot from October 2nd 2011.

Best regards

comment:8 follow-up: Changed 4 years ago by florian

  • Resolution set to worksforme
  • Status changed from reopened to closed

You need both ohci-hcd and ehci-hcd for the EHCI controller to work afaik, so this is not an issue.

comment:9 in reply to: ↑ 8 Changed 4 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Replying to florian:

You need both ohci-hcd and ehci-hcd for the EHCI controller to work afaik, so this is not an issue.

Yes, it is an issue because the usb device works ONLY at usb 1.1 when hardware is usb 2.0 capable. And I want to remark that my other two routers, which are exactly the same as this one, are running at USB 2.0, but with a October snapshot.

Differences between logs when device is running at 2.0 or running running at 1.1:

new full speed USB device number 2 using bcm63xx_ohci

new high speed USB device number 3 using bcm63xx_ehci

As you can see at the log below, usb device is detected, but "not running at full speed"

[ 145.796000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 145.804000] bcm63xx_ehci bcm63xx_ehci.0: BCM63XX integrated EHCI controller
[ 145.812000] bcm63xx_ehci bcm63xx_ehci.0: new USB bus registered, assigned bus number 1
[ 145.844000] bcm63xx_ehci bcm63xx_ehci.0: irq 18, io mem 0xfffe1300
[ 145.860000] bcm63xx_ehci bcm63xx_ehci.0: USB 2.0 started, EHCI 1.00, overcurrent ignored
[ 145.868000] hub 1-0:1.0: USB hub found
[ 145.872000] hub 1-0:1.0: 2 ports detected
[ 239.876000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 239.880000] bcm63xx_ohci bcm63xx_ohci.0: BCM63XX integrated OHCI controller
[ 239.888000] bcm63xx_ohci bcm63xx_ohci.0: new USB bus registered, assigned bus number 2
[ 239.896000] bcm63xx_ohci bcm63xx_ohci.0: irq 13, io mem 0xfffe1400
[ 239.964000] hub 2-0:1.0: USB hub found
[ 239.968000] hub 2-0:1.0: 1 port detected
[ 338.240000] usb 2-1: new full speed USB device number 2 using bcm63xx_ohci
[ 338.396000] usb 2-1: not running at top speed; connect to a high speed hub
[ 338.428000] scsi0 : usb-storage 2-1:1.0
[ 339.436000] scsi 0:0:0:0: Direct-Access Kingston DataTraveler G2 1.00 PQ: 0 ANSI: 2
[ 339.468000] sd 0:0:0:0: [sda] 31252024 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 339.484000] sd 0:0:0:0: [sda] Write Protect is off
[ 339.488000] sd 0:0:0:0: [sda] Mode Sense: 16 24 09 51
[ 339.496000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 339.528000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 339.544000] sda: sda1
[ 339.568000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 339.576000] sd 0:0:0:0: [sda] Attached SCSI removable disk

Neverthlees, the same usb device connected to my other router works at full speed:

Log:

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
bcm63xx_ehci bcm63xx_ehci.0: BCM63XX integrated EHCI controller
bcm63xx_ehci bcm63xx_ehci.0: new USB bus registered, assigned bus number 1
bcm63xx_ehci bcm63xx_ehci.0: irq 18, io mem 0xfffe1300
bcm63xx_ehci bcm63xx_ehci.0: USB 2.0 started, EHCI 1.00, overcurrent ignored
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb 1-2: new high speed USB device number 3 using bcm63xx_ehci
scsi1 : usb-storage 1-2:1.0
scsi 1:0:0:0: Direct-Access Kingston DataTraveler G2 1.00 PQ: 0 ANSI: 2
sd 1:0:0:0: [sda] 31252024 512-byte logical blocks: (16.0 GB/14.9 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 16 24 09 51
sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Assuming drive cache: write through

sda: sda1

sd 1:0:0:0: [sda] Assuming drive cache: write through
sd 1:0:0:0: [sda] Attached SCSI removable disk

Best regards

comment:10 Changed 4 years ago by florian

I you know the snapshot from october works, then just find out what's the problem between october and now.

comment:11 Changed 4 years ago by anonymous

using r27128, same problem:

usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
bcm63xx_ehci bcm63xx_ehci.0: BCM63XX integrated EHCI controller
bcm63xx_ehci bcm63xx_ehci.0: new USB bus registered, assigned bus number 1
bcm63xx_ehci bcm63xx_ehci.0: irq 18, io mem 0xfffe1300
bcm63xx_ehci bcm63xx_ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
bcm63xx_ohci bcm63xx_ohci.0: BCM63XX integrated OHCI controller
bcm63xx_ohci bcm63xx_ohci.0: new USB bus registered, assigned bus number 2
bcm63xx_ohci bcm63xx_ohci.0: irq 13, io mem 0xfffe1400
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
hub 1-0:1.0: over-current change on port 1
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb 2-1: new full speed USB device using bcm63xx_ohci and address 2
usb 2-1: not running at top speed; connect to a high speed hub
scsi0 : usb-storage 2-1:1.0
scsi 0:0:0:0: Direct-Access     USB      Flash Disk       1100 PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: [sda] 7831552 512-byte logical blocks: (4.00 GB/3.73 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk

neufbox4 (NB4-SER-r0)
anyone solve this issue ?

comment:12 Changed 4 years ago by anonymous

More infos...

dvb-usb: found a 'Pinnacle 400e DVB-S USB2.0' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-pctv-400e-01.fw'
usb 2-1: USB disconnect, address 2
usbcore: registered new interface driver dvb_usb_ttusb2
dvb-usb: generic DVB-USB module successfully deinitialized and disconnected.
usb 2-1: new full speed USB device using bcm63xx_ohci and address 3
usb 2-1: not running at top speed; connect to a high speed hub
dvb-usb: found a 'Pinnacle 400e DVB-S USB2.0' in warm state.
dvb-usb: This USB2.0 device cannot be run on a USB1.1 port. (it lacks a hardware PID filter)
dvb-usb: Pinnacle 400e DVB-S USB2.0 error while loading driver (-19)
root@OpenWrt:/# lsmod |grep usb
dvb_usb_ttusb2          9712  0 
dvb_usb                16272  1 dvb_usb_ttusb2
dvb_core               68416  1 dvb_usb
rc_core                12400  2 dvb_usb_ttusb2,dvb_usb
i2c_core               11904  5 tda826x,tda10086,lnbp21,dvb_usb,i2c_dev
input_core             19440  5 dvb_usb,rc_core,gpio_buttons,input_polldev
usb_storage            33328  0 
usbcore                97984  6 dvb_usb_ttusb2,dvb_usb,usb_storage,ohci_hcd,ehci_hcd
scsi_mod               70208  3 sg,usb_storage,sd_mod
nls_base                4576  5 vfat,fat,nls_iso8859_1,nls_cp437,usbcore
root@OpenWrt:/# cat /proc/bus/usb/devices 

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 1
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 2.06
S:  Manufacturer=Linux 2.6.37.6 ohci_hcd
S:  Product=BCM63XX integrated OHCI controller
S:  SerialNumber=bcm63xx
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2304 ProdID=020f Rev= 1.00
S:  Manufacturer=Pinnacle
S:  Product=PCTV 400e
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 2.06
S:  Manufacturer=Linux 2.6.37.6 ehci_hcd
S:  Product=BCM63XX integrated EHCI controller
S:  SerialNumber=bcm63xx
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

OpenWRT r27128

comment:13 Changed 4 years ago by anonymous

anyone solve this issue?

comment:14 Changed 4 years ago by MvsC

I don't know which is the revision that has usb2 working but i have tested a lot of different revisions (even the 28352 that should be the working one) and i have always the same result on my hg553, 1 port is working with 1.1 and the other one just does nothing (no activity on dmesg) but is powered. With the original firmware usb is working fine (correctly detected usb2 device on dmesg)

Maybe a different pcb version from the other guy?, ask if you need more info.

And yes kmod-usb2 is installed...

comment:15 Changed 4 years ago by sanzojn@…

last revision from svn of stable backfire:
in my HG553 usb2.0 doesn't work, kmod-usb2, ohci-hcd, ehci-hcd, usb_storage,uhci_hcd are installed....

comment:16 Changed 4 years ago by florian

  • Owner changed from developers to florian
  • Status changed from reopened to accepted

Also try if trunk is working please.

comment:17 Changed 4 years ago by sanzojn@…

tryed with revision 30891 of attitude adjustment, nothing, same problem and mac80211 error (with the same .config used in the stable image).

this is the config: http : www.mediafire.com/?9m7lzorck0janum

comment:18 Changed 4 years ago by MvsC

i can confirm that trunk is not working, same issue of my last post on my HG553

comment:19 Changed 4 years ago by anonymous

@sanzojn
the usb port near the ethernet ports is working on your router?

comment:20 Changed 4 years ago by sanzojn@…

No, the USB near Ethernet (usb 2.0) doesn't work....

comment:21 Changed 4 years ago by MvsC

Partial firmware source of the HG553 can be found at:

hp://forum.huawei.com/jive4/thread.jspa?threadID=324322

registration needed

comment:22 Changed 4 years ago by jogo

I just tried on my NB4(-SER-noidea) with current trunk, 3.0.18 and it seems to be working fine (on both USB ports):

[   35.364000] usb 1-2: new high speed USB device number 2 using bcm63xx_ehci
[   35.520000] scsi0 : usb-storage 1-2:1.0
[   36.528000] scsi 0:0:0:0: Direct-Access     VBTM     Store'n'go       6.51 PQ: 0 ANSI: 0 CCS
[   36.544000] sd 0:0:0:0: [sda] 3903487 512-byte logical blocks: (1.99 GB/1.86 GiB)
[   36.560000] sd 0:0:0:0: [sda] Write Protect is off
[   36.572000] sd 0:0:0:0: [sda] No Caching mode page present
[   36.576000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   36.596000] sd 0:0:0:0: [sda] No Caching mode page present
[   36.600000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   36.616000]  sda: sda1
[   36.632000] sd 0:0:0:0: [sda] No Caching mode page present
[   36.636000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   36.644000] sd 0:0:0:0: [sda] Attached SCSI removable disk
root@OpenWrt:/dev# time dd if=/dev/sda of=/dev/null
3903487+0 records in
3903487+0 records out
real    3m 41.37s
user    0m 10.14s
sys     1m 32.99s

which is about 9.5 MB/s (so definitely USB2 speed).

comment:23 Changed 4 years ago by sanzojn@…

just tryed with latest revision of attitude adjustment (r30913), kernel 3.0.18

root@OpenWrt:/# dmesg | grep ehci
[   61.200000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   61.204000] bcm63xx_ehci bcm63xx_ehci.0: BCM63XX integrated EHCI controller
[   61.212000] bcm63xx_ehci bcm63xx_ehci.0: new USB bus registered, assigned bus number 1
[   61.244000] bcm63xx_ehci bcm63xx_ehci.0: irq 18, io mem 0xfffe1300
[   61.260000] bcm63xx_ehci bcm63xx_ehci.0: USB 2.0 started, EHCI 1.00, overcurrent ignored
root@OpenWrt:/#

when i plug usb it doesn't recognize....
this is my config: .config

comment:24 Changed 4 years ago by protomax

Greetings, i created a thread and added some debug info about this issue:

https://forum.openwrt.org/viewtopic.php?id=35516

r30950 with USB_CONFIG_DEBUG enabled

comment:25 Changed 4 years ago by sanzojn@…

Anyone knows what revision were in October? i've tryed backfire rev29592 and rev26931 but i have the same problem: when i plug usb in the usb 2.0 i have no messages from kernel, usb 1.1 works well....

comment:26 Changed 4 years ago by danitool <dgcbueu@…>

I'm also having troubles with the usb. Plugging an usb device in the usb 1.1 port doesn't return any kernel message, but the other two usb 2.0 ports always work, even when I only configure the board with OHCI only. And more weird behaviors I won't explain.

The fact is, there is something wrong with the usb drivers/modules in bcm6358 boards.

comment:27 Changed 4 years ago by sanzojn@…

Good news for HG553 owner: https://forum.openwrt.org/viewtopic.php?pid=162684#p162684

usb 2.0 and 1.1 works

comment:28 Changed 4 years ago by rway07@…

Now we must understand why usb2 port work putting the b21 firmware before openwrt.

comment:29 follow-up: Changed 4 years ago by danitool <dgcbueu@…>

Maybe the reason is some CP0 register activated by the CFE.

It can be checked dumping some CP0 registers via Openwrt first using one CFE, and then using the CFE included in the b21. The differences would show the register that are responsible of this behavior.

comment:30 in reply to: ↑ 29 Changed 4 years ago by anonymous

Replying to danitool <dgcbueu@…>:

Maybe the reason is some CP0 register activated by the CFE.

It can be checked dumping some CP0 registers via Openwrt first using one CFE, and then using the CFE included in the b21. The differences would show the register that are responsible of this behavior.

If you can explain how to dump registers i can try..
my mail: sanzojn [at] hotmail [dot] com

comment:31 Changed 4 years ago by protomax

To get usb2 work, openwrt must be installed from b21 firmware update page, but stops working after powering down the router.

@danitool: maybe i don't understand what do you mean, but AFAIK cfe is not replaced on older versions like b21, same goes for openwrt, maybe you mean that firmware is setting some registers at boot time, well this could explain the problem, are CP0 registers volatile?

comment:32 Changed 4 years ago by danitool <dgcbueu@…>

Yes, CP0 registers are volatile, but as Florian said elsewhere those CP0 registers are for the processor, not for USB stuff. Then this shouldn't be the problem.

Might be a gpio driving current to the usb. A GPIO can be activated either by CFE or the firmware itself.

I still didn't discovered anything which makes sense. so who knows...

comment:33 Changed 3 years ago by DavidTamuna@…

I compiled latest trunk (Bleeding Edge, r34940) for HG553

with kmod-usb2, ohci-hcd,usb_storage,uhci_hcd

and only one port above router works as 1.1, but Usb near power supply does not :@
But I can not get Usb 2.0 working... Strange Problem ...

did someone manage to solve this problem ?

comment:34 Changed 2 years ago by protomax

I tested 2 routers with a clean ATTITUDE ADJUSTMENT (12.09, r36088) and both ports are working fine, always.

comment:35 Changed 2 years ago by protomax

same as #11200

comment:36 Changed 21 months ago by jow

  • Milestone changed from Backfire 10.03.2 to Chaos Calmer (trunk)

Milestone Backfire 10.03.2 deleted

comment:37 Changed 21 months ago by florian

  • Resolution set to fixed
  • Status changed from accepted to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.