summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordownsj <downsj@openbsd.org>1997-08-08 08:05:40 +0000
committerdownsj <downsj@openbsd.org>1997-08-08 08:05:40 +0000
commitd5d7e4d9ad39c151bf69c92ff2390d81616bc8c3 (patch)
treec99d94e03715278aa045ebd4264c10c74f948294
parenthardcode keyboard probe to 1 for now (diff)
downloadwireguard-openbsd-d5d7e4d9ad39c151bf69c92ff2390d81616bc8c3.tar.xz
wireguard-openbsd-d5d7e4d9ad39c151bf69c92ff2390d81616bc8c3.zip
Add hwreset callback; drivers need to set this appropiately.
-rw-r--r--sys/dev/ic/am7990.c6
-rw-r--r--sys/dev/ic/am7990var.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c
index a6a59211d01..a14e780c117 100644
--- a/sys/dev/ic/am7990.c
+++ b/sys/dev/ic/am7990.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: am7990.c,v 1.9 1996/11/28 23:27:46 niklas Exp $ */
+/* $OpenBSD: am7990.c,v 1.10 1997/08/08 08:05:40 downsj Exp $ */
/* $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $ */
/*-
@@ -304,6 +304,10 @@ am7990_init(sc)
(*sc->sc_wrcsr)(sc, LE_CSR0, LE_C0_STOP);
DELAY(100);
+ /* Newer LANCE chips have a reset register */
+ if (sc->sc_hwreset)
+ (*sc->sc_hwreset)(sc);
+
/* Set the correct byte swapping mode, etc. */
(*sc->sc_wrcsr)(sc, LE_CSR3, sc->sc_conf3);
diff --git a/sys/dev/ic/am7990var.h b/sys/dev/ic/am7990var.h
index d73b807654f..fa171c1e298 100644
--- a/sys/dev/ic/am7990var.h
+++ b/sys/dev/ic/am7990var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: am7990var.h,v 1.6 1996/11/28 23:27:47 niklas Exp $ */
+/* $OpenBSD: am7990var.h,v 1.7 1997/08/08 08:05:42 downsj Exp $ */
/* $NetBSD: am7990var.h,v 1.8 1996/07/05 23:57:01 abrown Exp $ */
/*
@@ -77,6 +77,7 @@ struct am7990_softc {
* Machine-dependent functions:
*
* read/write CSR
+ * hardware reset hook - may be NULL
* hardware init hook - may be NULL
* no carrier hook - may be NULL
*/
@@ -84,6 +85,7 @@ struct am7990_softc {
__P((struct am7990_softc *, u_int16_t));
void (*sc_wrcsr)
__P((struct am7990_softc *, u_int16_t, u_int16_t));
+ void (*sc_hwreset) __P((struct am7990_softc *));
void (*sc_hwinit) __P((struct am7990_softc *));
void (*sc_nocarrier) __P((struct am7990_softc *));