From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, Marek Beh__n <kabel@kernel.org>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH RFC net-next] net: phy: marvell10g: add downshift tunable support
Date: Tue, 20 Jul 2021 15:30:46 +0100 [thread overview]
Message-ID: <20210720143046.GU22278@shell.armlinux.org.uk> (raw)
In-Reply-To: <YPbdfBqjgHzM+6+Z@lunn.ch>
On Tue, Jul 20, 2021 at 04:28:12PM +0200, Andrew Lunn wrote:
> > +static int mv3310_set_downshift(struct phy_device *phydev, u8 ds)
> > +{
> > + struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev);
> > + u16 val;
> > + int err;
> > +
> > + /* Fails to downshift with v0.3.5.0 and earlier */
> > + if (priv->firmware_ver < MV_VERSION(0,3,5,0))
> > + return -EOPNOTSUPP;
> > +
> > + if (ds == DOWNSHIFT_DEV_DISABLE)
> > + return phy_clear_bits_mmd(phydev, MDIO_MMD_PCS, MV_PCS_DSC1,
> > + MV_PCS_DSC1_ENABLE);
> > +
> > + /* FIXME: The default is disabled, so should we disable? */
> > + if (ds == DOWNSHIFT_DEV_DEFAULT_COUNT)
> > + ds = 2;
>
> Interesting question.
>
> It is a useful feature, so i would enable it by default.
>
> Is it possible to read the actual speed via some vendor register? The
> phy-core might then give a warning, but it is 50/50 since the link
> peer might perform the downshift.
We already do read the actual negotiated speed anbd other parameters
from the MV_PCS_CSSR1 register.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2021-07-20 14:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-20 13:38 [PATCH RFC net-next] net: phy: marvell10g: add downshift tunable support Russell King
2021-07-20 14:28 ` Andrew Lunn
2021-07-20 14:30 ` Russell King (Oracle) [this message]
2021-07-20 15:04 ` Marek Behún
2021-07-20 17:14 ` Russell King (Oracle)
2021-07-20 17:32 ` Marek Behún
2021-07-20 17:39 ` Russell King (Oracle)
2021-07-20 17:50 ` Marek Behún
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=20210720143046.GU22278@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.