diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-01-16 20:47:45 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-01-16 20:47:45 +0000 |
commit | f5580db504a75f1a9e7fd87ba60c3d0816ecf9d4 (patch) | |
tree | c3cec219281a8126d8f55d287839cb2bc6ec1bcd | |
parent | 1e9e4d42c5d840ec82043ed05575d650887f8c50 (diff) |
- recognize Microsoft PCI and CardBus adapters
- recognize Hawking CardBus adapter
- simplify 3Com switch case and fold in with ADMtek case
- use 64-bit multicast hash for all instances of ADMtek 983 chipset
Hawking CardBus adapter reported by Alec Berryman <alec at thened dot net>
Microsoft adapters from FreeBSD dc(4) driver
-rw-r--r-- | sys/dev/cardbus/if_dc_cardbus.c | 13 | ||||
-rw-r--r-- | sys/dev/pci/if_dc_pci.c | 20 |
2 files changed, 18 insertions, 15 deletions
diff --git a/sys/dev/cardbus/if_dc_cardbus.c b/sys/dev/cardbus/if_dc_cardbus.c index 49ff799f68b..56c94ce76cd 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.17 2005/01/16 19:46:01 brad Exp $ */ +/* $OpenBSD: if_dc_cardbus.c,v 1.18 2005/01/16 20:47:44 brad Exp $ */ #include <sys/param.h> #include <sys/systm.h> @@ -69,6 +69,8 @@ struct dc_type dc_cardbus_devs[] = { { PCI_VENDOR_ABOCOM, PCI_PRODUCT_ABOCOM_FE2500 }, { PCI_VENDOR_ABOCOM, PCI_PRODUCT_ABOCOM_PCM200 }, { PCI_VENDOR_LINKSYS, PCI_PRODUCT_LINKSYS_PCM200 }, + { PCI_VENDOR_HAWKING, PCI_PRODUCT_HAWKING_PN672TX }, + { PCI_VENDOR_MICROSOFT, PCI_PRODUCT_MICROSOFT_MN120 }, { 0 } }; @@ -162,13 +164,18 @@ dc_cardbus_attach(parent, self, aux) case PCI_VENDOR_ACCTON: case PCI_VENDOR_ABOCOM: case PCI_VENDOR_LINKSYS: + case PCI_VENDOR_HAWKING: + case PCI_VENDOR_MICROSOFT: if (PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_ADMTEK_AN985 || PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_ACCTON_EN2242 || PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_ABOCOM_FE2500 || PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_ABOCOM_PCM200 || - PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_LINKSYS_PCM200) { + PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_LINKSYS_PCM200 || + PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_HAWKING_PN672TX || + PCI_PRODUCT(ca->ca_id) == PCI_PRODUCT_MICROSOFT_MN120) { sc->dc_type = DC_TYPE_AN983; - sc->dc_flags |= DC_TX_USE_TX_INTR|DC_TX_ADMTEK_WAR; + sc->dc_flags |= DC_TX_USE_TX_INTR|DC_TX_ADMTEK_WAR | + DC_64BIT_HASH; sc->dc_pmode = DC_PMODE_MII; /* Don't read SROM for - auto-loaded on reset */ } diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c index af21bf330c0..5152af1f7c8 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.48 2005/01/16 19:46:00 brad Exp $ */ +/* $OpenBSD: if_dc_pci.c,v 1.49 2005/01/16 20:47:44 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -105,6 +105,7 @@ struct dc_type dc_devs[] = { { PCI_VENDOR_CONEXANT, PCI_PRODUCT_CONEXANT_RS7112 }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_21145 }, { PCI_VENDOR_3COM, PCI_PRODUCT_3COM_3CSHO100BTX }, + { PCI_VENDOR_MICROSOFT, PCI_PRODUCT_MICROSOFT_MN130 }, { 0, 0 } }; @@ -331,17 +332,9 @@ void dc_pci_attach(parent, self, aux) pci_conf_write(pc, pa->pa_tag, DC_PCI_CFLT, command); } break; - case PCI_VENDOR_3COM: - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_3COM_3CSHO100BTX) { - found = 1; - sc->dc_type = DC_TYPE_AN983; - sc->dc_flags |= DC_TX_USE_TX_INTR; - sc->dc_flags |= DC_TX_ADMTEK_WAR; - sc->dc_pmode = DC_PMODE_MII; - /* Don't read SROM for - auto-loaded on reset */ - } - break; case PCI_VENDOR_ADMTEK: + case PCI_VENDOR_3COM: + case PCI_VENDOR_MICROSOFT: if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ADMTEK_AL981) { found = 1; sc->dc_type = DC_TYPE_AL981; @@ -350,7 +343,9 @@ void dc_pci_attach(parent, self, aux) sc->dc_pmode = DC_PMODE_MII; dc_read_srom(sc, sc->dc_romwidth); } - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ADMTEK_AN983) { + if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ADMTEK_AN983 || + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_3COM_3CSHO100BTX || + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_MICROSOFT_MN130) { found = 1; sc->dc_type = DC_TYPE_AN983; sc->dc_flags |= DC_TX_USE_TX_INTR; @@ -367,6 +362,7 @@ void dc_pci_attach(parent, self, aux) sc->dc_type = DC_TYPE_AN983; sc->dc_flags |= DC_TX_USE_TX_INTR; sc->dc_flags |= DC_TX_ADMTEK_WAR; + sc->dc_flags |= DC_64BIT_HASH; sc->dc_pmode = DC_PMODE_MII; /* Don't read SROM for - auto-loaded on reset */ } |