[SRU][J:linux-bluefield][PATCH v2 1/1] UBUNTU: SAUCE: mlxbf-gige: Vitesse PHY stuck in a bad state during reboot test
Asmaa Mnebhi
asmaa at nvidia.com
Tue May 14 17:59:57 UTC 2024
BugLink: https://bugs.launchpad.net/bugs/2064163
During the reboot test, the OOB doesn't get an ip. The root cause
is the PHY getting stuck in a bad state that's only recoverable by
a PHY hard reset so a powercycle. Warm boot doesn't support this
capability.
We can avoid this bug by preventing the PHY from entering this
bad state in the first place.
Disabling the OOB port avoids the issue.
Signed-off-by: Asmaa Mnebhi <asmaa at nvidia.com>
Reviewed-by: David Thompson <davthompson at nvidia.com>
---
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
index 56235cef5cd6..006c2b4eee70 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
@@ -202,8 +202,14 @@ static int mlxbf_gige_open(struct net_device *netdev)
static int mlxbf_gige_stop(struct net_device *netdev)
{
struct mlxbf_gige *priv = netdev_priv(netdev);
+ u64 control;
+
+ control = readq(priv->base + MLXBF_GIGE_CONTROL);
+ control &= ~MLXBF_GIGE_CONTROL_PORT_EN;
+ writeq(control, priv->base + MLXBF_GIGE_CONTROL);
writeq(0, priv->base + MLXBF_GIGE_INT_EN);
+ mb();
netif_stop_queue(netdev);
napi_disable(&priv->napi);
netif_napi_del(&priv->napi);
--
2.30.1
More information about the kernel-team
mailing list