From owner-freebsd-atm Tue Sep 21 12:17:49 1999 Delivered-To: freebsd-atm@freebsd.org Received: from btm4r4.alcatel.be (btm4r4.alcatel.be [195.207.101.110]) by hub.freebsd.org (Postfix) with ESMTP id A6BC414E96 for ; Tue, 21 Sep 1999 12:16:52 -0700 (PDT) (envelope-from livensw@rc.bel.alcatel.be) Received: from btmq9s.rc.bel.alcatel.be (btmq9s.rc.bel.alcatel.be [138.203.65.182]) by btm4r4.alcatel.be (8.9.1a/8.9.1) with ESMTP id VAA14898 for ; Tue, 21 Sep 1999 21:16:50 +0200 (MET DST) Received: from btmq9z.rc.bel.alcatel.be (btmq9z [138.203.65.192]) by btmq9s.rc.bel.alcatel.be (8.8.8+Sun/8.8.8) with ESMTP id VAA25208 for ; Tue, 21 Sep 1999 21:17:26 +0200 (MET DST) Received: (from livensw@localhost) by btmq9z.rc.bel.alcatel.be (8.8.8+Sun/8.8.8) id VAA19170 for freebsd-atm@freebsd.org; Tue, 21 Sep 1999 21:16:49 +0200 (MET DST) Date: Tue, 21 Sep 1999 21:16:49 +0200 From: Wim Livens To: freebsd-atm@freebsd.org Subject: Re: lanai driver: partially fixed bug Message-ID: <19990921211649.P10019@rc.bel.alcatel.be> References: <19990920153711.G10019@rc.bel.alcatel.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: ; from Taavi Talvik on Mon, Sep 20, 1999 at 08:37:44PM +0300 Sender: owner-freebsd-atm@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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