Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 1999 21:16:49 +0200
From:      Wim Livens <livensw@rc.bel.alcatel.be>
To:        freebsd-atm@freebsd.org
Subject:   Re: lanai driver: partially fixed bug
Message-ID:  <19990921211649.P10019@rc.bel.alcatel.be>
In-Reply-To: <Pine.BSF.3.95.990920203056.25863B-100000@ns.uninet.ee>; from Taavi Talvik on Mon, Sep 20, 1999 at 08:37:44PM %2B0300
References:  <19990920153711.G10019@rc.bel.alcatel.be> <Pine.BSF.3.95.990920203056.25863B-100000@ns.uninet.ee>

next in thread | previous in thread | raw e-mail | index | archive | help
I've found one bug in the lanai driver:

I've found that the receive fifo overflowed (STATS register,
ATM_OVFL_CNT).  This was caused by the fact that the bus mastering
failed (IS register, MASTERABORT).  And this in turn seems to be
caused by a bad address for the Rx and Rx buffers for dma.  I've
removed two lines (the #if 0 part) in the following code:

#if defined(__FreeBSD__)
    /* allocate TX buffer */
    if( bus_dmamap_load(sc->tx_dmat, sc->vcslot[slot].tx_map,
                        sc->vcslot[slot].txstart, LANAI_TRANSMIT_BUFFER_SIZE,
                        ef_map_rq,
                        &(sc->vcslot[slot].txseg), 
                        /*flags*/ 0) != 0 ){
        printf("ef_attach: bus_dmamap_load");
        panic("ef");
    }
#if 0
    sc->vcslot[slot].txseg.ds_addr = (bus_addr_t)sc->vcslot[slot].txstart;
    sc->vcslot[slot].txseg.ds_len = LANAI_TRANSMIT_BUFFER_SIZE;
#endif
#else 

and similar for RX buffer and it works.  I don't know anything about
memory mapping under FreeBSD but I quite sure that there is something
wrong with the above (original) code. The ds_addr is somthing like
0xc71f2000 which I think can't be a fysical address. After the patch
it was 0x2000. 

There is however still a problem: a ping gives a 3% packet loss and
TCP just doesn't get anything through. I also noticed 'ef_recieve:
dropped packet - no mbufs'.


Wim Livens.

Alcatel - Corporate Research Center     wim.livens@alcatel.be
Fr. Wellesplein 1                       livensw@rc.bel.alcatel.be
B-2018 Antwerpen                Tel:    +32 3 240 7570
Belgium.                        Fax:    +32 3 240 9932


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-atm" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990921211649.P10019>