diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-03 06:47:59 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-03 06:47:59 +0000 |
commit | 7c12b4a111b1f32305f716cd7e0cb91f87259809 (patch) | |
tree | 80124add3ebbea8c47b19a3de112b5a9ecbc6fc6 | |
parent | f237769b46c16ab0a5d0a718f379ef00b1f0cedf (diff) |
rename ccb_xs to ccb_cookie, and switch it from a struct scsi_xfer * to a
void *. this will let me stash things other than scsi xfers in the ccb for
ccb_done handlers to use.
-rw-r--r-- | sys/dev/ic/mpi.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/mpivar.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index cff3af3e27c..256bdc93308 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.127 2010/01/03 06:41:22 dlg Exp $ */ +/* $OpenBSD: mpi.c,v 1.128 2010/01/03 06:47:58 dlg Exp $ */ /* * Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org> @@ -1048,7 +1048,7 @@ mpi_put_ccb(struct mpi_softc *sc, struct mpi_ccb *ccb) DNPRINTF(MPI_D_CCB, "%s: mpi_put_ccb %p\n", DEVNAME(sc), ccb); ccb->ccb_state = MPI_CCB_FREE; - ccb->ccb_xs = NULL; + ccb->ccb_cookie = NULL; ccb->ccb_done = NULL; bzero(ccb->ccb_cmd, MPI_REQUEST_SIZE); mtx_enter(&sc->sc_ccb_mtx); @@ -1205,7 +1205,7 @@ mpi_scsi_cmd(struct scsi_xfer *xs) DNPRINTF(MPI_D_CMD, "%s: ccb_id: %d xs->flags: 0x%x\n", DEVNAME(sc), ccb->ccb_id, xs->flags); - ccb->ccb_xs = xs; + ccb->ccb_cookie = xs; ccb->ccb_done = mpi_scsi_cmd_done; mcb = ccb->ccb_cmd; @@ -1282,7 +1282,7 @@ void mpi_scsi_cmd_done(struct mpi_ccb *ccb) { struct mpi_softc *sc = ccb->ccb_sc; - struct scsi_xfer *xs = ccb->ccb_xs; + struct scsi_xfer *xs = ccb->ccb_cookie; struct mpi_ccb_bundle *mcb = ccb->ccb_cmd; bus_dmamap_t dmap = ccb->ccb_dmamap; struct mpi_msg_scsi_io_error *sie; @@ -1408,7 +1408,7 @@ int mpi_load_xs(struct mpi_ccb *ccb) { struct mpi_softc *sc = ccb->ccb_sc; - struct scsi_xfer *xs = ccb->ccb_xs; + struct scsi_xfer *xs = ccb->ccb_cookie; struct mpi_ccb_bundle *mcb = ccb->ccb_cmd; struct mpi_msg_scsi_io *io = &mcb->mcb_io; struct mpi_sge *sge, *nsge = &mcb->mcb_sgl[0]; diff --git a/sys/dev/ic/mpivar.h b/sys/dev/ic/mpivar.h index 2147c64c05c..e3431224b53 100644 --- a/sys/dev/ic/mpivar.h +++ b/sys/dev/ic/mpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mpivar.h,v 1.27 2010/01/03 06:36:50 dlg Exp $ */ +/* $OpenBSD: mpivar.h,v 1.28 2010/01/03 06:47:58 dlg Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -77,7 +77,7 @@ struct mpi_ccb { struct mpi_softc *ccb_sc; int ccb_id; - struct scsi_xfer *ccb_xs; + void *ccb_cookie; bus_dmamap_t ccb_dmamap; bus_addr_t ccb_offset; |