From 4c50db5b638dcb8c6c08d420dd940f861510f917 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 6 May 2023 15:30:05 +0900 Subject: [PATCH] drop impi patch from 4.14 and 4.19 --- ...if-not-responding-under-certain-cond.patch | 73 ------------------- ...if-not-responding-under-certain-cond.patch | 73 ------------------- 2 files changed, 146 deletions(-) delete mode 100644 queue-4.14/ipmi-fix-ssif-not-responding-under-certain-cond.patch delete mode 100644 queue-4.19/ipmi-fix-ssif-not-responding-under-certain-cond.patch diff --git a/queue-4.14/ipmi-fix-ssif-not-responding-under-certain-cond.patch b/queue-4.14/ipmi-fix-ssif-not-responding-under-certain-cond.patch deleted file mode 100644 index 443b84a2888..00000000000 --- a/queue-4.14/ipmi-fix-ssif-not-responding-under-certain-cond.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 6d2555cde2918409b0331560e66f84a0ad4849c6 Mon Sep 17 00:00:00 2001 -From: Zhang Yuchen -Date: Wed, 12 Apr 2023 15:49:07 +0800 -Subject: ipmi: fix SSIF not responding under certain cond. - -From: Zhang Yuchen - -commit 6d2555cde2918409b0331560e66f84a0ad4849c6 upstream. - -The ipmi communication is not restored after a specific version of BMC is -upgraded on our server. -The ipmi driver does not respond after printing the following log: - - ipmi_ssif: Invalid response getting flags: 1c 1 - -I found that after entering this branch, ssif_info->ssif_state always -holds SSIF_GETTING_FLAGS and never return to IDLE. - -As a result, the driver cannot be loaded, because the driver status is -checked during the unload process and must be IDLE in shutdown_ssif(): - - while (ssif_info->ssif_state != SSIF_IDLE) - schedule_timeout(1); - -The process trigger this problem is: - -1. One msg timeout and next msg start send, and call -ssif_set_need_watch(). - -2. ssif_set_need_watch()->watch_timeout()->start_flag_fetch() change -ssif_state to SSIF_GETTING_FLAGS. - -3. In msg_done_handler() ssif_state == SSIF_GETTING_FLAGS, if an error -message is received, the second branch does not modify the ssif_state. - -4. All retry action need IS_SSIF_IDLE() == True. Include retry action in -watch_timeout(), msg_done_handler(). Sending msg does not work either. -SSIF_IDLE is also checked in start_next_msg(). - -5. The only thing that can be triggered in the SSIF driver is -watch_timeout(), after destory_user(), this timer will stop too. - -So, if enter this branch, the ssif_state will remain SSIF_GETTING_FLAGS -and can't send msg, no timer started, can't unload. - -We did a comparative test before and after adding this patch, and the -result is effective. - -Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF)") - -Cc: stable@vger.kernel.org -Signed-off-by: Zhang Yuchen -Message-Id: <20230412074907.80046-1-zhangyuchen.lcr@bytedance.com> -Signed-off-by: Corey Minyard -Signed-off-by: Greg Kroah-Hartman ---- - drivers/char/ipmi/ipmi_ssif.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/char/ipmi/ipmi_ssif.c -+++ b/drivers/char/ipmi/ipmi_ssif.c -@@ -787,9 +787,9 @@ static void msg_done_handler(struct ssif - } else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 - || data[1] != IPMI_GET_MSG_FLAGS_CMD) { - /* -- * Don't abort here, maybe it was a queued -- * response to a previous command. -+ * Recv error response, give up. - */ -+ ssif_info->ssif_state = SSIF_IDLE; - ipmi_ssif_unlock_cond(ssif_info, flags); - pr_warn(PFX "Invalid response getting flags: %x %x\n", - data[0], data[1]); diff --git a/queue-4.19/ipmi-fix-ssif-not-responding-under-certain-cond.patch b/queue-4.19/ipmi-fix-ssif-not-responding-under-certain-cond.patch deleted file mode 100644 index 166feb214e2..00000000000 --- a/queue-4.19/ipmi-fix-ssif-not-responding-under-certain-cond.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 6d2555cde2918409b0331560e66f84a0ad4849c6 Mon Sep 17 00:00:00 2001 -From: Zhang Yuchen -Date: Wed, 12 Apr 2023 15:49:07 +0800 -Subject: ipmi: fix SSIF not responding under certain cond. - -From: Zhang Yuchen - -commit 6d2555cde2918409b0331560e66f84a0ad4849c6 upstream. - -The ipmi communication is not restored after a specific version of BMC is -upgraded on our server. -The ipmi driver does not respond after printing the following log: - - ipmi_ssif: Invalid response getting flags: 1c 1 - -I found that after entering this branch, ssif_info->ssif_state always -holds SSIF_GETTING_FLAGS and never return to IDLE. - -As a result, the driver cannot be loaded, because the driver status is -checked during the unload process and must be IDLE in shutdown_ssif(): - - while (ssif_info->ssif_state != SSIF_IDLE) - schedule_timeout(1); - -The process trigger this problem is: - -1. One msg timeout and next msg start send, and call -ssif_set_need_watch(). - -2. ssif_set_need_watch()->watch_timeout()->start_flag_fetch() change -ssif_state to SSIF_GETTING_FLAGS. - -3. In msg_done_handler() ssif_state == SSIF_GETTING_FLAGS, if an error -message is received, the second branch does not modify the ssif_state. - -4. All retry action need IS_SSIF_IDLE() == True. Include retry action in -watch_timeout(), msg_done_handler(). Sending msg does not work either. -SSIF_IDLE is also checked in start_next_msg(). - -5. The only thing that can be triggered in the SSIF driver is -watch_timeout(), after destory_user(), this timer will stop too. - -So, if enter this branch, the ssif_state will remain SSIF_GETTING_FLAGS -and can't send msg, no timer started, can't unload. - -We did a comparative test before and after adding this patch, and the -result is effective. - -Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF)") - -Cc: stable@vger.kernel.org -Signed-off-by: Zhang Yuchen -Message-Id: <20230412074907.80046-1-zhangyuchen.lcr@bytedance.com> -Signed-off-by: Corey Minyard -Signed-off-by: Greg Kroah-Hartman ---- - drivers/char/ipmi/ipmi_ssif.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/char/ipmi/ipmi_ssif.c -+++ b/drivers/char/ipmi/ipmi_ssif.c -@@ -772,9 +772,9 @@ static void msg_done_handler(struct ssif - } else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 - || data[1] != IPMI_GET_MSG_FLAGS_CMD) { - /* -- * Don't abort here, maybe it was a queued -- * response to a previous command. -+ * Recv error response, give up. - */ -+ ssif_info->ssif_state = SSIF_IDLE; - ipmi_ssif_unlock_cond(ssif_info, flags); - pr_warn(PFX "Invalid response getting flags: %x %x\n", - data[0], data[1]); -- 2.47.3