diff options
author | Piotr Sawicki <piotr.sawicki@intel.com> | 2011-02-25 16:07:38 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:29 -0400 |
commit | 3ff0121a704172aa4bca9c4026b419ddfe1921c8 (patch) | |
tree | b18c43ce359f9ee54a806d9b48fc883d5665edf2 | |
parent | a8d4b9fe911c7d48f7a75c37eb1bfa3273547d97 (diff) |
isci: handle cases where a d2h fis is used report an ncq error
Observed that some devices return a d2h fis, treat like an sdb error fis.
Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_stp_remote_device.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/drivers/scsi/isci/core/scic_sds_stp_remote_device.c b/drivers/scsi/isci/core/scic_sds_stp_remote_device.c index 1d8d9013068f..9a615f07cefe 100644 --- a/drivers/scsi/isci/core/scic_sds_stp_remote_device.c +++ b/drivers/scsi/isci/core/scic_sds_stp_remote_device.c | |||
@@ -367,10 +367,27 @@ static enum sci_status scic_sds_stp_remote_device_ready_ncq_substate_frame_handl | |||
367 | ); | 367 | ); |
368 | 368 | ||
369 | if (status == SCI_SUCCESS) { | 369 | if (status == SCI_SUCCESS) { |
370 | if ( | 370 | if (frame_header->fis_type == SATA_FIS_TYPE_SETDEVBITS && |
371 | (frame_header->fis_type == SATA_FIS_TYPE_SETDEVBITS) | 371 | (frame_header->status & ATA_STATUS_REG_ERROR_BIT)) { |
372 | && (frame_header->status & ATA_STATUS_REG_ERROR_BIT) | 372 | this_device->not_ready_reason = |
373 | ) { | 373 | SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED; |
374 | |||
375 | /* | ||
376 | * / @todo Check sactive and complete associated IO | ||
377 | * if any. | ||
378 | */ | ||
379 | |||
380 | sci_base_state_machine_change_state( | ||
381 | &this_device->ready_substate_machine, | ||
382 | SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ_ERROR | ||
383 | ); | ||
384 | } else if (frame_header->fis_type == SATA_FIS_TYPE_REGD2H && | ||
385 | (frame_header->status & ATA_STATUS_REG_ERROR_BIT)) { | ||
386 | |||
387 | /* | ||
388 | * Some devices return D2H FIS when an NCQ error is detected. | ||
389 | * Treat this like an SDB error FIS ready reason. | ||
390 | */ | ||
374 | this_device->not_ready_reason = | 391 | this_device->not_ready_reason = |
375 | SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED; | 392 | SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED; |
376 | 393 | ||