your patch does not apply because you have used spaces instead of tabs for the existing lines (Lantech and UBNT SFP)
then i would align the quirks by vendor so it should imho be near the other OEM quirks
so codechange is more like this:
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),
};
so now look how the commits look like for older sfp support
$ git log --oneline -10 drivers/net/phy/sfp.c
e9301af385e7 net: sfp: fix PHY discovery for FS SFP-10G-T module
bb1afee98466 net: sfp: Convert to platform remove callback returning void
2f3ce7a56c6e net: sfp: rework the RollBall PHY waiting code
dd9d75fcf0f4 net: phy: fill in missing MODULE_DESCRIPTION()s
5ffe330e40bd net: sfp: improve Nokia GPON sfp fixup
e184e8609f8c net: sfp: re-implement ignoring the hardware TX_FAULT signal
e27aca3760c0 net: sfp: add quirk for FS's 2.5G copper SFP
d387e34fec40 net: sfp: add quirk for Fiberstone GPON-ONU-34-20BI
f4bf467883f2 net: phy: move marking PHY on SFP module into SFP code
ac2e8e3cfe48 net: sfp: add support for HXSX-ATRI-1 copper SFP+ module
e.g. e27aca3760c0 looks good so far, so use e.g. git show e27aca3760c0
to look how commit message is written (you can copy the text and modify it to match your SFP without the indent added by git show).
git commit -s drivers/net/phy/sfp.c
something like this (signed-off-by is added with the -s switch of git commit):
net: sfp: add quirk for DFP-34X-2C2 GPON ONU SFP
Add a quirk for a GPON SFP that identifies itself as "OEM", "DFP-34X-2C2".
This module's PHY is inaccessible, and can only run at 2500base-X.
then you have the commit like it should be on top of your tree (you can use “git show” without ref to see it)…lets make a patch from it, check this and get maintainers
$ git format-patch HEAD^
0001-net-sfp-add-quirk-for-DFP-34X-2C2-GPON-ONU-SFP.patch
$ scripts/checkpatch.pl 0001-net-sfp-add-quirk-for-DFP-34X-2C2-GPON-ONU-SFP.patch
total: 0 errors, 0 warnings, 0 checks, 9 lines checked
0001-net-sfp-add-quirk-for-DFP-34X-2C2-GPON-ONU-SFP.patch has no obvious style problems and is ready for submission.
$ scripts/get_maintainer.pl 0001-net-sfp-add-quirk-for-DFP-34X-2C2-GPON-ONU-SFP.patch
...
you can add these adresses directly to patch-file or inserting them when running git send-email (maybe needs to be installed - sudo apt install git-email
in debian/ubuntu)
to add to Patch-File you can open your created patch in editor of your choice and add To: and Cc: headers between Date and Subject without the part in parenthesis (no blank line). add a comma at the end of line except the last recipient per header and a space before emails not prefixed by email-Header-Tag
so it should look like (maintainers in “To”, all other - except commit signers - in “Cc”):
Date: Sat, 6 Jan 2024 12:31:35 +0100
To: Russell King <email>,
Andrew Lunn <email>,
Heiner Kallweit <email>,
"David S. Miller" <email>,
Eric Dumazet <email>,
Jakub Kicinski <email>,
Paolo Abeni <email>
Cc: [email protected],
[email protected]
Subject: [PATCH] net: sfp: add quirk for DFP-34X-2C2 GPON ONU SFP
after saving you can send your patch
$ git send-email 0001-net-sfp-add-quirk-for-DFP-34X-2C2-GPON-ONU-SFP.patch
0001-net-sfp-add-quirk-for-DFP-34X-2C2-GPON-ONU-SFP.patch
To whom should the emails be sent (if anyone)?
Message-ID to be used as In-Reply-To for the first email (if any)?
...
From: Frank Wunderlich <email>
To: Russell King <email>,
Andrew Lunn <email>,
Heiner Kallweit <email>,
"David S. Miller" <email>,
Eric Dumazet <email>,
Jakub Kicinski <email>,
Paolo Abeni <email>
Cc: Frank Wunderlich <enail>,
[email protected],
[email protected]
Subject: [PATCH] net: sfp: add quirk for DFP-34X-2C2 GPON ONU SFP
Date: Sat, 6 Jan 2024 12:40:12 +0100
Message-Id: <20240106114012.10761-1-...>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
The Cc list above has been expanded by additional
addresses found in the patch commit message. By default
send-email prompts before sending whenever this occurs.
This behavior is controlled by the sendemail.confirm
configuration setting.
For additional information, run 'git send-email --help'.
To retain the current behavior, but squelch this message,
run 'git config --global sendemail.confirm auto'.
Send this email? ([y]es|[n]o|[e]dit|[q]uit|[a]ll):
make sure the To- and Cc-headers are displayed correctly (not merged 2 adresses or similar)
you may need to setup your mail-provider before if not done already
$ nano ~/.gitconfig
and add a section with you data:
[sendemail]
#from = Name <email> #optional if not matching the senders email
smtpencryption = ssl
smtpserver = <mailserver>
smtpServerPort = 465
smtpuser = <loginuser>
composeencoding = UTF-8