From: Eric Joyner Date: Fri, 6 Mar 2026 21:56:34 +0000 (-0800) Subject: ionic: Report additional media types from firmware X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1f9cab56e79eb88acec4d350c192d327244887c3;p=thirdparty%2Fkernel%2Flinux.git ionic: Report additional media types from firmware The device firmware supports reporting more media types than what was there in the past, so map these new media types to existing ethtool bits, which appears to be what other drivers do for media types that match speeds but not physical spec. And while here, make a very small cleanup in ionic_get_link_ksettings() to remove some unnecessary code duplication. Reviewed-by: Brett Creeley Signed-off-by: Eric Joyner Link: https://patch.msgid.link/20260306215634.64550-1-eric.joyner@amd.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index 1514c1019f28a..78a802eb159f0 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -188,10 +188,9 @@ static int ionic_get_link_ksettings(struct net_device *netdev, case IONIC_XCVR_PID_QSFP_100G_CWDM4: case IONIC_XCVR_PID_QSFP_100G_PSM4: case IONIC_XCVR_PID_QSFP_100G_LR4: - ethtool_link_ksettings_add_link_mode(ks, supported, - 100000baseLR4_ER4_Full); - break; case IONIC_XCVR_PID_QSFP_100G_ER4: + case IONIC_XCVR_PID_QSFP_100G_FR4: + case IONIC_XCVR_PID_QSFP_100G_DR4: ethtool_link_ksettings_add_link_mode(ks, supported, 100000baseLR4_ER4_Full); break; @@ -212,6 +211,7 @@ static int ionic_get_link_ksettings(struct net_device *netdev, break; case IONIC_XCVR_PID_QSFP_200G_AOC: case IONIC_XCVR_PID_QSFP_200G_SR4: + case IONIC_XCVR_PID_QSFP_200G_AEC: ethtool_link_ksettings_add_link_mode(ks, supported, 200000baseSR4_Full); break; @@ -232,6 +232,9 @@ static int ionic_get_link_ksettings(struct net_device *netdev, 400000baseDR4_Full); break; case IONIC_XCVR_PID_QSFP_400G_SR4: + case IONIC_XCVR_PID_QSFP_400G_AOC: + case IONIC_XCVR_PID_QSFP_400G_AEC: + case IONIC_XCVR_PID_QSFP_400G_LPO: ethtool_link_ksettings_add_link_mode(ks, supported, 400000baseSR4_Full); break; diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/drivers/net/ethernet/pensando/ionic/ionic_if.h index 47559c909c8b4..23d6e2b4791e0 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_if.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_if.h @@ -1341,6 +1341,12 @@ enum ionic_xcvr_pid { IONIC_XCVR_PID_QSFP_400G_DR4 = 80, IONIC_XCVR_PID_QSFP_400G_SR4 = 81, IONIC_XCVR_PID_QSFP_400G_VR4 = 82, + IONIC_XCVR_PID_QSFP_400G_AOC = 83, + IONIC_XCVR_PID_QSFP_400G_AEC = 84, + IONIC_XCVR_PID_QSFP_200G_AEC = 85, + IONIC_XCVR_PID_QSFP_400G_LPO = 86, + IONIC_XCVR_PID_QSFP_100G_FR4 = 87, + IONIC_XCVR_PID_QSFP_100G_DR4 = 88, }; /**