diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-08 12:28:00 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-08 12:28:00 +0000 |
commit | c9abe1fb637da922db4556b85cc89c98afe4b028 (patch) | |
tree | 0c0063dc4d01b781be8bd2246810709c28de7953 | |
parent | f01c943df46fd2e77e2e7049ba6ae6026dc41b87 (diff) |
dont panic on empty portfacts or portenable replies. we should probably
retry the init sequence if this happens.
-rw-r--r-- | sys/dev/ic/mpi.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index db78328b977..206da8c1c99 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.26 2006/06/06 14:51:29 dlg Exp $ */ +/* $OpenBSD: mpi.c,v 1.27 2006/06/08 12:27:59 dlg Exp $ */ /* * Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org> @@ -1401,8 +1401,10 @@ mpi_portfacts(struct mpi_softc *sc) } pfp = ccb->ccb_reply; - if (pfp == NULL) - panic("%s: empty portfacts reply\n", DEVNAME(sc)); + if (pfp == NULL) { + DPRINTF("%s: empty portfacts reply\n", DEVNAME(sc)); + return (1); + } #ifdef MPI_DEBUG if (mpidebug) { @@ -1539,8 +1541,10 @@ mpi_portenable(struct mpi_softc *sc) } pep = ccb->ccb_reply; - if (pep == NULL) - panic("%s: empty portenable reply\n", DEVNAME(sc)); + if (pep == NULL) { + DPRINTF("%s: empty portenable reply\n", DEVNAME(sc)); + return (1); + } mpi_push_reply(sc, ccb->ccb_reply_dva); mpi_put_ccb(sc, ccb); |