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 shown
up anywhere.)
Thoughts?
--
ryan beasley <[EMAIL PROTECTED]>
GPG ID: 0x16EFBD48 http://www.goddamnbastard.org
# 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
/*
+ * 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 &= 0xFFFF00FF;
command |= 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 = 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);
msg44737/pgp00000.pgp
Description: PGP signature
