summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/mpii.c6
-rw-r--r--sys/dev/pci/mpiireg.h36
2 files changed, 20 insertions, 22 deletions
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index 6d17d39f40b..94bc8cd3436 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.108 2016/11/06 09:58:16 dlg Exp $ */
+/* $OpenBSD: mpii.c,v 1.109 2017/01/16 18:09:35 mikeb Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -3063,7 +3063,7 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb)
DNPRINTF(MPII_D_CMD, "%s: bidirectional_transfer_count: 0x%08x\n",
DEVNAME(sc), letoh32(sie->bidirectional_transfer_count));
- if (sie->scsi_state & MPII_SCSIIO_ERR_STATE_NO_SCSI_STATUS)
+ if (sie->scsi_state & MPII_SCSIIO_STATE_NO_SCSI_STATUS)
xs->status = SCSI_TERMINATED;
else
xs->status = sie->scsi_status;
@@ -3117,7 +3117,7 @@ mpii_scsi_cmd_done(struct mpii_ccb *ccb)
sense = (struct scsi_sense_data *)((caddr_t)ccb->ccb_cmd +
sc->sc_request_size - sizeof(*sense));
- if (sie->scsi_state & MPII_SCSIIO_ERR_STATE_AUTOSENSE_VALID)
+ if (sie->scsi_state & MPII_SCSIIO_STATE_AUTOSENSE_VALID)
memcpy(&xs->sense, sense, sizeof(xs->sense));
DNPRINTF(MPII_D_CMD, "%s: xs err: %d status: %#x\n", DEVNAME(sc),
diff --git a/sys/dev/pci/mpiireg.h b/sys/dev/pci/mpiireg.h
index 5131c4f75c3..759072e50ef 100644
--- a/sys/dev/pci/mpiireg.h
+++ b/sys/dev/pci/mpiireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpiireg.h,v 1.11 2016/10/24 01:50:09 dlg Exp $ */
+/* $OpenBSD: mpiireg.h,v 1.12 2017/01/16 18:09:35 mikeb Exp $ */
/*
* Copyright (c) 2010 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -783,25 +783,23 @@ struct mpii_msg_scsi_io_error {
u_int16_t reserved3;
u_int8_t scsi_status;
- /* XXX JPG validate this */
-#if notyet
-#define MPII_SCSIIO_ERR_STATUS_SUCCESS
-#define MPII_SCSIIO_ERR_STATUS_CHECK_COND
-#define MPII_SCSIIO_ERR_STATUS_BUSY
-#define MPII_SCSIIO_ERR_STATUS_INTERMEDIATE
-#define MPII_SCSIIO_ERR_STATUS_INTERMEDIATE_CONDMET
-#define MPII_SCSIIO_ERR_STATUS_RESERVATION_CONFLICT
-#define MPII_SCSIIO_ERR_STATUS_CMD_TERM
-#define MPII_SCSIIO_ERR_STATUS_TASK_SET_FULL
-#define MPII_SCSIIO_ERR_STATUS_ACA_ACTIVE
-#endif
+#define MPII_SCSIIO_STATUS_GOOD (0x00)
+#define MPII_SCSIIO_STATUS_CHECK_COND (0x02)
+#define MPII_SCSIIO_STATUS_COND_MET (0x04)
+#define MPII_SCSIIO_STATUS_BUSY (0x08)
+#define MPII_SCSIIO_STATUS_INTERMEDIATE (0x10)
+#define MPII_SCSIIO_STATUS_INTERMEDIATE_CONDMET (0x14)
+#define MPII_SCSIIO_STATUS_RESERVATION_CONFLICT (0x18)
+#define MPII_SCSIIO_STATUS_CMD_TERM (0x22)
+#define MPII_SCSIIO_STATUS_TASK_SET_FULL (0x28)
+#define MPII_SCSIIO_STATUS_ACA_ACTIVE (0x30)
+#define MPII_SCSIIO_STATUS_TASK_ABORTED (0x40)
u_int8_t scsi_state;
-#define MPII_SCSIIO_ERR_STATE_AUTOSENSE_VALID (1<<0)
-#define MPII_SCSIIO_ERR_STATE_AUTOSENSE_FAILED (1<<1)
-#define MPII_SCSIIO_ERR_STATE_NO_SCSI_STATUS (1<<2)
-#define MPII_SCSIIO_ERR_STATE_TERMINATED (1<<3)
-#define MPII_SCSIIO_ERR_STATE_RESPONSE_INFO_VALID (1<<4)
-#define MPII_SCSIIO_ERR_STATE_QUEUE_TAG_REJECTED (0xffff)
+#define MPII_SCSIIO_STATE_AUTOSENSE_VALID (1<<0)
+#define MPII_SCSIIO_STATE_AUTOSENSE_FAILED (1<<1)
+#define MPII_SCSIIO_STATE_NO_SCSI_STATUS (1<<2)
+#define MPII_SCSIIO_STATE_TERMINATED (1<<3)
+#define MPII_SCSIIO_STATE_RESPONSE_INFO_VALID (1<<4)
u_int16_t ioc_status;
u_int32_t ioc_loginfo;