Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/ingenic add miivar.h and put a stop gap to com...
details: https://anonhg.NetBSD.org/src/rev/10598a0a6047
branches: trunk
changeset: 970724:10598a0a6047
user: nisimura <nisimura%NetBSD.org@localhost>
date: Thu Apr 02 13:03:03 2020 +0000
description:
add miivar.h and put a stop gap to compile.
diffstat:
sys/arch/mips/ingenic/ingenic_dme.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diffs (59 lines):
diff -r 63f73a89ddb2 -r 10598a0a6047 sys/arch/mips/ingenic/ingenic_dme.c
--- a/sys/arch/mips/ingenic/ingenic_dme.c Thu Apr 02 13:02:05 2020 +0000
+++ b/sys/arch/mips/ingenic/ingenic_dme.c Thu Apr 02 13:03:03 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ingenic_dme.c,v 1.3 2017/05/19 07:43:31 skrll Exp $ */
+/* $NetBSD: ingenic_dme.c,v 1.4 2020/04/02 13:03:03 nisimura Exp $ */
/*-
* Copyright (c) 2015 Michael Lorenz
@@ -27,14 +27,13 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ingenic_dme.c,v 1.3 2017/05/19 07:43:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ingenic_dme.c,v 1.4 2020/04/02 13:03:03 nisimura Exp $");
#include <sys/param.h>
-#include <sys/systm.h>
+#include <sys/intr.h>
+#include <sys/bus.h>
#include <sys/device.h>
-#include <sys/mutex.h>
-#include <sys/bus.h>
-#include <sys/workqueue.h>
+#include <sys/systm.h>
#include <mips/ingenic/ingenic_var.h>
#include <mips/ingenic/ingenic_regs.h>
@@ -42,6 +41,7 @@
#include <net/if.h>
#include <net/if_ether.h>
#include <net/if_media.h>
+#include <dev/mii/miivar.h>
#include <dev/ic/dm9000var.h>
#include <dev/ic/dm9000reg.h>
@@ -132,7 +132,7 @@
13);
goto fail;
}
-
+#if 0
eaddrprop = prop_dictionary_get(device_properties(self), "mac-address");
if (eaddrprop != NULL && prop_data_size(eaddrprop) == ETHER_ADDR_LEN) {
@@ -148,6 +148,13 @@
aprint_error_dev(self, "reading MAC address from chip\n");
dme_read_c(sc, DM9000_PAB0, enaddr, 6);
}
+#else
+ (void)eaddrprop;
+ /*
+ * dme_attach checks dictionary, then previous setting, then roll
+ * a dice to make random MAC address
+ */
+#endif
dme_attach(sc, enaddr);
return;
fail:
Home |
Main Index |
Thread Index |
Old Index