diff options
Diffstat (limited to 'queue-6.6/ionic-prevent-driver-fw-getting-out-of-sync-on-devcm.patch')
-rw-r--r-- | queue-6.6/ionic-prevent-driver-fw-getting-out-of-sync-on-devcm.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/queue-6.6/ionic-prevent-driver-fw-getting-out-of-sync-on-devcm.patch b/queue-6.6/ionic-prevent-driver-fw-getting-out-of-sync-on-devcm.patch new file mode 100644 index 0000000000..ce95f3e59c --- /dev/null +++ b/queue-6.6/ionic-prevent-driver-fw-getting-out-of-sync-on-devcm.patch @@ -0,0 +1,53 @@ +From 2f52a14c171ba18a6a06a0fd0fe1e81578e6b47d Mon Sep 17 00:00:00 2001 +From: Sasha Levin <sashal@kernel.org> +Date: Mon, 9 Jun 2025 14:28:27 -0700 +Subject: ionic: Prevent driver/fw getting out of sync on devcmd(s) + +From: Brett Creeley <brett.creeley@amd.com> + +[ Upstream commit 5466491c9e3309ed5c7adbb8fad6e93fcc9a8fe9 ] + +Some stress/negative firmware testing around devcmd(s) returning +EAGAIN found that the done bit could get out of sync in the +firmware when it wasn't cleared in a retry case. + +While here, change the type of the local done variable to a bool +to match the return type from ionic_dev_cmd_done(). + +Fixes: ec8ee714736e ("ionic: stretch heartbeat detection") +Signed-off-by: Brett Creeley <brett.creeley@amd.com> +Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> +Reviewed-by: Simon Horman <horms@kernel.org> +Link: https://patch.msgid.link/20250609212827.53842-1-shannon.nelson@amd.com +Signed-off-by: Jakub Kicinski <kuba@kernel.org> +Signed-off-by: Sasha Levin <sashal@kernel.org> +--- + drivers/net/ethernet/pensando/ionic/ionic_main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c +index 3ca6893d1bf26..2869922cffe2e 100644 +--- a/drivers/net/ethernet/pensando/ionic/ionic_main.c ++++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c +@@ -464,9 +464,9 @@ static int __ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds, + unsigned long start_time; + unsigned long max_wait; + unsigned long duration; +- int done = 0; + bool fw_up; + int opcode; ++ bool done; + int err; + + /* Wait for dev cmd to complete, retrying if we get EAGAIN, +@@ -474,6 +474,7 @@ static int __ionic_dev_cmd_wait(struct ionic *ionic, unsigned long max_seconds, + */ + max_wait = jiffies + (max_seconds * HZ); + try_again: ++ done = false; + opcode = idev->opcode; + start_time = jiffies; + for (fw_up = ionic_is_fw_running(idev); +-- +2.39.5 + |