Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp443401pxf; Wed, 31 Mar 2021 07:19:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIzx3ogCJxS1gbX+9MaTLDYIJMdqaYPAnbBYAOMVv4QdfhE1TKugV4ZOkuhwSDMHNDnon4 X-Received: by 2002:a17:906:4c56:: with SMTP id d22mr3923266ejw.426.1617200388326; Wed, 31 Mar 2021 07:19:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617200388; cv=none; d=google.com; s=arc-20160816; b=awSI/zQdGUziXzRjdx7igey2BQHqwB8SO61clTjX82If8qT88ngbbcZyCPqdG+qond vh2QR1CC/MlnSdwvONT26PJiZRgyy4SdMqbhs/YjFYDiBIeiAz6Fbj/mhcLumdd6OnZC FMPsYAFjzSAg6DlkHbV6F+mmusjPs+s+4TF49xBvHQH1gUyqM0uEU6J9wdRfxt1ACRyl VykOJds/sVpAFWvqYBd/AZqEFc1QQ4id7S6IZUwXbR4w2qhSOIkfCVDMhWu/Bdymzm77 xM/jydLcKjWHJi5axCRCdwiP90ht4rRCInvtaStfqQJe1C46FWl89lCstqBaW5LVqp1h asNg== 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; bh=5yCcEULgEHLm6M8u6rPTch6LlwVRwe65LWGs0CJiFTE=; b=tLL8RWOZc0rXasSBRanL6sxnTDlA02ScySr4Ivr4R/xV8GNiEJLnYv7/sWJQRX6Af7 pf+eLH1eYf1bYIQAImyW+gTc6v/NnasBdU9SoiJHIAUwr+Jg0XwvbzpDIEKoQpO1T+mA GFaonBZB2dsN+HINPGtufKm6QfTUR++fS53LI5ZpfMHLdCXG9rrDRbWx/N9TkZs+Qv4s oWCXWFZldhwAtMrqGSwmUDM6JnbUXRpGIMsuZ9u4/Q0Tf3PkSAfMjirlnq8hVfOHg/7Q w77uabB/c4h0DWaoABPZkfklTLD/S+/0AGvwK0uaZagqHPNqfB2Tkv0U3n8m/iKaK88G hVoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si1919461edw.354.2021.03.31.07.19.25; Wed, 31 Mar 2021 07:19:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236050AbhCaOS0 (ORCPT + 99 others); Wed, 31 Mar 2021 10:18:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236000AbhCaOSO (ORCPT ); Wed, 31 Mar 2021 10:18:14 -0400 Received: from hs01.dk-develop.de (hs01.dk-develop.de [IPv6:2a02:c207:3002:6234::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94E35C061574; Wed, 31 Mar 2021 07:18:12 -0700 (PDT) From: Danilo Krummrich To: linux@armlinux.org.uk, davem@davemloft.net, andrew@lunn.ch, hkallweit1@gmail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, Danilo Krummrich Subject: [PATCH 1/2] net: mdio: rename mii bus probe_capabilities Date: Wed, 31 Mar 2021 16:17:54 +0200 Message-Id: <20210331141755.126178-2-danilokrummrich@dk-develop.de> In-Reply-To: <20210331141755.126178-1-danilokrummrich@dk-develop.de> References: <20210331141755.126178-1-danilokrummrich@dk-develop.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename the probe_capabilities field of struct mii_bus to capabilities. This field represents the supported frame formats of the mdio controller backing this bus as by IEEE 802.3 in general. This is not specific to the probing procedure of the bus. Signed-off-by: Danilo Krummrich --- drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +- drivers/net/phy/mdio_bus.c | 2 +- include/linux/phy.h | 7 +++++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index bfa2826c5545..bda04154fca2 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -268,7 +268,7 @@ static int xgmac_mdio_probe(struct platform_device *pdev) bus->read = xgmac_mdio_read; bus->write = xgmac_mdio_write; bus->parent = &pdev->dev; - bus->probe_capabilities = MDIOBUS_C22_C45; + bus->capabilities = MDIOBUS_C22_C45; snprintf(bus->id, MII_BUS_ID_SIZE, "%pa", &res->start); /* Set the PHY base address */ diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index d64116e0543e..917537731131 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -366,7 +366,7 @@ int stmmac_mdio_register(struct net_device *ndev) new_bus->name = "stmmac"; if (priv->plat->has_gmac4) - new_bus->probe_capabilities = MDIOBUS_C22_C45; + new_bus->capabilities = MDIOBUS_C22_C45; if (priv->plat->has_xgmac) { new_bus->read = &stmmac_xgmac2_mdio_read; diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 823518554079..d03e40a0fbae 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -670,7 +670,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) struct phy_device *phydev = ERR_PTR(-ENODEV); int err; - switch (bus->probe_capabilities) { + switch (bus->capabilities) { case MDIOBUS_NO_CAP: case MDIOBUS_C22: phydev = get_phy_device(bus, addr, false); diff --git a/include/linux/phy.h b/include/linux/phy.h index 1a12e4436b5b..ba5eb317a471 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -362,13 +362,16 @@ struct mii_bus { /** @reset_gpiod: Reset GPIO descriptor pointer */ struct gpio_desc *reset_gpiod; - /** @probe_capabilities: bus capabilities, used for probing */ + /** + * @capabilities: bus capabilities, representing supported frame + * formats as by IEEE 802.3 + */ enum { MDIOBUS_NO_CAP = 0, MDIOBUS_C22, MDIOBUS_C45, MDIOBUS_C22_C45, - } probe_capabilities; + } capabilities; /** @shared_lock: protect access to the shared element */ struct mutex shared_lock; -- 2.31.0