summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2001-08-22 16:38:39 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2001-08-22 16:38:39 +0000
commit24550987873ac99c12df54f6061e922532cd9ebe (patch)
tree9d20cab0adecf3664c736cbbf12e421fff950a25 /sys/dev
parent529d5c12e2ac18c2871eeaea7390212056d15792 (diff)
Support more dc(4) CardBus devices, including the AN985-based Linksys PCMPC200
10/100 CardBus Ethernet adapter (thanks to beck@ for the donation).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/cardbus/if_dc_cardbus.c10
-rw-r--r--sys/dev/ic/dc.c6
-rw-r--r--sys/dev/pci/if_dc_pci.c4
3 files changed, 14 insertions, 6 deletions
diff --git a/sys/dev/cardbus/if_dc_cardbus.c b/sys/dev/cardbus/if_dc_cardbus.c
index a221eb8dcdc..69713ada995 100644
--- a/sys/dev/cardbus/if_dc_cardbus.c
+++ b/sys/dev/cardbus/if_dc_cardbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_dc_cardbus.c,v 1.5 2001/04/06 17:14:14 aaron Exp $ */
+/* $OpenBSD: if_dc_cardbus.c,v 1.6 2001/08/22 16:38:38 aaron Exp $ */
#include <sys/param.h>
#include <sys/systm.h>
@@ -70,6 +70,8 @@ struct dc_type dc_cardbus_devs[] = {
{ PCI_VENDOR_DEC, PCI_PRODUCT_DEC_21142 },
{ PCI_VENDOR_XIRCOM, PCI_PRODUCT_XIRCOM_X3201_3_21143 },
{ PCI_VENDOR_ADMTEK, PCI_PRODUCT_ADMTEK_AN985 },
+ { CARDBUS_VENDOR_ABOCOM, CARDBUS_PRODUCT_ABOCOM_FE2500 },
+ { CARDBUS_VENDOR_ABOCOM, CARDBUS_PRODUCT_ABOCOM_PCM200 },
{ 0 }
};
@@ -154,11 +156,15 @@ dc_cardbus_attach(parent, self, aux)
}
break;
case PCI_VENDOR_ADMTEK:
- if (PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_ADMTEK_AN985) {
+ case CARDBUS_VENDOR_ABOCOM:
+ if (PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_ADMTEK_AN985 ||
+ PCI_PRODUCT(ca->ca_id) == CARDBUS_PRODUCT_ABOCOM_FE2500 ||
+ PCI_PRODUCT(ca->ca_id) == CARDBUS_PRODUCT_ABOCOM_PCM200) {
sc->dc_type = DC_TYPE_AN983;
sc->dc_flags |= DC_TX_USE_TX_INTR|DC_TX_ADMTEK_WAR;
sc->dc_pmode = DC_PMODE_MII;
dc_eeprom_width(sc);
+ dc_read_srom(sc, sc->dc_romwidth);
}
break;
default:
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c
index 5c2980670df..85212ccc4ee 100644
--- a/sys/dev/ic/dc.c
+++ b/sys/dev/ic/dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dc.c,v 1.32 2001/08/12 20:12:12 mickey Exp $ */
+/* $OpenBSD: dc.c,v 1.33 2001/08/22 16:38:38 aaron Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1613,8 +1613,8 @@ void dc_attach(sc)
break;
case DC_TYPE_AL981:
case DC_TYPE_AN983:
- dc_read_eeprom(sc, (caddr_t)&sc->arpcom.ac_enaddr,
- DC_AL_EE_NODEADDR, 3, 0);
+ bcopy(&sc->dc_srom[DC_AL_EE_NODEADDR], &sc->arpcom.ac_enaddr,
+ ETHER_ADDR_LEN);
break;
case DC_TYPE_XIRCOM:
break;
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c
index a424ddb2f38..c4e167fa3df 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.15 2001/08/14 16:19:01 aaron Exp $ */
+/* $OpenBSD: if_dc_pci.c,v 1.16 2001/08/22 16:38:38 aaron Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -301,6 +301,8 @@ void dc_pci_attach(parent, self, aux)
sc->dc_flags |= DC_TX_ADMTEK_WAR;
sc->dc_pmode = DC_PMODE_MII;
}
+ dc_eeprom_width(sc);
+ dc_read_srom(sc, sc->dc_romwidth);
break;
case PCI_VENDOR_MACRONIX:
case PCI_VENDOR_ACCTON: