Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3325696rwb; Mon, 16 Jan 2023 06:41:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXsMFIA6Zvbtd7GkgCR66XJkXkRjFv5QBIJI562sne6B51A0uXhH+Dd2wlZyUQ5+4gSSDnow X-Received: by 2002:a05:6a20:5496:b0:b6:157c:d72b with SMTP id i22-20020a056a20549600b000b6157cd72bmr36212864pzk.33.1673880064451; Mon, 16 Jan 2023 06:41:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673880064; cv=none; d=google.com; s=arc-20160816; b=k26hWCZe8FA23Gar4nolIEBWY7GbtdlCSecc8Om6U3+SoA74bDcvUaSEoFDjjKGfXl 1h/ZiibOU7ZzmPq4Uwt9FyFNB0HAvqUtjuF/YsAjVORSgabyEkMrhwuLITjfF75ljFWo gRENWd0UkgJgH0qdD/041MMiHJ1g846P3ArKwOm6jaYsPShkg5GHYy3jhlbG61TOnMp4 CEgTwtR1KuNMkHvtzax42VKiqqDF5r0m4t0skb/6BtU7Asd4TAcCnYo7ZLvIvvF/py8I /BaiMaH/FakVUPxYOwLnLxjXUJfnq8Cao2ut9bz2tU1lQqc0w/0uQFCHjuhTBvrhRRIh fVew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=W5Spwn+5qRW864bp5C5OgGPVSnNBAMvY7J7oVAjQX4k=; b=G4bIazrXdksr2CYX0msBHmI3exSMlFDVw1Bqgy4Ijqq9xhhKVHBy6qJYdpawh7gMh3 Ef8h8BxtqtAgFWzCVGRrVm619sbbMdIImwsovEp5bv5TAW6sNn3Sa80RuOSPFYsmB6oV lLtphA0exQv0KKKfDAwqLZCwPnhjqGlySnYe+DkfAdWSm5yyq7qrGCU65jWc/MCdD5xc 48Isy2ETnzqyKgbrmFEkYNtRrS9eoZvdq2zUOfS9hgCBuk9MLuqH5CS5lgxNh39tfiQo EP3PKvaLYmkqyyo/E+mTTCYs0f5sFheGnVGsEtxrjRxe0TDr4saCuIlqosBJA7XUhZcu fXSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=yEEVhq99; 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 m3-20020a170902db0300b001946fc21187si9280506plx.616.2023.01.16.06.40.58; Mon, 16 Jan 2023 06:41:04 -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=yEEVhq99; 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 S231408AbjAPM52 (ORCPT + 51 others); Mon, 16 Jan 2023 07:57:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbjAPM4s (ORCPT ); Mon, 16 Jan 2023 07:56:48 -0500 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB8A01F926; Mon, 16 Jan 2023 04:55:39 -0800 (PST) Received: from mwalle01.sab.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 68D5516E8; Mon, 16 Jan 2023 13:55:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1673873737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W5Spwn+5qRW864bp5C5OgGPVSnNBAMvY7J7oVAjQX4k=; b=yEEVhq99moifusghajmavnVyJawstON1afqC5Ff04kQU5FcGh+uBKpXdm+vTexU/67q7MJ kNEKHriYbGV8HSHSiTGmNNbXJIDYPz2PCIJL0w513IT7/2JFtP4uLWM5tvmoRwMjo6zV79 bm9Iy1ZK89C+HNt09RugGpVqIBI5yHMoAFsiR4x8JNl8M+XS3zLGLcIkh4Vs3U0x4RGofZ elYe1Bd8q3AOX/HETYv5xgbWsoQ/52E8XVlda3GogtajUnjVfaEEoPPhRNwXhVwOLZrg7f za0L4cmjFrEnvbiFWil9a5tSr1ZwDB2XxgTfW+xqEu+OPu/ZSp9YAp/vYTdSjQ== From: Michael Walle Date: Mon, 16 Jan 2023 13:55:16 +0100 Subject: [PATCH net-next 4/6] net: mdio: scan bus based on bus capabilities for C22 and C45 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230116-net-next-remove-probe-capabilities-v1-4-5aa29738a023@walle.cc> References: <20230116-net-next-remove-probe-capabilities-v1-0-5aa29738a023@walle.cc> In-Reply-To: <20230116-net-next-remove-probe-capabilities-v1-0-5aa29738a023@walle.cc> To: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , Bryan Whitehead , UNGLinuxDriver@microchip.com, Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Joel Stanley , Andrew Jeffery Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-aspeed@lists.ozlabs.org, Andrew Lunn , Michael Walle X-Mailer: b4 0.11.1 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 set probe_capabilities to MDIOBUS_C22_C45 have been converted to use the name API for C45 transactions, perform the scanning of the bus based on which methods the bus provides. Signed-off-by: Andrew Lunn Signed-off-by: Michael Walle --- drivers/net/phy/mdio_bus.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index f173c91842e0..34790e601cb1 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -710,9 +710,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) goto error_reset_gpiod; } - if (bus->probe_capabilities == MDIOBUS_NO_CAP || - bus->probe_capabilities == MDIOBUS_C22 || - bus->probe_capabilities == MDIOBUS_C22_C45) { + if (bus->read) { err = mdiobus_scan_bus_c22(bus); if (err) goto error; @@ -720,9 +718,7 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner) prevent_c45_scan = mdiobus_prevent_c45_scan(bus); - if (!prevent_c45_scan && - (bus->probe_capabilities == MDIOBUS_C45 || - bus->probe_capabilities == MDIOBUS_C22_C45)) { + if (!prevent_c45_scan && bus->read_c45) { err = mdiobus_scan_bus_c45(bus); if (err) goto error; -- 2.30.2