[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201019220442.GA139700@lunn.ch>
Date: Tue, 20 Oct 2020 00:04:42 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Robert Hancock <robert.hancock@...ian.com>
Cc: "linux@...linux.org.uk" <linux@...linux.org.uk>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"michal.simek@...inx.com" <michal.simek@...inx.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"radhey.shyam.pandey@...inx.com" <radhey.shyam.pandey@...inx.com>
Subject: Re: [PATCH] net: axienet: Properly handle PCS/PMA PHY for 1000BaseX
mode
> > Hi Robert
> >
> > That looks like a layering violation. Maybe move this into
> > phylink_mii_c22_pcs_config(), it is accessing MII_BMCR anyway.
>
> Could do - do we think there's any harm in just disabling BMCR_ISOLATE
> in all cases in that function?
We have something similar in phylib:
/**
* genphy_restart_aneg - Enable and Restart Autonegotiation
* @phydev: target phy_device struct
*/
int genphy_restart_aneg(struct phy_device *phydev)
{
/* Don't isolate the PHY if we're negotiating */
return phy_modify(phydev, MII_BMCR, BMCR_ISOLATE,
BMCR_ANENABLE | BMCR_ANRESTART);
}
so i think it would also be safe in PCS code.
Andrew
Powered by blists - more mailing lists