mirror-linux/drivers/net/ethernet/wangxun
Jiawen Wu 8ce4f28752 net: libwx: fix firmware mailbox abnormal return
The existing SW-FW interaction flow on the driver is wrong. Follow this
wrong flow, driver would never return error if there is a unknown command.
Since firmware writes back 'firmware ready' and 'unknown command' in the
mailbox message if there is an unknown command sent by driver. So reading
'firmware ready' does not timeout. Then driver would mistakenly believe
that the interaction has completed successfully.

It tends to happen with the use of custom firmware. Move the check for
'unknown command' out of the poll timeout for 'firmware ready'. And adjust
the debug log so that mailbox messages are always printed when commands
timeout.

Fixes: 1efa9bfe58 ("net: libwx: Implement interaction with firmware")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Link: https://patch.msgid.link/20250103081013.1995939-1-jiawenwu@trustnetic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-01-04 17:42:15 -08:00
..
libwx net: libwx: fix firmware mailbox abnormal return 2025-01-04 17:42:15 -08:00
ngbe net: ngbe: Fix phy mode set to external phy 2024-08-22 12:28:33 +02:00
txgbe Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-11-19 13:56:02 +01:00
Kconfig net: txgbe: Fix I2C Kconfig dependencies 2024-09-10 00:36:54 +02:00
Makefile net: txgbe: Store PCI info 2022-10-28 11:25:53 +01:00