net: phy: marvell: add special handling of Finisar modules with 88E1111
authorRobert Hancock <robert.hancock@calian.com>
Wed, 28 Oct 2020 17:15:40 +0000 (11:15 -0600)
committerJakub Kicinski <kuba@kernel.org>
Sat, 31 Oct 2020 00:11:44 +0000 (17:11 -0700)
commit1887023a5e96f98249574e0785b7aa2e5742ca68
tree1b53385bb4124cda8b436468232516fe86da13f7
parentbe25f43aed73475f2d23b89cc755c2594644d47e
net: phy: marvell: add special handling of Finisar modules with 88E1111

The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel 88E1111 PHY
with a modified PHY ID. Add support for this ID using the 88E1111
methods.

By default these modules do not have 1000BaseX auto-negotiation enabled,
which is not generally desirable with Linux networking drivers. Add
handling to enable 1000BaseX auto-negotiation when these modules are
used in 1000BaseX mode. Also, some special handling is required to ensure
that 1000BaseT auto-negotiation is enabled properly when desired.

Based on existing handling in the AMD xgbe driver and the information in
the Finisar FAQ:
https://www.finisar.com/sites/default/files/resources/an-2036_1000base-t_sfp_faqreve1.pdf

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20201028171540.1700032-1-robert.hancock@calian.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/marvell.c
include/linux/marvell_phy.h