summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>2001-08-14 16:19:01 +0000
committeraaron <aaron@openbsd.org>2001-08-14 16:19:01 +0000
commit6b1f8c8a63310e4b2a31e80140fb0ff79b0abd5d (patch)
tree471c58755fddb465a8fd419c842e06e468739dd1
parent"bye"; hk63a@netscape.net (diff)
downloadwireguard-openbsd-6b1f8c8a63310e4b2a31e80140fb0ff79b0abd5d.tar.xz
wireguard-openbsd-6b1f8c8a63310e4b2a31e80140fb0ff79b0abd5d.zip
Call dc_read_srom with the correct width; patch from gluk@. Fixes problems
with multiple 21143 interfaces.
-rw-r--r--sys/dev/pci/if_dc_pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c
index 30e0838fe95..a424ddb2f38 100644
--- a/sys/dev/pci/if_dc_pci.c
+++ b/sys/dev/pci/if_dc_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_dc_pci.c,v 1.14 2001/08/12 20:03:49 mickey Exp $ */
+/* $OpenBSD: if_dc_pci.c,v 1.15 2001/08/14 16:19:01 aaron Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -266,7 +266,8 @@ void dc_pci_attach(parent, self, aux)
sc->dc_type = DC_TYPE_21143;
sc->dc_flags |= DC_TX_POLL|DC_TX_USE_TX_INTR;
sc->dc_flags |= DC_REDUCED_MII_POLL;
- dc_read_srom(sc, 9);
+ dc_eeprom_width(sc);
+ dc_read_srom(sc, sc->dc_romwidth);
}
break;
case PCI_VENDOR_DAVICOM: