summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-06-18 00:10:25 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-06-18 00:10:25 +0000
commitc8f5ae8677984294cadb3869d8913205ca67dc4d (patch)
treeca4afeb3a8ab02fe3edf0f4d4d610996eaef2587 /sys/dev/ic
parent7385dff5c7c26bd4cbe4d8f21ab3fdd43e704892 (diff)
Don't walk memory whenever there is nothing there. I ran into this while
debugging FC stuff.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/mpi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index 1712936b5ed..e18e9d37256 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.45 2006/06/18 00:08:00 marco Exp $ */
+/* $OpenBSD: mpi.c,v 1.46 2006/06/18 00:10:24 marco Exp $ */
/*
* Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org>
@@ -1972,6 +1972,10 @@ mpi_get_raid(struct mpi_softc *sc)
DEVNAME(sc), sc->sc_ioc_pg2->no_active_phys_disks,
sc->sc_ioc_pg2->max_phys_disks);
+ /* don't walk list if there are no RAID capability */
+ if (letoh32(sc->sc_ioc_pg2->capabilities) == 0xdeadbeef)
+ return;
+
for (i = 0; i < sc->sc_ioc_pg2->max_vols; i++) {
raidvol = &sc->sc_ioc_pg2->raid_vol[i];
DNPRINTF(MPI_D_RAID, "%s: id: %#02x bus: %d ioc: %d page: %d "