aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mps
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2016-05-05 15:32:47 +0000
committerAlan Somers <asomers@FreeBSD.org>2016-05-05 15:32:47 +0000
commit6adfa7edf0ecd0a7e5c5c72f639a42111d64a797 (patch)
tree086186f5c4454e42be45932ecc5e109b255f60b2 /sys/dev/mps
parentb4f69365997cff00cda2f38eb09cec9a78125979 (diff)
Notes
Diffstat (limited to 'sys/dev/mps')
-rw-r--r--sys/dev/mps/mps_sas.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c
index a4dd3e1a4c78..3790e8f218b6 100644
--- a/sys/dev/mps/mps_sas.c
+++ b/sys/dev/mps/mps_sas.c
@@ -2408,11 +2408,20 @@ mpssas_scsiio_complete(struct mps_softc *sc, struct mps_command *cm)
case MPI2_IOCSTATUS_SCSI_IOC_TERMINATED:
case MPI2_IOCSTATUS_SCSI_EXT_TERMINATED:
/*
- * Since these are generally external (i.e. hopefully
- * transient transport-related) errors, retry these without
- * decrementing the retry count.
+ * These can sometimes be transient transport-related
+ * errors, and sometimes persistent drive-related errors.
+ * We used to retry these without decrementing the retry
+ * count by returning CAM_REQUEUE_REQ. Unfortunately, if
+ * we hit a persistent drive problem that returns one of
+ * these error codes, we would retry indefinitely. So,
+ * return CAM_REQ_CMP_ERROR so that we decrement the retry
+ * count and avoid infinite retries. We're taking the
+ * potential risk of flagging false failures in the event
+ * of a topology-related error (e.g. a SAS expander problem
+ * causes a command addressed to a drive to fail), but
+ * avoiding getting into an infinite retry loop.
*/
- mpssas_set_ccbstatus(ccb, CAM_REQUEUE_REQ);
+ mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR);
mpssas_log_command(cm, MPS_INFO,
"terminated ioc %x scsi %x state %x xfer %u\n",
le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState,