Skip to content

Commit 1fa1f2e

Browse files
tlendackydavem330
authored andcommitted
amd-xgbe-phy: Allow more time for Rx/Tx to become ready
The current time range waiting for Rx/Tx to become ready can sometimes be too short if a connection is not present. Increase the number of retries and the sleep to give a bit more time. Also, change level of the message issued from _err to _dbg if Rx/Tx do not become ready since the underlying logic will function as if no link is established and retry eventually. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8c43a2c commit 1fa1f2e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/phy/amd-xgbe-phy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ MODULE_DESCRIPTION("AMD 10GbE (amd-xgbe) PHY driver");
9595
#define XNP_MP_FORMATTED (1 << 13)
9696
#define XNP_NP_EXCHANGE (1 << 15)
9797

98-
#define XGBE_PHY_RATECHANGE_COUNT 100
98+
#define XGBE_PHY_RATECHANGE_COUNT 500
9999

100100
#ifndef MDIO_PMA_10GBR_PMD_CTRL
101101
#define MDIO_PMA_10GBR_PMD_CTRL 0x0096
@@ -411,15 +411,15 @@ static void amd_xgbe_phy_serdes_complete_ratechange(struct phy_device *phydev)
411411
/* Wait for Rx and Tx ready */
412412
wait = XGBE_PHY_RATECHANGE_COUNT;
413413
while (wait--) {
414-
usleep_range(10, 20);
414+
usleep_range(50, 75);
415415

416416
status = XSIR0_IOREAD(priv, SIR0_STATUS);
417417
if (XSIR_GET_BITS(status, SIR0_STATUS, RX_READY) &&
418418
XSIR_GET_BITS(status, SIR0_STATUS, TX_READY))
419419
return;
420420
}
421421

422-
netdev_err(phydev->attached_dev, "SerDes rx/tx not ready (%#hx)\n",
422+
netdev_dbg(phydev->attached_dev, "SerDes rx/tx not ready (%#hx)\n",
423423
status);
424424
}
425425

0 commit comments

Comments
 (0)