diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-01 21:32:16 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-06-01 21:32:16 +0000 |
commit | 81eb534391226922b3a62e3683dd3f9adc73182e (patch) | |
tree | 27db9e0cd3b9675fe4a7b61d14ce4371a6e80691 /sys | |
parent | 1ca75a8186dffae1436a988a506991f6aac65110 (diff) |
leave the reply_dva address alone so we can post it back to the ioc rather
than posting back the offset of the reply frame to the start of the reply
space.
nobody likes panics, even if theyre free.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/mpi.c | 12 | ||||
-rw-r--r-- | sys/dev/ic/mpivar.h | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index 1cede99bee0..1a587e14c93 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.23 2006/06/01 04:36:19 dlg Exp $ */ +/* $OpenBSD: mpi.c,v 1.24 2006/06/01 21:32:15 dlg Exp $ */ /* * Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org> @@ -243,9 +243,10 @@ mpi_intr(void *arg) BUS_DMASYNC_POSTREAD); reply_dva = (reg & MPI_REPLY_QUEUE_ADDRESS_MASK) << 1; - reply_dva -= (u_int32_t)MPI_DMA_DVA(sc->sc_replies); - reply_addr = MPI_DMA_KVA(sc->sc_replies) + reply_dva; + reply_addr = MPI_DMA_KVA(sc->sc_replies); + reply_addr += reply_dva - + (u_int32_t)MPI_DMA_DVA(sc->sc_replies); reply = (struct mpi_msg_reply *)reply_addr; id = letoh32(reply->msg_context); @@ -486,9 +487,10 @@ mpi_complete(struct mpi_softc *sc, struct mpi_ccb *nccb, int timeout) BUS_DMASYNC_POSTREAD); reply_dva = (reg & MPI_REPLY_QUEUE_ADDRESS_MASK) << 1; - reply_dva -= (u_int32_t)MPI_DMA_DVA(sc->sc_replies); - reply_addr = MPI_DMA_KVA(sc->sc_replies) + reply_dva; + reply_addr = MPI_DMA_KVA(sc->sc_replies); + reply_addr += reply_dva - + (u_int32_t)MPI_DMA_DVA(sc->sc_replies); reply = (struct mpi_msg_reply *)reply_addr; id = letoh32(reply->msg_context); diff --git a/sys/dev/ic/mpivar.h b/sys/dev/ic/mpivar.h index 0abda114695..29eb1caff41 100644 --- a/sys/dev/ic/mpivar.h +++ b/sys/dev/ic/mpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mpivar.h,v 1.6 2006/06/01 04:36:19 dlg Exp $ */ +/* $OpenBSD: mpivar.h,v 1.7 2006/06/01 21:32:15 dlg Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -63,7 +63,7 @@ struct mpi_ccb { } ccb_state; void (*ccb_done)(struct mpi_ccb *); void *ccb_reply; - paddr_t ccb_reply_dva; + u_int32_t ccb_reply_dva; TAILQ_ENTRY(mpi_ccb) ccb_link; }; |