From: Ivan Malov <ivan.malov@arknetworks.am>
To: dev@dpdk.org
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Andy Moreton <andy.moreton@amd.com>,
Pieter Jansen Van Vuuren <pieter.jansen-van-vuuren@amd.com>,
Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>,
stable@dpdk.org
Subject: [PATCH 1/1] common/sfc_efx/base: revise legacy port controls on Medford4
Date: Wed, 13 Aug 2025 16:36:36 +0400 [thread overview]
Message-ID: <20250813123636.16363-1-ivan.malov@arknetworks.am> (raw)
Theoretically, adaptor firmware may not support new netport API. Currently,
efx_np_supported() assumes Medford4 always supports the API, however, this
can be improved in the future by checking some capability bit during probe.
If efx_np_supported() returns B_FALSE, then one should not invoke Medford4
PHY and MAC methods that are inherently dependent on new netport API. Pick
EF10-generic PHY and MAC methods in this case to maintain legacy behaviour.
Fixes: 8dac31d073af ("common/sfc_efx/base: introduce Medford4 stub for MAC methods")
Fixes: d65a7129c413 ("common/sfc_efx/base: introduce Medford4 stub for PHY methods")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <andy.moreton@amd.com>
---
drivers/common/sfc_efx/base/efx_mac.c | 6 +++++-
drivers/common/sfc_efx/base/efx_phy.c | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/common/sfc_efx/base/efx_mac.c b/drivers/common/sfc_efx/base/efx_mac.c
index 69f053ce44..9dc1eb23b9 100644
--- a/drivers/common/sfc_efx/base/efx_mac.c
+++ b/drivers/common/sfc_efx/base/efx_mac.c
@@ -1000,7 +1000,11 @@ efx_mac_select(
#if EFSYS_OPT_MEDFORD4
case EFX_FAMILY_MEDFORD4:
- emop = &__efx_mac_medford4_ops;
+ if (efx_np_supported(enp) != B_FALSE)
+ emop = &__efx_mac_medford4_ops;
+ else
+ emop = &__efx_mac_ef10_ops;
+
type = EFX_MAC_MEDFORD4;
break;
#endif /* EFSYS_OPT_MEDFORD4 */
diff --git a/drivers/common/sfc_efx/base/efx_phy.c b/drivers/common/sfc_efx/base/efx_phy.c
index 1f99c72e62..6e5521db20 100644
--- a/drivers/common/sfc_efx/base/efx_phy.c
+++ b/drivers/common/sfc_efx/base/efx_phy.c
@@ -136,7 +136,10 @@ efx_phy_probe(
#if EFSYS_OPT_MEDFORD4
case EFX_FAMILY_MEDFORD4:
- epop = &__efx_phy_medford4_ops;
+ if (efx_np_supported(enp) != B_FALSE)
+ epop = &__efx_phy_medford4_ops;
+ else
+ epop = &__efx_phy_ef10_ops;
break;
#endif /* EFSYS_OPT_MEDFORD4 */
--
2.17.1
next reply other threads:[~2025-08-13 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 12:36 Ivan Malov [this message]
2025-08-13 15:20 ` Stephen Hemminger
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=20250813123636.16363-1-ivan.malov@arknetworks.am \
--to=ivan.malov@arknetworks.am \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=andy.moreton@amd.com \
--cc=dev@dpdk.org \
--cc=pieter.jansen-van-vuuren@amd.com \
--cc=stable@dpdk.org \
--cc=viacheslav.galaktionov@arknetworks.am \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).