]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: mv88e6xxx: Add support for model-specific pre- and post-reset handlers
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Tue, 23 Apr 2024 07:47:48 +0000 (09:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:22 +0000 (13:39 +0200)
commit25479712dab10e8746b2d81fce66ab097cd42ee7
treedd8b794075505d7f19e25317dac6ce601b9d5bdf
parent719dac9679fa784718d42e59935e70c8048f9723
net: dsa: mv88e6xxx: Add support for model-specific pre- and post-reset handlers

[ Upstream commit 0fdd27b9d6d7c60bd319d3497ad797934bab13cb ]

Instead of calling mv88e6xxx_g2_eeprom_wait() directly from
mv88e6xxx_hardware_reset(), add configurable pre- and post-reset hard
reset handlers. Initially, the handlers are set to
mv88e6xxx_g2_eeprom_wait() for all families that have get/set_eeprom()
to match the existing behavior. No functional change intended (except
for additional error messages on failure).

Fixes: 6ccf50d4d474 ("net: dsa: mv88e6xxx: Avoid EEPROM timeout when EEPROM is absent")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h