Date: Mon, 17 Mar 2014 22:30:54 +0000 (UTC) From: Jim Harris <jimharris@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263275 - head/sys/dev/isci/scil Message-ID: <201403172230.s2HMUsvk090240@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jimharris Date: Mon Mar 17 22:30:54 2014 New Revision: 263275 URL: http://svnweb.freebsd.org/changeset/base/263275 Log: isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set translate their response. Sponsored by: Intel Discussed with: scottl MFC after: 3 days Modified: head/sys/dev/isci/scil/sati_passthrough.c Modified: head/sys/dev/isci/scil/sati_passthrough.c ============================================================================== --- head/sys/dev/isci/scil/sati_passthrough.c Mon Mar 17 21:45:08 2014 (r263274) +++ head/sys/dev/isci/scil/sati_passthrough.c Mon Mar 17 22:30:54 2014 (r263275) @@ -441,6 +441,13 @@ SATI_STATUS sati_passthrough_16_translat 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_r 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_r 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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403172230.s2HMUsvk090240>