lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240320172008.2989693-3-enachman@marvell.com>
Date: Wed, 20 Mar 2024 19:20:05 +0200
From: Elad Nachman <enachman@...vell.com>
To: <taras.chornyi@...ision.eu>, <davem@...emloft.net>, <edumazet@...gle.com>,
        <kuba@...nel.org>, <pabeni@...hat.com>, <andrew@...n.ch>,
        <kory.maincent@...tlin.com>, <thomas.petazzoni@...tlin.com>,
        <miquel.raynal@...tlin.com>, <przemyslaw.kitszel@...el.com>,
        <dkirjanov@...e.de>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC: <enachman@...vell.com>
Subject: [PATCH v2 2/5] net: marvell: prestera: enlarge fw restart time

From: Elad Nachman <enachman@...vell.com>

Increase firmware restart timeout, as current timeout value of 5 seconds
was too small, in actual life it can take up to 30 seconds for firmware
to shutdown and for the firmware loader to shift to the ready to receive
firmware code state.

Reported-by: Köry Maincent <kory.maincent@...tlin.com>
Closes: https://lore.kernel.org/netdev/20240208101005.29e8c7f3@kmaincent-XPS-13-7390/T/
Fixes: 4c2703dfd7fa ("net: marvell: prestera: Add PCI interface support")
Tested-by: Kory Maincent <kory.maincent@...tlin.com>
Signed-off-by: Elad Nachman <enachman@...vell.com>
---
 drivers/net/ethernet/marvell/prestera/prestera_pci.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_pci.c b/drivers/net/ethernet/marvell/prestera/prestera_pci.c
index 35857dc19542..2caa33d195ab 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_pci.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_pci.c
@@ -24,6 +24,11 @@
 #define PRESTERA_FW_ARM64_PATH_FMT "mrvl/prestera/mvsw_prestera_fw_arm64-v%u.%u.img"
 
 #define PRESTERA_FW_HDR_MAGIC		0x351D9D06
+/* Timeout waiting for firmware CPU to reboot and restart
+ * the firmware loading software layer, hence becoming
+ * ready for the next firmware downloading phase:
+ */
+#define PRESTERA_FW_READY_TIMEOUT_MS	30000
 #define PRESTERA_FW_DL_TIMEOUT_MS	50000
 #define PRESTERA_FW_BLK_SZ		1024
 
@@ -765,7 +770,7 @@ static int prestera_fw_load(struct prestera_fw *fw)
 
 	err = prestera_ldr_wait_reg32(fw, PRESTERA_LDR_READY_REG,
 				      PRESTERA_LDR_READY_MAGIC,
-				      5 * MSEC_PER_SEC);
+				      PRESTERA_FW_READY_TIMEOUT_MS);
 	if (err) {
 		dev_err(fw->dev.dev, "waiting for FW loader is timed out");
 		return err;
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ