summaryrefslogtreecommitdiffstats
path: root/sys/dev/isci/scil/sati_passthrough.c
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2014-05-07 16:56:20 +0000
committerjimharris <jimharris@FreeBSD.org>2014-05-07 16:56:20 +0000
commit636363f8c23b878677cc1532f36a8515566b1e80 (patch)
tree3ab60cd4e05517e7307ff13811ea46baa673499f /sys/dev/isci/scil/sati_passthrough.c
parent559a6cde69a290918379d48eeea8fae6aec21d5d (diff)
downloadFreeBSD-src-636363f8c23b878677cc1532f36a8515566b1e80.zip
FreeBSD-src-636363f8c23b878677cc1532f36a8515566b1e80.tar.gz
MFC r263275:
isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set translate their response.
Diffstat (limited to 'sys/dev/isci/scil/sati_passthrough.c')
-rw-r--r--sys/dev/isci/scil/sati_passthrough.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/isci/scil/sati_passthrough.c b/sys/dev/isci/scil/sati_passthrough.c
index c2f3941..a083bd5 100644
--- a/sys/dev/isci/scil/sati_passthrough.c
+++ b/sys/dev/isci/scil/sati_passthrough.c
@@ -441,6 +441,13 @@ SATI_STATUS sati_passthrough_16_translate_command(
sati_set_ata_lba_mid_exp(register_fis, sati_get_cdb_byte(cdb, 9));
sati_set_ata_lba_high_exp(register_fis, sati_get_cdb_byte(cdb, 11));
}
+
+ if (PASSTHROUGH_CDB_CK_COND(cdb) ||
+ PASSTHROUGH_CDB_PROTOCOL(cdb) == PASSTHROUGH_RETURN_RESPONSE)
+ {
+ sequence->is_translate_response_required = TRUE;
+ }
+
sati_set_ata_features(register_fis, sati_get_cdb_byte(cdb, 4));
sati_set_ata_sector_count(register_fis, sati_get_cdb_byte(cdb, 6));
sati_set_ata_lba_low(register_fis, sati_get_cdb_byte(cdb, 8));
@@ -483,6 +490,8 @@ SATI_STATUS sati_passthrough_translate_response(
return SATI_FAILURE_CHECK_RESPONSE_DATA;
}
+ sequence->state = SATI_SEQUENCE_STATE_FINAL;
+
// If the user set the check condition bit, fill out the sense data
if (PASSTHROUGH_CDB_CK_COND(cdb) ||
PASSTHROUGH_CDB_PROTOCOL(cdb) == PASSTHROUGH_RETURN_RESPONSE)
@@ -496,10 +505,9 @@ SATI_STATUS sati_passthrough_translate_response(
SCSI_ASC_NO_ADDITIONAL_SENSE,
SCSI_ASCQ_ATA_PASS_THROUGH_INFORMATION_AVAILABLE
);
+ return SATI_FAILURE_CHECK_RESPONSE_DATA;
}
- sequence->state = SATI_SEQUENCE_STATE_FINAL;
-
return SATI_COMPLETE;
}
OpenPOWER on IntegriCloud