summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsil.com>2006-07-11 17:25:35 -0600
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-07-13 09:27:18 -0400
commitbf4515227c36fde1887f3fc0afc25a9bb4726842 (patch)
treea16efb1aa29fef58c7983c390f394cd0079ff9e8
parent4f766dc6d30ab0d958cbeafaeab5ed2538ec7015 (diff)
downloadlinux-bf4515227c36fde1887f3fc0afc25a9bb4726842.tar.gz
linux-bf4515227c36fde1887f3fc0afc25a9bb4726842.tar.bz2
linux-bf4515227c36fde1887f3fc0afc25a9bb4726842.zip
[SCSI] mptfusion: sas nexus loss support
sas nexus loss support for systems that suport failover. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/message/fusion/mptscsih.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index c8a9d8e8c5de..bc099651df73 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -66,6 +66,7 @@
#include "mptbase.h"
#include "mptscsih.h"
+#include "lsi/mpi_log_sas.h"
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#define my_NAME "Fusion MPT SCSI Host driver"
@@ -682,8 +683,24 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
}
break;
- case MPI_IOCSTATUS_SCSI_TASK_TERMINATED: /* 0x0048 */
case MPI_IOCSTATUS_SCSI_IOC_TERMINATED: /* 0x004B */
+ if ( ioc->bus_type == SAS ) {
+ u16 ioc_status = le16_to_cpu(pScsiReply->IOCStatus);
+ if (ioc_status & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) {
+ u32 log_info = le32_to_cpu(mr->u.reply.IOCLogInfo);
+ log_info &=SAS_LOGINFO_MASK;
+ if (log_info == SAS_LOGINFO_NEXUS_LOSS) {
+ sc->result = (DID_BUS_BUSY << 16);
+ break;
+ }
+ }
+ }
+
+ /*
+ * Allow non-SAS & non-NEXUS_LOSS to drop into below code
+ */
+
+ case MPI_IOCSTATUS_SCSI_TASK_TERMINATED: /* 0x0048 */
case MPI_IOCSTATUS_SCSI_EXT_TERMINATED: /* 0x004C */
/* Linux handles an unsolicited DID_RESET better
* than an unsolicited DID_ABORT.