Skip to contentSkip to conversation

ionic: minor code updates

PATCH Applied Shannon Nelson 5 participants 19 messages Dec 10, 2024 – Dec 12, 2024

Subsystems (3)

v1 of 2 Applied 5/5 Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ionic: minor code updates

These are a few updates to the ionic driver, mostly for handling newer/faster QSFP connectors.

Brett Creeley (2):
ionic: Use VLAN_ETH_HLEN when possible
ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP

Shannon Nelson (3):
ionic: add asic codes to firmware interface file
ionic: add speed defines for 200G and 400G
ionic: add support for QSFP_PLUS_CMIS

 drivers/net/ethernet/pensando/ionic/ionic.h   |  2 -
 .../ethernet/pensando/ionic/ionic_ethtool.c   | 40 +++++++++++++++++++
 .../net/ethernet/pensando/ionic/ionic_if.h    | 22 +++++++++-
 .../net/ethernet/pensando/ionic/ionic_lif.c   |  2 +-
 .../net/ethernet/pensando/ionic/ionic_main.c  |  3 +-
 5 files changed, 63 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/5 ionic: add asic codes to firmware interface file

Now that the firmware has learned how to properly report the asic type id, add the values to our interface file.

The sharp-eyed reviewers will catch that the CAPRI value changed here from 0 to 1. This comes with the FW actually defining it correctly. This is safe for us to change as nothing actually uses that value yet.

---
 drivers/net/ethernet/pensando/ionic/ionic.h    | 2 --
 drivers/net/ethernet/pensando/ionic/ionic_if.h | 6 +++++-
 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/net/ethernet/pensando/ionic/ionic.h +0 -2
index 1c61390677f7..0639bf56bd3a 100644
@@ -18,8 +18,6 @@ struct ionic_lif;
 #define PCI_DEVICE_ID_PENSANDO_IONIC_ETH_PF	0x1002
 #define PCI_DEVICE_ID_PENSANDO_IONIC_ETH_VF	0x1003
 
-#define IONIC_ASIC_TYPE_ELBA	2
-
 #define DEVCMD_TIMEOUT			5
 #define IONIC_ADMINQ_TIME_SLICE		msecs_to_jiffies(100)
 
drivers/net/ethernet/pensando/ionic/ionic_if.h +5 -1
index 9c85c0706c6e..6ea190f1a706 100644
@@ -3209,7 +3209,11 @@ union ionic_adminq_comp {
 #define IONIC_BAR0_INTR_CTRL_OFFSET		0x2000
 #define IONIC_DEV_CMD_DONE			0x00000001
 
-#define IONIC_ASIC_TYPE_CAPRI			0
+#define IONIC_ASIC_TYPE_NONE			0
+#define IONIC_ASIC_TYPE_CAPRI			1
+#define IONIC_ASIC_TYPE_ELBA			2
+#define IONIC_ASIC_TYPE_GIGLIO			3
+#define IONIC_ASIC_TYPE_SALINA			4
 
 /**
  * struct ionic_doorbell - Doorbell register layout
Signature · 1 line
2.17.1
Reviewed-by on v1 1/5
#2 lore raw

Re: [PATCH net-next 1/5] ionic: add asic codes to firmware interface file

Quoted 10 lines · Shannon Nelson

Now that the firmware has learned how to properly report the asic type id, add the values to our interface file.

The sharp-eyed reviewers will catch that the CAPRI value changed here from 0 to 1. This comes with the FW actually defining it correctly. This is safe for us to change as nothing actually uses that value yet.

---

Reviewed-by on v1 1/5
#3 lore raw

Re: [PATCH net-next 1/5] ionic: add asic codes to firmware interface file

In reply to Shannon Nelson
Quoted 10 lines · Shannon Nelson

Now that the firmware has learned how to properly report the asic type id, add the values to our interface file.

The sharp-eyed reviewers will catch that the CAPRI value changed here from 0 to 1. This comes with the FW actually defining it correctly. This is safe for us to change as nothing actually uses that value yet.

Signature · 2 lines
Regards,
Kalesh AP
#4 lore raw

PATCH 2/5 ionic: Use VLAN_ETH_HLEN when possible

In reply to Shannon Nelson

From: Brett Creeley <[email protected]>

Replace when ETH_HLEN and VLAN_HLEN are used together with VLAN_ETH_HLEN since it's the same value and uses 1 define instead of 2.

---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +1 -1
index 40496587b2b3..052c767a2c75 100644
@@ -3265,7 +3265,7 @@ int ionic_lif_alloc(struct ionic *ionic)
 	lif->netdev->min_mtu = max_t(unsigned int, ETH_MIN_MTU,
 				     le32_to_cpu(lif->identity->eth.min_frame_size));
 	lif->netdev->max_mtu =
-		le32_to_cpu(lif->identity->eth.max_frame_size) - ETH_HLEN - VLAN_HLEN;
+		le32_to_cpu(lif->identity->eth.max_frame_size) - VLAN_ETH_HLEN;
 
 	lif->neqs = ionic->neqs_per_lif;
 	lif->nxqs = ionic->ntxqs_per_lif;
Signature · 1 line
2.17.1
Reviewed-by on v1 2/5
#5 lore raw

Re: [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible

Quoted 17 lines · Shannon Nelson

From: Brett Creeley <[email protected]>

Replace when ETH_HLEN and VLAN_HLEN are used together with VLAN_ETH_HLEN since it's the same value and uses 1 define instead of 2.

---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +0 -0
index 40496587b2b3..052c767a2c75 100644

drivers/net/ethernet/pensando/ionic/ionic_lif.c int ionic_lif_alloc(struct ionic *ionic) · line 3271

Quoted 8 lines
drivers/net/ethernet/pensando/ionic/ionic_lif.c +1 -1
@@ -3265,7 +3265,7 @@ int ionic_lif_alloc(struct ionic *ionic)
 	lif->netdev->min_mtu = max_t(unsigned int, ETH_MIN_MTU,
 				     le32_to_cpu(lif->identity->eth.min_frame_size));
 	lif->netdev->max_mtu =
-		le32_to_cpu(lif->identity->eth.max_frame_size) - ETH_HLEN - VLAN_HLEN;
+		le32_to_cpu(lif->identity->eth.max_frame_size) - VLAN_ETH_HLEN;
 
 	lif->neqs = ionic->neqs_per_lif;
 	lif->nxqs = ionic->ntxqs_per_lif;

Nice shorter line.

Reviewed-by on v1 2/5
#6 lore raw

Re: [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible

In reply to Shannon Nelson
Quoted 9 lines · Shannon Nelson

From: Brett Creeley <[email protected]>

Replace when ETH_HLEN and VLAN_HLEN are used together with VLAN_ETH_HLEN since it's the same value and uses 1 define instead of 2.

Signature · 2 lines
Regards,
Kalesh AP
#7 lore raw

PATCH 3/5 ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP

In reply to Shannon Nelson

From: Brett Creeley <[email protected]>

Instead of reporting -EINVAL when IONIC_RC_ENOSUPP is returned use the -EOPNOTSUPP value. This aligns better since the FW only returns IONIC_RC_ENOSUPP when operations aren't supported not when invalid values are used.

---
 drivers/net/ethernet/pensando/ionic/ionic_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_main.c +2 -1
index 0f817c3f92d8..daf1e82cb76b 100644
@@ -81,8 +81,9 @@ static int ionic_error_to_errno(enum ionic_status_code code)
 	case IONIC_RC_EQTYPE:
 	case IONIC_RC_EQID:
 	case IONIC_RC_EINVAL:
-	case IONIC_RC_ENOSUPP:
 		return -EINVAL;
+	case IONIC_RC_ENOSUPP:
+		return -EOPNOTSUPP;
 	case IONIC_RC_EPERM:
 		return -EPERM;
 	case IONIC_RC_ENOENT:
Signature · 1 line
2.17.1
Reviewed-by on v1 3/5
#8 lore raw

Re: [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP

Quoted 10 lines · Shannon Nelson

From: Brett Creeley <[email protected]>

Instead of reporting -EINVAL when IONIC_RC_ENOSUPP is returned use the -EOPNOTSUPP value. This aligns better since the FW only returns IONIC_RC_ENOSUPP when operations aren't supported not when invalid values are used.

---

Makes sense.

Quoted 18 lines
 drivers/net/ethernet/pensando/ionic/ionic_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_main.c +2 -1
index 0f817c3f92d8..daf1e82cb76b 100644
@@ -81,8 +81,9 @@ static int ionic_error_to_errno(enum ionic_status_code code)
 	case IONIC_RC_EQTYPE:
 	case IONIC_RC_EQID:
 	case IONIC_RC_EINVAL:
-	case IONIC_RC_ENOSUPP:
 		return -EINVAL;
+	case IONIC_RC_ENOSUPP:
+		return -EOPNOTSUPP;
 	case IONIC_RC_EPERM:
 		return -EPERM;
 	case IONIC_RC_ENOENT:
Reviewed-by on v1 3/5
#9 lore raw

Re: [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP

In reply to Shannon Nelson
Quoted 10 lines · Shannon Nelson

From: Brett Creeley <[email protected]>

Instead of reporting -EINVAL when IONIC_RC_ENOSUPP is returned use the -EOPNOTSUPP value. This aligns better since the FW only returns IONIC_RC_ENOSUPP when operations aren't supported not when invalid values are used.

Signature · 2 lines
Regards,
Kalesh AP
#10 lore raw

PATCH 4/5 ionic: add speed defines for 200G and 400G

In reply to Shannon Nelson

Add higher speed defines to the ionic_if.h API and decode them in the ethtool get_link_ksettings callback.

---
 .../ethernet/pensando/ionic/ionic_ethtool.c   | 39 +++++++++++++++++++
 .../net/ethernet/pensando/ionic/ionic_if.h    | 16 +++++++-
 2 files changed, 54 insertions(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +39 -0
index dda22fa4448c..272317048cb9 100644
@@ -158,6 +158,20 @@ static int ionic_get_link_ksettings(struct net_device *netdev,
 						     25000baseCR_Full);
 		copper_seen++;
 		break;
+	case IONIC_XCVR_PID_QSFP_50G_CR2_FC:
+	case IONIC_XCVR_PID_QSFP_50G_CR2:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     50000baseCR2_Full);
+		copper_seen++;
+		break;
+	case IONIC_XCVR_PID_QSFP_200G_CR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported, 200000baseCR4_Full);
+		copper_seen++;
+		break;
+	case IONIC_XCVR_PID_QSFP_400G_CR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported, 400000baseCR4_Full);
+		copper_seen++;
+		break;
 	case IONIC_XCVR_PID_SFP_10GBASE_AOC:
 	case IONIC_XCVR_PID_SFP_10GBASE_CU:
 		ethtool_link_ksettings_add_link_mode(ks, supported,
@@ -196,6 +210,31 @@ static int ionic_get_link_ksettings(struct net_device *netdev,
 		ethtool_link_ksettings_add_link_mode(ks, supported,
 						     25000baseSR_Full);
 		break;
+	case IONIC_XCVR_PID_QSFP_200G_AOC:
+	case IONIC_XCVR_PID_QSFP_200G_SR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     200000baseSR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_200G_FR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     200000baseLR4_ER4_FR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_200G_DR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     200000baseDR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_400G_FR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     400000baseLR4_ER4_FR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_400G_DR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     400000baseDR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_400G_SR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     400000baseSR4_Full);
+		break;
 	case IONIC_XCVR_PID_SFP_10GBASE_SR:
 		ethtool_link_ksettings_add_link_mode(ks, supported,
 						     10000baseSR_Full);
drivers/net/ethernet/pensando/ionic/ionic_if.h +15 -1
index 6ea190f1a706..830c8adbfbee 100644
@@ -1277,7 +1277,10 @@ enum ionic_xcvr_pid {
 	IONIC_XCVR_PID_SFP_25GBASE_CR_S  = 3,
 	IONIC_XCVR_PID_SFP_25GBASE_CR_L  = 4,
 	IONIC_XCVR_PID_SFP_25GBASE_CR_N  = 5,
-
+	IONIC_XCVR_PID_QSFP_50G_CR2_FC   = 6,
+	IONIC_XCVR_PID_QSFP_50G_CR2      = 7,
+	IONIC_XCVR_PID_QSFP_200G_CR4     = 8,
+	IONIC_XCVR_PID_QSFP_400G_CR4     = 9,
 	/* Fiber */
 	IONIC_XCVR_PID_QSFP_100G_AOC    = 50,
 	IONIC_XCVR_PID_QSFP_100G_ACC    = 51,
@@ -1303,6 +1306,15 @@ enum ionic_xcvr_pid {
 	IONIC_XCVR_PID_SFP_25GBASE_ACC  = 71,
 	IONIC_XCVR_PID_SFP_10GBASE_T    = 72,
 	IONIC_XCVR_PID_SFP_1000BASE_T   = 73,
+	IONIC_XCVR_PID_QSFP_200G_AOC    = 74,
+	IONIC_XCVR_PID_QSFP_200G_FR4    = 75,
+	IONIC_XCVR_PID_QSFP_200G_DR4    = 76,
+	IONIC_XCVR_PID_QSFP_200G_SR4    = 77,
+	IONIC_XCVR_PID_QSFP_200G_ACC    = 78,
+	IONIC_XCVR_PID_QSFP_400G_FR4    = 79,
+	IONIC_XCVR_PID_QSFP_400G_DR4    = 80,
+	IONIC_XCVR_PID_QSFP_400G_SR4    = 81,
+	IONIC_XCVR_PID_QSFP_400G_VR4    = 82,
 };
 
 /**
@@ -1404,6 +1416,8 @@ struct ionic_xcvr_status {
  */
 union ionic_port_config {
 	struct {
+#define IONIC_SPEED_400G	400000	/* 400G in Mbps */
+#define IONIC_SPEED_200G	200000	/* 200G in Mbps */
 #define IONIC_SPEED_100G	100000	/* 100G in Mbps */
 #define IONIC_SPEED_50G		50000	/* 50G in Mbps */
 #define IONIC_SPEED_40G		40000	/* 40G in Mbps */
Signature · 1 line
2.17.1
Reviewed-by on v1 4/5
#11 lore raw

Re: [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G

Quoted 5 lines · Shannon Nelson

Add higher speed defines to the ionic_if.h API and decode them in the ethtool get_link_ksettings callback.

---

You might consider refactoring the ionic driver to use the ethtool_forced_speed_maps_init interface at some point. See 26c5334d344d ("ethtool: Add forced speed to supported link modes maps"), with 982b0192db45 ("ice: Refactor finding advertised link speed") and 1d4e4ecccb11 ("qede: populate supported link modes maps on module init") (though it looks like the latter hasn't moved to the ethtool function).

This saves a bunch of text size on the module.

Quoted 102 lines
 .../ethernet/pensando/ionic/ionic_ethtool.c   | 39 +++++++++++++++++++
 .../net/ethernet/pensando/ionic/ionic_if.h    | 16 +++++++-
 2 files changed, 54 insertions(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +39 -0
index dda22fa4448c..272317048cb9 100644
@@ -158,6 +158,20 @@ static int ionic_get_link_ksettings(struct net_device *netdev,
 						     25000baseCR_Full);
 		copper_seen++;
 		break;
+	case IONIC_XCVR_PID_QSFP_50G_CR2_FC:
+	case IONIC_XCVR_PID_QSFP_50G_CR2:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     50000baseCR2_Full);
+		copper_seen++;
+		break;
+	case IONIC_XCVR_PID_QSFP_200G_CR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported, 200000baseCR4_Full);
+		copper_seen++;
+		break;
+	case IONIC_XCVR_PID_QSFP_400G_CR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported, 400000baseCR4_Full);
+		copper_seen++;
+		break;
 	case IONIC_XCVR_PID_SFP_10GBASE_AOC:
 	case IONIC_XCVR_PID_SFP_10GBASE_CU:
 		ethtool_link_ksettings_add_link_mode(ks, supported,
@@ -196,6 +210,31 @@ static int ionic_get_link_ksettings(struct net_device *netdev,
 		ethtool_link_ksettings_add_link_mode(ks, supported,
 						     25000baseSR_Full);
 		break;
+	case IONIC_XCVR_PID_QSFP_200G_AOC:
+	case IONIC_XCVR_PID_QSFP_200G_SR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     200000baseSR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_200G_FR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     200000baseLR4_ER4_FR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_200G_DR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     200000baseDR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_400G_FR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     400000baseLR4_ER4_FR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_400G_DR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     400000baseDR4_Full);
+		break;
+	case IONIC_XCVR_PID_QSFP_400G_SR4:
+		ethtool_link_ksettings_add_link_mode(ks, supported,
+						     400000baseSR4_Full);
+		break;
 	case IONIC_XCVR_PID_SFP_10GBASE_SR:
 		ethtool_link_ksettings_add_link_mode(ks, supported,
 						     10000baseSR_Full);
drivers/net/ethernet/pensando/ionic/ionic_if.h +15 -1
index 6ea190f1a706..830c8adbfbee 100644
@@ -1277,7 +1277,10 @@ enum ionic_xcvr_pid {
 	IONIC_XCVR_PID_SFP_25GBASE_CR_S  = 3,
 	IONIC_XCVR_PID_SFP_25GBASE_CR_L  = 4,
 	IONIC_XCVR_PID_SFP_25GBASE_CR_N  = 5,
-
+	IONIC_XCVR_PID_QSFP_50G_CR2_FC   = 6,
+	IONIC_XCVR_PID_QSFP_50G_CR2      = 7,
+	IONIC_XCVR_PID_QSFP_200G_CR4     = 8,
+	IONIC_XCVR_PID_QSFP_400G_CR4     = 9,
 	/* Fiber */
 	IONIC_XCVR_PID_QSFP_100G_AOC    = 50,
 	IONIC_XCVR_PID_QSFP_100G_ACC    = 51,
@@ -1303,6 +1306,15 @@ enum ionic_xcvr_pid {
 	IONIC_XCVR_PID_SFP_25GBASE_ACC  = 71,
 	IONIC_XCVR_PID_SFP_10GBASE_T    = 72,
 	IONIC_XCVR_PID_SFP_1000BASE_T   = 73,
+	IONIC_XCVR_PID_QSFP_200G_AOC    = 74,
+	IONIC_XCVR_PID_QSFP_200G_FR4    = 75,
+	IONIC_XCVR_PID_QSFP_200G_DR4    = 76,
+	IONIC_XCVR_PID_QSFP_200G_SR4    = 77,
+	IONIC_XCVR_PID_QSFP_200G_ACC    = 78,
+	IONIC_XCVR_PID_QSFP_400G_FR4    = 79,
+	IONIC_XCVR_PID_QSFP_400G_DR4    = 80,
+	IONIC_XCVR_PID_QSFP_400G_SR4    = 81,
+	IONIC_XCVR_PID_QSFP_400G_VR4    = 82,
 };
 
 /**
@@ -1404,6 +1416,8 @@ struct ionic_xcvr_status {
  */
 union ionic_port_config {
 	struct {
+#define IONIC_SPEED_400G	400000	/* 400G in Mbps */
+#define IONIC_SPEED_200G	200000	/* 200G in Mbps */
 #define IONIC_SPEED_100G	100000	/* 100G in Mbps */
 #define IONIC_SPEED_50G		50000	/* 50G in Mbps */
 #define IONIC_SPEED_40G		40000	/* 40G in Mbps */
#12 lore raw

Re: [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G

Quoted 7 lines · Jacob Keller
Quoted 5 lines · Shannon Nelson

Add higher speed defines to the ionic_if.h API and decode them in the ethtool get_link_ksettings callback.

---

Quoted 8 lines

You might consider refactoring the ionic driver to use the ethtool_forced_speed_maps_init interface at some point. See 26c5334d344d ("ethtool: Add forced speed to supported link modes maps"), with 982b0192db45 ("ice: Refactor finding advertised link speed") and 1d4e4ecccb11 ("qede: populate supported link modes maps on module init") (though it looks like the latter hasn't moved to the ethtool function).

This saves a bunch of text size on the module.

Yeah, and it would get rid of the silly CamelCase code complaints as well. We'll have to take look at this in a future opportunity.

Thanks for the Reviews,
sln

#13 lore raw

PATCH 5/5 ionic: add support for QSFP_PLUS_CMIS

In reply to Shannon Nelson

Teach the driver to recognize and decode the sfp pid SFF8024_ID_QSFP_PLUS_CMIS correctly.

---
 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +1 -0
index 272317048cb9..720092b1633a 100644
@@ -968,6 +968,7 @@ static int ionic_get_module_info(struct net_device *netdev,
 		break;
 	case SFF8024_ID_QSFP_8436_8636:
 	case SFF8024_ID_QSFP28_8636:
+	case SFF8024_ID_QSFP_PLUS_CMIS:
 		modinfo->type = ETH_MODULE_SFF_8436;
 		modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;
 		break;
Signature · 1 line
2.17.1
Reviewed-by on v1 5/5
#14 lore raw

Re: [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS

Quoted 5 lines · Shannon Nelson

Teach the driver to recognize and decode the sfp pid SFF8024_ID_QSFP_PLUS_CMIS correctly.

---

Quoted 15 lines
 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +1 -0
index 272317048cb9..720092b1633a 100644
@@ -968,6 +968,7 @@ static int ionic_get_module_info(struct net_device *netdev,
 		break;
 	case SFF8024_ID_QSFP_8436_8636:
 	case SFF8024_ID_QSFP28_8636:
+	case SFF8024_ID_QSFP_PLUS_CMIS:
 		modinfo->type = ETH_MODULE_SFF_8436;
 		modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;
 		break;
#16 lore raw

Re: [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS

In reply to Shannon Nelson
Quoted 13 lines · Shannon Nelson

Teach the driver to recognize and decode the sfp pid SFF8024_ID_QSFP_PLUS_CMIS correctly.

---
 drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +0 -0
index 272317048cb9..720092b1633a 100644

drivers/net/ethernet/pensando/ionic/ionic_ethtool.c static int ionic_get_module_info(struct net_device *netdev, · line 973

Quoted 6 lines
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +1 -0
@@ -968,6 +968,7 @@ static int ionic_get_module_info(struct net_device *netdev,
 		break;
 	case SFF8024_ID_QSFP_8436_8636:
 	case SFF8024_ID_QSFP28_8636:
+	case SFF8024_ID_QSFP_PLUS_CMIS:
 		modinfo->type = ETH_MODULE_SFF_8436;
 		modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;

Patch looks fine, but this will only allow user space to decode page 00h. I suggest adding support for the get_module_eeprom_by_page() ethtool operation in a follow-up patch, so that user space will be able to query and decode more pages from the CMIS memory map.

#17 lore raw

Re: [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS

Quoted 9 lines · Ido Schimmel
Quoted 8 lines · Shannon Nelson

Teach the driver to recognize and decode the sfp pid SFF8024_ID_QSFP_PLUS_CMIS correctly.

---
  drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 16 lines

drivers/net/ethernet/pensando/ionic/ionic_ethtool.c static int ionic_get_module_info(struct net_device *netdev, · line 973

Quoted 11 lines
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +1 -0
index 272317048cb9..720092b1633a 100644
@@ -968,6 +968,7 @@ static int ionic_get_module_info(struct net_device *netdev,
               break;
       case SFF8024_ID_QSFP_8436_8636:
       case SFF8024_ID_QSFP28_8636:
+     case SFF8024_ID_QSFP_PLUS_CMIS:
               modinfo->type = ETH_MODULE_SFF_8436;
               modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN;

Patch looks fine, but this will only allow user space to decode page 00h. I suggest adding support for the get_module_eeprom_by_page() ethtool operation in a follow-up patch, so that user space will be able to query and decode more pages from the CMIS memory map.

Thanks, Ido, that's a good idea. I'll have to talk to our firmware folks about making more of the module pages available to the driver.

sln

#18 lore raw
In reply to Shannon Nelson
This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Tue, 10 Dec 2024 10:30:40 -0800 you wrote:

These are a few updates to the ionic driver, mostly for handling newer/faster QSFP connectors.

Brett Creeley (2):
ionic: Use VLAN_ETH_HLEN when possible
ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP

[...]

Here is the summary with links:
- [net-next,1/5] ionic: add asic codes to firmware interface file

    https://git.kernel.org/netdev/net-next/c/4aa567b1df8b
  - [net-next,2/5] ionic: Use VLAN_ETH_HLEN when possible
    https://git.kernel.org/netdev/net-next/c/33ce1d41c133
  - [net-next,3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP
    https://git.kernel.org/netdev/net-next/c/7c372bac12b2
  - [net-next,4/5] ionic: add speed defines for 200G and 400G
    https://git.kernel.org/netdev/net-next/c/a8b05dd3389f
  - [net-next,5/5] ionic: add support for QSFP_PLUS_CMIS
    https://git.kernel.org/netdev/net-next/c/a857c841e7ea

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html