From patchwork Tue Jul 12 14:12:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Yan X-Patchwork-Id: 9225387 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2186B604DB for ; Tue, 12 Jul 2016 14:12:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F79B27BF9 for ; Tue, 12 Jul 2016 14:12:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0116327C39; Tue, 12 Jul 2016 14:12:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 969E827BF9 for ; Tue, 12 Jul 2016 14:12:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751366AbcGLOML (ORCPT ); Tue, 12 Jul 2016 10:12:11 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35816 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750990AbcGLOMJ (ORCPT ); Tue, 12 Jul 2016 10:12:09 -0400 Received: by mail-pf0-f194.google.com with SMTP id t190so1159287pfb.2; Tue, 12 Jul 2016 07:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:cc:subject:date; bh=f2HsyVVCZmNCF5A8QmGUHXgnQJdlA/grMcN/JmXAHlg=; b=G7l3UlwNVVk2VnU/iUVusUePu9PQtmXrT/LQ3g5gSob6IvV99F1dkEDrbGeqDTnaPL eRoOz5bgPCP6G5RgY6quwYHe2FU9SsIKur2swc1qK5AePBc1XXbR8lofLsLtHKKfgvuc hjgZFzoRn9FqkM7h7vOs9Rcv4UOStD1pFV5ewevVNeBXAqLMSXXQ8EZQin4u2heWBRvh d3yU5dargeGFj2GM3LwN1ORzivoKFrNYbv2g116SRZZQNacaQzMGEsrdkmRlyvK4zyUd ED/p2fEahoRNI79v0pnmv/I6FoaBEG6EgMpZfc4Zz+wcEJR0ZsvQdMbEDjhV2iYEJP0I Bk8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:from:to:cc:subject:date; bh=f2HsyVVCZmNCF5A8QmGUHXgnQJdlA/grMcN/JmXAHlg=; b=XxcEyO/VV262sW8tnvuiXA7VDR+PgkNm/A6LUhbEgq+yARgXL4Oj6qMCXiUzwnSdSP jT3zdQcYSS9MR8ldiTgKPcyp7zqXqP6e/iD0hCaAZTIM1cg5i3H302ADyPy035U7qjo3 mh5ZVR6Rnk9WARxgY2PrPf5H/YVcUgxw48k6aNzxWyhFYj6FFRGcGYQLwAURnXHms9JG VBtHdogERGOLWC+a0FjnRrs+isUx1tlazLQiYAnHmCh2/wV6ScDTETlV2rdUgq+Q4OS/ XKuc6AJb5VECIy6v99UL9EKHK+VaFGt+Cd/7+lxgU6Nkkg0Ho/bhaiRTrDhB1l/pJ6lK 6+RQ== X-Gm-Message-State: ALyK8tJX+8RqSJ2vp013ke6rX0bN+7KmEkasS9i0IC6wv9DJOCT45RP+VL2f4xu6GK+u8Q== X-Received: by 10.98.38.69 with SMTP id m66mr44647854pfm.57.1468332728142; Tue, 12 Jul 2016 07:12:08 -0700 (PDT) Received: from localhost.localdomain ([2404:c805:e00:4700:ae22:bff:fe29:e60c]) by smtp.gmail.com with ESMTPSA id o22sm4705053pfa.15.2016.07.12.07.12.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jul 2016 07:12:07 -0700 (PDT) Message-ID: <5784fab7.1641620a.9a531.ffff8dae@mx.google.com> X-Google-Original-Message-ID: <20160712141201.2733-1-me> From: tom.ty89@gmail.com X-Google-Original-From: me To: tj@kernel.org, hare@suse.de, shaun.tancheff@seagate.com, sergei.shtylyov@cogentembedded.com Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, Tom Yan Subject: [PATCH v2] libata-scsi: set correct VERSION field for ZAC devices Date: Tue, 12 Jul 2016 22:12:01 +0800 X-Mailer: git-send-email 2.9.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tom Yan Commit 856c46639309 ("libata: support device-managed ZAC devices") had the line that "bumps" the VERSION field in standard INQUIRY data removed. Add it back and claim SPC-5 version compatibility, which matches with the current version descriptor "SPC-5 (no version claimed)" that is used for ZAC devices. Signed-off-by: Tom Yan diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index bfec66f..27e29e1 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2109,8 +2109,10 @@ static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf) (args->dev->link->ap->pflags & ATA_PFLAG_EXTERNAL)) hdr[1] |= (1 << 7); - if (args->dev->class == ATA_DEV_ZAC) + if (args->dev->class == ATA_DEV_ZAC) { hdr[0] = TYPE_ZBC; + hdr[2] = 0x7; /* claim SPC-5 version compatibility */ + } memcpy(rbuf, hdr, sizeof(hdr)); memcpy(&rbuf[8], "ATA ", 8);