Date: Wed, 7 Oct 1998 11:30:32 -0700 (PDT) From: Bill Paul <wpaul> To: marcs@znep.com (Marc Slemko) Cc: jason@thought.net, tech@openbsd.org, hardware@FreeBSD.ORG Subject: Re: Lite-On PNIC (fwd) Message-ID: <199810071830.LAA17593@hub.freebsd.org> In-Reply-To: <Pine.GSO.4.02A.9810070018040.844-100000@redfish> from Marc Slemko at "Oct 7, 98 00:18:58 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Wed, 7 Oct 1998 01:59:49 -0400 (EDT) > From: jason@thought.net > To: tech@openbsd.org > Subject: Lite-On PNIC > > What follows are the diffs for /sys/dev/pci/{if_de.c,if_devar.h} to > support the Lite-On PNIC. I'm not sure about the marketing, but the > box this card came in said "Netgear FA310TX rev D1", and I've been told > that newer Kingston? boards use this same chip set. > > I need testers, and I'd like for someone more familiar with if_de to > tell me if I'm doing things all wrong or not =) The card works, but > it seems to have trouble with manually setting the media type. > > If you have a board that probes as "Lite-On PNIC", please give this patch > a try and let me know your results as soon as possible. > > --Jason Wright FYI: I spotted a small bug just looking at this patch. The code that writes to the PHY registers has a typo in it: > - unsigned csr = TULIP_CSR_READ(sc, csr_srom_mii) & (MII_RD|MII_DOUT|MII_CLK); > + unsigned csr; > + > + if (sc->tulip_chipid == TULIP_LC82C168) { > + int tmout = 1000; > + > + TULIP_CSR_WRITE(sc, csr_20, (MII_WRCMD << 28) | > + (devaddr << 23) | (regno << 18) | data); > + do { > + if (! (TULIP_CSR_READ(sc, csr_20) & 0x8000000)) > + return; ^^^^^^^^^ > + } while (--tmout); > + return; > + } > + > + csr = TULIP_CSR_READ(sc, csr_srom_mii) & (MII_RD|MII_DOUT|MII_CLK); That 0x8000000 up there should be 0x80000000. The 'busy' bit is bit 31. Also, LinkSys sells a 10/100 card that uses the PNIC chip. -Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810071830.LAA17593>