public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,
	aleksandr.loktionov@intel.com
Cc: netdev@vger.kernel.org, Paul Greenwalt <paul.greenwalt@intel.com>
Subject: [PATCH iwl-next 3/10] ice: add PORT_AUI and PORT_NONE ethtool port type reporting
Date: Fri, 10 Apr 2026 09:49:14 +0200	[thread overview]
Message-ID: <20260410074921.1254213-4-aleksandr.loktionov@intel.com> (raw)
In-Reply-To: <20260410074921.1254213-1-aleksandr.loktionov@intel.com>

Now that ICE_MEDIA_AUI and ICE_MEDIA_NONE enum values exist,
ice_get_link_ksettings() reports PORT_OTHER for both of them because the
switch falls through to the former default handler.

Replace the catch-all default with an explicit ICE_MEDIA_UNKNOWN case for
PORT_OTHER, and add proper ICE_MEDIA_AUI -> PORT_AUI and
ICE_MEDIA_NONE -> PORT_NONE mappings.  The switch now covers every
enum ice_media_type value.

Suggested-by: Paul Greenwalt <paul.greenwalt@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_ethtool.c | 11 +++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index caec297..6857fcd 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -1901,9 +1901,18 @@ ice_get_link_ksettings(struct net_device *netdev,
 		ethtool_link_ksettings_add_link_mode(ks, advertising, FIBRE);
 		ks->base.port = PORT_DA;
 		break;
-	default:
+	case ICE_MEDIA_AUI:
+		ethtool_link_ksettings_add_link_mode(ks, supported, AUI);
+		ethtool_link_ksettings_add_link_mode(ks, advertising, AUI);
+		ks->base.port = PORT_AUI;
+		break;
+	case ICE_MEDIA_NONE:
+		ks->base.port = PORT_NONE;
+		break;
+	case ICE_MEDIA_UNKNOWN:
 		ks->base.port = PORT_OTHER;
 		break;
+	/* All ice_media_type enum values are explicitly handled above. */
 	}
 
 	/* flow control is symmetric and always supported */
-- 
2.52.0

  parent reply	other threads:[~2026-04-10  7:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10  7:49 [PATCH iwl-next 0/10] ice: misc cleanups and improvements Aleksandr Loktionov
2026-04-10  7:49 ` [PATCH iwl-next 1/10] ice: translate FW to SW for max num TCs encoding Aleksandr Loktionov
2026-04-14  8:44   ` Simon Horman
2026-04-10  7:49 ` [PATCH iwl-next 2/10] ice: allow setting advertised speed and duplex for all media types Aleksandr Loktionov
2026-04-10  7:49 ` Aleksandr Loktionov [this message]
2026-04-10  7:49 ` [PATCH iwl-next 4/10] ice: reorder ice_flash_info fields to eliminate padding Aleksandr Loktionov
2026-04-10  7:49 ` [PATCH iwl-next 5/10] ice: improve Add/Update VSI error messages in ice_vsi_init() Aleksandr Loktionov
2026-04-10  7:49 ` [PATCH iwl-next 6/10] ice: increase OICR interrupt moderation rate to 20K interrupts/sec Aleksandr Loktionov
2026-04-10  7:49 ` [PATCH iwl-next 7/10] ice: emit user-visible info message for non-contiguous ETS TC config Aleksandr Loktionov
2026-04-10  7:49 ` [PATCH iwl-next 8/10] ice: move ice_phy_get_speed_eth56g() from ice_ptp_hw.c to ice_common.c Aleksandr Loktionov
2026-04-10  7:49 ` [PATCH iwl-next 9/10] ice: use inline helpers instead of memcmp() for IPv6 mask checks in ice_ethtool_fdir Aleksandr Loktionov
2026-04-10  7:49 ` [PATCH iwl-next 10/10] ice: promote Tx FIFO drain timeout message from dev_dbg to dev_warn Aleksandr Loktionov

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=20260410074921.1254213-4-aleksandr.loktionov@intel.com \
    --to=aleksandr.loktionov@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.greenwalt@intel.com \
    /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