[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YiYOUtP+Ip+4xsd/@lunn.ch>
Date: Mon, 7 Mar 2022 14:53:22 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Arun Ramadoss <arun.ramadoss@...rochip.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Jakub Kicinski <kuba@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
UNGLinuxDriver@...rochip.com
Subject: Re: [RFC PATCH net-next 1/2] net: phy: exported the
genphy_read_master_slave function
> @@ -2401,9 +2396,14 @@ int genphy_read_status(struct phy_device *phydev)
> phydev->pause = 0;
> phydev->asym_pause = 0;
>
> - err = genphy_read_master_slave(phydev);
> - if (err < 0)
> - return err;
> + if (phydev->is_gigabit_capable) {
> + err = genphy_read_master_slave(phydev);
> + if (err < 0)
> + return err;
> + } else {
> + phydev->master_slave_get = MASTER_SLAVE_CFG_UNSUPPORTED;
> + phydev->master_slave_state = MASTER_SLAVE_STATE_UNSUPPORTED;
> + }
Rather than have this else clause, just initialize them to
_UNSUPPORTED, in the same block as speed, duplex and pause are
initialized above.
Otherwise, this looks good.
Andrew
Powered by blists - more mailing lists