From owner-freebsd-current Tue Oct 15 14:50:17 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BF1737B401 for ; Tue, 15 Oct 2002 14:50:15 -0700 (PDT) Received: from jesper.goddamnbastard.org (12-251-154-208.client.attbi.com [12.251.154.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF9F743E65 for ; Tue, 15 Oct 2002 14:50:13 -0700 (PDT) (envelope-from ryanb@goddamnbastard.org) Received: by jesper.goddamnbastard.org (Postfix, from userid 1000) id C44B11549D; Tue, 15 Oct 2002 16:50:12 -0500 (CDT) Date: Tue, 15 Oct 2002 16:50:12 -0500 From: ryan beasley To: freebsd-current@freebsd.org Subject: Re: CNet Pro200WL (Davicom DM9102A): fine under 4.6.2-p2, no worky under -CURRENT Message-ID: <20021015215012.GG62935@goddamnbastard.org> References: <20021012014437.GA59010@goddamnbastard.org> <20021012091202.GD59010@goddamnbastard.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AzNpbZlgThVzWita" Content-Disposition: inline In-Reply-To: <20021012091202.GD59010@goddamnbastard.org> User-Agent: Mutt/1.4i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --AzNpbZlgThVzWita Content-Type: multipart/mixed; boundary="eVzOFob/8UvintSX" Content-Disposition: inline --eVzOFob/8UvintSX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 12, 2002 at 04:12:02AM -0500, ryan beasley wrote: > was loaded / probed the card? (FWIW, I'm not seeing any significant > changes to dc_setfilt_21143() between revs 1.9.2.33 and 1.81...) Er, I meant dc_attach. Rilly. Trust me. ;) ( I think I initially guessed there from the 'set our mac address' comment without taking *any* of the surrounding code into context. ) I skimmed over a portion of the DM9102A data sheet, saw the SROM layout, and modified this driver to grab the MAC from that space. It's worked fine ever since. (I sent a pr this morning with said patch, and while my mail logs show the message as having been received as msgID B63E843E3B, it hasn't sho= wn up anywhere.) Thoughts? --=20 ryan beasley GPG ID: 0x16EFBD48 http://www.goddamnbastard.org =09 --eVzOFob/8UvintSX Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="if_dc.patch" Content-Transfer-Encoding: quoted-printable # made against if_dcreg.h 1.27 and if_dc.c 1.81 --- sys/pci/if_dcreg.h.orig Tue Oct 15 07:44:12 2002 +++ sys/pci/if_dcreg.h Tue Oct 15 07:42:37 2002 @@ -856,6 +856,11 @@ #define DC_REVISION_DM9102A 0x30 =20 /* + * DM9102A MAC address SROM offset. + */ +#define DC_DM9102_NODEADDR 0x14 + +/* * ADMtek vendor ID. */ #define DC_VENDORID_ADMTEK 0x1317 --- sys/pci/if_dc.c.orig Tue Oct 15 07:44:08 2002 +++ sys/pci/if_dc.c Tue Oct 15 07:42:29 2002 @@ -1995,6 +1995,9 @@ command &=3D 0xFFFF00FF; command |=3D 0x00008000; pci_write_config(dev, DC_PCI_CFLT, command, 4); + /* See above. ;) */ + dc_eeprom_width(sc); + dc_read_srom(sc, sc->dc_romwidth); break; case DC_DEVICEID_AL981: sc->dc_type =3D DC_TYPE_AL981; @@ -2142,6 +2145,9 @@ dc_read_eeprom(sc, (caddr_t)&eaddr, 0, 3, 1); break; case DC_TYPE_DM9102: + bcopy(&sc->dc_srom[DC_DM9102_NODEADDR], (caddr_t)&eaddr, + ETHER_ADDR_LEN); + break; case DC_TYPE_21143: case DC_TYPE_ASIX: dc_read_eeprom(sc, (caddr_t)&eaddr, DC_EE_NODEADDR, 3, 0); --eVzOFob/8UvintSX-- --AzNpbZlgThVzWita Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9rI2UskfdOxbvvUgRAl7rAJwIxTsuenyUe6HI3gq5zcJZ4FopYQCfagVQ QCpVJn/KX12OeUXd7DWlEsI= =2dp+ -----END PGP SIGNATURE----- --AzNpbZlgThVzWita-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message