Skip to content

Commit

Permalink
isci: Add Support for new TC completion codes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomasz Chudy authored and Dan Williams committed Jul 3, 2011
1 parent 3c06c28 commit 52b957c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/isci/core/scic_sds_stp_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions drivers/scsi/isci/core/scu_completion_codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 52b957c

Please sign in to comment.