summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTomasz Chudy <Tomasz.Chudy@intel.com>2011-02-23 11:09:04 +0300
committerDan Williams <dan.j.williams@intel.com>2011-07-03 14:55:28 +0400
commit52b957c80c3be9bab2748b0ac59ed3c3e8ffe196 (patch)
tree93c18345f0274951cef053f419743179a99a6346 /drivers
parent3c06c2839dac6db56a1e6bd11924db38eddfb2ed (diff)
downloadlinux-52b957c80c3be9bab2748b0ac59ed3c3e8ffe196.tar.xz
isci: Add Support for new TC completion codes
Update the SCI Core to comprehend the changes in the TC completion codes from A0 to B0. Specifically, there isnew R_ER code differences for command and data FISes. Changes are as follows: 1) 0x16 now additionally indicates an R_ERR received for a COMMAND FIS being sent to a SATA target. 0x16 for SSP still indicates a NAK received for a COMMAND frame. Fix is to retry TC to be compliant with SATA spec or ensure proper error handling of return value (not spec compliant I don't believe). 2) 0x1B was previously called DONE_BREAK_RCVD for STP and DONE_LL_ABORT_ERR for SSP. Now it is universally called DONE_LL_ABORT_ERR. This is purely a superficial change. 3) 0x32 is no longer a reserved code. Now it indicates DONE_CMD_SDMA_ERR for STP/SSP. There was a fatal error on the SDMA for a command IU (includes Raw frames). Consider retry, but at a minimum gracefully fail the request. 4) 0x33 is no longer a reserved code. Now it indicates DONE_CMD_LL_ABORT_ERR for SSP. There was a break receivd during transmission of a command IU. Consider retry, but at a minimum gracefully fail the request. Signed-off-by: Tomasz Chudy <Tomasz.Chudy@intel.com> Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/isci/core/scic_sds_stp_request.c2
-rw-r--r--drivers/scsi/isci/core/scu_completion_codes.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/isci/core/scic_sds_stp_request.c b/drivers/scsi/isci/core/scic_sds_stp_request.c
index 0b6b0552186a..6d280c0a2fc3 100644
--- a/drivers/scsi/isci/core/scic_sds_stp_request.c
+++ b/drivers/scsi/isci/core/scic_sds_stp_request.c
@@ -1602,9 +1602,11 @@ static enum sci_status scic_sds_stp_request_udma_await_tc_completion_tc_completi
/*
* / @todo Check to see if any of these completion status need to wait for
* / the device to host register fis. */
+ /* / @todo We can retry the command for SCU_TASK_DONE_CMD_LL_R_ERR - this comes only for B0 */
case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_INV_FIS_LEN):
case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_MAX_PLD_ERR):
case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_LL_R_ERR):
+ case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_CMD_LL_R_ERR):
case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_CRC_ERR):
scic_sds_remote_device_suspend(
this_request->parent.target_device,
diff --git a/drivers/scsi/isci/core/scu_completion_codes.h b/drivers/scsi/isci/core/scu_completion_codes.h
index 17ee4c8b9122..c8b329c695f9 100644
--- a/drivers/scsi/isci/core/scu_completion_codes.h
+++ b/drivers/scsi/isci/core/scu_completion_codes.h
@@ -228,6 +228,7 @@
#define SCU_TASK_DONE_CHECK_RESPONSE ((u32)0x14)
#define SCU_TASK_DONE_GEN_RESPONSE ((u32)0x15)
#define SCU_TASK_DONE_NAK_CMD_ERR ((u32)0x16)
+#define SCU_TASK_DONE_CMD_LL_R_ERR ((u32)0x16)
#define SCU_TASK_DONE_LL_R_ERR ((u32)0x17)
#define SCU_TASK_DONE_ACK_NAK_TO ((u32)0x17)
#define SCU_TASK_DONE_LL_PERR ((u32)0x18)
@@ -264,6 +265,8 @@
#define SCU_TASK_DONE_REG_ERR ((u32)0x2E)
#define SCU_TASK_DONE_SDB_ERR ((u32)0x2F)
#define SCU_TASK_DONE_TASK_ABORT ((u32)0x30)
+#define SCU_TASK_DONE_CMD_SDMA_ERR ((U32)0x32)
+#define SCU_TASK_DONE_CMD_LL_ABORT_ERR ((U32)0x33)
#define SCU_TASK_OPEN_REJECT_WRONG_DESTINATION ((u32)0x34)
#define SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_1 ((u32)0x35)
#define SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_2 ((u32)0x36)