Skip to content

Commit 09e7636

Browse files
Jiawen Wukuba-moo
authored andcommitted
net: libwx: Fix FW mailbox unknown command
For the new SW-FW interaction, missing the error return if there is an unknown command. It causes the driver to mistakenly believe that the interaction is complete. This problem occurs when new driver is paired with old firmware, which does not support the new mailbox commands. Fixes: 2e5af6b ("net: txgbe: Add basic support for new AML devices") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/64DBB705D35A0016+20250513021009.145708-4-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 42efa35 commit 09e7636

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • drivers/net/ethernet/wangxun/libwx

drivers/net/ethernet/wangxun/libwx/wx_hw.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,12 @@ static int wx_host_interface_command_r(struct wx *wx, u32 *buffer,
442442
goto rel_out;
443443
}
444444

445+
if (hdr->cmd_or_resp.ret_status == 0x80) {
446+
wx_err(wx, "Unknown FW command: 0x%x\n", send_cmd);
447+
err = -EINVAL;
448+
goto rel_out;
449+
}
450+
445451
/* expect no reply from FW then return */
446452
if (!return_data)
447453
goto rel_out;

0 commit comments

Comments
 (0)