2009-11-09 10:43:30     Blackfin as switch

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-11-09 10:43:30     Blackfin as switch

Daniele Pagani (ITALY)

Message: 82216   

 

Dear sirs,

 

I'm using BF537 custom board, with Micrel 8893, 2009R1-RC6 and all work fine.

 

According to   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:dsa_for_ksz8893m

 

I can configure two ethernet cards.

 

But, the device with BF537 needs to have only one IP address, so the customer can connect the cable in one port or in the other port.

 

Then, the free port needs to be the "switch" port.

 

If I configure eth1 with 192.168.1.68 (example) and eth2 with 192.168.1.68 (same ip address), I see the route table:

 

Destination Gateway Genmask Flags Metric Ref Use Iface

 

192.168.1.0    *            255.255.255.0 U  0  0 0 eth1

 

192.168.1.0    *            255.255.255.0 U  0  0 0 eth2

 

It works fine if I connect the cable to port1 and then if I use port2 as hub/switch.

 

But, it doesn't work fine if I connect the cable to port2, because I don't reach the 192.168.1.68.

 

How can I configure it?

 

Best regards,

 

Daniele.

TranslateQuoteReplyEditDelete

 

 

2009-11-09 12:59:38     Re: Blackfin as switch

Mike Frysinger (UNITED STATES)

Message: 82217   

 

this isnt really a Blackfin issue.  at any rate, this would probably work smoother if you simply had the IP hotplug.  when a port gets plugged in, the Blackfin detects that and configures that interface accordingly.

QuoteReplyEditDelete

 

 

2009-11-09 13:13:16     Re: Blackfin as switch

Jean-Christian de Rivaz (SWITZERLAND)

Message: 82219   

 

Hello,

 

You can get somethnig close to a switch by using the bridge feature of the Linux kernel:

 

  www.linuxfoundation.org/en/Net:Bridge

 

  www.faqs.org/docs/Linux-HOWTO/BRIDGE-STP-HOWTO.html

 

Hope this help,

 

Jean-Christian

QuoteReplyEditDelete

 

 

2009-11-09 21:42:47     Re: Blackfin as switch

Graf Yang (CHINA)

Message: 82230   

 

If you disable the DSA driver, you will let the 8893 be a unmanagered (two port) switch.

 

You can write another driver to control the 8893 to be a managerable switch, but it only provide two free port.

QuoteReplyEditDelete

 

 

2009-11-10 03:05:10     Re: Blackfin as switch

Daniele Pagani (ITALY)

Message: 82232   

 

Dear sirs,

 

thank you very much, I've 3 interesting solutions, so I'll test them.

 

The first is "Blackfin detects that"; how can I detect? Where can I read something about the matter?

 

Best regards,

 

Daniele.

TranslateQuoteReplyEditDelete

 

 

2009-11-10 03:48:12     Re: Blackfin as switch

Graf Yang (CHINA)

Message: 82248   

 

You can download the datasheet of ksz8893.

 

Blackfin's MAC has mdio bus connected to this switch.  The switch's state is read out through this bus.

QuoteReplyEditDelete

 

 

2009-11-10 04:57:10     Re: Blackfin as switch

Daniele Pagani (ITALY)

Message: 82250   

 

Dear sirs,

 

I've tested the bridge solution.

 

I have enable brctl in BusyBox and all works fine.

 

This is a very good solution in my application.

 

Many thanks,

 

Daniele.

Attachments

    Outcomes