summaryrefslogtreecommitdiff
path: root/sys/scsi/sdvar.h
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2009-12-01 01:40:03 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2009-12-01 01:40:03 +0000
commit56901e51ebf1db9a1c61f31f83c5b6e63d702f20 (patch)
treee67ac5f8cc1747cdb9604d963d72edfc3d46c789 /sys/scsi/sdvar.h
parent92a8e1a40ad01eb3ce5d68d4a5b10308e44cdf34 (diff)
put the midlayer changes back in.
the two issues affecting it last time are gone. the first, mishandling of TRY_AGAIN_LATER is not relevant now that krw got rid of TRY_AGAIN_LATER. the second, the misbehaving IBM disk was found to be a problem with siop using ordered tags on most ops combined with the speed of the new code. putting this in so we can move forward. ok krw@ "commit please" marco@
Diffstat (limited to 'sys/scsi/sdvar.h')
-rw-r--r--sys/scsi/sdvar.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/scsi/sdvar.h b/sys/scsi/sdvar.h
index 7147b6f6f0e..d9b8d2837a6 100644
--- a/sys/scsi/sdvar.h
+++ b/sys/scsi/sdvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdvar.h,v 1.23 2009/11/12 06:20:27 dlg Exp $ */
+/* $OpenBSD: sdvar.h,v 1.24 2009/12/01 01:40:02 dlg Exp $ */
/* $NetBSD: sdvar.h,v 1.7 1998/08/17 00:49:03 mycroft Exp $ */
/*-
@@ -49,10 +49,10 @@
#ifdef _KERNEL
struct sd_softc {
- struct device sc_dev;
- struct disk sc_dk;
+ struct device sc_dev;
+ struct disk sc_dk;
- int flags;
+ int flags;
#define SDF_LOCKED 0x01
#define SDF_WANTED 0x02
#define SDF_WLABEL 0x04 /* label is writable */
@@ -60,7 +60,8 @@ struct sd_softc {
#define SDF_ANCIENT 0x10 /* disk is ancient; for minphys */
#define SDF_DIRTY 0x20 /* disk is dirty; needs cache flush */
#define SDF_DYING 0x40 /* dying, when deactivated */
- struct scsi_link *sc_link; /* contains our targ, lun, etc. */
+#define SDF_WAITING 0x80 /* bus is busy, try again later */
+ struct scsi_link *sc_link; /* contains our targ, lun, etc. */
struct disk_parms {
u_long heads; /* number of heads */
u_long cyls; /* number of cylinders */
@@ -69,9 +70,11 @@ struct sd_softc {
u_long rot_rate; /* rotational rate, in RPM */
daddr64_t disksize; /* total number sectors */
} params;
- struct buf buf_queue;
+ struct mutex sc_buf_mtx;
+ struct buf sc_buf_queue;
void *sc_sdhook; /* our shutdown hook */
struct timeout sc_timeout;
+
};
#define SDGP_RESULT_OK 0 /* parameters obtained */