Skip to contentSkip to conversation

IPC MUX: Add error handling for ipc_mux_dl_acb_send_cmds().

PATCH In review Wentao Liang 2 participants 2 messages Apr 3, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IPC MUX: Add error handling for ipc_mux_dl_acb_send_cmds().

The ipc_mux_dl_acbcmd_decode() calls the ipc_mux_dl_acb_send_cmds(), but does not report the error if ipc_mux_dl_acb_send_cmds() fails. This makes it difficult to detect command sending failures. A proper implementation can be found in ipc_mux_dl_cmd_decode().

Add error reporting to the call, logging an error message using dev_err() if the command sending fails.

Fixes 1f52d7b62285 ("net: wwan: iosm: Enable M.2 7360 WWAN card support")
---
 drivers/net/wwan/iosm/iosm_ipc_mux_codec.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/wwan/iosm/iosm_ipc_mux_codec.c +5 -2
index bff46f7ca59f..478c9c8b638b 100644
@@ -509,8 +509,11 @@ static void ipc_mux_dl_acbcmd_decode(struct iosm_mux *ipc_mux,
 			return;
 			}
 		trans_id = le32_to_cpu(cmdh->transaction_id);
-		ipc_mux_dl_acb_send_cmds(ipc_mux, cmd, cmdh->if_id,
-					 trans_id, cmd_p, size, false, true);
+		if (ipc_mux_dl_acb_send_cmds(ipc_mux, cmd, cmdh->if_id,
+					     trans_id, cmd_p, size, false, true))
+			dev_err(ipc_mux->dev,
+				"if_id %d: cmd send failed",
+				cmdh->if_id);
 	}
 }
 
Signature · 1 line
2.42.0.windows.2
reviewer
#1 lore raw
Quoted 9 lines · Wentao Liang

The ipc_mux_dl_acbcmd_decode() calls the ipc_mux_dl_acb_send_cmds(), but does not report the error if ipc_mux_dl_acb_send_cmds() fails. This makes it difficult to detect command sending failures. A proper implementation can be found in ipc_mux_dl_cmd_decode().

Add error reporting to the call, logging an error message using dev_err() if the command sending fails.

Fixes 1f52d7b62285 ("net: wwan: iosm: Enable M.2 7360 WWAN card support")

That should've given you a hint for your own patch's subject :)

johannes