From owner-freebsd-atm Mon Sep 20 6:37:30 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 E685F14E32 for ; Mon, 20 Sep 1999 06:37:23 -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 PAA06213 for ; Mon, 20 Sep 1999 15:37:21 +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 PAA09337 for ; Mon, 20 Sep 1999 15:37:52 +0200 (MET DST) Received: (from livensw@localhost) by btmq9z.rc.bel.alcatel.be (8.8.8+Sun/8.8.8) id PAA22237 for freebsd-atm@FreeBSD.ORG; Mon, 20 Sep 1999 15:37:12 +0200 (MET DST) Date: Mon, 20 Sep 1999 15:37:11 +0200 From: Wim Livens To: freebsd-atm@FreeBSD.ORG Subject: lanai driver (again): debug output + any docs ? Message-ID: <19990920153711.G10019@rc.bel.alcatel.be> References: <19990916194757.A10019@rc.bel.alcatel.be> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: <19990916194757.A10019@rc.bel.alcatel.be>; from Wim Livens on Thu, Sep 16, 1999 at 07:47:57PM +0200 Sender: owner-freebsd-atm@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I'm still trying to get the Efficient speedstream 3010 card (lanai chip, ef driver) to work... I've switched on the debug messages but I don't see anything suspicious except: ef_attach: reset reg 0x1 should be 0 The card doesn't seem to generate any data cells on the link. Also, sending data packets on the correct vc doesn't give any service interupts. I'm also wondering if anyone has the docs for the lanai (the link http://www.whitebarn.com/~bob/atm/ doesn't work) Thanks, below is the debug output (i've removed the messages for the non-service interupts) relevant parts of dmesg: FreeBSD 4.0-19990709-CURRENT #3: Fri Sep 17 14:51:26 GMT 1999 root@btm234.rc.bel.alcatel.be:/usr/src/sys/compile/CUSTOM Timecounter "i8254" frequency 1193182 Hz CPU: Pentium II (266.44-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x634 Stepping = 4 Features=0x80f9ff Pentium Pro MTRR support enabled, default memory type is uncacheable Probing for PnP devices: fxp0: irq 11 at device 13.0 on pci0 fxp0: Ethernet address 00:08:c7:b2:ea:09 ef0: irq 11 at device 14.0 on pci0 ef_pci_attach: memt 42000000, base c6576000, obmemsz 0 ef_pci_attach: command back 2900006 ef_pci_attach: command back 2900006 ef_pci_attach: LATTIMER back ffffffff ef_pci_attach: LATTIMER back ffffffff ef_pci_attach: MEM_BASE back 42000000 ef_attach: reset reg 0x1 should be 0 ef_attach: seeprom=\M^A MAC=00:20:ea:02:73:f2 ef_attach: config1 reg before setting loopback 0x3 ef_attach: (after enable DMA) LANAI_CONFIG1_REG=6013 ef_attach: config2 register is 0x1 ef_attach: starting to clear out rxvc2slot, txspeed, txvc2slot ef_attach: starting to clear out vcslot ef0: tx0: start 0x0, stop 0x0 ef0: tx1: start 0x0, stop 0x0 ef0: tx2: start 0x0, stop 0x0 ef0: tx3: start 0x0, stop 0x0 ef0: tx4: start 0x0, stop 0x0 ef0: tx5: start 0x0, stop 0x0 ef0: tx6: start 0x0, stop 0x0 ef0: tx7: start 0x0, stop 0x0 ef0: rx8: start 0xffffffff, stop 0xffffffff, mode 0xffffffff bash-2.03# ifconfig ef0 10.0.0.2 netmask 255.255.255.0 up Sep 20 13:34:21 btm234 /kernel: ef_ioctl: start Sep 20 13:34:21 btm234 /kernel: ef_ioctl: unknown 80206910 Sep 20 13:34:21 btm234 /kernel: ef_ioctl: start Sep 20 13:34:21 btm234 /kernel: ef_ioctl: SIOCSIFADDR bash-2.03# route add -iface 10.0.0.1 -link ef0:1.0.0.c add host 10.0.0.1: gateway ef0:1.0.0.c Sep 20 13:34:59 btm234 /kernel: ef_ioctl: start Sep 20 13:34:59 btm234 /kernel: ef_ioctl: SIOCATMENA vci = 12 Sep 20 13:34:59 btm234 /kernel: ef0: enable vpi=0, vci=12, flags=1 Sep 20 13:34:59 btm234 /kernel: ef_vcctl: on, slot=0, txstart=0xc71f5000, txlength=32768, txcur=0, txbfree=32768 Sep 20 13:34:59 btm234 /kernel: ef_vcctl: on ds_len=0x8000, shifted = 0x500 Sep 20 13:34:59 btm234 /kernel: ef_vcc(on): rx VCI setup Sep 20 13:34:59 btm234 /kernel: ef_vcc(on): rx VCI finished setup Sep 20 13:34:59 btm234 /kernel: ef_vcctl: clearing interupts 0x0 Sep 20 13:34:59 btm234 /kernel: leaving vci on bash-2.03# ping 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes Sep 20 13:38:13 btm234 /kernel: efstart(1A): cp = 0xc71f500c, end_index=a0 Sep 20 13:38:13 btm234 /kernel: ef_start(3A): bcopy cp=0xc71f5018, size=84 Sep 20 13:38:13 btm234 /kernel: 45 0 0 54 0 e5 0 0 ff 1 a6 c1 a 0 0 2 a 0 0 1 8 0 6a 2f e1 0 0 0 c5 38 Sep 20 13:38:13 btm234 /kernel: ef_start(10): on, slot=0, txstart=0xc71f5000, txlength=32768, txcur=160, txbfree=32608 Sep 20 13:38:13 btm234 /kernel: ef_start: read_ptr (before writing butt reg)is 0x0 Sep 20 13:38:13 btm234 /kernel: ef_start: write to BUTT_REG txcur=a000c Sep 20 13:38:13 btm234 /kernel: ef_start: BUTT_REG is now 0xa000c ^C --- 10.0.0.1 ping statistics --- 1 packets transmitted, 0 packets received, 100% packet loss -- 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 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