]> git.hungrycats.org Git - linux/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>
Thu, 30 May 2024 07:49:15 +0000 (09:49 +0200)
commit5302a7e39d60e78145975f1237f934282ab6f3d8
treece285c32edd86a4842fe8efd1708bc300962e164
parent5ad3360a45266febb0931eb1f259f8301f728a51
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