summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2012-02-28 08:58:31 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2012-02-28 08:58:31 +0000
commitdefa3ca81a159ef85dc08c0db08d67d914b163d9 (patch)
treec16a8755c70a8baa3967b72b6c42da1358e3b9a0 /sys
parentea3ebdd40ba14a89ee759e9c04260efb49636a2a (diff)
add support for the MCS7832 which is apparently a low pin count
version of the MCS7830 with no software visible changes besides a new product id. from brad
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/if_mos.c12
-rw-r--r--sys/dev/usb/if_mosreg.h3
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c
index 4489b4ab5d9..c96146f60e6 100644
--- a/sys/dev/usb/if_mos.c
+++ b/sys/dev/usb/if_mos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mos.c,v 1.15 2011/07/03 15:47:17 matthew Exp $ */
+/* $OpenBSD: if_mos.c,v 1.16 2012/02/28 08:58:30 jsg Exp $ */
/*
* Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net>
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
/*
- * Moschip MCS7730/MCS7830 USB to Ethernet controller
+ * Moschip MCS7730/MCS7830/MCS7832 USB to Ethernet controller
* The datasheet is available at the following URL:
* http://www.moschip.com/data/products/MCS7830/Data%20Sheet_7830.pdf
*/
@@ -129,6 +129,7 @@ int mosdebug = 0;
const struct mos_type mos_devs[] = {
{ { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7730 }, MCS7730 },
{ { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7830 }, MCS7830 },
+ { { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7832 }, MCS7832 },
{ { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_LN030 }, MCS7830 },
};
#define mos_lookup(v, p) ((struct mos_type *)usb_lookup(mos_devs, v, p))
@@ -696,11 +697,12 @@ mos_attach(struct device *parent, struct device *self, void *aux)
printf("%s:", sc->mos_dev.dv_xname);
- if (sc->mos_flags & MCS7730) {
+ if (sc->mos_flags & MCS7730)
printf(" MCS7730");
- } else if (sc->mos_flags & MCS7830) {
+ else if (sc->mos_flags & MCS7830)
printf(" MCS7830");
- }
+ else if (sc->mos_flags & MCS7832)
+ printf(" MCS7832");
mos_chip_init(sc);
diff --git a/sys/dev/usb/if_mosreg.h b/sys/dev/usb/if_mosreg.h
index 34b51161ac6..c1732ece7bc 100644
--- a/sys/dev/usb/if_mosreg.h
+++ b/sys/dev/usb/if_mosreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mosreg.h,v 1.4 2010/12/06 04:41:39 jakemsr Exp $ */
+/* $OpenBSD: if_mosreg.h,v 1.5 2012/02/28 08:58:30 jsg Exp $ */
/*
* Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net>
@@ -140,6 +140,7 @@ struct mos_type {
u_int16_t mos_flags;
#define MCS7730 0x0001 /* MCS7730 */
#define MCS7830 0x0002 /* MCS7830 */
+#define MCS7832 0x0004 /* MCS7832 */
};
#define MOS_INC(x, y) (x) = (x + 1) % y