Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2002 16:50:12 -0500
From:      ryan beasley <ryanb@goddamnbastard.org>
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>
In-Reply-To: <20021012091202.GD59010@goddamnbastard.org>
References:  <20021012014437.GA59010@goddamnbastard.org> <20021012091202.GD59010@goddamnbastard.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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.  ;)  (<dunce> I think I
    initially guessed there from the 'set our mac address' comment without
    taking *any* of the surrounding code into context. </dunce>)

    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				<ryanb@goddamnbastard.org>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021015215012.GG62935>