summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2010-01-20 08:40:42 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2010-01-20 08:40:42 +0000
commitf597ac200f4b40c3b7492eead6a360f8ce425efd (patch)
tree477aab694bfee9a2342ddfa7037b7bace79bb7ce /sys/dev/ic
parent9c2a180d863ef4ed48ce3fbea8e41e389cbbb63e (diff)
Remove horrible hack in ahc/ahd that made some commands retry
endlessly. Use the shiny new XS_NO_CCB instead to retry commands that can't start. Neither dlg@ nor I can figure out why 4.6 and earlier worked. Problem noted, debugged with and fix tested by Jeff Ross and his new external enclosure. Thanks! ok dlg@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/aic79xx_openbsd.c14
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c14
2 files changed, 6 insertions, 22 deletions
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c
index 472f2ff5226..fb8521e03bf 100644
--- a/sys/dev/ic/aic79xx_openbsd.c
+++ b/sys/dev/ic/aic79xx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic79xx_openbsd.c,v 1.34 2010/01/10 00:10:23 krw Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.35 2010/01/20 08:40:41 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -200,14 +200,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
case CAM_REQ_CMP:
switch (xs->status) {
case SCSI_TASKSET_FULL:
- /* SCSI Layer won't requeue, so we force infinite
- * retries until queue space is available. XS_BUSY
- * is dangerous because if the NOSLEEP flag is set
- * it can cause the I/O to return EIO. XS_BUSY code
- * falls through to XS_TIMEOUT anyway.
- */
- xs->error = XS_TIMEOUT;
- xs->retries++;
+ xs->error = XS_NO_CCB;
break;
case SCSI_BUSY:
xs->error = XS_BUSY;
@@ -236,8 +229,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
xs->error = XS_RESET;
break;
case CAM_REQUEUE_REQ:
- xs->error = XS_TIMEOUT;
- xs->retries++;
+ xs->error = XS_NO_CCB;
break;
case CAM_SEL_TIMEOUT:
xs->error = XS_SELTIMEOUT;
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index eb24a34fbfa..bbf8894e1de 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.44 2010/01/10 00:10:23 krw Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.45 2010/01/20 08:40:41 krw Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -209,14 +209,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
case CAM_REQ_CMP:
switch (xs->status) {
case SCSI_TASKSET_FULL:
- /* SCSI Layer won't requeue, so we force infinite
- * retries until queue space is available. XS_BUSY
- * is dangerous because if the NOSLEEP flag is set
- * it can cause the I/O to return EIO. XS_BUSY code
- * falls through to XS_TIMEOUT anyway.
- */
- xs->error = XS_TIMEOUT;
- xs->retries++;
+ xs->error = XS_NO_CCB;
break;
case SCSI_BUSY:
xs->error = XS_BUSY;
@@ -245,8 +238,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
xs->error = XS_RESET;
break;
case CAM_REQUEUE_REQ:
- xs->error = XS_TIMEOUT;
- xs->retries++;
+ xs->error = XS_NO_CCB;
break;
case CAM_SEL_TIMEOUT:
xs->error = XS_SELTIMEOUT;