aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
authorMoore, Eric <Eric.Moore@lsil.com>2006-01-16 20:53:26 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-31 15:40:00 -0500
commit9f63bb73eb52df43f46ce2284759709fc40f4f52 (patch)
tree06096ad8afd9f3f6a1db1d6ae9888f0faaa1137f /drivers/message/fusion/mptscsih.c
parent4ddce14e753fd4fe7445fa046a3aee155c2e48f4 (diff)
[SCSI] fusion: add task managment response code info
Adding verbose message returned from firmware when a task mangment request fails. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 4513ee7b7ea..d6ccd6aa434 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -2028,6 +2028,42 @@ mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout )
2028} 2028}
2029 2029
2030/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 2030/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
2031static void
2032mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code)
2033{
2034 char *desc;
2035
2036 switch (response_code) {
2037 case MPI_SCSITASKMGMT_RSP_TM_COMPLETE:
2038 desc = "The task completed.";
2039 break;
2040 case MPI_SCSITASKMGMT_RSP_INVALID_FRAME:
2041 desc = "The IOC received an invalid frame status.";
2042 break;
2043 case MPI_SCSITASKMGMT_RSP_TM_NOT_SUPPORTED:
2044 desc = "The task type is not supported.";
2045 break;
2046 case MPI_SCSITASKMGMT_RSP_TM_FAILED:
2047 desc = "The requested task failed.";
2048 break;
2049 case MPI_SCSITASKMGMT_RSP_TM_SUCCEEDED:
2050 desc = "The task completed successfully.";
2051 break;
2052 case MPI_SCSITASKMGMT_RSP_TM_INVALID_LUN:
2053 desc = "The LUN request is invalid.";
2054 break;
2055 case MPI_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC:
2056 desc = "The task is in the IOC queue and has not been sent to target.";
2057 break;
2058 default:
2059 desc = "unknown";
2060 break;
2061 }
2062 printk(MYIOC_s_INFO_FMT "Response Code(0x%08x): F/W: %s\n",
2063 ioc->name, response_code, desc);
2064}
2065
2066/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
2031/** 2067/**
2032 * mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver 2068 * mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver
2033 * @ioc: Pointer to MPT_ADAPTER structure 2069 * @ioc: Pointer to MPT_ADAPTER structure
@@ -2076,6 +2112,11 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *m
2076 /* Figure out if this was ABORT_TASK, TARGET_RESET, or BUS_RESET! */ 2112 /* Figure out if this was ABORT_TASK, TARGET_RESET, or BUS_RESET! */
2077 tmType = pScsiTmReq->TaskType; 2113 tmType = pScsiTmReq->TaskType;
2078 2114
2115 if (ioc->facts.MsgVersion >= MPI_VERSION_01_05 &&
2116 pScsiTmReply->ResponseCode)
2117 mptscsih_taskmgmt_response_code(ioc,
2118 pScsiTmReply->ResponseCode);
2119
2079 dtmprintk((MYIOC_s_WARN_FMT " TaskType = %d, TerminationCount=%d\n", 2120 dtmprintk((MYIOC_s_WARN_FMT " TaskType = %d, TerminationCount=%d\n",
2080 ioc->name, tmType, le32_to_cpu(pScsiTmReply->TerminationCount))); 2121 ioc->name, tmType, le32_to_cpu(pScsiTmReply->TerminationCount)));
2081 DBG_DUMP_TM_REPLY_FRAME((u32 *)pScsiTmReply); 2122 DBG_DUMP_TM_REPLY_FRAME((u32 *)pScsiTmReply);