[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190825120232.GG6729@t480s.localdomain>
Date: Sun, 25 Aug 2019 12:02:32 -0400
From: Vivien Didelot <vivien.didelot@...il.com>
To: Marek Behún <marek.behun@....cz>
Cc: netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Marek Behún <marek.behun@....cz>
Subject: Re: [PATCH net-next v3 4/6] net: dsa: mv88e6xxx: simplify SERDES code
for Topaz and Peridot
Hi Marek,
On Sun, 25 Aug 2019 05:59:13 +0200, Marek Behún <marek.behun@....cz> wrote:
> +int mv88e6341_serdes_get_lane(struct mv88e6xxx_chip *chip, int port, s8 *lane)
> +{
> + u8 cmode = chip->ports[port].cmode;
> +
> + *lane = -1;
> +
> + if (port != 5)
> + return 0;
Aren't you relying on -ENODEV as well?
> +
> + if (cmode == MV88E6XXX_PORT_STS_CMODE_1000BASE_X ||
> + cmode == MV88E6XXX_PORT_STS_CMODE_SGMII ||
> + cmode == MV88E6XXX_PORT_STS_CMODE_2500BASEX)
> + *lane = MV88E6341_PORT5_LANE;
> +
> + return 0;
> +}
Powered by blists - more mailing lists