[char-misc-next,1/4] mei: log firmware status on hw_start failure.

Message ID 20230716081043.3092690-1-tomas.winkler@intel.com
State New
Headers
Series [char-misc-next,1/4] mei: log firmware status on hw_start failure. |

Commit Message

Tomas Winkler July 16, 2023, 8:10 a.m. UTC
  From: Alexander Usyskin <alexander.usyskin@intel.com>

In order to extend debug information log firmware status details
when waiting for firmware ready status fails.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index bac8852aad510b9fb6459001..5cc75a3314a6482e64a1c809 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -157,7 +157,10 @@  int mei_reset(struct mei_device *dev)
 
 	ret = mei_hw_start(dev);
 	if (ret) {
-		dev_err(dev->dev, "hw_start failed ret = %d\n", ret);
+		char fw_sts_str[MEI_FW_STATUS_STR_SZ];
+
+		mei_fw_status_str(dev, fw_sts_str, MEI_FW_STATUS_STR_SZ);
+		dev_err(dev->dev, "hw_start failed ret = %d fw status = %s\n", ret, fw_sts_str);
 		return ret;
 	}