All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Daniel Golle <daniel@makrotopia.org>
Cc: linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
	Sean Wang <sean.wang@mediatek.com>,
	Landen Chao <Landen.Chao@mediatek.com>,
	DENG Qingfang <dqfext@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Alexander 'lynxis' Couzens <lynxis@fe80.eu>
Subject: Re: [PATCH] net: dsa: mt7530: add support for in-band link status
Date: Sun, 11 Sep 2022 20:58:15 +0100	[thread overview]
Message-ID: <Yx4910YC6/Y7ghfm@shell.armlinux.org.uk> (raw)
In-Reply-To: <YxvkbO9PoNi86BZa@makrotopia.org>

Hi,

Just two points please:

On Sat, Sep 10, 2022 at 02:12:12AM +0100, Daniel Golle wrote:
> +static void
> +mt7531_sgmii_pcs_get_state_inband(struct mt7530_priv *priv, int port,
> +				  struct phylink_link_state *state)
> +{
> +	unsigned int val;
> +
> +	val = mt7530_read(priv, MT7531_PCS_CONTROL_1(port));
> +	state->link = !!(val & MT7531_SGMII_LINK_STATUS);
> +	if (!state->link)
> +		return;
> +
> +	if (state->interface == PHY_INTERFACE_MODE_2500BASEX)
> +		state->speed = SPEED_2500;
> +	else
> +		state->speed = SPEED_1000;
> +
> +	state->duplex = DUPLEX_FULL;
> +	state->pause = 0;

MLO_PAUSE_NONE please.

Also, please set state->an_complete appropriately.


-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!


  reply	other threads:[~2022-09-11 19:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-10  1:12 [PATCH] net: dsa: mt7530: add support for in-band link status Daniel Golle
2022-09-11 19:58 ` Russell King (Oracle) [this message]
2022-09-11 20:45   ` [PATCH v2] " Daniel Golle
2022-09-20  1:36     ` Jakub Kicinski
2022-09-20 22:28       ` Daniel Golle

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=Yx4910YC6/Y7ghfm@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=Landen.Chao@mediatek.com \
    --cc=andrew@lunn.ch \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lynxis@fe80.eu \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@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 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.