All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [patch net] mlxsw: pci: Wait longer before accessing the device after reset
@ 2020-02-27 20:07 Jiri Pirko
  2020-02-27 20:10 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2020-02-27 20:07 UTC (permalink / raw
  To: netdev; +Cc: davem, kuba, idosch, mlxsw

From: Amit Cohen <amitc@mellanox.com>

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")
Signed-off-by: Amit Cohen <amitc@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h b/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
index e0d7d2d9a0c8..43fa8c85b5d9 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
@@ -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
-- 
2.21.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch net] mlxsw: pci: Wait longer before accessing the device after reset
  2020-02-27 20:07 [patch net] mlxsw: pci: Wait longer before accessing the device after reset Jiri Pirko
@ 2020-02-27 20:10 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-02-27 20:10 UTC (permalink / raw
  To: jiri; +Cc: netdev, kuba, idosch, mlxsw

From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 27 Feb 2020 21:07:53 +0100

> From: Amit Cohen <amitc@mellanox.com>
> 
> 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")
> Signed-off-by: Amit Cohen <amitc@mellanox.com>
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>

Applied and queued up for -stable, thanks Jiri.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-27 20:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27 20:07 [patch net] mlxsw: pci: Wait longer before accessing the device after reset Jiri Pirko
2020-02-27 20:10 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.