Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1024974rwb; Thu, 19 Jan 2023 05:51:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXtMEd0iNNAeRdmxncYByk8eoYhdaTLSsXCyhs0c+jrG206DLjfkjISR31D+6poRNlT0GiOW X-Received: by 2002:a05:6a00:4088:b0:58d:aadf:5e62 with SMTP id bw8-20020a056a00408800b0058daadf5e62mr11838160pfb.18.1674136286741; Thu, 19 Jan 2023 05:51:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674136286; cv=none; d=google.com; s=arc-20160816; b=DXyFg+jlkt6kwjXpRUUib/OUjDQAHOwbqtMjurjuMWz8oizar/VMh5NEvOMoxkhj7Z ppo/ju/Qpd/ssO3/+DuB0SnHEFGFx4RQUEi5aqE2v4hGYzbNWOh970yq8odSSCIAEn4V +K66LjH4YLP6EydtwnWXOeyuIkeDkUlr43TibrDXsPzbmoCvbSksaapuXvRbzfL4OpkB /s1VzikY7yfo+Fsu/Qt8yPYgxHojWznpG2GCeJqCTRk4pIzcaznagR4bL14WkU2aRA64 2oS/2M0Cg7dfbg4VZBV+ga17446mnvd92ATc65taJDqqX3fXe6jY38jtAblw3q8mD0Yc oX1Q== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e125-20020a621e83000000b005726ac39d2esi2719179pfe.30.2023.01.19.05.51.20; Thu, 19 Jan 2023 05:51:26 -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 + 44 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?q?Cl=C3=A9ment=20L=C3=A9ger?= , =?UTF-8?q?Andreas=20F=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 Content-Transfer-Encoding: 8bit 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 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); -- 2.30.2