From patchwork Thu Jan 19 13:06:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 45748 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp317208wrn; Thu, 19 Jan 2023 05:10:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXshsXs+5MRo/tIZ60URss4h/XbgcdKDKL2kc3zD3/z32C6VxvqPQgpatOMktf7n4kzmDiPr X-Received: by 2002:a17:906:2582:b0:877:573d:e91c with SMTP id m2-20020a170906258200b00877573de91cmr6745153ejb.63.1674133832525; Thu, 19 Jan 2023 05:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674133832; cv=none; d=google.com; s=arc-20160816; b=ca+mmitve56GoH7xw6C9PPS16f7S67UIo89YVCWriqwQiZ7x+SF9CTHVULRLh+wIkT 1e1fxHxjhetd8zGo67mlcCwkOgUxk6pNX33laSNn7ZAQDlsJJWq/CH6AgNl2nSB7VIrt inUOe4kOj5VSmp9htOCqIRO/730CDeAazD1eeYi+uSJD34ptc2msbSsBQaRnN9qcn4GY MqNPLuxw6O9VUoA8VktTc/+Cx1GOE0vwn7UALIJAtm1AabWIOu5uEZl4oARKEk382ORO YMxYMfJ5xiA3ZMA/htlrNR5vomdqQL4SfzYMYyCtku/FguDel369Vh7Ugdxmz2vA45Sa 9i8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=khuF9D5aRrU+RqS5yxEYYs8dKhh0RK9DJlZz4Fdm+kU=; b=ErM/YoyjFIFKiCkGgr8KNcNEAwsR+nBmZ2mwBwlqvsOI1WCvHmxVZPl3BuPSWOWrcT MWi3KYfs++KnEdM6yZ3Wd0sdUofhArg7vh2Hn/y+OmjkR77IAd6bbf+sYWLjniMM6hgk He0Nw0lpes/wGudtsdDhjuuKpsCabKzcOoVMIdZlZC3phywt56zlMCr2MYw96Ee86m3W tQoGYBFlFN4VoHH7TdaAxuNZfSj6pmV89DcBRtThfDfX1+WoxeBqMdYYTHF5AwVYd7ie bukSlymhUIQQ8DQgKEiyJ5vVoUysvx+HZA6eM8e2Zd06n9peKndkIu29fywyk/GXfQ9e dHmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=ELaQzDQS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc41-20020a17090716a900b007ae74740fa4si36252927ejc.275.2023.01.19.05.10.07; Thu, 19 Jan 2023 05:10:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=ELaQzDQS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229872AbjASNJB (ORCPT + 99 others); Thu, 19 Jan 2023 08:09:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230391AbjASNIF (ORCPT ); Thu, 19 Jan 2023 08:08:05 -0500 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 910E95F3A5; Thu, 19 Jan 2023 05:08:00 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 4F8C518D8; Thu, 19 Jan 2023 14:07:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1674133678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=khuF9D5aRrU+RqS5yxEYYs8dKhh0RK9DJlZz4Fdm+kU=; b=ELaQzDQS/Rb8IAB9R0Pt+rIRCMsEkAtSuwUypOhzEYItq8wf5369kWuR3b1vmg/r7hqSXq jrzs/i2jaDREjQI+27CQpIrMmgERRMP8mPnjtB6gnkma/7Q8z3r586D0X0yj6MYPVI/guN dFxfFIVmDq1JyKHS5rTkjoUM8S9Y02KS5A+K3BVFI4xYCNXoQc/wiaKvsrLJNM+HzmAbts Mrtgx/u7YFnMyB42Y2ZmYxQGn02c8oJX8s5BSx+kCkmpVdWHA5Rxoi6xj8IiTwzWdUeb2Y KjSAmnVlGA8Wtmk1B2LBtx1KeQ6RimYPHHgIUwGqCrBCT2PNkj+o9vj9RbjntQ== From: Michael Walle To: Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , =?utf-8?q?And?= =?utf-8?q?reas_F=C3=A4rber?= , Manivannan Sadhasivam , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , Wells Lu , Jiawen Wu , Mengyuan Lou , Heiner Kallweit , Russell King , Tobias Waldekranz Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-mediatek@lists.infradead.org, Michael Walle Subject: [PATCH RESEND net-next 1/4] net: phy: Remove fallback to old C45 method Date: Thu, 19 Jan 2023 14:06:57 +0100 Message-Id: <20230119130700.440601-2-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230119130700.440601-1-michael@walle.cc> References: <20230119130700.440601-1-michael@walle.cc> MIME-Version: 1.0 X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755456557256011497?= X-GMAIL-MSGID: =?utf-8?q?1755456557256011497?= From: Andrew Lunn Now that all MDIO bus drivers which support C45 implement the c45 specific ops, remove the fallback to the old method. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle --- drivers/net/phy/mdio_bus.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 132dd1f905f4..f5e319549f67 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -844,11 +844,6 @@ int __mdiobus_modify_changed(struct mii_bus *bus, int addr, u32 regnum, } EXPORT_SYMBOL_GPL(__mdiobus_modify_changed); -static u32 mdiobus_c45_addr(int devad, u16 regnum) -{ - return MII_ADDR_C45 | devad << MII_DEVADDR_C45_SHIFT | regnum; -} - /** * __mdiobus_c45_read - Unlocked version of the mdiobus_c45_read function * @bus: the mii_bus struct @@ -869,7 +864,7 @@ int __mdiobus_c45_read(struct mii_bus *bus, int addr, int devad, u32 regnum) if (bus->read_c45) retval = bus->read_c45(bus, addr, devad, regnum); else - retval = bus->read(bus, addr, mdiobus_c45_addr(devad, regnum)); + retval = -EOPNOTSUPP; trace_mdio_access(bus, 1, addr, regnum, retval, retval); mdiobus_stats_acct(&bus->stats[addr], true, retval); @@ -900,8 +895,7 @@ int __mdiobus_c45_write(struct mii_bus *bus, int addr, int devad, u32 regnum, if (bus->write_c45) err = bus->write_c45(bus, addr, devad, regnum, val); else - err = bus->write(bus, addr, mdiobus_c45_addr(devad, regnum), - val); + err = -EOPNOTSUPP; trace_mdio_access(bus, 0, addr, regnum, val, err); mdiobus_stats_acct(&bus->stats[addr], false, err); From patchwork Thu Jan 19 13:06:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 45749 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp317794wrn; Thu, 19 Jan 2023 05:11:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXulFH55j3TU8FpTJuLACKbLNZivKEb7NBBWrPfJ0fFE9fyYDE/p+GhVgseczYP9turEVv7t X-Received: by 2002:a17:907:20db:b0:7c1:7226:c936 with SMTP id qq27-20020a17090720db00b007c17226c936mr10715185ejb.64.1674133895151; Thu, 19 Jan 2023 05:11:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674133895; cv=none; d=google.com; s=arc-20160816; b=n4uK/qlFT77Q34pxEi1jGaMMQ/dzB2i7btAXiymXdA9VwGjYTU1rNCaBufJshgXBsc 9+WMhILdb3v5i5ZJua5MV16gssMXSG86EA6HWq/LYnkjEi7jiR89Y3b5smACe9ETODYK r+QqmTM72/ivjYxSnypmGibhLCRi/gyZDUhkwl3EjTkdx0uHpQwlnDdfs6HXZu+5v/UD TnycnkLhknqtTWHz99gPq+mCm/YItjhGOHoZZP5jDdE/Rhdsa8SH/0Ci515PmtlR+IVb A9rX3MJYMh641kRfUobg4GN0FTpfGxBvO8ZPaOeCQyPBYJbTQKXyoIbrqLmXUyIvRdAp LXYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8ucNqQrBv58FmJgsbqN8x3M/G1cfrpq7tqtLwGp8Zts=; b=ywyIPY+qI77In6tC/chBy8MfWMhH0QWTEo10FI9861ZsibcBI16JHNIvj2S1R86iFC rys9jNHde8eTcxZ3mKJ0bYdDlCh2N4/kFlhLkXin0pMkzSYz7KRRSP9lQbiXzLbd/sJG 1wfuN37dUxpzp6XbJRax4DRwaIu+dsKhOYYXd0e360+N6T5PkCEExtdrYGmngvtiCq54 9Z3ttZKlHONjKfXP8haMq10Ls+c6fnO75SCFwXoVlkwdjyDzq9lYftSa/PMSdSQJYf0W kee1gk05Bv0ucFkncOJngNnANyf0rMUfH+ZAuNW0L8B0c/OqrDYqK8hoprGUDYhLgTVE jk1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b="BO/W7ryv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xc2-20020a170907074200b0078c3197bf86si44662028ejb.533.2023.01.19.05.11.11; Thu, 19 Jan 2023 05:11:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b="BO/W7ryv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbjASNJG (ORCPT + 99 others); Thu, 19 Jan 2023 08:09:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230463AbjASNIF (ORCPT ); Thu, 19 Jan 2023 08:08:05 -0500 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57AD2613C1; Thu, 19 Jan 2023 05:08:01 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 17FA41A00; Thu, 19 Jan 2023 14:07:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1674133679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8ucNqQrBv58FmJgsbqN8x3M/G1cfrpq7tqtLwGp8Zts=; b=BO/W7ryvR8JDotAf4gWdeS8Dhl59cGsFoi2/VnxatK00UV12d84+KVEVwGfDL8trZQBnc+ 49hLDoUSNcQCQtN4ZVeOAI0dyEb+tNHVH1L8GNuYlK+07FEsRD3IRwEQZ5B/adTcnrzazY HmDIqU/fUL97iMbwdSjzRRA0kOypKtd15rrc/7qZAdyJRUQumxYBxBGm6d53iZtp4z6V3n HwP+BjH8gf176YsJHMPazgLiq1kx4TNoXJTop86c7QkTOAueyZsuTW7tzMcpeJRYRRXmkH RV1t7L68Q23HalVppN3uKO0DLIapfih8QyyqhJ5svBPlhCLRnlxVS4vNivCqiQ== From: Michael Walle To: Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , =?utf-8?q?And?= =?utf-8?q?reas_F=C3=A4rber?= , Manivannan Sadhasivam , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , Wells Lu , Jiawen Wu , Mengyuan Lou , Heiner Kallweit , Russell King , Tobias Waldekranz Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-mediatek@lists.infradead.org, Michael Walle Subject: [PATCH RESEND net-next 2/4] net: ngbe: Drop mdiobus_c45_regad() Date: Thu, 19 Jan 2023 14:06:58 +0100 Message-Id: <20230119130700.440601-3-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230119130700.440601-1-michael@walle.cc> References: <20230119130700.440601-1-michael@walle.cc> MIME-Version: 1.0 X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755456623188413071?= X-GMAIL-MSGID: =?utf-8?q?1755456623188413071?= With the new C45 MDIO access API, there is no encoding of the register number anymore and thus the masking isn't necessary anymore. Remove it. Signed-off-by: Michael Walle --- drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c index ba33a57b42c2..c9ddbbc3fa4f 100644 --- a/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c @@ -92,7 +92,7 @@ static int ngbe_phy_read_reg_mdi_c45(struct mii_bus *bus, int phy_addr, int devn wr32(wx, NGBE_MDIO_CLAUSE_SELECT, 0x0); /* setup and write the address cycle command */ - command = NGBE_MSCA_RA(mdiobus_c45_regad(regnum)) | + command = NGBE_MSCA_RA(regnum) | NGBE_MSCA_PA(phy_addr) | NGBE_MSCA_DA(devnum); wr32(wx, NGBE_MSCA, command); @@ -121,7 +121,7 @@ static int ngbe_phy_write_reg_mdi_c45(struct mii_bus *bus, int phy_addr, wr32(wx, NGBE_MDIO_CLAUSE_SELECT, 0x0); /* setup and write the address cycle command */ - command = NGBE_MSCA_RA(mdiobus_c45_regad(regnum)) | + command = NGBE_MSCA_RA(regnum) | NGBE_MSCA_PA(phy_addr) | NGBE_MSCA_DA(devnum); wr32(wx, NGBE_MSCA, command); From patchwork Thu Jan 19 13:06:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 45750 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp317806wrn; Thu, 19 Jan 2023 05:11:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXsmbqwQZXhFaZ0T085PdAPeRvHXZTB9t4MPf9QJNOQ54C63/wMp6f5LMK4JTlUiRX4cV8Fs X-Received: by 2002:a17:906:70c7:b0:84c:a863:ebe6 with SMTP id g7-20020a17090670c700b0084ca863ebe6mr6269673ejk.43.1674133896747; Thu, 19 Jan 2023 05:11:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674133896; cv=none; d=google.com; s=arc-20160816; b=rrLBdHTyae+p6LXOpv/u6euWFdfd4LN7oFVnxlOEqWg1yq9/WzE0ECO4tm9z7fUFNZ xYsXjicVJMALkuXTkUtPJaPMIRuWGpCULvVH9BvXsaBQNhTiv9zsgzjXDwUWQ0Qnu1vU d3wHl+Rv2OaG1iiibRPqaNjSRjBOMLCyjMC3wkawEBk1O7BDrgO5Tl/l7eYNj3XNVG6W 6LCMM13f5TEarY12Fv7IgH+Zabi73xcv2Ga+AY9QxjOILDByhiezEDYfqmm5gimf5FPr RJHEj2ZIPXLhTOzUoQSjiDIci5FkL057RSRZqQbZmjZq5empb2qbEpsO5k40bWSfbPaF /eUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KB9q2klnkcEtMLmw33Oo0QuC0liZTfwwOM7ryE/7LOs=; b=xfofjW9gctZhOZlXB3qI0D+uciScF0wr9Yp1LPXmMxC5lMeGnWDvOKbJh/3ueEKE/x SnOwz+Rd4+0mMyYNTnZEMxzqK8GhMujjBq8m+SsSRC2g/CVwSPLIFrEMP1LCw2mvqsvN 45jKnxeNz1Io5Nlc9K2Z6KTNvy0OOUoegR3fOLt0a8HB7ipeXz6YJMGHEFKYd3BHJ0N2 FXIeARCYMkvvMkLGJ7F5Aw3p4JJIiZ969rPmp52ReJAKbnGsGiFPJonxAr5SStAH+fgv PjdLDeQchBK5LaBYBvcP/LkDQKEztuTEKUUlw1/M3YCMCNXdmT49DQbj1YWPwOaxZsq/ HZ5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=W3xTjohz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h18-20020a05640250d200b0049e0e4b6394si17210853edb.444.2023.01.19.05.11.12; Thu, 19 Jan 2023 05:11:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=W3xTjohz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231207AbjASNJK (ORCPT + 99 others); Thu, 19 Jan 2023 08:09:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbjASNIF (ORCPT ); Thu, 19 Jan 2023 08:08:05 -0500 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CD4261896; Thu, 19 Jan 2023 05:08:02 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id CE88C1A07; Thu, 19 Jan 2023 14:07:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1674133680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KB9q2klnkcEtMLmw33Oo0QuC0liZTfwwOM7ryE/7LOs=; b=W3xTjohztJGbXmy3C4u8IpeO8WIju8y6jS2QjgV3yMJCcfEXSd3ETq7Z4OZhilXOOdMzmu 2+FxZ9xPwbZnvOSBQl2UxSX83+1u50X728rQuuGR4OLvs0i/zqvShDClDGNiuFheptSiXD DfFlCJh3lPXpvvyPuraZEMn+PBB2FgovkCTsx01k82hbUB4erF0wAJsX1HHp5H4bUcZn89 3U4w72R4WseRtujUm8DPMxwXj07OZey/1a5d43QQ/xEdnyBBgNCiOwVICGYlMWqeSq0KKQ aJ7sxUSDqqgiEALb31v+Mqu+8Wp1yhNM5TYHyaqfdJ0/b4jGLwFrmZ4anjOHOA== From: Michael Walle To: Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , =?utf-8?q?And?= =?utf-8?q?reas_F=C3=A4rber?= , Manivannan Sadhasivam , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , Wells Lu , Jiawen Wu , Mengyuan Lou , Heiner Kallweit , Russell King , Tobias Waldekranz Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-mediatek@lists.infradead.org, Michael Walle Subject: [PATCH RESEND net-next 3/4] net: Remove C45 check in C22 only MDIO bus drivers Date: Thu, 19 Jan 2023 14:06:59 +0100 Message-Id: <20230119130700.440601-4-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230119130700.440601-1-michael@walle.cc> References: <20230119130700.440601-1-michael@walle.cc> MIME-Version: 1.0 X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755456625223999596?= X-GMAIL-MSGID: =?utf-8?q?1755456625223999596?= From: Andrew Lunn The MDIO core should not pass a C45 request via the C22 API call any more. So remove the tests from the drivers. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle --- drivers/net/dsa/microchip/ksz_common.c | 6 ------ drivers/net/dsa/rzn1_a5psw.c | 6 ------ drivers/net/dsa/sja1105/sja1105_mdio.c | 6 ------ drivers/net/ethernet/actions/owl-emac.c | 6 ------ drivers/net/ethernet/engleder/tsnep_main.c | 6 ------ drivers/net/ethernet/marvell/mvmdio.c | 6 ------ drivers/net/ethernet/mediatek/mtk_star_emac.c | 6 ------ .../net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c | 6 ------ drivers/net/ethernet/sunplus/spl2sw_mdio.c | 6 ------ drivers/net/mdio/mdio-i2c.c | 6 ------ drivers/net/mdio/mdio-ipq8064.c | 8 -------- drivers/net/mdio/mdio-mscc-miim.c | 6 ------ drivers/net/mdio/mdio-mvusb.c | 6 ------ 13 files changed, 80 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 5e1e5bd555d2..28d26e80e256 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -1777,9 +1777,6 @@ static int ksz_sw_mdio_read(struct mii_bus *bus, int addr, int regnum) u16 val; int ret; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - ret = dev->dev_ops->r_phy(dev, addr, regnum, &val); if (ret < 0) return ret; @@ -1792,9 +1789,6 @@ static int ksz_sw_mdio_write(struct mii_bus *bus, int addr, int regnum, { struct ksz_device *dev = bus->priv; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - return dev->dev_ops->w_phy(dev, addr, regnum, val); } diff --git a/drivers/net/dsa/rzn1_a5psw.c b/drivers/net/dsa/rzn1_a5psw.c index ed413d555bec..919027cf2012 100644 --- a/drivers/net/dsa/rzn1_a5psw.c +++ b/drivers/net/dsa/rzn1_a5psw.c @@ -781,9 +781,6 @@ static int a5psw_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg) u32 cmd, status; int ret; - if (phy_reg & MII_ADDR_C45) - return -EOPNOTSUPP; - cmd = A5PSW_MDIO_COMMAND_READ; cmd |= FIELD_PREP(A5PSW_MDIO_COMMAND_REG_ADDR, phy_reg); cmd |= FIELD_PREP(A5PSW_MDIO_COMMAND_PHY_ADDR, phy_id); @@ -809,9 +806,6 @@ static int a5psw_mdio_write(struct mii_bus *bus, int phy_id, int phy_reg, struct a5psw *a5psw = bus->priv; u32 cmd; - if (phy_reg & MII_ADDR_C45) - return -EOPNOTSUPP; - cmd = FIELD_PREP(A5PSW_MDIO_COMMAND_REG_ADDR, phy_reg); cmd |= FIELD_PREP(A5PSW_MDIO_COMMAND_PHY_ADDR, phy_id); diff --git a/drivers/net/dsa/sja1105/sja1105_mdio.c b/drivers/net/dsa/sja1105/sja1105_mdio.c index 2fcb601cb4eb..01f1cb719042 100644 --- a/drivers/net/dsa/sja1105/sja1105_mdio.c +++ b/drivers/net/dsa/sja1105/sja1105_mdio.c @@ -235,9 +235,6 @@ static int sja1105_base_tx_mdio_read(struct mii_bus *bus, int phy, int reg) u32 tmp; int rc; - if (reg & MII_ADDR_C45) - return -EOPNOTSUPP; - rc = sja1105_xfer_u32(priv, SPI_READ, regs->mdio_100base_tx + reg, &tmp, NULL); if (rc < 0) @@ -254,9 +251,6 @@ static int sja1105_base_tx_mdio_write(struct mii_bus *bus, int phy, int reg, const struct sja1105_regs *regs = priv->info->regs; u32 tmp = val; - if (reg & MII_ADDR_C45) - return -EOPNOTSUPP; - return sja1105_xfer_u32(priv, SPI_WRITE, regs->mdio_100base_tx + reg, &tmp, NULL); } diff --git a/drivers/net/ethernet/actions/owl-emac.c b/drivers/net/ethernet/actions/owl-emac.c index cd4d71b83c33..c6f8f852bff1 100644 --- a/drivers/net/ethernet/actions/owl-emac.c +++ b/drivers/net/ethernet/actions/owl-emac.c @@ -1275,9 +1275,6 @@ static int owl_emac_mdio_read(struct mii_bus *bus, int addr, int regnum) u32 data, tmp; int ret; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - data = OWL_EMAC_BIT_MAC_CSR10_SB; data |= OWL_EMAC_VAL_MAC_CSR10_OPCODE_RD << OWL_EMAC_OFF_MAC_CSR10_OPCODE; @@ -1305,9 +1302,6 @@ owl_emac_mdio_write(struct mii_bus *bus, int addr, int regnum, u16 val) struct owl_emac_priv *priv = bus->priv; u32 data, tmp; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - data = OWL_EMAC_BIT_MAC_CSR10_SB; data |= OWL_EMAC_VAL_MAC_CSR10_OPCODE_WR << OWL_EMAC_OFF_MAC_CSR10_OPCODE; diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c index 5a909c1c11bc..e9dfefba5973 100644 --- a/drivers/net/ethernet/engleder/tsnep_main.c +++ b/drivers/net/ethernet/engleder/tsnep_main.c @@ -130,9 +130,6 @@ static int tsnep_mdiobus_read(struct mii_bus *bus, int addr, int regnum) u32 md; int retval; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - md = ECM_MD_READ; if (!adapter->suppress_preamble) md |= ECM_MD_PREAMBLE; @@ -154,9 +151,6 @@ static int tsnep_mdiobus_write(struct mii_bus *bus, int addr, int regnum, u32 md; int retval; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - md = ECM_MD_WRITE; if (!adapter->suppress_preamble) md |= ECM_MD_PREAMBLE; diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index 2d654a40af13..8662543ca5c8 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -146,9 +146,6 @@ static int orion_mdio_smi_read(struct mii_bus *bus, int mii_id, u32 val; int ret; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - ret = orion_mdio_wait_ready(&orion_mdio_smi_ops, bus); if (ret < 0) return ret; @@ -177,9 +174,6 @@ static int orion_mdio_smi_write(struct mii_bus *bus, int mii_id, struct orion_mdio_dev *dev = bus->priv; int ret; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - ret = orion_mdio_wait_ready(&orion_mdio_smi_ops, bus); if (ret < 0) return ret; diff --git a/drivers/net/ethernet/mediatek/mtk_star_emac.c b/drivers/net/ethernet/mediatek/mtk_star_emac.c index 7050351250b7..02c03325911f 100644 --- a/drivers/net/ethernet/mediatek/mtk_star_emac.c +++ b/drivers/net/ethernet/mediatek/mtk_star_emac.c @@ -1378,9 +1378,6 @@ static int mtk_star_mdio_read(struct mii_bus *mii, int phy_id, int regnum) unsigned int val, data; int ret; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - mtk_star_mdio_rwok_clear(priv); val = (regnum << MTK_STAR_OFF_PHY_CTRL0_PREG); @@ -1407,9 +1404,6 @@ static int mtk_star_mdio_write(struct mii_bus *mii, int phy_id, struct mtk_star_priv *priv = mii->priv; unsigned int val; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - mtk_star_mdio_rwok_clear(priv); val = data; diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c index 7ac06fd31011..654190263535 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_mdio.c @@ -213,9 +213,6 @@ static int mlxbf_gige_mdio_read(struct mii_bus *bus, int phy_add, int phy_reg) int ret; u32 val; - if (phy_reg & MII_ADDR_C45) - return -EOPNOTSUPP; - /* Send mdio read request */ cmd = mlxbf_gige_mdio_create_cmd(priv->mdio_gw, 0, phy_add, phy_reg, MLXBF_GIGE_MDIO_CL22_READ); @@ -249,9 +246,6 @@ static int mlxbf_gige_mdio_write(struct mii_bus *bus, int phy_add, u32 cmd; int ret; - if (phy_reg & MII_ADDR_C45) - return -EOPNOTSUPP; - /* Send mdio write request */ cmd = mlxbf_gige_mdio_create_cmd(priv->mdio_gw, val, phy_add, phy_reg, MLXBF_GIGE_MDIO_CL22_WRITE); diff --git a/drivers/net/ethernet/sunplus/spl2sw_mdio.c b/drivers/net/ethernet/sunplus/spl2sw_mdio.c index 733ae1704269..c8ef17e34f3c 100644 --- a/drivers/net/ethernet/sunplus/spl2sw_mdio.c +++ b/drivers/net/ethernet/sunplus/spl2sw_mdio.c @@ -61,9 +61,6 @@ static int spl2sw_mii_read(struct mii_bus *bus, int addr, int regnum) { struct spl2sw_common *comm = bus->priv; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - return spl2sw_mdio_access(comm, SPL2SW_MDIO_READ_CMD, addr, regnum, 0); } @@ -72,9 +69,6 @@ static int spl2sw_mii_write(struct mii_bus *bus, int addr, int regnum, u16 val) struct spl2sw_common *comm = bus->priv; int ret; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - ret = spl2sw_mdio_access(comm, SPL2SW_MDIO_WRITE_CMD, addr, regnum, val); if (ret < 0) return ret; diff --git a/drivers/net/mdio/mdio-i2c.c b/drivers/net/mdio/mdio-i2c.c index 9577a1842997..1e0c206d0f2e 100644 --- a/drivers/net/mdio/mdio-i2c.c +++ b/drivers/net/mdio/mdio-i2c.c @@ -297,9 +297,6 @@ static int i2c_mii_read_rollball(struct mii_bus *bus, int phy_id, int reg) int bus_addr, ret; u16 val; - if (!(reg & MII_ADDR_C45)) - return -EOPNOTSUPP; - bus_addr = i2c_mii_phy_addr(phy_id); if (bus_addr != ROLLBALL_PHY_I2C_ADDR) return 0xffff; @@ -331,9 +328,6 @@ static int i2c_mii_write_rollball(struct mii_bus *bus, int phy_id, int reg, int bus_addr, ret; u8 buf[6]; - if (!(reg & MII_ADDR_C45)) - return -EOPNOTSUPP; - bus_addr = i2c_mii_phy_addr(phy_id); if (bus_addr != ROLLBALL_PHY_I2C_ADDR) return 0; diff --git a/drivers/net/mdio/mdio-ipq8064.c b/drivers/net/mdio/mdio-ipq8064.c index 37e0d8b6da07..fd9716960106 100644 --- a/drivers/net/mdio/mdio-ipq8064.c +++ b/drivers/net/mdio/mdio-ipq8064.c @@ -57,10 +57,6 @@ ipq8064_mdio_read(struct mii_bus *bus, int phy_addr, int reg_offset) u32 ret_val; int err; - /* Reject clause 45 */ - if (reg_offset & MII_ADDR_C45) - return -EOPNOTSUPP; - miiaddr |= ((phy_addr << MII_ADDR_SHIFT) & MII_ADDR_MASK) | ((reg_offset << MII_REG_SHIFT) & MII_REG_MASK); @@ -81,10 +77,6 @@ ipq8064_mdio_write(struct mii_bus *bus, int phy_addr, int reg_offset, u16 data) u32 miiaddr = MII_WRITE | MII_BUSY | MII_CLKRANGE_250_300M; struct ipq8064_mdio *priv = bus->priv; - /* Reject clause 45 */ - if (reg_offset & MII_ADDR_C45) - return -EOPNOTSUPP; - regmap_write(priv->base, MII_DATA_REG_ADDR, data); miiaddr |= ((phy_addr << MII_ADDR_SHIFT) & MII_ADDR_MASK) | diff --git a/drivers/net/mdio/mdio-mscc-miim.c b/drivers/net/mdio/mdio-mscc-miim.c index 51f68daac152..c87e991d1a17 100644 --- a/drivers/net/mdio/mdio-mscc-miim.c +++ b/drivers/net/mdio/mdio-mscc-miim.c @@ -108,9 +108,6 @@ static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum) u32 val; int ret; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - ret = mscc_miim_wait_pending(bus); if (ret) goto out; @@ -154,9 +151,6 @@ static int mscc_miim_write(struct mii_bus *bus, int mii_id, struct mscc_miim_dev *miim = bus->priv; int ret; - if (regnum & MII_ADDR_C45) - return -EOPNOTSUPP; - ret = mscc_miim_wait_pending(bus); if (ret < 0) goto out; diff --git a/drivers/net/mdio/mdio-mvusb.c b/drivers/net/mdio/mdio-mvusb.c index d5eabddfdf51..68fc55906e78 100644 --- a/drivers/net/mdio/mdio-mvusb.c +++ b/drivers/net/mdio/mdio-mvusb.c @@ -34,9 +34,6 @@ static int mvusb_mdio_read(struct mii_bus *mdio, int dev, int reg) struct mvusb_mdio *mvusb = mdio->priv; int err, alen; - if (dev & MII_ADDR_C45) - return -EOPNOTSUPP; - mvusb->buf[MVUSB_CMD_ADDR] = cpu_to_le16(0xa400 | (dev << 5) | reg); err = usb_bulk_msg(mvusb->udev, usb_sndbulkpipe(mvusb->udev, 2), @@ -57,9 +54,6 @@ static int mvusb_mdio_write(struct mii_bus *mdio, int dev, int reg, u16 val) struct mvusb_mdio *mvusb = mdio->priv; int alen; - if (dev & MII_ADDR_C45) - return -EOPNOTSUPP; - mvusb->buf[MVUSB_CMD_ADDR] = cpu_to_le16(0x8000 | (dev << 5) | reg); mvusb->buf[MVUSB_CMD_VAL] = cpu_to_le16(val); From patchwork Thu Jan 19 13:07:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 45751 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp318016wrn; Thu, 19 Jan 2023 05:11:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXsQDCO6kHKo1KL0nBbXjoLy8R3eu/ZtTvJxEPUy1CPCyrzOIUy7YUVrOTMYKMXFbwJhFwct X-Received: by 2002:a17:906:80cd:b0:847:410:ecff with SMTP id a13-20020a17090680cd00b008470410ecffmr10400601ejx.16.1674133916471; Thu, 19 Jan 2023 05:11:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674133916; cv=none; d=google.com; s=arc-20160816; b=NNecRzAL9qRvS8iwFmYXLJ7LhjmtfDt1NqS3uBV9hfvI8PbRHsGnk4gf0INTDpS804 +rbEvz4hOhI9cWDgpUEMbyXetqZ1PVNHlMaZwXrm7QLwhhCzry5LlFvZCTTvmKvPh3cr D5Cd1CR8sE+Ot8V/ifkEym+fvd2rwynnUwkSKzyoUEjDntZO2uOpDTwGcWEYZ9BijT69 J/4X996z76tOcAtYJlCR7q6QzHlwGGqaKe+Jen8OYykmGEfL30wmAN3tNvrZWY8OUBr/ aC5Iv5ZKHDr9AvGUuAlA+KQSYUVl61sQBBzjQZ87A5/bPLkhGsw18ZWPjYNhM7kA4rJD DkvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mcR19n1jDxBUupnqYv6z29UpOBYVbpXsCvGX6v7zcG0=; b=jKI/aD0ErtocUfnRKq59XBAcybgNrizKARF8JXWsuK5rHO+1oeSO1QUZcA6as+klUv gdj5sZb/NewFTZrAMDOVuaJVipwSmop0RKZw+fHPzrMl4ZTKEVzbqDDPPhN7/1dcibe4 sNNhu5C2DjzwjieQhsZPYZF5/QOnbVRWZW2/ZhB5mPUPSLKIA380/qP2bNj3Gz8QzsyE 0sunJRAKM1ss1+lEzww5sOKCcPUcxkzYr8AOncBKZZ8TqFQ0Jjqzt/tYnqYP9oXZ2e70 2Q2FwxtkM+VMiFPg2Tvqenk+9HQft9K6/gwEXdhgW67s3alGENvsPs94zRw7kIZnoR4z h+Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=NDLWWYBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xi8-20020a170906dac800b007c10bb4eaabsi18453947ejb.156.2023.01.19.05.11.31; Thu, 19 Jan 2023 05:11:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=NDLWWYBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230418AbjASNJQ (ORCPT + 99 others); Thu, 19 Jan 2023 08:09:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230482AbjASNIF (ORCPT ); Thu, 19 Jan 2023 08:08:05 -0500 Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A39366ECF; Thu, 19 Jan 2023 05:08:02 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 95AB41A20; Thu, 19 Jan 2023 14:08:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1674133680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mcR19n1jDxBUupnqYv6z29UpOBYVbpXsCvGX6v7zcG0=; b=NDLWWYBkTVutRYnfjXhxKtQozJCPobbGKm41FWp+lv8xA3rDIuiWCWKrv9GVJp96TIMats YGVT1PCNvNvAIQpAdLGx1udVKsm/uaFfQrMU/5uVfVmvD3+ysuMEyqVFm3RHlurOjDsJ8g 6DrjmliJLYEjoFZ/xuPUk1XOT5nPSnI6HQT5wYO2ZMgmp9YMp1xXc1ievjfY6aBoenlMG4 RFIcC+hEwPLqaFh2rM6rWXHcUZrCon7GsHMb7GGg2DDO+m7QkAg64xnEED8KniBp6RUcoU Echz3WDK71FeMKCMeY2fhmEn9LtTglFMY14GzppjgyQVDldVqeq3X4v5Ln+Njg== From: Michael Walle To: Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , =?utf-8?q?And?= =?utf-8?q?reas_F=C3=A4rber?= , Manivannan Sadhasivam , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , Wells Lu , Jiawen Wu , Mengyuan Lou , Heiner Kallweit , Russell King , Tobias Waldekranz Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, linux-mediatek@lists.infradead.org, Michael Walle Subject: [PATCH RESEND net-next 4/4] net: mdio: Remove support for building C45 muxed addresses Date: Thu, 19 Jan 2023 14:07:00 +0100 Message-Id: <20230119130700.440601-5-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230119130700.440601-1-michael@walle.cc> References: <20230119130700.440601-1-michael@walle.cc> MIME-Version: 1.0 X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755456494615210406?= X-GMAIL-MSGID: =?utf-8?q?1755456645678628474?= From: Andrew Lunn The old way of performing a C45 bus transfer created a special register value and passed it to the MDIO bus driver, in the hope it would see the MII_ADDR_C45 bit set, and perform a C45 transfer. Now that there is a clear separation of C22 and C45, this scheme is no longer used. Remove all the #defines and helpers, to prevent any code being added which tries to use it. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle --- include/linux/mdio.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/include/linux/mdio.h b/include/linux/mdio.h index 220f3ca8702d..c0da30d63b1d 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -10,14 +10,6 @@ #include #include -/* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit - * IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. - */ -#define MII_ADDR_C45 (1<<30) -#define MII_DEVADDR_C45_SHIFT 16 -#define MII_DEVADDR_C45_MASK GENMASK(20, 16) -#define MII_REGADDR_C45_MASK GENMASK(15, 0) - struct gpio_desc; struct mii_bus; struct reset_control; @@ -463,16 +455,6 @@ static inline int mdiodev_modify_changed(struct mdio_device *mdiodev, mask, set); } -static inline u16 mdiobus_c45_regad(u32 regnum) -{ - return FIELD_GET(MII_REGADDR_C45_MASK, regnum); -} - -static inline u16 mdiobus_c45_devad(u32 regnum) -{ - return FIELD_GET(MII_DEVADDR_C45_MASK, regnum); -} - static inline int mdiodev_c45_modify(struct mdio_device *mdiodev, int devad, u32 regnum, u16 mask, u16 set) {