summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2001-11-11 21:59:20 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2001-11-11 21:59:20 +0000
commit6916b480bce82c1dc07719d41631a38c56a6a62c (patch)
tree4319e49fb9d88f23070990c77c56cfc4a80229d3 /sys
parent2724970bafb70b3309e7bce0a52a619fce5dfac2 (diff)
Remove local defines for SCSI status codes and use those now
defined in scsi_all.h.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/adw.c22
-rw-r--r--sys/dev/ic/adwlib.h17
-rw-r--r--sys/dev/ic/iha.c10
-rw-r--r--sys/dev/ic/iha.h8
4 files changed, 18 insertions, 39 deletions
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index cdbdacfd710..570b5797ca2 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.24 2001/11/06 19:53:18 miod Exp $ */
+/* $OpenBSD: adw.c,v 1.25 2001/11/11 21:59:19 krw Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -1233,32 +1233,32 @@ NO_ERROR:
switch (scsiq->host_status) {
case QHSTA_NO_ERROR:
switch (scsiq->scsi_status) {
- case SCSI_STATUS_CONDITION_MET:
- case SCSI_STATUS_INTERMID:
- case SCSI_STATUS_INTERMID_COND_MET:
+ case SCSI_COND_MET:
+ case SCSI_INTERM:
+ case SCSI_INTERM_COND_MET:
/*
* These non-zero status values are
* not really error conditions.
*
* XXX - would it be too paranoid to
- * add SCSI_STATUS_GOOD here in
+ * add SCSI_OK here in
* case the docs are wrong re
* QD_NO_ERROR?
*/
goto NO_ERROR;
- case SCSI_STATUS_CHECK_CONDITION:
- case SCSI_STATUS_CMD_TERMINATED:
- case SCSI_STATUS_ACA_ACTIVE:
+ case SCSI_CHECK:
+ case SCSI_TERMINATED:
+ case SCSI_ACA_ACTIVE:
s1 = &ccb->scsi_sense;
s2 = &xs->sense;
*s2 = *s1;
xs->error = XS_SENSE;
break;
- case SCSI_STATUS_TARGET_BUSY:
- case SCSI_STATUS_QUEUE_FULL:
- case SCSI_STATUS_RSERV_CONFLICT:
+ case SCSI_BUSY:
+ case SCSI_QUEUE_FULL:
+ case SCSI_RESV_CONFLICT:
sc->sc_freeze_dev[scsiq->target_id] = 1;
xs->error = XS_BUSY;
break;
diff --git a/sys/dev/ic/adwlib.h b/sys/dev/ic/adwlib.h
index 35c8937327f..618ae970ab1 100644
--- a/sys/dev/ic/adwlib.h
+++ b/sys/dev/ic/adwlib.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: adwlib.h,v 1.8 2001/04/06 04:42:06 csapuntz Exp $ */
+/* $OpenBSD: adwlib.h,v 1.9 2001/11/11 21:59:19 krw Exp $ */
/* $NetBSD: adwlib.h,v 1.14 2000/07/03 18:14:18 dante Exp $ */
/*
@@ -874,21 +874,6 @@ typedef struct adw_scsi_req_q {
#define QHSTA_M_SGBACKUP_ERROR 0x47 /* Scatter-Gather backup error */
/*
- * ADW_SCSI_REQ_Q 'scsi_status' return values.
- */
-#define SCSI_STATUS_GOOD 0x00
-#define SCSI_STATUS_CHECK_CONDITION 0x02
-#define SCSI_STATUS_CONDITION_MET 0x04
-#define SCSI_STATUS_TARGET_BUSY 0x08
-#define SCSI_STATUS_INTERMID 0x10
-#define SCSI_STATUS_INTERMID_COND_MET 0x14
-#define SCSI_STATUS_RSERV_CONFLICT 0x18
-#define SCSI_STATUS_CMD_TERMINATED 0x22
-#define SCSI_STATUS_QUEUE_FULL 0x28
-#define SCSI_STATUS_ACA_ACTIVE 0x30
-
-
-/*
* Microcode idle loop commands
*/
#define IDLE_CMD_COMPLETED 0
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c
index 76a108aa76e..c54a1e1d59d 100644
--- a/sys/dev/ic/iha.c
+++ b/sys/dev/ic/iha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.c,v 1.11 2001/11/05 17:25:58 art Exp $ */
+/* $OpenBSD: iha.c,v 1.12 2001/11/11 21:59:19 krw Exp $ */
/*
* Initio INI-9xxxU/UW SCSI Device Driver
*
@@ -864,7 +864,7 @@ iha_scsi_label:
while ((pScb = iha_pop_done_scb(sc)) != NULL) {
switch (pScb->SCB_TaStat) {
- case SCSI_CMD_TERMINATED:
+ case SCSI_TERMINATED:
case SCSI_ACA_ACTIVE:
case SCSI_CHECK:
pScb->SCB_Tcs->TCS_Flags &=
@@ -2417,20 +2417,20 @@ iha_done_scb(sc, pScb)
case HOST_OK:
switch (pScb->SCB_TaStat) {
case SCSI_OK:
- case SCSI_CONDITION_MET:
+ case SCSI_COND_MET:
case SCSI_INTERM:
case SCSI_INTERM_COND_MET:
xs->resid = pScb->SCB_BufLen;
xs->error = XS_NOERROR;
break;
- case SCSI_RSERV_CONFLICT:
+ case SCSI_RESV_CONFLICT:
case SCSI_BUSY:
case SCSI_QUEUE_FULL:
xs->error = XS_BUSY;
break;
- case SCSI_CMD_TERMINATED:
+ case SCSI_TERMINATED:
case SCSI_ACA_ACTIVE:
case SCSI_CHECK:
s1 = &pScb->SCB_ScsiSenseData;
diff --git a/sys/dev/ic/iha.h b/sys/dev/ic/iha.h
index abe3eb522ed..daa3aa88985 100644
--- a/sys/dev/ic/iha.h
+++ b/sys/dev/ic/iha.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.h,v 1.8 2001/11/05 17:25:58 art Exp $ */
+/* $OpenBSD: iha.h,v 1.9 2001/11/11 21:59:19 krw Exp $ */
/*
* Initio INI-9xxxU/UW SCSI Device Driver
*
@@ -48,12 +48,6 @@
#define IHA_MAX_SCB 32
#define IHA_MAX_EXTENDED_MSG 4 /* SDTR(3) and WDTR(4) only */
-#define SCSI_CONDITION_MET 0x04 /* SCSI Status codes not defined */
-#define SCSI_INTERM_COND_MET 0x14 /* in scsi_all.h */
-#define SCSI_RSERV_CONFLICT 0x18
-#define SCSI_CMD_TERMINATED 0x22
-#define SCSI_ACA_ACTIVE 0x30
-
/*
* Scatter-Gather Element Structure
*/