From owner-freebsd-sparc64@FreeBSD.ORG Thu Sep 4 06:05:50 2003 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D6C7416A4BF for ; Thu, 4 Sep 2003 06:05:50 -0700 (PDT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 4E3A343FDF for ; Thu, 4 Sep 2003 06:05:49 -0700 (PDT) (envelope-from tmoestl@gmx.net) Received: (qmail 4788 invoked by uid 65534); 4 Sep 2003 13:05:47 -0000 Received: from p508E597B.dip.t-dialin.net (EHLO timesink.dyndns.org) (80.142.89.123) by mail.gmx.net (mp027) with SMTP; 04 Sep 2003 15:05:47 +0200 Received: from luthien (luthien.local [192.168.0.16]) by raven (Postfix) with ESMTP id EA60A6D; Thu, 4 Sep 2003 15:05:47 +0200 (CEST) Received: by luthien (Postfix, from userid 1001) id CBA4A153E8; Thu, 4 Sep 2003 15:04:26 +0200 (CEST) Date: Thu, 4 Sep 2003 15:04:26 +0200 From: Thomas Moestl To: Maxim Mazurok Message-ID: <20030904130426.GB5484@timesink.dyndns.org> References: <20030822185956.GL21392@km.ua> <20030823180012.GA668@crow.dom2ip.de> <20030828100032.GI8966@km.ua> <20030828104212.GL8966@km.ua> <20030828155927.GA707@timesink.dyndns.org> <20030828174715.GR8966@km.ua> <20030903170000.GB20825@timesink.dyndns.org> <20030903194133.GN8966@km.ua> <20030903212129.GA21806@timesink.dyndns.org> <20030903225314.GS8966@km.ua> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="hQiwHBbRI9kgIhsi" Content-Disposition: inline In-Reply-To: <20030903225314.GS8966@km.ua> User-Agent: Mutt/1.4.1i cc: freebsd-sparc@freebsd.org Subject: Re: sio(4) driver X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2003 13:05:51 -0000 --hQiwHBbRI9kgIhsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, 2003/09/04 at 01:53:14 +0300, Maxim Mazurok wrote: > On Wed, Sep 03, 2003 at 11:21:30PM +0200, Thomas Moestl wrote: > > >> >> >That's very strange. So you cannot see them in tcpdump if you do not > >> >> >put the interface in promiscuous mode (by using the -p argument to > >> >> >tcpdump)? Can you receive broadcast packets (e.g. a broadcast ping) at > >> >> >all? > >> >> > >> >> so... experiment: > >> >> [...] > >> > > >> >Hmmm. Can you please repeat the experiment and send a tcpdump, this > >> >time in promiscuous mode (i.e. without the -p option), if possible > >> >from both the e250 and the cisco? > >> > >> i not have e250 :( > > > >Oh, sorry, mixed that up. > > > >> i have Ultra AXi OEM motherboard..... > >> tcpdump on cisco - it's problem. i can run packet debugger.... > > > >Hmmm, the tcpdump from the sparc64 box might do for now. > > > >> so, experiment two: > >> > >> root@fang:~#ifconfig rl3 > >> rl3: flags=8843 mtu 1500 > >> options=8 > >> inet 193.201.116.249 netmask 0xfffffffc broadcast 193.201.116.251 > >> ether 00:30:4f:21:bc:91 > >> media: Ethernet 10baseT/UTP > >> status: active > >> root@fang:~#tcpdump -n -i rl3 > > > >Please include -e in the tcpdump flags; sorry for forgetting to > >mention that. > > root@fang:~#tcpdump -e -n -i rl3 > tcpdump: listening on rl3 > 01:47:28.400964 0:0:c:47:8a:c1 ff:ff:ff:ff:ff:ff 0800 114: 193.201.116.250 > 255.255.255.255: icmp: echo request > 01:47:29.796714 0:0:c:47:8a:c1 1:0:c:cc:cc:cc 0125 307: CDP v2, ttl=180s DevID 'ap-ec' Addr (1): IPv4 193.201.116.250 PortID 'Ethernet0' CAP 0x01[|cdp] > 01:47:30.398474 0:0:c:47:8a:c1 ff:ff:ff:ff:ff:ff 0800 114: 193.201.116.250 > 255.255.255.255: icmp: echo request > 01:47:32.398607 0:0:c:47:8a:c1 ff:ff:ff:ff:ff:ff 0800 114: 193.201.116.250 > 255.255.255.255: icmp: echo request > 01:47:34.398588 0:0:c:47:8a:c1 ff:ff:ff:ff:ff:ff 0800 114: 193.201.116.250 > 255.255.255.255: icmp: echo request > 01:47:36.401175 0:0:c:47:8a:c1 ff:ff:ff:ff:ff:ff 0800 114: 193.201.116.250 > 255.255.255.255: icmp: echo request OK, so arp is working fine; the real problem is that the station address is not programmed correctly even with the patch that I sent you. The issue is that it has do be programmed with 32-bit accesses - byte-wise accesses, like my patch introduces, are seemingly not allowed. They used to "work" before because we did not make the configuration registers writable, so the byte writes would not change anything and the address preloaded from the card ROM would be used. I've attached a patch that uses stream accesses to program the address instead. I've borrowed myself a rl card, and it seems to work fine now (in fact I'm writing this over it). - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C --hQiwHBbRI9kgIhsi Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rl-enaddr2.diff" Index: if_rl.c =================================================================== RCS file: /vol/ncvs/src/sys/pci/if_rl.c,v retrieving revision 1.113 diff -u -r1.113 if_rl.c --- if_rl.c 22 Aug 2003 07:13:21 -0000 1.113 +++ if_rl.c 4 Sep 2003 12:50:08 -0000 @@ -2673,8 +2673,8 @@ * register write enable" mode to modify the ID registers. */ CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_WRITECFG); - CSR_WRITE_4(sc, RL_IDR0, *(u_int32_t *)(&sc->arpcom.ac_enaddr[0])); - CSR_WRITE_4(sc, RL_IDR4, *(u_int32_t *)(&sc->arpcom.ac_enaddr[4])); + CSR_WRITE_STREAM_4(sc, RL_IDR0, *(u_int32_t *)(&sc->arpcom.ac_enaddr[0])); + CSR_WRITE_STREAM_4(sc, RL_IDR4, *(u_int32_t *)(&sc->arpcom.ac_enaddr[4])); CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); /* Index: if_rlreg.h =================================================================== RCS file: /vol/ncvs/src/sys/pci/if_rlreg.h,v retrieving revision 1.33 diff -u -r1.33 if_rlreg.h --- if_rlreg.h 15 Aug 2003 22:47:55 -0000 1.33 +++ if_rlreg.h 4 Sep 2003 12:46:41 -0000 @@ -667,6 +667,8 @@ /* * register space access macros */ +#define CSR_WRITE_STREAM_4(sc, reg, val) \ + bus_space_write_stream_4(sc->rl_btag, sc->rl_bhandle, reg, val) #define CSR_WRITE_4(sc, reg, val) \ bus_space_write_4(sc->rl_btag, sc->rl_bhandle, reg, val) #define CSR_WRITE_2(sc, reg, val) \ --hQiwHBbRI9kgIhsi--