From: Heiner Kallweit <hkallweit1@gmail.com>
To: Michael Walle <michael@walle.cc>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
Russell King <linux@armlinux.org.uk>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Vladimir Oltean <olteanv@gmail.com>
Subject: Re: [PATCH net-next] net: phy: at803x: remove at803x_aneg_done()
Date: Thu, 18 Mar 2021 15:54:00 +0100 [thread overview]
Message-ID: <411c3508-978e-4562-f1e9-33ca7e98a752@gmail.com> (raw)
In-Reply-To: <20210318142356.30702-1-michael@walle.cc>
On 18.03.2021 15:23, Michael Walle wrote:
> at803x_aneg_done() is pretty much dead code since the patch series
> "net: phy: improve and simplify phylib state machine" [1]. Remove it.
>
Well, it's not dead, it's resting .. There are few places where
phy_aneg_done() is used. So you would need to explain:
- why these users can't be used with this PHY driver
- or why the aneg_done callback isn't needed here and the
genphy_aneg_done() fallback is sufficient
> [1] https://lore.kernel.org/netdev/922c223b-7bc0-e0ec-345d-2034b796af91@gmail.com/
>
> Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
> drivers/net/phy/at803x.c | 31 -------------------------------
> 1 file changed, 31 deletions(-)
>
> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
> index c2aa4c92edde..d7799beb811c 100644
> --- a/drivers/net/phy/at803x.c
> +++ b/drivers/net/phy/at803x.c
> @@ -751,36 +751,6 @@ static void at803x_link_change_notify(struct phy_device *phydev)
> }
> }
>
> -static int at803x_aneg_done(struct phy_device *phydev)
> -{
> - int ccr;
> -
> - int aneg_done = genphy_aneg_done(phydev);
> - if (aneg_done != BMSR_ANEGCOMPLETE)
> - return aneg_done;
> -
> - /*
> - * in SGMII mode, if copper side autoneg is successful,
> - * also check SGMII side autoneg result
> - */
> - ccr = phy_read(phydev, AT803X_REG_CHIP_CONFIG);
> - if ((ccr & AT803X_MODE_CFG_MASK) != AT803X_MODE_CFG_SGMII)
> - return aneg_done;
> -
> - /* switch to SGMII/fiber page */
> - phy_write(phydev, AT803X_REG_CHIP_CONFIG, ccr & ~AT803X_BT_BX_REG_SEL);
> -
> - /* check if the SGMII link is OK. */
> - if (!(phy_read(phydev, AT803X_PSSR) & AT803X_PSSR_MR_AN_COMPLETE)) {
> - phydev_warn(phydev, "803x_aneg_done: SGMII link is not ok\n");
> - aneg_done = 0;
> - }
> - /* switch back to copper page */
> - phy_write(phydev, AT803X_REG_CHIP_CONFIG, ccr | AT803X_BT_BX_REG_SEL);
> -
> - return aneg_done;
> -}
> -
> static int at803x_read_status(struct phy_device *phydev)
> {
> int ss, err, old_link = phydev->link;
> @@ -1198,7 +1168,6 @@ static struct phy_driver at803x_driver[] = {
> .resume = at803x_resume,
> /* PHY_GBIT_FEATURES */
> .read_status = at803x_read_status,
> - .aneg_done = at803x_aneg_done,
> .config_intr = &at803x_config_intr,
> .handle_interrupt = at803x_handle_interrupt,
> .get_tunable = at803x_get_tunable,
>
next prev parent reply other threads:[~2021-03-18 14:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 14:23 Michael Walle
2021-03-18 14:54 ` Heiner Kallweit [this message]
2021-03-18 15:17 ` Vladimir Oltean
2021-03-18 16:21 ` Heiner Kallweit
2021-03-18 16:38 ` Michael Walle
2021-03-18 17:04 ` Vladimir Oltean
2021-03-18 17:09 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=411c3508-978e-4562-f1e9-33ca7e98a752@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michael@walle.cc \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®