From patchwork Fri Sep 9 16:44:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaun Tancheff X-Patchwork-Id: 9324011 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 51D5A60752 for ; Fri, 9 Sep 2016 16:44:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D94E29F66 for ; Fri, 9 Sep 2016 16:44:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3240829F7D; Fri, 9 Sep 2016 16:44:56 +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_SIGNED, 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 DF51829F66 for ; Fri, 9 Sep 2016 16:44:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751581AbcIIQoe (ORCPT ); Fri, 9 Sep 2016 12:44:34 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:36023 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbcIIQod (ORCPT ); Fri, 9 Sep 2016 12:44:33 -0400 Received: by mail-oi0-f67.google.com with SMTP id s71so7992557oih.3; Fri, 09 Sep 2016 09:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=VcICCkaYA9SF3N3zIVcoR7eCDWbXldY705J5iqNzaiY=; b=HGKfPp+2EBMllYs6EcT1eMrbX/C6tS9fuChIIuEZirwUyBjJ0tY0YJCidDdlXD3Vwt fUN9paIURAXKGbpIYvlPPnNtDHGLL986Mm/meii8G8KF9Duz9xaMD5PtsNsRsH7ow0gk bR5gG8vWCGTYeRxVXCnpW9shAX2+Zh3bKJ1qvS9C9Mw8bPDjLmQNyHCjGnw8aAzKXt/J s80nubvU3lVtuPvTdV+e8mOpRt16AcGJJLHXJE0wPT/4bWTC/KiqSxD6p71fyGMwhq0e crw/acBS3TXGXw8fjSsjcoZbsvj6ICk2yGPXdGavVdHeTGvPoeN/yu5YXRGAEzb0Gp8/ Cpag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=VcICCkaYA9SF3N3zIVcoR7eCDWbXldY705J5iqNzaiY=; b=kDH6SHzVCpAgMXxKLA98KXOdbh3owRg3ysPa/PBRPPOTiP7OsyBPH8w7QIRz6qnTnn /kMOLdCGqXflxnsEFsAT0lT5F+3+0X4nsbcS2H//Ou1Hs8kYtrJubXcyYCs6KGHgP9ki mo1PcG4F5wjIFUMycJ/eUvy04kH5xjsA6VCu8gQc+WkM7LhWEeqLph27kgwY4SIiR3SL 9Za0aw4HrMbiU7EcwsvlU7IFi+NIDYMfdbeIUUeLVyNT12CUV6gnTFi1FJ30/+O5MKJf OXUEh8NqbSRq+beiOAWKxUJVm5Y8ej2zvoWqS8Ytb3mknldBDYlU5VZV4Mb/DyxpDwqk 1hNQ== X-Gm-Message-State: AE9vXwNK6wFEb6SSmu97J8O2g8Ct2fxmf9RfjnFx6aEgVCYH6Yn2oJWyinO6HMBYdOir6g== X-Received: by 10.157.44.233 with SMTP id e38mr5938549otd.13.1473439472861; Fri, 09 Sep 2016 09:44:32 -0700 (PDT) Received: from helios.aeonazure.com (173-16-223-93.client.mchsi.com. [173.16.223.93]) by smtp.gmail.com with ESMTPSA id o9sm1967147iod.10.2016.09.09.09.44.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Sep 2016 09:44:32 -0700 (PDT) From: Shaun Tancheff To: tj@kernel.org Cc: Shaun Tancheff , Mike Krinkin , linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, hch@lst.de, shaun.tancheff@seagate.com Subject: [PATCH] Some drives failing on SCT Write Same Date: Fri, 9 Sep 2016 11:44:19 -0500 Message-Id: <20160909164419.12978-1-shaun@tancheff.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: References: 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 Restrict support SCT Write Same to devices which also support ZAC where support is required. Reported-by: Mike Krinkin Signed-off-by: Shaun Tancheff --- drivers/ata/libata-scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 2f5487f..9cceb4a 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3562,9 +3562,9 @@ static unsigned int ata_scsiop_maint_in(struct ata_scsi_args *args, u8 *rbuf) supported = 3; break; case WRITE_SAME_16: - if (ata_id_sct_write_same(dev->id)) - supported = 3; - break; + if (!ata_id_sct_write_same(dev->id)) + break; + /* fallthrough: if SCT ... only enable for ZBC */ case ZBC_IN: case ZBC_OUT: if (ata_id_zoned_cap(dev->id) ||