Skip to content

Commit

Permalink
isci: handle cases where a d2h fis is used report an ncq error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
piotr-intel authored and djbw committed Jul 3, 2011
1 parent a8d4b9f commit 3ff0121
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions drivers/scsi/isci/core/scic_sds_stp_remote_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,27 @@ static enum sci_status scic_sds_stp_remote_device_ready_ncq_substate_frame_handl
);

if (status == SCI_SUCCESS) {
if (
(frame_header->fis_type == SATA_FIS_TYPE_SETDEVBITS)
&& (frame_header->status & ATA_STATUS_REG_ERROR_BIT)
) {
if (frame_header->fis_type == SATA_FIS_TYPE_SETDEVBITS &&
(frame_header->status & ATA_STATUS_REG_ERROR_BIT)) {
this_device->not_ready_reason =
SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED;

/*
* / @todo Check sactive and complete associated IO
* if any.
*/

sci_base_state_machine_change_state(
&this_device->ready_substate_machine,
SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_NCQ_ERROR
);
} else if (frame_header->fis_type == SATA_FIS_TYPE_REGD2H &&
(frame_header->status & ATA_STATUS_REG_ERROR_BIT)) {

/*
* Some devices return D2H FIS when an NCQ error is detected.
* Treat this like an SDB error FIS ready reason.
*/
this_device->not_ready_reason =
SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED;

Expand Down

0 comments on commit 3ff0121

Please sign in to comment.