diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-12 12:31:59 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-12 12:31:59 +0000 |
commit | f2554e7ea4f981e8323a53a8668a7e633ccdb158 (patch) | |
tree | a8bdae1bdbdf0fe75930b28645dcb9eda00fbee5 | |
parent | 725d0601ae69c1a97d2ffdd91bbe40913c5ceeab (diff) |
reset the reply pointer to NULL every time we get a context reply in
mpi_interrupt and mpi_completion. if we got an address reply followed by a
context reply we used to pass that same reply to both completion routines.
-rw-r--r-- | sys/dev/ic/mpi.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index 9235e12e108..ef2a1679f11 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.33 2006/06/12 03:55:39 dlg Exp $ */ +/* $OpenBSD: mpi.c,v 1.34 2006/06/12 12:31:58 dlg Exp $ */ /* * Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org> @@ -475,7 +475,7 @@ mpi_intr(void *arg) { struct mpi_softc *sc = arg; struct mpi_ccb *ccb; - struct mpi_msg_reply *reply = NULL; + struct mpi_msg_reply *reply; u_int32_t reply_dva; char *reply_addr; u_int32_t reg, id; @@ -513,6 +513,8 @@ mpi_intr(void *arg) panic("%s: unsupported context reply\n", DEVNAME(sc)); } + + reply = NULL; } DNPRINTF(MPI_D_INTR, "%s: mpi_intr id: %d\n", DEVNAME(sc), id); @@ -738,7 +740,7 @@ int mpi_complete(struct mpi_softc *sc, struct mpi_ccb *nccb, int timeout) { struct mpi_ccb *ccb; - struct mpi_msg_reply *reply = NULL; + struct mpi_msg_reply *reply; u_int32_t reply_dva; char *reply_addr; u_int32_t reg, id = 0xffffffff; @@ -786,6 +788,8 @@ mpi_complete(struct mpi_softc *sc, struct mpi_ccb *nccb, int timeout) panic("%s: unsupported context reply\n", DEVNAME(sc)); } + + reply = NULL; } DNPRINTF(MPI_D_INTR, "%s: mpi_complete id: %d\n", |