From patchwork Tue Dec 6 17:18:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Manzanares X-Patchwork-Id: 9462995 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 AF73360459 for ; Tue, 6 Dec 2016 17:33:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F32527F86 for ; Tue, 6 Dec 2016 17:33:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FE9028486; Tue, 6 Dec 2016 17:33:48 +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 0660727F86 for ; Tue, 6 Dec 2016 17:33:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751277AbcLFRdr (ORCPT ); Tue, 6 Dec 2016 12:33:47 -0500 Received: from mail-sn1nam01on0058.outbound.protection.outlook.com ([104.47.32.58]:56148 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751180AbcLFRdp (ORCPT ); Tue, 6 Dec 2016 12:33:45 -0500 X-Greylist: delayed 891 seconds by postgrey-1.27 at vger.kernel.org; Tue, 06 Dec 2016 12:33:44 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandiskcorp.onmicrosoft.com; s=selector1-sandiskcorp-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XbkGectuIjc0j77x9EnyOMsPHnLQErP0g3ovrpyu2vo=; b=qjaGotSJb3dgcTzJ61LRCAjkghm349pQbydHjocBZIObyMc5N2jKRLZp6/c93RPYhVkVHtRFvWfrQ7fIWe0RQ5mg4FtQorD7LCp4AIepkyY0k8k3PNJm0D3nHJxrfI1JkkwVh8/nbP6HP/rLUQimU3RnJcotTQ4RXFbo+9mpfpg= Received: from BY1PR0201CA0010.namprd02.prod.outlook.com (10.160.191.148) by BLUPR0201MB1508.namprd02.prod.outlook.com (10.163.119.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Tue, 6 Dec 2016 17:18:34 +0000 Received: from BN1AFFO11FD045.protection.gbl (2a01:111:f400:7c10::121) by BY1PR0201CA0010.outlook.office365.com (2a01:111:e400:4814::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9 via Frontend Transport; Tue, 6 Dec 2016 17:18:34 +0000 Authentication-Results: spf=fail (sender IP is 63.163.107.21) smtp.mailfrom=wdc.com; canonical.com; dkim=none (message not signed) header.d=none; canonical.com; dmarc=none action=none header.from=hgst.com; Received-SPF: Fail (protection.outlook.com: domain of wdc.com does not designate 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BN1AFFO11FD045.mail.protection.outlook.com (10.58.53.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.4 via Frontend Transport; Tue, 6 Dec 2016 17:18:32 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:3252; Count:18 Received: from MILHUBIP04.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 97.0C.02899.6A0F6485; Tue, 6 Dec 2016 09:08:55 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Tue, 6 Dec 2016 09:18:28 -0800 X-AuditID: 0ac94369-9793798000000b53-a6-5846f0a67b71 Received: from penguito.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id F0.7C.02804.4E2F6485; Tue, 6 Dec 2016 09:18:28 -0800 (PST) From: Adam Manzanares To: , , , , , , , , CC: , , , Adam Manzanares Subject: [PATCH v7 4/4] ata: set ncq_prio_enabled iff device has support Date: Tue, 6 Dec 2016 09:18:05 -0800 Message-ID: <1481044685-2803-5-git-send-email-adam.manzanares@hgst.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481044685-2803-1-git-send-email-adam.manzanares@hgst.com> References: <1481044685-2803-1-git-send-email-adam.manzanares@hgst.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRmVeSWpSXmKPExsXCddJ5ke7yD24RBku3clvcPrqDxWL13X42 i59XZrFZTJ96gdFiz6JJTBZ7b2lbHNvxiMni8q45bBbLj/9jslh/ZAOjxa6H39ktfi0/ymjx cMFmdgdej1kNvWweu3Y1snss3vOSyePy2VKPTas62Tw+Pr3F4vF+31U2j0tn21k8Np+u9vi8 SS6AK4rLJiU1J7MstUjfLoEr48H7j6wFnUIVv3e8YG1gvM3XxcjJISFgIvFy8xPWLkYuDiGB pUwS1599ZQNJCAlsZ5S4vYMNpmjL4wYWiKL1jBL/z+9l7mLk4GATMJCYfjkRJC4icJ1Rovvz KTYQh1mgm1Fi8/cGVpBuYQEPiS/rZ4HZLAIqEre+rmMBsXkF3CUa13WxQGyQk7h5rpMZxOYE qr93vJcR4gp3iTvPr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zPlj0fv2nxLz0kTt eanv78RIhi5clrrEYmd4v3mFEktxRqKhFnNRcSIA17Xjcf0BAAA= MIME-Version: 1.0 X-IncomingHeaderCount: 18 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(356003)(8936002)(68736007)(50226002)(47776003)(76176999)(5003940100001)(81166006)(5001770100001)(81156014)(50986999)(97736004)(106466001)(8676002)(189998001)(105606002)(2270400002)(305945005)(7846002)(48376002)(69596002)(50466002)(92566002)(2906002)(4326007)(39860400001)(39850400001)(39840400001)(960300001)(36756003)(7416002)(2950100002)(6666003)(33646002)(42882006)(85426001)(2201001)(39450400002)(626004)(5660300001)(38730400001)(77096006)(39410400001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0201MB1508; H:milsmgep15.sandisk.com; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD045; 1:kz+oBx+f6jDgv5ycRmDoRVmR8LmgodZ7K+EJ19/f3p3BEYQCKXmrIoixN+hMkxB3X/6mtXWr/VNFpzAJLkqoQxhL5MIWVnpfv3f39hcWEB7MAeEHDhHXc+g4NTXxzsc4gxKaPVPXceO/RYPnyEYkQJ+UAzyp+mdPjXlydCF6h22STDoSNI6QUEEaxVtuhLF+fN2OeISsoupvRzcFukP8WK8JCYWh6N8kAGBYmJ2RniHlVdKz8UnCUUqxlg7hR8HrpKsNPGjO9kKBWgROKpQPPEEgCWrvCCGI1MIKqHuthU/I/5/2Nv+eD6FPrhyDE7sZutUlnNZhkZf/pPGl/dWTE7YHNp6Fv8SSGCPqrB9dufCDRRfNszHQoDzSD/ZimP5q3LJ1cTbOtPGEkAOCHXiGe5GzYHQmK5H5p3sUfcyDahfJWYKyCaG/mbr2p2G01VZnC6A3Hq3nWXJzlTM/cwIO6KAC87dQy+TpORYKIZjBR0d3C1Oz09ikwk+TVGy//FaKhYGWgaCYN6rK2SQiZ0NDufP3dAJ3Xz/o6fPSUaMSp+IVFSs3KLNxTyn3K+d9fR8RabeBg7CVKFqauWpKyiMj1w== X-MS-Office365-Filtering-Correlation-Id: 9c3b4ed8-bd09-47ac-0eb7-08d41dfbe812 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0201MB1508; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1508; 3:Z3uzRKkmShM65EI3wxDooLRfWP2BszYz0iAmFLyv3FOKY4bSHxvzHxjgDsro57FIFOvKaLuSD2mbxPf80QH4uZ76BD3+L565QR2HIi2dKNfGpN1iw1JFm0QF/Rj02P6IJnEzXF/i/4iID/RntYvVnl9IbAff1ra5BT1yXk6JGSComNRsNgRazgF7NGI5hWVKo9neoDa5GDDNiien7FZapDosNrQN7PvRf6eU+scX/dnRYhJMsvjtC3tDLuhNcrDbLXp6yvmHuWQwI6a1jJRqaP2MQS4KofZ1zbwRdUPKxSxiXNEsMDrR74IfPwNuEngLDedkvxpYzLj0lSrS+aDBLwyCDBnEPTg73aDH00mdkbuX6ToXW+VQostSb9Cbcr+i X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1508; 25:ClowDcmVUF3u8Cx9DsVJAyEDb+BLQjxt31nwDHwPqp8eMglCrhbOPv7p+25Pl2tDFTI80XfjUR2L2lmhChk2cF0UzBwdi1P68wPMEVSoias2g0UIjmGmpBuPtJxOmW1j37QayS3oVSZDV3iOmRZ3XmH8qTMgdZ1vubxD5Lu7KpUpaqf5enXd1p2oXYs9IkLnwr+6XDFhlcWs4E3km8bXdf9kDmw3dpOSxbJCSdIcA0Y1qVCPG7Idgyu220geqfczolr5B4goRp5knuh+cw7fBSFBmluK8+AOolfJeozPqduu4u7mm2dvgf1XdLJ4F6r09j6Rdjr6uSqaf5EMCa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cuKDd5ASbWEYPXgSq28qy1E60+4jEjYDH929jsZ1pSudEoj7LEL2SLsYJVv9qhpVs/CZdx42Qbxk8tANmvFUZKVBqhRd8evJMkTYkjA5IZQ2gJzPGNayfhtp6hCX8J1x6csVR6qLva45zkrJwdQqk7pFcy/899nksRFPUovKHvKxO9Nk55KiAum1+dbNHdqKwv0fImEfwQrp1Ix5oSB9os8ZS1CO5C1ce/s/pd6XCkifCn9FBSN4PPI2V2bjMm0GBOAty2SuvFcgb0CoRsPnFB64OO8mtw/pXN1pX858SxvG3Ck4Qame5nKWW+6MRww31 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13016025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:BLUPR0201MB1508; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0201MB1508; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1508; 4:4s5RW+rCex5FtwQlYBk/x8TXfvSo+hlG/lJXIFqQmo+IGfi1aNOnneRljMMoA4T490mHbc7ehU10ddVVkWCqeH/BAEBwEbl23FPnqaQm11wZvHHRohEnKgRzkZrdYbKEv5OpNAqo6xYdvib5DjhQUamPXhf/HbXejbav15aaIVUMYRVf3JVy8K1lGoaX9lS3a5OvhYq8EKtL6vxfEnVE7e/N5xzAfJTyl3It4a1OYLoUXLp6FX8cosTrxs+i1IKyc7+uDnVzg3YHJdu2XZOyswX3ZQeTKDjVk8V/y/IzbgxXtn0H2Pkt6Y7CaCjEb+H7tdTqCpyoMnRFl5W05IHbVropIhMx/H3/GWIWPChnnh9m482BD5Jw7uGgFSxsCFnhpDc6pfo/Z0L9fU8+eopoTKr4HWcnBmotZcAH4w+RpvQpasUTF4WPlJh0Lxctu1ByrDCuXHoyvs7s4tmyNYFWq9cBJtJYqftmJW54GT9XG2++lS6VIQwCzcDRbCjvv2J4zXeZJg6uDMwplOzFYcxE7pMhXNaaJ3tq09kE47gdnzTHj4lN83hGjkQA9ZfOsssidbS0x5bqR8/0IEDoo6EBSQcQSsZTF4ryNLsJnKplnORryoYs+tBFX1RLQPHRR/tx X-Forefront-PRVS: 01480965DA X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0201MB1508; 23:T+m5h4LmlLh00tybdG8D36Qux0c9P5zdOru2LKs?= =?us-ascii?Q?bAkIZDqOF9mrheyGtdafTq/DtFf5xFqAMpAon/v25mPdHuKOOmSSBFe1/aNl?= =?us-ascii?Q?OTmJc9C3SN20fh6kGm/HeSEOzjqrwCtZZvXacX834+Dh6zFCW3S681EGg7Ub?= =?us-ascii?Q?i6n2XIYrC6sxx8M8kirMRXuvl2b4CXSAmUOUTVP5rM1pjupEfgxccHsZeuj2?= =?us-ascii?Q?NeN7X8FOOfOGscY/8FDh2d2XMf7hVz4KavVP4+xe50notY1tLM7GlIa3FGNH?= =?us-ascii?Q?h6wxb7Lz4uveVr1OFUYmexar0s4+CI8e/J5NruCZNg2dlrbE0T1U0hIjRGVd?= =?us-ascii?Q?1RAdOFPB0+KVJcI6yS4TlVCL7/7livCmgANtR/8T6nz9n9k/zOP2R+oamfwT?= =?us-ascii?Q?Ei22riGjOUGJr5a7ohWLCP9/4rvSDSzcBZ+2FrEKId+6sYovIVfv07XwFn3V?= =?us-ascii?Q?p6oUgOciIpL7BrQtQbwYtKE1UAEMjS6fseDZUmGkaJ+TviczpqVL4cg/pFIp?= =?us-ascii?Q?DZ98FWuUx/kqVs/vBdqmJJzvUsagF6dfeVgoJJV7OPvw6S20c0MlZaozvWHa?= =?us-ascii?Q?N6fXl2GyDPVm+0SF8fP9vfVtf6I3Ny8DX9nFUPHP5NSw8J/RYAhlHCtUezzW?= =?us-ascii?Q?QM2RKs7m3JeYLZafdK3rzLK46Dagwo1/9HSk6f7Xxa8S359MEDbcbxLPJ5kL?= =?us-asc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1uYiTCwaJnii/0TFIQKUOL4QquQ2diitz4wacOv0xZoXoM623KnJSOsO/kaW1CGmSYTiG/MnCBWivWkzShMAyEIjgfqhevuPMRlyR1vZ57/IOQSBGGqe6IJut4jZr6rZaKmhn X-OriginatorOrg: sandiskcorp.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2016 17:18:32.0940 (UTC) X-MS-Exchange-CrossTenant-Id: fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fcd9ea9c-ae8c-460c-ab3c-3db42d7ac64d; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0201MB1508 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adam Manzanares We previously had a check to see if the device has support for prioritized ncq commands and a check to see if a device flag is set, through a sysfs variable, in order to send a prioritized command. This patch only allows the sysfs variable to be set if the device supports prioritized commands enabling one check in ata_build_rw_tf in order to determine whether or not to send a prioritized command. This patch depends on ata: ATA Command Priority Disabled By Default tj: Minor subject and formatting updates. Signed-off-by: Adam Manzanares --- drivers/ata/libata-core.c | 3 +-- drivers/ata/libata-scsi.c | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index f6a631a..324e76e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -787,8 +787,7 @@ int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev, if (tf->flags & ATA_TFLAG_FUA) tf->device |= 1 << 7; - if ((dev->flags & ATA_DFLAG_NCQ_PRIO) && - (dev->flags & ATA_DFLAG_NCQ_PRIO_ENABLE)) { + if (dev->flags & ATA_DFLAG_NCQ_PRIO_ENABLE) { if (class == IOPRIO_CLASS_RT) tf->hob_nsect |= ATA_PRIO_HIGH << ATA_SHIFT_PRIO; diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 328a601..c24cbf1 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -317,17 +317,26 @@ static ssize_t ata_ncq_prio_enable_store(struct device *device, ap = ata_shost_to_port(sdev->host); - spin_lock_irqsave(ap->lock, flags); dev = ata_scsi_find_dev(ap, sdev); - if (unlikely(!dev)) { - rc = -ENODEV; - goto unlock; + if (unlikely(!dev)) + return -ENODEV; + + if (!(dev->flags & ATA_DFLAG_NCQ_PRIO)) { + if (ata_id_has_ncq_prio(dev->id)) + ata_dev_config_ncq_prio(dev); } - if (input) + spin_lock_irqsave(ap->lock, flags); + if (input) { + if (!(dev->flags & ATA_DFLAG_NCQ_PRIO)) { + rc = -EOPNOTSUPP; + goto unlock; + } + dev->flags |= ATA_DFLAG_NCQ_PRIO_ENABLE; - else + } else { dev->flags &= ~ATA_DFLAG_NCQ_PRIO_ENABLE; + } unlock: spin_unlock_irqrestore(ap->lock, flags);