lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 11 Sep 2022 20:58:15 +0100
From:   "Russell King (Oracle)" <linux@...linux.org.uk>
To:     Daniel Golle <daniel@...rotopia.org>
Cc:     linux-mediatek@...ts.infradead.org, netdev@...r.kernel.org,
        Sean Wang <sean.wang@...iatek.com>,
        Landen Chao <Landen.Chao@...iatek.com>,
        DENG Qingfang <dqfext@...il.com>, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Alexander 'lynxis' Couzens <lynxis@...0.eu>
Subject: Re: [PATCH] net: dsa: mt7530: add support for in-band link status

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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ