* [PATCH net-next 0/5] ionic: minor code updates
@ 2024-12-10 18:30 Shannon Nelson
2024-12-10 18:30 ` [PATCH net-next 1/5] ionic: add asic codes to firmware interface file Shannon Nelson
` (5 more replies)
0 siblings, 6 replies; 19+ messages in thread
From: Shannon Nelson @ 2024-12-10 18:30 UTC (permalink / raw)
To: netdev, davem, kuba, edumazet, pabeni, andrew+netdev,
jacob.e.keller
Cc: brett.creeley, Shannon Nelson
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(-)
--
2.17.1
^ permalink raw reply [flat|nested] 19+ messages in thread* [PATCH net-next 1/5] ionic: add asic codes to firmware interface file 2024-12-10 18:30 [PATCH net-next 0/5] ionic: minor code updates Shannon Nelson @ 2024-12-10 18:30 ` Shannon Nelson 2024-12-10 22:44 ` Jacob Keller 2024-12-11 3:36 ` Kalesh Anakkur Purayil 2024-12-10 18:30 ` [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible Shannon Nelson ` (4 subsequent siblings) 5 siblings, 2 replies; 19+ messages in thread From: Shannon Nelson @ 2024-12-10 18:30 UTC (permalink / raw) To: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller Cc: brett.creeley, 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. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> --- drivers/net/ethernet/pensando/ionic/ionic.h | 2 -- drivers/net/ethernet/pensando/ionic/ionic_if.h | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic.h b/drivers/net/ethernet/pensando/ionic/ionic.h index 1c61390677f7..0639bf56bd3a 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic.h +++ b/drivers/net/ethernet/pensando/ionic/ionic.h @@ -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) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/drivers/net/ethernet/pensando/ionic/ionic_if.h index 9c85c0706c6e..6ea190f1a706 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_if.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_if.h @@ -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 -- 2.17.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 1/5] ionic: add asic codes to firmware interface file 2024-12-10 18:30 ` [PATCH net-next 1/5] ionic: add asic codes to firmware interface file Shannon Nelson @ 2024-12-10 22:44 ` Jacob Keller 2024-12-11 3:36 ` Kalesh Anakkur Purayil 1 sibling, 0 replies; 19+ messages in thread From: Jacob Keller @ 2024-12-10 22:44 UTC (permalink / raw) To: Shannon Nelson, netdev, davem, kuba, edumazet, pabeni, andrew+netdev Cc: brett.creeley On 12/10/2024 10:30 AM, Shannon Nelson wrote: > 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. > > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> > --- Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 1/5] ionic: add asic codes to firmware interface file 2024-12-10 18:30 ` [PATCH net-next 1/5] ionic: add asic codes to firmware interface file Shannon Nelson 2024-12-10 22:44 ` Jacob Keller @ 2024-12-11 3:36 ` Kalesh Anakkur Purayil 1 sibling, 0 replies; 19+ messages in thread From: Kalesh Anakkur Purayil @ 2024-12-11 3:36 UTC (permalink / raw) To: Shannon Nelson Cc: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller, brett.creeley [-- Attachment #1: Type: text/plain, Size: 586 bytes --] On Wed, Dec 11, 2024 at 12:01 AM Shannon Nelson <shannon.nelson@amd.com> wrote: > > 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. > > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> -- Regards, Kalesh AP [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4239 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible 2024-12-10 18:30 [PATCH net-next 0/5] ionic: minor code updates Shannon Nelson 2024-12-10 18:30 ` [PATCH net-next 1/5] ionic: add asic codes to firmware interface file Shannon Nelson @ 2024-12-10 18:30 ` Shannon Nelson 2024-12-10 22:45 ` Jacob Keller 2024-12-11 3:32 ` Kalesh Anakkur Purayil 2024-12-10 18:30 ` [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP Shannon Nelson ` (3 subsequent siblings) 5 siblings, 2 replies; 19+ messages in thread From: Shannon Nelson @ 2024-12-10 18:30 UTC (permalink / raw) To: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller Cc: brett.creeley, Shannon Nelson From: Brett Creeley <brett.creeley@amd.com> 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. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index 40496587b2b3..052c767a2c75 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -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; -- 2.17.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible 2024-12-10 18:30 ` [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible Shannon Nelson @ 2024-12-10 22:45 ` Jacob Keller 2024-12-11 3:32 ` Kalesh Anakkur Purayil 1 sibling, 0 replies; 19+ messages in thread From: Jacob Keller @ 2024-12-10 22:45 UTC (permalink / raw) To: Shannon Nelson, netdev, davem, kuba, edumazet, pabeni, andrew+netdev Cc: brett.creeley On 12/10/2024 10:30 AM, Shannon Nelson wrote: > From: Brett Creeley <brett.creeley@amd.com> > > 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. > > Signed-off-by: Brett Creeley <brett.creeley@amd.com> > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> > --- > drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c > index 40496587b2b3..052c767a2c75 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c > @@ -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: Jacob Keller <jacob.e.keller@intel.com> ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible 2024-12-10 18:30 ` [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible Shannon Nelson 2024-12-10 22:45 ` Jacob Keller @ 2024-12-11 3:32 ` Kalesh Anakkur Purayil 1 sibling, 0 replies; 19+ messages in thread From: Kalesh Anakkur Purayil @ 2024-12-11 3:32 UTC (permalink / raw) To: Shannon Nelson Cc: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller, brett.creeley [-- Attachment #1: Type: text/plain, Size: 487 bytes --] On Wed, Dec 11, 2024 at 12:01 AM Shannon Nelson <shannon.nelson@amd.com> wrote: > > From: Brett Creeley <brett.creeley@amd.com> > > 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. > > Signed-off-by: Brett Creeley <brett.creeley@amd.com> > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> -- Regards, Kalesh AP [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4239 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP 2024-12-10 18:30 [PATCH net-next 0/5] ionic: minor code updates Shannon Nelson 2024-12-10 18:30 ` [PATCH net-next 1/5] ionic: add asic codes to firmware interface file Shannon Nelson 2024-12-10 18:30 ` [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible Shannon Nelson @ 2024-12-10 18:30 ` Shannon Nelson 2024-12-10 22:45 ` Jacob Keller 2024-12-11 3:31 ` Kalesh Anakkur Purayil 2024-12-10 18:30 ` [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G Shannon Nelson ` (2 subsequent siblings) 5 siblings, 2 replies; 19+ messages in thread From: Shannon Nelson @ 2024-12-10 18:30 UTC (permalink / raw) To: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller Cc: brett.creeley, Shannon Nelson From: Brett Creeley <brett.creeley@amd.com> 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. Signed-off-by: Brett Creeley <brett.creeley@amd.com> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> --- drivers/net/ethernet/pensando/ionic/ionic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c index 0f817c3f92d8..daf1e82cb76b 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c @@ -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: -- 2.17.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP 2024-12-10 18:30 ` [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP Shannon Nelson @ 2024-12-10 22:45 ` Jacob Keller 2024-12-11 3:31 ` Kalesh Anakkur Purayil 1 sibling, 0 replies; 19+ messages in thread From: Jacob Keller @ 2024-12-10 22:45 UTC (permalink / raw) To: Shannon Nelson, netdev, davem, kuba, edumazet, pabeni, andrew+netdev Cc: brett.creeley On 12/10/2024 10:30 AM, Shannon Nelson wrote: > From: Brett Creeley <brett.creeley@amd.com> > > 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. > > Signed-off-by: Brett Creeley <brett.creeley@amd.com> > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> > --- Makes sense. Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> > drivers/net/ethernet/pensando/ionic/ionic_main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c > index 0f817c3f92d8..daf1e82cb76b 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_main.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c > @@ -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: ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP 2024-12-10 18:30 ` [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP Shannon Nelson 2024-12-10 22:45 ` Jacob Keller @ 2024-12-11 3:31 ` Kalesh Anakkur Purayil 1 sibling, 0 replies; 19+ messages in thread From: Kalesh Anakkur Purayil @ 2024-12-11 3:31 UTC (permalink / raw) To: Shannon Nelson Cc: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller, brett.creeley [-- Attachment #1: Type: text/plain, Size: 578 bytes --] On Wed, Dec 11, 2024 at 12:01 AM Shannon Nelson <shannon.nelson@amd.com> wrote: > > From: Brett Creeley <brett.creeley@amd.com> > > 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. > > Signed-off-by: Brett Creeley <brett.creeley@amd.com> > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> -- Regards, Kalesh AP [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4239 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G 2024-12-10 18:30 [PATCH net-next 0/5] ionic: minor code updates Shannon Nelson ` (2 preceding siblings ...) 2024-12-10 18:30 ` [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP Shannon Nelson @ 2024-12-10 18:30 ` Shannon Nelson 2024-12-10 22:53 ` Jacob Keller 2024-12-10 18:30 ` [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS Shannon Nelson 2024-12-12 11:20 ` [PATCH net-next 0/5] ionic: minor code updates patchwork-bot+netdevbpf 5 siblings, 1 reply; 19+ messages in thread From: Shannon Nelson @ 2024-12-10 18:30 UTC (permalink / raw) To: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller Cc: brett.creeley, Shannon Nelson Add higher speed defines to the ionic_if.h API and decode them in the ethtool get_link_ksettings callback. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> --- .../ethernet/pensando/ionic/ionic_ethtool.c | 39 +++++++++++++++++++ .../net/ethernet/pensando/ionic/ionic_if.h | 16 +++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index dda22fa4448c..272317048cb9 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -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); diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/drivers/net/ethernet/pensando/ionic/ionic_if.h index 6ea190f1a706..830c8adbfbee 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_if.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_if.h @@ -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 */ -- 2.17.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G 2024-12-10 18:30 ` [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G Shannon Nelson @ 2024-12-10 22:53 ` Jacob Keller 2024-12-10 23:21 ` Nelson, Shannon 0 siblings, 1 reply; 19+ messages in thread From: Jacob Keller @ 2024-12-10 22:53 UTC (permalink / raw) To: Shannon Nelson, netdev, davem, kuba, edumazet, pabeni, andrew+netdev Cc: brett.creeley On 12/10/2024 10:30 AM, Shannon Nelson wrote: > Add higher speed defines to the ionic_if.h API and decode them > in the ethtool get_link_ksettings callback. > > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> > --- 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. Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> > .../ethernet/pensando/ionic/ionic_ethtool.c | 39 +++++++++++++++++++ > .../net/ethernet/pensando/ionic/ionic_if.h | 16 +++++++- > 2 files changed, 54 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > index dda22fa4448c..272317048cb9 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > @@ -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); > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/drivers/net/ethernet/pensando/ionic/ionic_if.h > index 6ea190f1a706..830c8adbfbee 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_if.h > +++ b/drivers/net/ethernet/pensando/ionic/ionic_if.h > @@ -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 */ ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G 2024-12-10 22:53 ` Jacob Keller @ 2024-12-10 23:21 ` Nelson, Shannon 0 siblings, 0 replies; 19+ messages in thread From: Nelson, Shannon @ 2024-12-10 23:21 UTC (permalink / raw) To: Jacob Keller, netdev, davem, kuba, edumazet, pabeni, andrew+netdev Cc: brett.creeley On 12/10/2024 2:53 PM, Jacob Keller wrote: > On 12/10/2024 10:30 AM, Shannon Nelson wrote: >> Add higher speed defines to the ionic_if.h API and decode them >> in the ethtool get_link_ksettings callback. >> >> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> >> --- > > 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 ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS 2024-12-10 18:30 [PATCH net-next 0/5] ionic: minor code updates Shannon Nelson ` (3 preceding siblings ...) 2024-12-10 18:30 ` [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G Shannon Nelson @ 2024-12-10 18:30 ` Shannon Nelson 2024-12-10 22:53 ` Jacob Keller ` (2 more replies) 2024-12-12 11:20 ` [PATCH net-next 0/5] ionic: minor code updates patchwork-bot+netdevbpf 5 siblings, 3 replies; 19+ messages in thread From: Shannon Nelson @ 2024-12-10 18:30 UTC (permalink / raw) To: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller Cc: brett.creeley, Shannon Nelson Teach the driver to recognize and decode the sfp pid SFF8024_ID_QSFP_PLUS_CMIS correctly. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> --- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c index 272317048cb9..720092b1633a 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c @@ -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; -- 2.17.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS 2024-12-10 18:30 ` [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS Shannon Nelson @ 2024-12-10 22:53 ` Jacob Keller 2024-12-11 3:30 ` Kalesh Anakkur Purayil 2024-12-11 10:12 ` Ido Schimmel 2 siblings, 0 replies; 19+ messages in thread From: Jacob Keller @ 2024-12-10 22:53 UTC (permalink / raw) To: Shannon Nelson, netdev, davem, kuba, edumazet, pabeni, andrew+netdev Cc: brett.creeley On 12/10/2024 10:30 AM, Shannon Nelson wrote: > Teach the driver to recognize and decode the sfp pid > SFF8024_ID_QSFP_PLUS_CMIS correctly. > > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> > --- Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> > drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > index 272317048cb9..720092b1633a 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > @@ -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; ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS 2024-12-10 18:30 ` [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS Shannon Nelson 2024-12-10 22:53 ` Jacob Keller @ 2024-12-11 3:30 ` Kalesh Anakkur Purayil 2024-12-11 10:12 ` Ido Schimmel 2 siblings, 0 replies; 19+ messages in thread From: Kalesh Anakkur Purayil @ 2024-12-11 3:30 UTC (permalink / raw) To: Shannon Nelson Cc: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller, brett.creeley [-- Attachment #1: Type: text/plain, Size: 335 bytes --] On Wed, Dec 11, 2024 at 12:01 AM Shannon Nelson <shannon.nelson@amd.com> wrote: > > Teach the driver to recognize and decode the sfp pid > SFF8024_ID_QSFP_PLUS_CMIS correctly. > > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> -- Regards, Kalesh AP [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4239 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS 2024-12-10 18:30 ` [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS Shannon Nelson 2024-12-10 22:53 ` Jacob Keller 2024-12-11 3:30 ` Kalesh Anakkur Purayil @ 2024-12-11 10:12 ` Ido Schimmel 2024-12-11 17:15 ` Nelson, Shannon 2 siblings, 1 reply; 19+ messages in thread From: Ido Schimmel @ 2024-12-11 10:12 UTC (permalink / raw) To: Shannon Nelson Cc: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller, brett.creeley On Tue, Dec 10, 2024 at 10:30:45AM -0800, Shannon Nelson wrote: > Teach the driver to recognize and decode the sfp pid > SFF8024_ID_QSFP_PLUS_CMIS correctly. > > Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> > --- > drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > index 272317048cb9..720092b1633a 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > @@ -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. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS 2024-12-11 10:12 ` Ido Schimmel @ 2024-12-11 17:15 ` Nelson, Shannon 0 siblings, 0 replies; 19+ messages in thread From: Nelson, Shannon @ 2024-12-11 17:15 UTC (permalink / raw) To: Ido Schimmel Cc: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller, brett.creeley On 12/11/2024 2:12 AM, Ido Schimmel wrote: > On Tue, Dec 10, 2024 at 10:30:45AM -0800, Shannon Nelson wrote: >> Teach the driver to recognize and decode the sfp pid >> SFF8024_ID_QSFP_PLUS_CMIS correctly. >> >> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> >> --- >> drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c >> index 272317048cb9..720092b1633a 100644 >> --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c >> +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c >> @@ -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 ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH net-next 0/5] ionic: minor code updates 2024-12-10 18:30 [PATCH net-next 0/5] ionic: minor code updates Shannon Nelson ` (4 preceding siblings ...) 2024-12-10 18:30 ` [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS Shannon Nelson @ 2024-12-12 11:20 ` patchwork-bot+netdevbpf 5 siblings, 0 replies; 19+ messages in thread From: patchwork-bot+netdevbpf @ 2024-12-12 11:20 UTC (permalink / raw) To: Nelson, Shannon Cc: netdev, davem, kuba, edumazet, pabeni, andrew+netdev, jacob.e.keller, brett.creeley Hello: This series was applied to netdev/net-next.git (main) by Paolo Abeni <pabeni@redhat.com>: 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! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2024-12-12 11:20 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-12-10 18:30 [PATCH net-next 0/5] ionic: minor code updates Shannon Nelson 2024-12-10 18:30 ` [PATCH net-next 1/5] ionic: add asic codes to firmware interface file Shannon Nelson 2024-12-10 22:44 ` Jacob Keller 2024-12-11 3:36 ` Kalesh Anakkur Purayil 2024-12-10 18:30 ` [PATCH net-next 2/5] ionic: Use VLAN_ETH_HLEN when possible Shannon Nelson 2024-12-10 22:45 ` Jacob Keller 2024-12-11 3:32 ` Kalesh Anakkur Purayil 2024-12-10 18:30 ` [PATCH net-next 3/5] ionic: Translate IONIC_RC_ENOSUPP to EOPNOTSUPP Shannon Nelson 2024-12-10 22:45 ` Jacob Keller 2024-12-11 3:31 ` Kalesh Anakkur Purayil 2024-12-10 18:30 ` [PATCH net-next 4/5] ionic: add speed defines for 200G and 400G Shannon Nelson 2024-12-10 22:53 ` Jacob Keller 2024-12-10 23:21 ` Nelson, Shannon 2024-12-10 18:30 ` [PATCH net-next 5/5] ionic: add support for QSFP_PLUS_CMIS Shannon Nelson 2024-12-10 22:53 ` Jacob Keller 2024-12-11 3:30 ` Kalesh Anakkur Purayil 2024-12-11 10:12 ` Ido Schimmel 2024-12-11 17:15 ` Nelson, Shannon 2024-12-12 11:20 ` [PATCH net-next 0/5] ionic: minor code updates patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox