Skip to contentSkip to conversation

mlxsw: pci: Wait longer before accessing the device after reset

PATCH In review Jiri Pirko 2 participants 2 messages Feb 27, 2020

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 mlxsw: pci: Wait longer before accessing the device after reset

From: Amit Cohen <[email protected]>

During initialization the driver issues a reset to the device and waits for 100ms before checking if the firmware is ready. The waiting is necessary because before that the device is irresponsive and the first read can result in a completion timeout.

While 100ms is sufficient for Spectrum-1 and Spectrum-2, it is insufficient for Spectrum-3.

Fix this by increasing the timeout to 200ms.

Fixes da382875c616 ("mlxsw: spectrum: Extend to support Spectrum-3 ASIC")
---
 drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/pci_hw.h +1 -1
index e0d7d2d9a0c8..43fa8c85b5d9 100644
@@ -28,7 +28,7 @@
 #define MLXSW_PCI_SW_RESET			0xF0010
 #define MLXSW_PCI_SW_RESET_RST_BIT		BIT(0)
 #define MLXSW_PCI_SW_RESET_TIMEOUT_MSECS	900000
-#define MLXSW_PCI_SW_RESET_WAIT_MSECS		100
+#define MLXSW_PCI_SW_RESET_WAIT_MSECS		200
 #define MLXSW_PCI_FW_READY			0xA1844
 #define MLXSW_PCI_FW_READY_MASK			0xFFFF
 #define MLXSW_PCI_FW_READY_MAGIC		0x5E
Signature · 1 line
2.21.1
maintainer
#1 lore raw

From: Jiri Pirko <[email protected]>
Date: Thu, 27 Feb 2020 21:07:53 +0100

Quoted 10 lines

From: Amit Cohen <[email protected]>

During initialization the driver issues a reset to the device and waits for 100ms before checking if the firmware is ready. The waiting is necessary because before that the device is irresponsive and the first read can result in a completion timeout.

While 100ms is sufficient for Spectrum-1 and Spectrum-2, it is insufficient for Spectrum-3.

Quoted 6 lines

Fix this by increasing the timeout to 200ms.

Fixes da382875c616 ("mlxsw: spectrum: Extend to support Spectrum-3 ASIC")

Applied and queued up for -stable, thanks Jiri.