From patchwork Tue Oct 18 19:10:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 1691674 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=iSq+n/yl; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4MsNlB4W1nz23jp for ; Wed, 19 Oct 2022 06:11:50 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229602AbiJRTLN (ORCPT ); Tue, 18 Oct 2022 15:11:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbiJRTLB (ORCPT ); Tue, 18 Oct 2022 15:11:01 -0400 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26A6D28724 for ; Tue, 18 Oct 2022 12:11:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1666120260; x=1697656260; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=uFx+cIF2B48EL7XjK41r06t1GGAXOyurA9GNTPL1qWg=; b=iSq+n/ylASUMZksiyNTaHsIkMltliULMEWcmA6jbmKnuYqcyrpL6/hRq CSFqPQNjzjTiXyOYwZGsVnHDEmXSCuNLV6hrG53KLjQI1jnIGejBwBNuy hflSma8xZ5NHYutVDBHmHGxx9tY2KKrep9Bcqv/GBF/FxLQMc5aBZpREy Et3zprDMmG5r3PxkjV0PKdtrlrZpH47yCpYkgZc2H4NGX/dnsmRy8otq+ x0lAtgEESXMgQ7m9A7Fwggrv7bfNpfB36flD1Wwxf313IgSwMpT1iG/H2 S/oy0xc9v6k26mXUn4KjZqAOeG3mbz/V1m2+KjTiWYSKXyMX0708/FT9o Q==; X-IronPort-AV: E=Sophos;i="5.95,194,1661788800"; d="scan'208";a="214533335" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 19 Oct 2022 03:10:59 +0800 IronPort-SDR: v3nDmihTBLIS1nLqHQevGcHPtpC8fiRrhYtt++vSNm1036rrjK8B/nYee/I8pS2dE4hkl8B2UD dH3qClDqx0F3/TPH/u6HAva586a5bVOa5UVvrd5zFB1wYPzcUmsGUNWQdb1KxNvW+qgQm/uXUi 0g1MhQgTQFzYUw0hK6hSgbI/4ClepD6c4HHRPNTl2Pkv0yam9dZZ7rKfHcU+pgtSMACpc9l8Gb KH2bZv2DYSJRJ8mdQKutzt7Tu9VR3rOewfnm7d0xGyZs/24cNPiloiX2EAk56kapTU6vBNArpn wloHuZW9qnbUDpuMTNgKCWCv Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 18 Oct 2022 11:30:30 -0700 IronPort-SDR: x5+ZUPcj+P1KOwcRhHqoScFWljic0JVC/kq2x8ZcfLRKDIKEIKyhCCVJq8g2BPMm1Y4llI/Sl1 0wgttfQZu3rVXJB/8X2u76ckzZL/3cjG47FSWhg17cM1h+mtNj9azOCG9BRvsqy9HFq45gGRnR bhW7CYquO5NrRklsXr6B2OXmYC2g25I+t/woduenXgDlwoYa+PAIlQ/Ry9IpjPBwOHx3XzhUCH uR0LgGQ2dle9Ru6K+n049X/GTHhPm/W1UA4Sg76biohCT6kVpJ8ddve0jPekQ9ZSzQZwmqlMpn 2OU= WDCIronportException: Internal Received: from unknown (HELO x1-carbon.lan) ([10.225.164.90]) by uls-op-cesaip01.wdc.com with ESMTP; 18 Oct 2022 12:10:58 -0700 From: Niklas Cassel To: Damien Le Moal Cc: Niklas Cassel , linux-ide@vger.kernel.org Subject: [PATCH 1/3] ata: remove unused helper ata_id_lba48_enabled() Date: Tue, 18 Oct 2022 21:10:52 +0200 Message-Id: <20221018191055.2367325-1-niklas.cassel@wdc.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Not only is this function unused, but even worse, the bit it is checking is actually used for signaling if the feature is supported, not enabled. Therefore, remove the unused helper function ata_id_lba48_enabled(). ata_id_has_lba48() is left unmodified, since this extra supported bit (Bit 10 of word 86) is simply a copy of the bit that ata_id_has_lba48() already checks (Bit 10 of word 83), see ACS-5 r10: 7.13.6.41 Words 85..87, 120: Commands and feature sets supported or enabled Signed-off-by: Niklas Cassel --- include/linux/ata.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/linux/ata.h b/include/linux/ata.h index e3050e153a71..c04aca58448a 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -698,15 +698,6 @@ static inline bool ata_id_has_lba48(const u16 *id) return id[ATA_ID_COMMAND_SET_2] & (1 << 10); } -static inline bool ata_id_lba48_enabled(const u16 *id) -{ - if (ata_id_has_lba48(id) == 0) - return false; - if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) - return false; - return id[ATA_ID_CFS_ENABLE_2] & (1 << 10); -} - static inline bool ata_id_hpa_enabled(const u16 *id) { /* Yes children, word 83 valid bits cover word 82 data */ From patchwork Tue Oct 18 19:10:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 1691676 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=aiTa5B+j; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4MsNlD29fZz23jp for ; Wed, 19 Oct 2022 06:11:52 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbiJRTLO (ORCPT ); Tue, 18 Oct 2022 15:11:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbiJRTLD (ORCPT ); Tue, 18 Oct 2022 15:11:03 -0400 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BD541F2DC for ; Tue, 18 Oct 2022 12:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1666120262; x=1697656262; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YqqAv9Yqf41OrfCSGIwM1W/yjX8UlkXu7OkJOCCBTI8=; b=aiTa5B+jjogjikGyDRMduF0n2CRmAnRmwDu6srQMI9Va/RdtEGTQ8SGU ESjbGB+wyyNqUxJ/rSWkSCwRIbiBUvGlms4rHhD9dFEWLkaTa2+2D/MXU 4VgXGJCW6Vn4PT81J3e/vEzKPzUxaSSlfnTTQ/nLymldxNwmla+mmxogL VOWvfe1URTFmoUReMtKQDDcvkpgkHjFO6lX4eGC0pxKNkaF/rD+wfZcrm iM/0745Xz6vuTwzFYks6yXRXNUbNvqWSR5m/a4RunE2rVhLHfDvbXF+j5 MtfB+YUaQ2bJ9nElYTWKjS0R6F6qzLycLrRRdqh7oCagrjeoqXJMxXQ/v w==; X-IronPort-AV: E=Sophos;i="5.95,194,1661788800"; d="scan'208";a="214533339" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 19 Oct 2022 03:11:02 +0800 IronPort-SDR: fvhFowEIWHYSow4ZNP8fT8ZB87tHuHB2pyKxLx8uMFyp0kLB9quj/N+bZviMU6hSkWR7kU8n7v x2T9BTc8dz2xT29Qurl5i7YTJyTdDXkTABB42KfZgWnw6dYqIqseG4cDxqrABQz+JM9BQvB1dc 0u9hBxow9XgKTnD3Y7IwIUHG0CmYXqUQwnanJI0duDiuD7H4lwctahPp+1mdTzo7MRCy3ptuTV 1VzlQCjEVyM92N5l0tfokW4dpYbHsOOSLpP7D61OArmee4vHQ1gZkBuaL/ku94RdItzVmpiH/I ziWlFIkFaoeYy3fHqR3j0cgp Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 18 Oct 2022 11:30:34 -0700 IronPort-SDR: vqiXYqj3E81yFGBI8bOR/EcwqFSlbJcW4xslsIzACE+pR7M3pWm8q6EqIZaCud6sPUcDjwV6/Z PCVjEFCMiznlt/HuI9rDFQuzRDCfF5x/OX8hL4+nytjkOPGms511AqgBS7bryJHxW0K3XntTfc TGL15j4EBi2ILtJn85RQC3tUa2wPL7FzD7vHtam0bhYdqIbbScgut285glhvJzMoHDp20vr5zL BBlzwh7McO4fYIPrLS0Gz/6FubLyCe6L4/VOLLI4XZMQxO8myHeWhKkyMbI1iudFcU7Yb8da4+ wvE= WDCIronportException: Internal Received: from unknown (HELO x1-carbon.lan) ([10.225.164.90]) by uls-op-cesaip01.wdc.com with ESMTP; 18 Oct 2022 12:11:01 -0700 From: Niklas Cassel To: Damien Le Moal Cc: Niklas Cassel , linux-ide@vger.kernel.org Subject: [PATCH 2/3] ata: remove unused helper ata_id_flush_enabled() Date: Tue, 18 Oct 2022 21:10:53 +0200 Message-Id: <20221018191055.2367325-2-niklas.cassel@wdc.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221018191055.2367325-1-niklas.cassel@wdc.com> References: <20221018191055.2367325-1-niklas.cassel@wdc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Not only is this function unused, but even worse, the bit it is checking is actually used for signaling if the feature is supported, not enabled. Therefore, remove the unused helper function ata_id_flush_enabled(). ata_id_has_flush() is left unmodified, since this extra supported bit (Bit 12 of word 86) is simply a copy of the bit that ata_id_has_flush() already checks (Bit 12 of word 83), see ACS-5 r10: 7.13.6.41 Words 85..87, 120: Commands and feature sets supported or enabled Signed-off-by: Niklas Cassel --- include/linux/ata.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/linux/ata.h b/include/linux/ata.h index c04aca58448a..b32d62542e26 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -615,15 +615,6 @@ static inline bool ata_id_has_flush(const u16 *id) return id[ATA_ID_COMMAND_SET_2] & (1 << 12); } -static inline bool ata_id_flush_enabled(const u16 *id) -{ - if (ata_id_has_flush(id) == 0) - return false; - if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) - return false; - return id[ATA_ID_CFS_ENABLE_2] & (1 << 12); -} - static inline bool ata_id_has_flush_ext(const u16 *id) { if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) From patchwork Tue Oct 18 19:10:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 1691675 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=DvCV/eG+; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4MsNlC5qHyz23kT for ; Wed, 19 Oct 2022 06:11:51 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229726AbiJRTLP (ORCPT ); Tue, 18 Oct 2022 15:11:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbiJRTLG (ORCPT ); Tue, 18 Oct 2022 15:11:06 -0400 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B2A51F2DC for ; Tue, 18 Oct 2022 12:11:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1666120265; x=1697656265; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XBi5JONUHLkgh5GrOiwpON56BlPI5qhx2/e44LRDZes=; b=DvCV/eG+RcHdJxGy6RTj9zpKuv6JrUQ2g0vwYJtZNXDv4emfnp4YJ9y2 46O+V4kKTCUXhoeFI0GI0pn+sijgybDDzmRYL+/r019fn/kagIUk3mG1h z6+Vn6rppkV3T1AhLxFbyerwi57G9Rg4w5Hz3grV3r+U/b9NQ8sR6FNKA DFVwcsPVgE155fUHZoeaeBaQmo1yNpjjfrD37UXA//Dci1WgZTYQMAy8Z eQ+YpwlE//W9z6sSPVUaEUAxzaaK7jQRXCvL1jnvNdj81aUDik4DxH6lN qfv31qoqsmQxzLfM8ClJjBUr3n5UN/CTVnQzPfVcy5T5Wjap2FClLgQEY g==; X-IronPort-AV: E=Sophos;i="5.95,194,1661788800"; d="scan'208";a="214533342" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 19 Oct 2022 03:11:05 +0800 IronPort-SDR: upgv+o+F7204O+722ZnC8WHdk7puCadVpVMN2DLTwv4HaaiN4UBmcYXV4QVVuLKzeTwbB5xLC9 3/Qr5tRVuql16Ai9sAHWVLd2BhRq/asYAEwEXnnj5pVT5M9USkMPWtRalCvfb5UguT0IIu4lqZ KTj91uiMOIMISnYjJ8dGa9jlcTD34gU5ijtOLc7D7R6rcRYwY3NivcxgHuIFm7ULDwXxukPiHc ZNGXw6va6qMTwvAxoGb5fe9JD8Q+x5JrajeKhUNso/s2S3fERpWmfi2ZGyf2zLNE6BaCoXHhQD VTCu9tEB2U7IcRWNnFekHSh4 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 18 Oct 2022 11:30:36 -0700 IronPort-SDR: WaPvmmvnj7BQnI459j3p5xRVh9JGb/neAu3HLvd+IjrdGvlYQNd/tSjqrrLAlCcVn/QUzNFJqL ZUaEiWwD01ztkj8taMXvYKKXKtMbOG9ZGsWgBxBA/X5WSV43FbfaCF61Dxq7FX0QN6YrDseSxM DxJIIvxaSIss1X7stGwlztWV9gw3/nGty8yX8LQzKUnrslKFEKKU3PdmcFpyzGTE11bKp0e2JL Fiz/hQBais6bATVbl2sN/gza0dVR1u4n5xzR1K1AydMVyrT0rlKl7T+ZFjjGgQGvXYpyHTiA+a m54= WDCIronportException: Internal Received: from unknown (HELO x1-carbon.lan) ([10.225.164.90]) by uls-op-cesaip01.wdc.com with ESMTP; 18 Oct 2022 12:11:04 -0700 From: Niklas Cassel To: Damien Le Moal Cc: Niklas Cassel , linux-ide@vger.kernel.org Subject: [PATCH 3/3] ata: remove unused helper ata_id_flush_ext_enabled() Date: Tue, 18 Oct 2022 21:10:54 +0200 Message-Id: <20221018191055.2367325-3-niklas.cassel@wdc.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221018191055.2367325-1-niklas.cassel@wdc.com> References: <20221018191055.2367325-1-niklas.cassel@wdc.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Not only is this function unused, but even worse, the bit it is checking is actually used for signaling if the feature is supported, not enabled. Therefore, remove the unused helper function ata_id_flush_ext_enabled(). ata_id_has_flush_ext() is left unmodified, since this extra supported bit (Bit 13 of word 86) is simply a copy of the bit that ata_id_has_flush_ext() already checks (Bit 13 of word 83), see ACS-5 r10: 7.13.6.41 Words 85..87, 120: Commands and feature sets supported or enabled Signed-off-by: Niklas Cassel --- include/linux/ata.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/include/linux/ata.h b/include/linux/ata.h index b32d62542e26..0c18499f60b6 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -622,19 +622,6 @@ static inline bool ata_id_has_flush_ext(const u16 *id) return id[ATA_ID_COMMAND_SET_2] & (1 << 13); } -static inline bool ata_id_flush_ext_enabled(const u16 *id) -{ - if (ata_id_has_flush_ext(id) == 0) - return false; - if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) - return false; - /* - * some Maxtor disks have bit 13 defined incorrectly - * so check bit 10 too - */ - return (id[ATA_ID_CFS_ENABLE_2] & 0x2400) == 0x2400; -} - static inline u32 ata_id_logical_sector_size(const u16 *id) { /* T13/1699-D Revision 6a, Sep 6, 2008. Page 128.