summaryrefslogtreecommitdiffstats
path: root/sys/dev/dc
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2003-07-10 18:43:17 +0000
committerwpaul <wpaul@FreeBSD.org>2003-07-10 18:43:17 +0000
commitab54f720139a9503efa3a9f37c35f48a84c0f789 (patch)
tree3309011d2d00ffd4ab30a5b099751df033c9b41d /sys/dev/dc
parent2184143037977814193cc1a055860d1eb9497c34 (diff)
downloadFreeBSD-src-ab54f720139a9503efa3a9f37c35f48a84c0f789.zip
FreeBSD-src-ab54f720139a9503efa3a9f37c35f48a84c0f789.tar.gz
Add support for a bunch of Microsoft networking products:
- MN-110 10/100 USB ethernet (ADMtek Pegasus II, if_aue) - MN-120 10/100 cardbus (ADMtek Centaur-C, if_dc) - MN-130 10/100 PCI (ADMtek Centaur-P, if_dc) Also update dc(4) man page to mention support for MN-120 and MN-130.
Diffstat (limited to 'sys/dev/dc')
-rw-r--r--sys/dev/dc/if_dc.c20
-rw-r--r--sys/dev/dc/if_dcreg.h14
2 files changed, 34 insertions, 0 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 19ba308..42dd8c9 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -202,6 +202,12 @@ static struct dc_type dc_devs[] = {
"PlaneX FNW-3602-T CardBus 10/100" },
{ DC_VENDORID_3COM, DC_DEVICEID_3CSOHOB,
"3Com OfficeConnect 10/100B" },
+ { DC_VENDORID_MICROSOFT, DC_DEVICEID_MSMN120,
+ "Microsoft MN-120 CardBus 10/100" },
+ { DC_VENDORID_MICROSOFT, DC_DEVICEID_MSMN130,
+ "Microsoft MN-130 10/100" },
+ { DC_VENDORID_MICROSOFT, DC_DEVICEID_MSMN130_FAKE,
+ "Microsoft MN-130 10/100" },
{ 0, 0, NULL }
};
@@ -1587,6 +1593,18 @@ dc_devtype(device_t dev)
if (t->dc_did == DC_DEVICEID_DM9102 &&
rev >= DC_REVISION_DM9102A)
t++;
+ /*
+ * The Microsoft MN-130 has a device ID of 0x0002,
+ * which happens to be the same as the PNIC 82c168.
+ * To keep dc_attach() from getting confused, we
+ * pretend its ID is something different.
+ * XXX: ideally, dc_attach() should be checking
+ * vendorid+deviceid together to avoid such
+ * collisions.
+ */
+ if (t->dc_vid == DC_VENDORID_MICROSOFT &&
+ t->dc_did == DC_DEVICEID_MSMN130)
+ t++;
return (t);
}
t++;
@@ -1927,6 +1945,8 @@ dc_attach(device_t dev)
case DC_DEVICEID_EN2242:
case DC_DEVICEID_HAWKING_PN672TX:
case DC_DEVICEID_3CSOHOB:
+ case DC_DEVICEID_MSMN120:
+ case DC_DEVICEID_MSMN130_FAKE: /* XXX avoid collision with PNIC*/
sc->dc_type = DC_TYPE_AN985;
sc->dc_flags |= DC_64BIT_HASH;
sc->dc_flags |= DC_TX_USE_TX_INTR;
diff --git a/sys/dev/dc/if_dcreg.h b/sys/dev/dc/if_dcreg.h
index edbefef..e4ad2b9 100644
--- a/sys/dev/dc/if_dcreg.h
+++ b/sys/dev/dc/if_dcreg.h
@@ -985,6 +985,20 @@ struct dc_softc {
#define DC_DEVICEID_HAWKING_PN672TX 0xab08
/*
+ * Microsoft device ID.
+ */
+#define DC_VENDORID_MICROSOFT 0x1414
+
+/*
+ * Supported Microsoft PCI and cardbus NICs. These are really
+ * ADMtek parts in disguise.
+ */
+
+#define DC_DEVICEID_MSMN120 0x0001
+#define DC_DEVICEID_MSMN130 0x0002
+#define DC_DEVICEID_MSMN130_FAKE 0xFFF2
+
+/*
* PCI low memory base and low I/O base register, and
* other PCI registers.
*/
OpenPOWER on IntegriCloud