diff options
author | Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> | 2017-02-03 00:53:31 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-02-03 16:35:03 +0100 |
commit | 954b2b5ac76d6bde80974c0779d36f054e036aa5 (patch) | |
tree | 8e34c5f295ddcc5f1a4ac209b9423ca18cc75ad7 /drivers/scsi/aacraid/src.c | |
parent | scsi: aacraid: Add task management functionality (diff) | |
download | linux-954b2b5ac76d6bde80974c0779d36f054e036aa5.tar.xz linux-954b2b5ac76d6bde80974c0779d36f054e036aa5.zip |
scsi: aacraid: Added support to abort cmd and reset lun
Added task management command support to abort any timed out commands
in case of a eh_abort call and to reset lun's in case of eh_reset call.
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: Dave Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aacraid/src.c')
-rw-r--r-- | drivers/scsi/aacraid/src.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c index 946a010e46df..1dd62a4aad2c 100644 --- a/drivers/scsi/aacraid/src.c +++ b/drivers/scsi/aacraid/src.c @@ -497,10 +497,35 @@ static int aac_src_deliver_message(struct fib *fib) vector_no = fib->vector_no; if (native_hba) { - ((struct aac_hba_cmd_req *)fib->hw_fib_va)->reply_qid - = vector_no; - ((struct aac_hba_cmd_req *)fib->hw_fib_va)->request_id - += (vector_no << 16); + if (fib->flags & FIB_CONTEXT_FLAG_NATIVE_HBA_TMF) { + struct aac_hba_tm_req *tm_req; + + tm_req = (struct aac_hba_tm_req *) + fib->hw_fib_va; + if (tm_req->iu_type == + HBA_IU_TYPE_SCSI_TM_REQ) { + ((struct aac_hba_tm_req *) + fib->hw_fib_va)->reply_qid + = vector_no; + ((struct aac_hba_tm_req *) + fib->hw_fib_va)->request_id + += (vector_no << 16); + } else { + ((struct aac_hba_reset_req *) + fib->hw_fib_va)->reply_qid + = vector_no; + ((struct aac_hba_reset_req *) + fib->hw_fib_va)->request_id + += (vector_no << 16); + } + } else { + ((struct aac_hba_cmd_req *) + fib->hw_fib_va)->reply_qid + = vector_no; + ((struct aac_hba_cmd_req *) + fib->hw_fib_va)->request_id + += (vector_no << 16); + } } else { fib->hw_fib_va->header.Handle += (vector_no << 16); } |