Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/vsa If we panic before the vsbus is found, don'...
details: https://anonhg.NetBSD.org/src/rev/8c84a9080e73
branches: trunk
changeset: 486614:8c84a9080e73
user: ragge <ragge%NetBSD.org@localhost>
date: Fri May 26 21:05:01 2000 +0000
description:
If we panic before the vsbus is found, don't panic again.
diffstat:
sys/arch/vax/vsa/vsbus.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r db40a3728834 -r 8c84a9080e73 sys/arch/vax/vsa/vsbus.c
--- a/sys/arch/vax/vsa/vsbus.c Fri May 26 20:59:07 2000 +0000
+++ b/sys/arch/vax/vsa/vsbus.c Fri May 26 21:05:01 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vsbus.c,v 1.24 2000/04/23 16:38:54 matt Exp $ */
+/* $NetBSD: vsbus.c,v 1.25 2000/05/26 21:05:01 ragge Exp $ */
/*
* Copyright (c) 1996, 1999 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -248,9 +248,13 @@
vsbus_setmask(mask)
unsigned char mask;
{
- struct vsbus_softc *sc = vsbus_cd.cd_devs[0];
+ struct vsbus_softc *sc;
unsigned char ch;
+ if (vsbus_cd.cd_ndevs == 0)
+ return 0;
+ sc = vsbus_cd.cd_devs[0];
+
ch = *sc->sc_intmsk;
*sc->sc_intmsk = mask;
return ch;
@@ -263,7 +267,11 @@
vsbus_clrintr(mask)
unsigned char mask;
{
- struct vsbus_softc *sc = vsbus_cd.cd_devs[0];
+ struct vsbus_softc *sc;
+
+ if (vsbus_cd.cd_ndevs == 0)
+ return;
+ sc = vsbus_cd.cd_devs[0];
*sc->sc_intclr = mask;
}
Home |
Main Index |
Thread Index |
Old Index