Modify

Opened 9 years ago

Closed 9 years ago

Last modified 4 years ago

#4599 closed enhancement (fixed)

[patch] BCM63XX "robo" switch support

Reported by: LinuxInside Owned by: florian
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version:
Keywords: bcm63xx Cc:

Description

This patch adds support for the bcm53xx switch.

Attachments (1)

bcm63xx-robo-switch.patch (5.8 KB) - added by LinuxInside 9 years ago.
Patch for robo switch support

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by LinuxInside

Patch for robo switch support

comment:1 Changed 9 years ago by florian

  • Component changed from packages to kernel
  • Owner changed from developers to florian
  • Status changed from new to assigned
  • Type changed from defect to enhancement

comment:2 Changed 9 years ago by florian

Cool ! I was expecting this. Does it work for you ? and if so, did you prevent the board code from forcing the duplex ? It fails for me here with the following errors :

br-lan: port 1(eth1) entering forwarding state
roboswitch: Probing device eth0: Failed to enable switch
roboswitch: Probing device eth1: <3>roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
roboswitch: [/home/florian/dev/openwrt/trunk/build_dir/linux-brcm63xx/kmod-switch/switch-robo.c:190] timeout in robo_reg!
Failed to enable switch
roboswitch: Probing device eth2: No such device
roboswitch: Probing device eth3: No such device
root@OpenWrt:/# eth0: link UP - 100/full - flow control off
eth0: link DOWN
eth0: link UP - 100/full - flow control off
eth0: link DOWN
eth0: link UP - 100/full - flow control off
eth0: link DOWN
eth0: link UP - 100/full - flow control off
eth0: link DOWN
eth0: link UP - 100/full - flow control off
eth0: link DOWN
eth0: link UP - 100/full - flow control off
eth0: link DOWN
eth0: link UP - 100/full - flow control off
eth0: link DOWN
eth0: link UP - 100/full - flow control off
eth0: link DOWN
eth0: link UP - 100/full - flow control off

comment:3 Changed 9 years ago by LinuxInside

This happens for me:

root@OpenWrt:~# ./robocfg show
Switch: enabled
Port 0(W): DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 1(4): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 2(3): DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 3(2): DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 4(1): DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 5(C): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
VLANs: BCM5325/535x disabled mac_check mac_hash

root@OpenWrt:~# insmod switch-core.ko
root@OpenWrt:~# insmod switch-robo.ko

roboswitch: Probing device eth0: <3>roboswitch: [/home/henk/prj/dsl/trunk/build!
roboswitch: [/home/henk/prj/dsl/trunk/build_dir/linux-brcm63xx/kmod-switch/swit!
No Robo switch in managed mode found
roboswitch: Probing device eth1: found!

Can you please tell me what kind of router you are testing on?

comment:4 Changed 9 years ago by zucht

This happens for me:

root@OpenWrt:~# ./robocfg show
Switch: enabled
Port 0(W): DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 1(4): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 2(3): DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 3(2): DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 4(1): DOWN enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
Port 5(C): 100FD enabled stp: none vlan: 1 mac: 00:00:00:00:00:00
VLANs: BCM5325/535x disabled mac_check mac_hash
root@OpenWrt:~# insmod switch-core.ko
root@OpenWrt:~# insmod switch-robo.ko
roboswitch: Probing device eth0: <3>roboswitch: [/home/henk/prj/dsl/trunk/build!
roboswitch: [/home/henk/prj/dsl/trunk/build_dir/linux-brcm63xx/kmod-switch/swit!
No Robo switch in managed mode found
roboswitch: Probing device eth1: found!

Can you please tell me what kind of router you are testing on?

comment:5 Changed 9 years ago by LinuxInside

BTW i am using the "standard" bcm63xx_enet driver (without modifications).

One of the ports is not connected on my rig. But if i disable one of them in the board config nothing works. So i leave them both enabled. It almost looks like the mii bus of enet1 is intitialized in the enet0 driver and vice versa....

target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c

...
       .has_enet0                      = 1,
       .has_enet1                      = 1,
        .enet0 = {
                .has_phy                = 1,
                .use_internal_phy       = 1,
        },

        .enet1 = {
                .force_speed_100        = 1,
                .force_duplex_full      = 1,
        },
...

comment:6 Changed 9 years ago by florian

I am still getting the timeout error while probing for the switch on eth1, which seems strange to me since the board is just like yours. Will investigate a bit more ;)

comment:7 Changed 9 years ago by cshore@…

I think think may be a function of the a setting on the switch itself. I have a Comtrend CT-5621 and in the stock firmware and after putting on openwrt it was showing eth0 and eth1, but once I bricked and flashed it with with a netgear firmware someone made available, it changed to only showing eth0, and reflashing with the original firmware (it took some devel which is why I didn't initially use it), the eth0 only configuration stayed (i.e. no more eth0 and eth1).

So it's not the flash on the router that's the issue (because I wiped it and installed the original), which leads me to believe there must be a small flash or something of that nature on the switch the stores a setting that some routers are configured with.

Regards,

Daniel

comment:8 Changed 9 years ago by florian

My guess is also that not all switch can be configured using mdio/mdc some might be configured using GPIOs or SPI which seems to be the case with my 96348GW board.

comment:9 Changed 9 years ago by florian

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

Applied in [14825] and [14826], thanks ! My board does not have the MDC/MDIO pin between the BCM5325 switch and the BCM6348 connected, thus my problem which does not affect the other boards.

comment:10 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 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.