From owner-svn-src-all@FreeBSD.ORG Wed May 7 16:56:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DF04DB5; Wed, 7 May 2014 16:56:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AADEDF; Wed, 7 May 2014 16:56:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GuKsc074607; Wed, 7 May 2014 16:56:20 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GuKLo074605; Wed, 7 May 2014 16:56:20 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071656.s47GuKLo074605@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265570 - stable/10/sys/dev/isci/scil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:56:21 -0000 Author: jimharris Date: Wed May 7 16:56:20 2014 New Revision: 265570 URL: http://svnweb.freebsd.org/changeset/base/265570 Log: MFC r263275: isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set translate their response. Modified: stable/10/sys/dev/isci/scil/sati_passthrough.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isci/scil/sati_passthrough.c ============================================================================== --- stable/10/sys/dev/isci/scil/sati_passthrough.c Wed May 7 16:55:08 2014 (r265569) +++ stable/10/sys/dev/isci/scil/sati_passthrough.c Wed May 7 16:56:20 2014 (r265570) @@ -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; }