Message ID | BL2PR04MB1969643BA42447A6F3F8DB249F490@BL2PR04MB1969.namprd04.prod.outlook.com |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show
Return-Path: <linux-ide-owner@vger.kernel.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3r8bKk0styz9vL8 for <incoming@patchwork.ozlabs.org>; Wed, 18 May 2016 10:53:30 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b=La1ffMoG; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755303AbcERAx3 (ORCPT <rfc822;incoming@patchwork.ozlabs.org>); Tue, 17 May 2016 20:53:29 -0400 Received: from sjc00mx1.hgst.com ([199.255.44.36]:32459 "EHLO sjc00mx1.hgst.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751513AbcERAx3 convert rfc822-to-8bit (ORCPT <rfc822; linux-ide@vger.kernel.org>); Tue, 17 May 2016 20:53:29 -0400 X-IronPort-AV: E=Sophos;i="5.26,326,1459839600"; d="scan'208";a="195860041" Received: from mail-bl2lp0203.outbound.protection.outlook.com (HELO na01-bl2-obe.outbound.protection.outlook.com) ([207.46.163.203]) by sjc00mx1.hgst.com with ESMTP/TLS/AES256-SHA; 17 May 2016 17:53:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-hgst-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=l8jFWYNmpYOsjfO+Y0LA4mRGjNFQV5b4wGaO58bs19I=; b=La1ffMoGj3tu36Bpl0wfwu6pu2oji+8p+NwSoX4CsNKuJ71WR9TRS5Uvnu3H9VTn5zFw3Fq8n32d2jPVrQMxCCIRfJysBUdzGaIvA9pAK19dTuIVaUXIYRgThPnz5PHXYVzdfOckCTaBy2mbtvepIDDzcsXmdl/s3hgrP+khM/I= Received: from BL2PR04MB1969.namprd04.prod.outlook.com (10.167.97.141) by BL2PR04MB1969.namprd04.prod.outlook.com (10.167.97.141) with Microsoft SMTP Server (TLS) id 15.1.497.12; Wed, 18 May 2016 00:53:26 +0000 Received: from BL2PR04MB1969.namprd04.prod.outlook.com ([10.167.97.141]) by BL2PR04MB1969.namprd04.prod.outlook.com ([10.167.97.141]) with mapi id 15.01.0497.019; Wed, 18 May 2016 00:53:26 +0000 From: Damien Le Moal <Damien.LeMoal@hgst.com> To: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>, Hannes Reinecke <hare@suse.com> Subject: [PATCH 2/3] libata-scsi: Fix ZBC management out command translation Thread-Topic: [PATCH 2/3] libata-scsi: Fix ZBC management out command translation Thread-Index: AQHRsJ+vYIJI+G/xhUGXvD1p5zgwYQ== Date: Wed, 18 May 2016 00:53:26 +0000 Message-ID: <BL2PR04MB1969643BA42447A6F3F8DB249F490@BL2PR04MB1969.namprd04.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=hgst.com; x-originating-ip: [199.255.47.8] x-ms-office365-filtering-correlation-id: d7b0b9f9-0996-414c-d356-08d37eb6d212 x-microsoft-exchange-diagnostics: 1; BL2PR04MB1969; 5:sw/CP5uKHICLc+CjhVHKqG+suk9WjBs5g7Pxd5hDWt9Bj+Mz1FbcJy4KqHTzFe828wfaOoyTHMfmuUBkyj0qyjIyg8kDSLy2Gbjoq6k/ySLP/lgRJT753Q0JawhCbIcmdJk3Yx5hFUt8fD1X6BgMgA==; 24:xzUSUK5gj0d4pUlnz08sLbpzYr8Td4P4mGT9RVr5zTQ2/wPPKY+27GOFtT9G+u0IZmHF4Ou35I9g7em24psIealGQ0yv/UxJk+aDHw/WHBk=; 7:1dVu77xGfee9fWdjO1khpRBO0MoCuZ5EiLe5HduJL1zTynuTlS8UIH17U5B+EPUCoc0XnlQGOimn7EZGNPw0NT//O5KU95i5QUNenni6H4jN8jQJ+nq08r0Efg66ryFrtHptWFd5xv0oHgikhStKVOWaiC/j4VAY9vMUK5tun6Cz04/p/Cv/rzM53V+bavEh; 20:NHzeYrMDMxBgj6F9hDPKT1h5sdOFoHmFabHmGz5YvreZgXRyDkjhcxdThOnN6Z2zF3LFcRh1M36kKaqWyuNuOCwk2NUKcUdsgpu2S607K+xuUjXtIiwL5z5ZXaK7g63XnL5xPMUrIm28rSya0BycbzYxrXH0kci+Vqvv05e/K66TRlXj9OWqn3xOVPPY/+WBx5HuHZk9mpQYtMOeGT0Cl6xxu5j+S+fEjASGMiJEOmRSwJwJaPRJnOul/W9w5KAs x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR04MB1969; x-microsoft-antispam-prvs: <BL2PR04MB1969D5B6BD0F9577545797969F490@BL2PR04MB1969.namprd04.prod.outlook.com> x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:BL2PR04MB1969; BCL:0; PCL:0; RULEID:; SRVR:BL2PR04MB1969; x-forefront-prvs: 0946DC87A1 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(377424004)(107886002)(229853001)(9686002)(586003)(81166006)(102836003)(6116002)(15974865002)(66066001)(3846002)(33656002)(10400500002)(5004730100002)(106116001)(189998001)(2900100001)(77096005)(1220700001)(76576001)(5001770100001)(11100500001)(8676002)(99286002)(2501003)(5008740100001)(122556002)(19580395003)(19580405001)(92566002)(86362001)(87936001)(5003600100002)(5002640100001)(50986999)(54356999)(74316001)(2906002)(8936002)(18886075002); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR04MB1969; H:BL2PR04MB1969.namprd04.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: hgst.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2016 00:53:26.0937 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR04MB1969 Content-Transfer-Encoding: 8BIT Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: <linux-ide.vger.kernel.org> X-Mailing-List: linux-ide@vger.kernel.org |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 8b375c7..dfb6a10 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3506,7 +3506,7 @@ static unsigned int ata_scsi_zbc_out_xlat(struct ata_queued_cmd *qc) struct scsi_cmnd *scmd = qc->scsicmd; struct ata_device *dev = qc->dev; const u8 *cdb = scmd->cmnd; - u8 reset_all, sa; + u8 all, sa; u64 block; u32 n_block;
The subcommand for NCQ NON-DATA must be specified in the feature (low byte), not the high-order count byte. Also, the reset_all variable name is misleading as it is the "all" bit also applicable to open, close, and finish actions. So rename that variable and remove unnecessary mask. Signed-off-by: Damien Le Moal <damien.lemoal@hgst.com> --- drivers/ata/libata-scsi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) u16 fp = (u16)-1; @@ -3533,20 +3533,20 @@ static unsigned int ata_scsi_zbc_out_xlat(struct ata_queued_cmd *qc) if (block > dev->n_sectors) goto out_of_range; - reset_all = cdb[14] & 0x1; + all = cdb[14] & 0x1; if (ata_ncq_enabled(qc->dev) && ata_fpdma_zac_mgmt_out_supported(qc->dev)) { tf->protocol = ATA_PROT_NCQ; tf->command = ATA_CMD_NCQ_NON_DATA; - tf->hob_nsect = ATA_SUBCMD_NCQ_NON_DATA_ZAC_MGMT_OUT; + tf->feature = ATA_SUBCMD_NCQ_NON_DATA_ZAC_MGMT_OUT; tf->nsect = qc->tag << 3; - tf->auxiliary = sa | (reset_all & 0x1) << 8; + tf->auxiliary = sa | (all << 8); } else { tf->protocol = ATA_PROT_NODATA; tf->command = ATA_CMD_ZAC_MGMT_OUT; tf->feature = sa; - tf->hob_feature = reset_all & 0x1; + tf->hob_feature = all; } tf->lbah = (block >> 16) & 0xff; tf->lbam = (block >> 8) & 0xff;