summaryrefslogtreecommitdiff
path: root/sys/scsi/ssvar.h
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-01-02 23:28:52 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-01-02 23:28:52 +0000
commitf810d7ce65c2aa4c6906749ce6f29fd031b0f846 (patch)
tree1a098a2c793f85dc83159ccfec12921567024459 /sys/scsi/ssvar.h
parentc659e107d06ed65114e6fdb1be2dde76d5b3da41 (diff)
move the buf handling from using scsi_scsi_cmd over to scsi_xs_exec. i
think this is the last chunk of code using a buf pointer in the scsi_xfer now. this has not been tested due to a lack of hardware anywhere. if there are problems please report them as soon as possible. ok krw@ miod@
Diffstat (limited to 'sys/scsi/ssvar.h')
-rw-r--r--sys/scsi/ssvar.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/scsi/ssvar.h b/sys/scsi/ssvar.h
index 0c5d39546b3..441e0e0ba80 100644
--- a/sys/scsi/ssvar.h
+++ b/sys/scsi/ssvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssvar.h,v 1.12 2008/11/10 18:04:41 deraadt Exp $ */
+/* $OpenBSD: ssvar.h,v 1.13 2010/01/02 23:28:51 dlg Exp $ */
/* $NetBSD: ssvar.h,v 1.2 1996/03/30 21:47:11 christos Exp $ */
/*
@@ -51,7 +51,7 @@ struct ss_special {
int (*get_params)(struct ss_softc *);
/* some scanners only send line-multiples */
void (*minphys)(struct ss_softc *, struct buf *);
- int (*read)(struct ss_softc *, struct buf *);
+ int (*read)(struct ss_softc *, struct scsi_xfer *, struct buf *);
int (*rewind_scanner)(struct ss_softc *);
int (*load_adf)(struct ss_softc *);
int (*unload_adf)(struct ss_softc *);
@@ -67,13 +67,22 @@ struct ss_softc {
int flags;
#define SSF_TRIGGERED 0x01 /* read operation has been primed */
#define SSF_LOADED 0x02 /* parameters loaded */
+#define SSF_WAITING 0x04
+#define SSF_STARTING 0x08
struct scsi_link *sc_link; /* contains our targ, lun, etc. */
struct scan_io sio;
struct buf buf_queue; /* the queue of pending IO operations */
const struct quirkdata *quirkdata; /* if we have a rogue entry */
struct ss_special special; /* special handlers for spec. devices */
+ struct timeout timeout;
+ struct mutex queue_mtx;
+ struct mutex start_mtx;
};
+struct buf *ss_buf_dequeue(struct ss_softc *);
+void ss_buf_enqueue(struct ss_softc *, struct buf *);
+void ss_buf_requeue(struct ss_softc *, struct buf *);
+
/*
* define the special attach routines if configured
*/