Modify

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#3365 closed enhancement (fixed)

Patch to add ssb multi-device support & ssb ehci driver

Reported by: sbrown Owned by: developers
Priority: normal Milestone:
Component: kernel Version:
Keywords: Cc:

Description

This patch adds support for the USB2.0 core found on the BCM5354. That core has both a ohci and ehci device.

The patch is against r10910.

Testing has been done using a 200Gb drive connected to the usb port on an ASUS wl520gu.

I've also included the usb device list and a boot log.

Steve

Attachments (4)

ssb-ehci-svn.patch (18.0 KB) - added by sbrown 10 years ago.
SSB USB2.0 Core support (ohci & ehci)
usb-devices.txt (1.4 KB) - added by sbrown 10 years ago.
usb device list
bootup.txt (8.1 KB) - added by sbrown 10 years ago.
boot log
ssb-ehci-25.patch (13.8 KB) - added by sbrown 10 years ago.
Revised patch that doesn't hack ssb core scanner

Download all attachments as: .zip

Change History (13)

Changed 10 years ago by sbrown

SSB USB2.0 Core support (ohci & ehci)

Changed 10 years ago by sbrown

usb device list

Changed 10 years ago by sbrown

boot log

comment:1 Changed 10 years ago by doggy

this patch works ok for usb-storage on kernel2.6
but after apply this patch, my uvc webcam became not working.
uvc-video-driver loaded ok,
but my uvc_stream cause an error report when it start.
and after that it exit immediately.

root@OpenWrt:~# /sbin/uvc_stream
Using V4L2 device: /dev/video0
Resolution.......: 640 x 480
frames per second: 5
TCP port.........: 8080
Unable to set format: 22.

Init v4L2 failed !! exit fatal

init_VideoIn failed

comment:2 Changed 10 years ago by sbrown

Please post /proc/bus/usb/devices.

comment:3 Changed 10 years ago by doggy

at this time, I have disabled ehci module in /etc/modules.d/50-usb2 and reboot
now it contains:

#ehci-hcd

without ehci-usb, uvc_stream works okey.

root@OpenWrt:~# /sbin/uvc_stream 
Using V4L2 device: /dev/video0
Resolution.......: 640 x 480
frames per second: 5
TCP port.........: 8080

then I push Ctrl+C

root@OpenWrt:~# /sbin/uvc_stream 
Using V4L2 device: /dev/video0
Resolution.......: 640 x 480
frames per second: 5
TCP port.........: 8080
shutdown...
shutdown...
shutdown...
root@OpenWrt:~# 

afterthen I loaded the ehci-usb with "insmod ehci-hcd"

root@OpenWrt:~# /sbin/uvc_stream 
Using V4L2 device: /dev/video0
Resolution.......: 640 x 480
frames per second: 5
TCP port.........: 8080
Unable to set format: 22.
 Init v4L2 failed !! exit fatal 
init_VideoIn failed
root@OpenWrt:~# 

here is my /proc/bus/usb/devices

root@OpenWrt:~# cat /proc/bus/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 2
B:  Alloc=  0/800 us ( 0%), #Int=  2, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.23.16 ssb-usb-ehci
S:  Product=SSB EHCI Controller
S:  SerialNumber=ssb0:1
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

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=05e3 ProdID=0608 Rev= 7.02
S:  Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=02 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=13fd ProdID=1040 Rev= 1.06
S:  Manufacturer=Initio
S:  Product=MHK2048AT       
S:  SerialNumber=0000000000000000W
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

T:  Bus=02 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(unk. ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0c45 ProdID=62c0 Rev= 1.00
S:  Manufacturer=Sonix Technology Co., Ltd.
S:  Product=USB 2.0 Camera
S:  SerialNumber=SN0001
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=0e(video) Sub=03 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#= 1 Alt= 1 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 128 Ivl=125us
I:  If#= 1 Alt= 2 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 256 Ivl=125us
I:  If#= 1 Alt= 3 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 800 Ivl=125us
I:  If#= 1 Alt= 4 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS=1600 Ivl=125us
I:  If#= 1 Alt= 5 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS=2400 Ivl=125us
I:  If#= 1 Alt= 6 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS=3000 Ivl=125us

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
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=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.23.16 ssb-usb-ohci
S:  Product=SSB OHCI Controller
S:  SerialNumber=ssb0:2
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
root@OpenWrt:~# 

comment:4 Changed 10 years ago by sbrown

I don't see anything really obvious.

There's been lots of fixes to the ehci code since 2.6.23. It looks like bcm47xx 2.6.25 will be here shortly. I'm incline to wait until it shows up. I don't think I'll get a lot of interest on the linux-usb list with 2.6.23 ehci troubles. Further, the ssb ehci driver is pretty low level. I'd think it would either work or really screw up.

Steve

comment:5 Changed 10 years ago by doggy

I've found that reason.

The problem is caused by my webcam use mjpg format only when it connected to a usb1.1 host and use yuv format only for usb2.0

I have noticed that mjpeg-streamer working in yuv format mode would cause a large cpu usage
but at least it works..

yaaaa... ehci-usb ~

this patch is very really nice ~

Changed 10 years ago by sbrown

Revised patch that doesn't hack ssb core scanner

comment:6 Changed 10 years ago by sbrown

This is still a work-in-progress.

Although the code seems to work, it's not in the best form. See the discussion on the openwrt-devel list.

comment:7 Changed 10 years ago by sbrown

The latest version was posted to the openwrt-devel list.
Please close this ticket.

comment:8 Changed 9 years ago by florian

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

Ok.

comment:9 Changed 9 years ago by cmshk

On the Asus WL-520gu with kamikaze_8.09_rc1, with this patch, reading large files from usb storage (eg. flash stick) caused system to freeze, a power cycle is needed to restart the router. However, writing large files is okay.

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.