From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <44E09C40.8060306@seskion.de> Date: Mon, 14 Aug 2006 17:52:32 +0200 From: Juergen Pfeiffer MIME-Version: 1.0 References: <44C77FD2.2030208@seskion.de> In-Reply-To: <44C77FD2.2030208@seskion.de> Content-Type: multipart/alternative; boundary="------------020407080907040908060304" Subject: Re: [Bridge] Is bridgeing possible with kernel 2.6.10 List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bridge@lists.osdl.org Cc: uclinux-dev@uclinux.org This is a multi-part message in MIME format... --------------020407080907040908060304 Content-Type: text/plain; charset="iso-8859-1"; format="flowed" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Juergen Pfeiffer schrieb: > Hi > > I didn't get bridgeing to work with Linux kernel 2.6.10 (coldfire 5485)=20 > yet. When i try to configure bridgeing > with "brctl", everything seems to be ok, but i if i try to ping through=20 > my bridge, i see ARP-Request arriving on the other side, but the > ARP-Responses do not go back through the bridge. > =20 Now i found the error in the coldfire specific ethernet driver:=20 "drivers/net/fec/fec.c" The driver did not set Promiscuouse Mode correct in Hardware Registers: function fec_set_multicast_list() with error: *void fec_set_multicast_list(struct net_device *dev) { // Pointer to the address list struct dev_mc_list *dmi; unsigned int crc, data; int i, j, k; // Receive the base address unsigned long base_addr =3D (unsigned long) dev->base_addr; if (dev->flags & IFF_PROMISC || dev->flags & IFF_ALLMULTI) { // Allow all incoming frames FEC_GALR(base_addr) =3D 0xFFFFFFFF; FEC_GAUR(base_addr) =3D 0xFFFFFFFF; return; } ... * function fec_set_multicast_list() correct: *void fec_set_multicast_list(struct net_device *dev) { // Pointer to the address list struct dev_mc_list *dmi; unsigned int crc, data; int i, j, k; // Receive the base address unsigned long base_addr =3D (unsigned long) dev->base_addr; if (dev->flags & IFF_PROMISC) { // Allow all incoming frames if ((FEC_RCR(base_addr) & FEC_RCR_PROM)=3D=3D0) { FEC_ECR(base_addr) &=3D ~FEC_ECR_ETHEREN; FEC_RCR(base_addr) |=3D FEC_RCR_PROM; FEC_ECR(base_addr) |=3D FEC_ECR_ETHEREN; } return; } if ((FEC_RCR(base_addr) & FEC_RCR_PROM)!=3D0) { FEC_ECR(base_addr) &=3D ~FEC_ECR_ETHEREN; FEC_RCR(base_addr) &=3D ~FEC_RCR_PROM; FEC_ECR(base_addr) |=3D FEC_ECR_ETHEREN; } if (dev->flags & IFF_ALLMULTI) { // Allow all incoming frames FEC_GALR(base_addr) =3D 0xFFFFFFFF; FEC_GAUR(base_addr) =3D 0xFFFFFFFF; return; } ... * after this the bridge worked fine! --=20 ------------------------------------------------------------------------ J=FCrgen Pfeiffer =09 =09 * _mailto:j.pfeiffer@seskion.de_ SesKion Softwareentwicklung und System Konzeption GmbH =09 =09 ( : +49-711-9905814 Karlsruher Str. 11/1 =09 =09 Fax: +49-711-9905827 D-70771 Leinfelden-Echterdingen =09 =09 1 _http://www.seskion.de_ ------------------------------------------------------------------------ --------------020407080907040908060304 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Juergen Pfeiffer schrieb:
Hi

I didn't get bridgeing to work with Linux kernel 2.6.10 (coldfire 5485) 
yet. When i try to configure bridgeing
with "brctl", everything seems to be ok, but i if i try to ping through 
my bridge, i see ARP-Request arriving on the other side, but the
ARP-Responses do not go back through the bridge.
  

Now i found the error in the coldfire specific ethernet driver: "drivers/net/fec/fec.c"
The driver did not set Promiscuouse Mode correct in Hardware Registers:

function fec_set_multicast_list() with error:
void fec_set_multicast_list(struct net_device *dev)
{
    // Pointer to the address list
    struct dev_mc_list *dmi;

    unsigned int crc, data;
    int i, j, k;

    // Receive the base address
    unsigned long base_addr = (unsigned long) dev->base_addr;

    if (dev->flags & IFF_PROMISC || dev->flags & IFF_ALLMULTI)
    {
        // Allow all incoming frames
        FEC_GALR(base_addr) = 0xFFFFFFFF;
        FEC_GAUR(base_addr) = 0xFFFFFFFF;
        return;
    }
...



function fec_set_multicast_list() correct:
void fec_set_multicast_list(struct net_device *dev)
{
    // Pointer to the address list
    struct dev_mc_list *dmi;

    unsigned int crc, data;
    int i, j, k;

    // Receive the base address
    unsigned long base_addr = (unsigned long) dev->base_addr;

    if (dev->flags & IFF_PROMISC)
    {
        // Allow all incoming frames
        if ((FEC_RCR(base_addr) & FEC_RCR_PROM)==0) {
            FEC_ECR(base_addr) &= ~FEC_ECR_ETHEREN;
            FEC_RCR(base_addr) |= FEC_RCR_PROM;
            FEC_ECR(base_addr) |= FEC_ECR_ETHEREN;
        }
        return;
    }
    if ((FEC_RCR(base_addr) & FEC_RCR_PROM)!=0) {
        FEC_ECR(base_addr) &= ~FEC_ECR_ETHEREN;
        FEC_RCR(base_addr) &= ~FEC_RCR_PROM;
        FEC_ECR(base_addr) |= FEC_ECR_ETHEREN;
    }
    if (dev->flags & IFF_ALLMULTI)
    {
        // Allow all incoming frames
        FEC_GALR(base_addr) = 0xFFFFFFFF;
        FEC_GAUR(base_addr) = 0xFFFFFFFF;
        return;
    }
...


after this the bridge worked fine!


--

Jürgen Pfeiffer

* mailto:j.pfeiffer@seskion.de
SesKion Softwareentwicklung und System Konzeption GmbH

( : +49-711-9905814
Karlsruher Str. 11/1

Fax: +49-711-9905827
D-70771 Leinfelden-Echterdingen

1 http://www.seskion.de

--------------020407080907040908060304--