diff mbox series

net: sfp: add quirk for DFP-34X-2C2 GPON ONU SFP

Message ID AS1PR03MB8189FE82C632EBA97644D70082642@AS1PR03MB8189.eurprd03.prod.outlook.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: sfp: add quirk for DFP-34X-2C2 GPON ONU SFP | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1081 this patch: 1081
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 1108 this patch: 1108
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1108 this patch: 1108
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sergio Palumbo Jan. 7, 2024, 4:17 p.m. UTC
Add a quirk for a GPON SFP that identifies itself as "OEM"
    "DFP-34X-2C2". This module's PHY is accessible at 1000base-X,
    but can also run at 2500base-X as per specs of the module.
    After application of the quirk the module is enebled to run both
    at 1000base-X as well as at 2500base-X interface mode.

Signed-off-by: Sergio Palumbo <palumbo.ser@outlook.it>
---
 drivers/net/phy/sfp.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Russell King (Oracle) Jan. 7, 2024, 7:17 p.m. UTC | #1
On Sun, Jan 07, 2024 at 05:17:57PM +0100, Sergio Palumbo wrote:
>     Add a quirk for a GPON SFP that identifies itself as "OEM"
>     "DFP-34X-2C2". This module's PHY is accessible at 1000base-X,
>     but can also run at 2500base-X as per specs of the module.
>     After application of the quirk the module is enebled to run both
>     at 1000base-X as well as at 2500base-X interface mode.
> 
> Signed-off-by: Sergio Palumbo <palumbo.ser@outlook.it>

There are several issues here:

1. Submitting to netdev needs either [PATCH net] or [PATCH net-next]
   to indicate which tree is being targetted. As this isn't a fix,
   net-next is appropriate, but I would also suggest that it is too
   late in the cycle as v6.7 is due out today.

2. How does the module switch between 1000base-X and 2500base-X?
   What happens if the module wants to use 2500base-X but the host
   doesn't support it? Please include these details in the commit
   message.

3. While I know the Turris Rollball entries are out of order, please
   try to keep the list alphabetically sorted, first by vendor string
   and then part string.

Thanks.
diff mbox series

Patch

diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index f75c9eb3958e..1a447e3567c8 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -506,6 +506,9 @@  static const struct sfp_quirk sfp_quirks[] = {
 	SFP_QUIRK_M("OEM", "SFP-2.5G-T", sfp_quirk_oem_2_5g),
 	SFP_QUIRK_F("OEM", "RTSFP-10", sfp_fixup_rollball_cc),
 	SFP_QUIRK_F("OEM", "RTSFP-10G", sfp_fixup_rollball_cc),
+	// DFP-34X-2C2 GPON ONU supports 2500base-X
+	SFP_QUIRK_M("OEM", "DFP-34X-2C2", sfp_quirk_2500basex),
+
 	SFP_QUIRK_F("Turris", "RTSFP-10", sfp_fixup_rollball),
 	SFP_QUIRK_F("Turris", "RTSFP-10G", sfp_fixup_rollball),
 };