[PATCH 1/2] firmware: qcom: scm: suppress download mode error

Johan Hovold posted 2 patches 1 month, 3 weeks ago
[PATCH 1/2] firmware: qcom: scm: suppress download mode error
Posted by Johan Hovold 1 month, 3 weeks ago
Stop spamming the logs with errors about missing mechanism for setting
the so called download (or dump) mode for users that have not requested
that feature to be enabled in the first place.

This avoids the follow error being logged on boot as well as on
shutdown when the feature it not available and download mode has not
been enabled on the kernel command line:

	qcom_scm firmware:scm: No available mechanism for setting download mode

Fixes: 79cb2cb8d89b ("firmware: qcom: scm: Disable SDI and write no dump to dump mode")
Fixes: 781d32d1c970 ("firmware: qcom_scm: Clear download bit during reboot")
Cc: Mukesh Ojha <quic_mojha@quicinc.com>
Cc: stable@vger.kernel.org	# 6.4
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/firmware/qcom/qcom_scm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 10986cb11ec0..e2ac595902ed 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -545,7 +545,7 @@ static void qcom_scm_set_download_mode(u32 dload_mode)
 	} else if (__qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_BOOT,
 						QCOM_SCM_BOOT_SET_DLOAD_MODE)) {
 		ret = __qcom_scm_set_dload_mode(__scm->dev, !!dload_mode);
-	} else {
+	} else if (dload_mode) {
 		dev_err(__scm->dev,
 			"No available mechanism for setting download mode\n");
 	}
-- 
2.45.2
Re: [PATCH 1/2] firmware: qcom: scm: suppress download mode error
Posted by Mukesh Ojha 1 month, 3 weeks ago
On Wed, Oct 02, 2024 at 12:01:21PM +0200, Johan Hovold wrote:
> Stop spamming the logs with errors about missing mechanism for setting
> the so called download (or dump) mode for users that have not requested
> that feature to be enabled in the first place.
> 
> This avoids the follow error being logged on boot as well as on
> shutdown when the feature it not available and download mode has not
> been enabled on the kernel command line:
> 
> 	qcom_scm firmware:scm: No available mechanism for setting download mode
> 
> Fixes: 79cb2cb8d89b ("firmware: qcom: scm: Disable SDI and write no dump to dump mode")
> Fixes: 781d32d1c970 ("firmware: qcom_scm: Clear download bit during reboot")
> Cc: Mukesh Ojha <quic_mojha@quicinc.com>
> Cc: stable@vger.kernel.org	# 6.4
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>

-Mukesh