diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-10-12 00:53:33 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2010-10-12 00:53:33 +0000 |
commit | a00c37d04e43794430c084035699e18c19d2826a (patch) | |
tree | 8d718c1a941578299947619c3be3908455fdae96 /sys/scsi | |
parent | e04f4ebd8cfdde3e5c356d99ac819b3964ac1fcc (diff) |
Force openings to 1 for devices that can't do tagged i/o, i.e. more
than 1 i/o active at once. This reduces the chances that concurrent
i/o's for such devices will confuse the device or the adapter code.
It also eliminates a reason for adapter code to maintain its own
queues.
Tweak all drivers that fake INQUIRY results to set the SID_CmdQue
flag, thus continuing to claim to be able to do tagged i/o.
Positive feedback from matthew@ and marco@ for an earlier version.
ok dlg@
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsiconf.c | 8 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index fe1262ded9b..839f43624c0 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.166 2010/09/08 00:58:05 dlg Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.167 2010/10/12 00:53:32 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -1008,6 +1008,12 @@ scsi_probedev(struct scsibus_softc *scsi, int target, int lun) sc_link->quirks |= finger->quirks; /* + * If the device can't use tags, >1 opening may confuse it. + */ + if (ISSET(sc_link->quirks, SDEV_NOTAGS)) + sc_link->openings = 1; + + /* * note what BASIC type of device it is */ if ((inqbuf->dev_qual2 & SID_REMOVABLE) != 0) diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 21be0e0f57f..3b98b3e50ad 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.140 2010/09/20 00:19:47 dlg Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.141 2010/10/12 00:53:32 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -585,7 +585,7 @@ void scsi_remove_link(struct scsibus_softc *, struct scsi_link *); extern const u_int8_t version_to_spc[]; -#define SCSISPC(x)(version_to_spc[(x) & SID_ANSII]) +#define SCSISPC(x) (version_to_spc[(x) & SID_ANSII]) struct scsi_xfer * scsi_xs_get(struct scsi_link *, int); void scsi_xs_exec(struct scsi_xfer *); |