From 720e17c11edd6c80f84bb9ce0e13282feef04a09 Mon Sep 17 00:00:00 2001 From: onoe Date: Mon, 27 Mar 2000 12:54:59 +0000 Subject: Do not try to lock out MAC until the firmware correctly start up, to avoid "awi: failed to lock interrupt" message when IRQ are shared with other devices [PR kern/9660] --- sys/dev/ic/awi.c | 6 ++++-- sys/dev/ic/awivar.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ic/awi.c b/sys/dev/ic/awi.c index 2eee9204869..cfdc452cca9 100644 --- a/sys/dev/ic/awi.c +++ b/sys/dev/ic/awi.c @@ -1,4 +1,4 @@ -/* $NetBSD: awi.c,v 1.14 2000/03/27 12:52:45 onoe Exp $ */ +/* $NetBSD: awi.c,v 1.15 2000/03/27 12:54:59 onoe Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -867,7 +867,7 @@ awi_intr(arg) u_int16_t status; int error, handled = 0, ocansleep; - if (sc->sc_invalid) + if (!sc->sc_enabled || !sc->sc_enab_intr || sc->sc_invalid) return 0; am79c930_gcr_setbits(&sc->sc_chip, @@ -1490,6 +1490,7 @@ awi_init_hw(sc) int i, error; u_int8_t banner[AWI_BANNER_LEN]; + sc->sc_enab_intr = 0; awi_drvstate(sc, AWI_DRV_RESET); /* reset firmware */ @@ -1535,6 +1536,7 @@ awi_init_hw(sc) } /* initializing interrupt */ + sc->sc_enab_intr = 1; error = awi_intr_lock(sc); if (error) return error; diff --git a/sys/dev/ic/awivar.h b/sys/dev/ic/awivar.h index a3e4995f2f5..df9df0d8aee 100644 --- a/sys/dev/ic/awivar.h +++ b/sys/dev/ic/awivar.h @@ -1,4 +1,4 @@ -/* $NetBSD: awivar.h,v 1.6 2000/03/22 11:22:22 onoe Exp $ */ +/* $NetBSD: awivar.h,v 1.7 2000/03/27 12:55:00 onoe Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -105,6 +105,7 @@ struct awi_softc sc_busy:1, sc_cansleep:1, sc_invalid:1, + sc_enab_intr:1, sc_cmd_inprog:1, sc_format_llc:1, sc_start_bss:1, -- cgit