From: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
To: <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>,
<linux-kernel@vger.kernel.org>, <andrew@lunn.ch>,
<linux@armlinux.org.uk>, <UNGLinuxDriver@microchip.com>
Subject: [PATCH net-next 2/2] net: sfp: add quirk for FS's DAC10G SFP (SFPP-PC01)
Date: Fri, 21 Jul 2023 11:30:57 +0530 [thread overview]
Message-ID: <20230721060057.2998-3-Raju.Lakkaraju@microchip.com> (raw)
In-Reply-To: <20230721060057.2998-1-Raju.Lakkaraju@microchip.com>
Add a quirk for a DAC10G SFP that identifies itself as "FS" "SFPP-PC01".
Add a quirk to enable the SGMII interface, modes 2500base-T, 1000base-T,
100base-T/Full and 100base-T/Half support.
Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
---
drivers/net/phy/sfp.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index ee049efdf71b..80d2680f08ab 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -421,6 +421,18 @@ static void sfp_quirk_oem_2_5g(const struct sfp_eeprom_id *id,
sfp_quirk_disable_autoneg(id, modes, interfaces);
}
+static void sfp_quirk_fs_dac(const struct sfp_eeprom_id *id,
+ unsigned long *modes,
+ unsigned long *interfaces)
+{
+ /* Fiberstore(FS)'s DAC SFP (SFPP-PC01) */
+ linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, modes);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, modes);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, modes);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, modes);
+ __set_bit(PHY_INTERFACE_MODE_SGMII, interfaces);
+}
+
static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id,
unsigned long *modes,
unsigned long *interfaces)
@@ -465,6 +477,8 @@ static const struct sfp_quirk sfp_quirks[] = {
// FS 2.5G Base-T
SFP_QUIRK_M("FS", "SFP-2.5G-T", sfp_quirk_oem_2_5g),
+ // FS DAC10G (SFPP-PC01)
+ SFP_QUIRK_M("FS", "SFPP-PC01", sfp_quirk_fs_dac),
// Lantech 8330-262D-E can operate at 2500base-X, but incorrectly report
// 2500MBd NRZ in their EEPROM
--
2.25.1
next prev parent reply other threads:[~2023-07-21 6:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 6:00 [PATCH net-next 0/2] Add support to Fiberstore SFP quirks Raju Lakkaraju
2023-07-21 6:00 ` [PATCH net-next 1/2] net: sfp: add quirk for FS's 2.5G copper SFP Raju Lakkaraju
2023-07-21 6:00 ` Raju Lakkaraju [this message]
2023-07-21 7:50 ` [PATCH net-next 2/2] net: sfp: add quirk for FS's DAC10G SFP (SFPP-PC01) Russell King (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230721060057.2998-3-Raju.Lakkaraju@microchip.com \
--to=raju.lakkaraju@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.