[SRU][F:linux-bluefield][PATCH v1 1/1] UBUNTU: SAUCE: mlxbf-gige: OOB PHY stuck in a bad state during reboot test
Asmaa Mnebhi
asmaa at nvidia.com
Thu May 23 17:25:03 UTC 2024
BugLink: https://bugs.launchpad.net/bugs/2064163
During the reboot test, the BF3 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.
Since the UEFI OOB driver doesn't have the issue, we mimic its
behavior in the ExitServices() routine by disabling the OOB port.
Although the PHY issue only happens in BF3, disabling the OOB port
in the shutdown is a fix that should apply to BF2 as well.
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 635009a209d5..c5f658d553e9 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
@@ -216,8 +216,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