Commit 5c14e51d authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Jakub Kicinski
Browse files

net: dsa: lan9303: ensure chip reset and wait for READY status



Accessing device registers seems to be not reliable, the chip
revision is sometimes detected wrongly (0 instead of expected 1).

Ensure that the chip reset is performed via reset GPIO and then
wait for 'Device Ready' status in HW_CFG register before doing
any register initializations.

Cc: stable@vger.kernel.org
Fixes: a1292595 ("net: dsa: add new DSA switch driver for the SMSC-LAN9303")
Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
[alex: reworked using read_poll_timeout()]
Signed-off-by: default avatarAlexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20241004113655.3436296-1-alexander.sverdlin@siemens.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 63108314
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment