public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn•ch>
To: "Russell King (Oracle)" <linux@armlinux•org.uk>
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 net-next] net: phy: marvell10g: add downshift tunable support
Date: Sun, 26 Sep 2021 17:24:06 +0200	[thread overview]
Message-ID: <YVCQlul6Ar4fVtns@lunn.ch> (raw)
In-Reply-To: <YUxTvC9QVI5bGLuF@shell.armlinux.org.uk>

> So, some further questions: should we be calling the set_downshift
> implementation from the .config_init as the Marvell driver does to
> ensure that downshift is correctly enabled?

The bootloader might of messed it up, so it does not seem unreasonable
to set it somewhere at startup.

> Is .config_init really
> the best place to do this? So many things with Marvell PHYs seem to
> require a reset, which bounces the link. So if one brings up the
> network interface, then sets EEE (you get a link bounce) and then
> set downshift, you get another link bounce. Each link bounce takes
> more than a second, which means the more features that need to be
> configured after bringing the interface up, the longer it takes for
> the network to become usable. Note that Marvell downshift will cause
> the link to bounce even if the values programmed into the register
> were already there - there is no check to see if we actually changed
> anything before calling genphy_soft_reset() which seems suboptimal
> given that we have phy_modify_changed() which can tell us that.

This can clearly be optimized. Add a test if the values are being
changed. Skip the reset if it is being done as part of .config_init
and there is a guarantee a later stage will perform the reset, etc.

    Andrew


      reply	other threads:[~2021-09-26 15:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 13:48 [PATCH net-next] net: phy: marvell10g: add downshift tunable support Russell King
2021-09-17 14:45 ` Andrew Lunn
2021-09-17 14:58   ` Russell King (Oracle)
2021-09-22 12:00     ` Russell King (Oracle)
2021-09-22 23:56       ` Andrew Lunn
2021-09-23 10:15         ` Russell King (Oracle)
2021-09-26 15:24           ` Andrew Lunn [this message]

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=YVCQlul6Ar4fVtns@lunn.ch \
    --to=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=hkallweit1@gmail$(echo .)com \
    --cc=kabel@kernel$(echo .)org \
    --cc=kuba@kernel$(echo .)org \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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