summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-01-04 08:04:44 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-01-04 08:04:44 +0000
commit9621dc4c2ac883b440f713dcfe971420fc251638 (patch)
tree10af8de51ceb3f2863f28bf488f406d23c77cb36 /sys/dev
parent0a2af6998a98513fad5e50f2849fde5e5fd1f483 (diff)
rename ccb_xs to ccb_cookie and change its type from a scsi_xfer * to a
void *. this lets us pass things other than scsi_xfers to ccb completion handlers.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/mfi.c10
-rw-r--r--sys/dev/ic/mfivar.h5
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index b7a56198da0..16ea2dfa97e 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.97 2010/01/04 07:57:28 dlg Exp $ */
+/* $OpenBSD: mfi.c,v 1.98 2010/01/04 08:04:43 dlg Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -177,7 +177,7 @@ mfi_put_ccb(struct mfi_ccb *ccb)
hdr->mfh_cmd_status = 0x0;
hdr->mfh_flags = 0x0;
ccb->ccb_state = MFI_CCB_FREE;
- ccb->ccb_xs = NULL;
+ ccb->ccb_cookie = NULL;
ccb->ccb_flags = 0;
ccb->ccb_done = NULL;
ccb->ccb_direction = 0;
@@ -870,7 +870,7 @@ mfi_scsi_io(struct mfi_ccb *ccb, struct scsi_xfer *xs, uint64_t blockno,
io->mif_sense_addr_hi = 0;
ccb->ccb_done = mfi_scsi_xs_done;
- ccb->ccb_xs = xs;
+ ccb->ccb_cookie = xs;
ccb->ccb_frame_size = MFI_IO_FRAME_SIZE;
ccb->ccb_sgl = &io->mif_sgl;
ccb->ccb_data = xs->data;
@@ -886,7 +886,7 @@ mfi_scsi_io(struct mfi_ccb *ccb, struct scsi_xfer *xs, uint64_t blockno,
void
mfi_scsi_xs_done(struct mfi_ccb *ccb)
{
- struct scsi_xfer *xs = ccb->ccb_xs;
+ struct scsi_xfer *xs = ccb->ccb_cookie;
struct mfi_softc *sc = ccb->ccb_sc;
struct mfi_frame_header *hdr = &ccb->ccb_frame->mfr_header;
@@ -953,7 +953,7 @@ mfi_scsi_ld(struct mfi_ccb *ccb, struct scsi_xfer *xs)
memcpy(pf->mpf_cdb, &xs->cmdstore, xs->cmdlen);
ccb->ccb_done = mfi_scsi_xs_done;
- ccb->ccb_xs = xs;
+ ccb->ccb_cookie = xs;
ccb->ccb_frame_size = MFI_PASS_FRAME_SIZE;
ccb->ccb_sgl = &pf->mpf_sgl;
diff --git a/sys/dev/ic/mfivar.h b/sys/dev/ic/mfivar.h
index c7518330607..09a4c715faa 100644
--- a/sys/dev/ic/mfivar.h
+++ b/sys/dev/ic/mfivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfivar.h,v 1.36 2010/01/04 07:57:28 dlg Exp $ */
+/* $OpenBSD: mfivar.h,v 1.37 2010/01/04 08:04:43 dlg Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -76,8 +76,7 @@ struct mfi_ccb {
#define MFI_DATA_IN 1
#define MFI_DATA_OUT 2
- struct scsi_xfer *ccb_xs;
-
+ void *ccb_cookie;
void (*ccb_done)(struct mfi_ccb *);
volatile enum {