Question: pause mode disabled for marvell 88e151x phy
From: Yunsheng Lin
Date: Sat Dec 15 2018 - 03:07:56 EST
Hi, all
When using the marvel 88e151x phy driver, the pause mode is disabled
by commit 6623c0fba10e when phy is inited as below:
if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
+ u32 pause;
+
/* Select page 18 */
err = marvell_set_page(phydev, 18);
if (err < 0)
@@ -902,6 +904,16 @@ static int m88e1510_config_init(struct phy_device *phydev)
err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE);
if (err < 0)
return err;
+
+ /* There appears to be a bug in the 88e1512 when used in
+ * SGMII to copper mode, where the AN advertisment register
+ * clears the pause bits each time a negotiation occurs.
+ * This means we can never be truely sure what was advertised,
+ * so disable Pause support.
+ */
+ pause = SUPPORTED_Pause | SUPPORTED_Asym_Pause;
+ phydev->supported &= ~pause;
+ phydev->advertising &= ~pause;
}
According to the commit log:
"Observed on the 88e1512 in SGMII-to-Copper mode, negotiating pause
is unreliable. While the pause bits can be set in the advertisment
register, they clear shortly after negotiation with a link partner
commences irrespective of the cause of the negotiation."
There seems to be some problem with pause subsequent negotiation.
We reverted the above patch and tried to reproduce the above problem
by triggering another negotiation by reconnection of the cable, using
ethtool -a cmd shows both still have tx and rx pause enable.
Some doubt about the above problem:
According to 88e151x datasheet and marvel phy driver in linux, the
88e1512 and 88e1514 support SGMII-to-Copper mode, so commit above
disables the pause support for all 88e151x phy using SGMII-to-Copper
mode.
1. Does all the 88e151x supporting SGMII-to-Copper have the above problem?
2. If not, can we use revision id field in phydev->phy_id to only disable
the pause support for specific 88e151x phy? We can not find some useful
revision info in datasheet, and by printing the phy id when phy init, we
are able to find that the phy we are using has a phy id as 0x1d10dd1,
which has revision id as 0x1.
3. Does this problem only happen marvel 88e1512 phy with some specific partner
phy? We are unable to reproduce this problem, so any suggestion to reproduce
this would be very helpful to us too.
4. Also the commit disables the pause support completely, if using revision id
can not aviod this problem, can we only disable pause support when negotiation
by only clearing pause support in phydev->advertising, but not phydev->supported?
If there are any better info or suggestion regarding this problem, it would be very
helpful, thanks in advance.
reference:
[1] https://lists.openwall.net/netdev/2017/12/15/174
[2] https://web.pa.msu.edu/hep/atlas/l1calo/htm/hardware/components/Enet_Phy/marvell_alaska_phy_88e151x_datasheet_jan18.pdf