From owner-freebsd-mobile Fri Jan 21 0:58:46 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from afs.itc.keio.ac.jp (afs.itc.keio.ac.jp [131.113.212.3]) by hub.freebsd.org (Postfix) with SMTP id CD29415445 for ; Fri, 21 Jan 2000 00:58:35 -0800 (PST) (envelope-from hosokawa@itc.keio.ac.jp) Received: (qmail 17664 invoked from network); 21 Jan 2000 08:58:26 -0000 Received: from mobile04.ntc.mita.keio.ac.jp (HELO ringo.FromTo.Cc) (131.113.212.24) by afs.itc.keio.ac.jp with SMTP; 21 Jan 2000 08:58:26 -0000 Date: Fri, 21 Jan 2000 17:58:27 +0900 Message-ID: <86embbrebw.wl@ringo.FromTo.Cc> From: Tatsumi Hosokawa To: imp@village.org Cc: mobile@FreeBSD.ORG Subject: Re: if_sn now works on -current (Re: One more serious problem with -current PCCARD support ) In-Reply-To: In your message of "Fri, 21 Jan 2000 01:01:02 -0700" <200001210801.BAA09842@harmony.village.org> References: <863drs1vdr.wl@ringo.FromTo.Cc> <86r9fisfe2.wl@ringo.FromTo.Cc> <86u2kesizg.wl@ringo.FromTo.Cc> <200001180742.AAA15379@harmony.village.org> <864sc820u4.wl@ringo.FromTo.Cc> <200001210801.BAA09842@harmony.village.org> User-Agent: Wanderlust/2.2.13 (Keep The Faith) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.1 (patch 8) (Bryce Canyon) (i386--freebsd) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At Fri, 21 Jan 2000 01:01:02 -0700, Warner Losh wrote: > : This patch adds "attr2" keyword to /etc/pccard.conf and I'm afraid > : that it can break feature freeze. If it's not acceptable, I'll commit > : it later. > > That is fine by me. When you commit this, you may want to add that I > said it was OK. Thank you. > : Index: sys/dev/sn/if_sn_pccard.c > > I think you missed the kludge I have in if_sn.c: Oops. I rewrote it. Index: if_sn.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sn/if_sn.c,v retrieving revision 1.5 diff -u -r1.5 if_sn.c --- if_sn.c 1999/12/28 01:07:15 1.5 +++ if_sn.c 2000/01/21 08:57:06 @@ -148,9 +148,6 @@ */ #define SW_PAD -/* XXX KLUDGE XXX */ -u_char sn_pccard_macaddr[6] = { 0x00, 0x00, 0x86, 0x10, 0x2b, 0xc0 }; - static const char *chip_ids[15] = { NULL, NULL, NULL, /* 3 */ "SMC91C90/91C92", @@ -173,6 +170,7 @@ struct sockaddr_dl *sdl; int rev; u_short address; + int j; sn_activate(dev); @@ -191,19 +189,13 @@ SMC_SELECT_BANK(1); i = inw(BASE + CONFIG_REG_W); printf(i & CR_AUI_SELECT ? "AUI" : "UTP"); + + for (j = 0; j < 3; j++) { + u_short w; - if (1) { - /* XXX The pccard probe routine for megahearts needs to */ - /* XXX snag this from your info 2 */ - int j; - - for (j = 0; j < 3; j++) { - u_short w; - - w = (u_short)sn_pccard_macaddr[j * 2] | - (((u_short)sn_pccard_macaddr[j * 2 + 1]) << 8); - outw(BASE + IAR_ADDR0_REG_W + j * 2, w); - } + w = (u_short)sc->arpcom.ac_enaddr[j * 2] | + (((u_short)sc->arpcom.ac_enaddr[j * 2 + 1]) << 8); + outw(BASE + IAR_ADDR0_REG_W + j * 2, w); } /* -- --------------------------- Tatsumi Hosokawa hosokawa@itc.keio.ac.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message