[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YADNEWkiPQX34Tyo@lunn.ch>
Date: Fri, 15 Jan 2021 00:00:33 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Marek BehĂșn <kabel@...nel.org>
Cc: netdev@...r.kernel.org, pavana.sharma@...i.com,
vivien.didelot@...il.com, f.fainelli@...il.com, kuba@...nel.org,
lkp@...el.com, davem@...emloft.net, ashkan.boldaji@...i.com,
Chris Packham <chris.packham@...iedtelesis.co.nz>,
olteanv@...il.com,
Russell King - ARM Linux admin <linux@...linux.org.uk>,
Russell King <rmk+kernel@...linux.org.uk>
Subject: Re: [PATCH net] net: dsa: mv88e6xxx: do not allow inband AN for
2500base-x mode
> diff --git a/drivers/net/dsa/mv88e6xxx/serdes.c b/drivers/net/dsa/mv88e6xxx/serdes.c
> index 3195936dc5be..b8241820679e 100644
> --- a/drivers/net/dsa/mv88e6xxx/serdes.c
> +++ b/drivers/net/dsa/mv88e6xxx/serdes.c
> @@ -55,9 +55,20 @@ static int mv88e6xxx_serdes_pcs_get_state(struct mv88e6xxx_chip *chip,
> {
> if (status & MV88E6390_SGMII_PHY_STATUS_SPD_DPL_VALID) {
> state->link = !!(status & MV88E6390_SGMII_PHY_STATUS_LINK);
> +
> + if (state->interface == PHY_INTERFACE_MODE_2500BASEX) {
> + if (state->link) {
> + state->speed = SPEED_2500;
> + state->duplex = DUPLEX_FULL;
> + }
> +
> + return 0;
> + }
> +
> + state->an_complete = 1;
Should this be here? It seems like a logically different change, it is
not clear to me it is to do with PHY_INTERFACE_MODE_2500BASEX.
> state->duplex = status &
> MV88E6390_SGMII_PHY_STATUS_DUPLEX_FULL ?
> - DUPLEX_FULL : DUPLEX_HALF;
> + DUPLEX_FULL : DUPLEX_HALF;
This looks like an unintended white space change.
Andrew
Powered by blists - more mailing lists