]> git.dujemihanovic.xyz Git - linux.git/commit
net: stmmac: dwmac-socfpga: use pcs_init/pcs_exit
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 13 May 2024 07:25:16 +0000 (09:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 14 May 2024 00:20:00 +0000 (17:20 -0700)
commit81b418a6565757128afc6f74dd997598f8adb1b2
tree1ed0d5cf5b2b4f7d7094c1455e2383bd76d751b5
parentf0ef433fc264b70a415257dba126acbe3fda666b
net: stmmac: dwmac-socfpga: use pcs_init/pcs_exit

Use the newly introduced pcs_init() and pcs_exit() operations to
create and destroy the PCS instance at a more appropriate moment during
the driver lifecycle, thereby avoiding publishing a network device to
userspace that has not yet finished its PCS initialisation.

There are other similar issues with this driver which remain
unaddressed, but these are out of scope for this patch.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
[rgantois: removed second parameters of new callbacks]
Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://lore.kernel.org/r/20240513-rzn1-gmac1-v7-5-6acf58b5440d@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c