summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/request.h
diff options
context:
space:
mode:
authorJeff Skirvin <jeffrey.d.skirvin@intel.com>2011-06-23 17:09:02 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:04:51 -0700
commit9274f45ea551421cd3bf329de9dd8d1e6208285a (patch)
tree25e21494d3c74a5b2965485f2d76c541d49cc68b /drivers/scsi/isci/request.h
parent4cffe13e0dfd00f90c86b0153c751dab61a1bf1d (diff)
isci: Terminate dev requests on FIS err bit rx in NCQ
When the remote device transitions to a not-ready state because of an NCQ error condition, all outstanding requests to that device are terminated and completed to libsas on the normal path. The device then waits for a READ LOG EXT command to issue on the task management path. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.h')
-rw-r--r--drivers/scsi/isci/request.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index 7c8b59a7c02c..9130f22a63b8 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -687,4 +687,13 @@ scic_task_request_construct_sata(struct scic_sds_request *sci_req);
void
scic_stp_io_request_set_ncq_tag(struct scic_sds_request *sci_req, u16 ncq_tag);
void scic_sds_smp_request_copy_response(struct scic_sds_request *sci_req);
+
+static inline int isci_task_is_ncq_recovery(struct sas_task *task)
+{
+ return (sas_protocol_ata(task->task_proto) &&
+ task->ata_task.fis.command == ATA_CMD_READ_LOG_EXT &&
+ task->ata_task.fis.lbal == ATA_LOG_SATA_NCQ);
+
+}
+
#endif /* !defined(_ISCI_REQUEST_H_) */