bnxt_en: Update for net-next.
Michael Chan
maintainercover bnxt_en: Update for net-next.
This patch series adds 2 main features to the bnxt_en driver: 200G link speed support and FEC support with some refactoring of the link speed logic. The firmware interface is updated to have proper support for these 2 features. The ethtool preset max channel value is also adjusted properly to account for XDP and TCs.
Edwin Peer (5):
bnxt_en: refactor code to limit speed advertising
bnxt_en: refactor bnxt_get_fw_speed()
bnxt_en: add basic infrastructure to support PAM4 link speeds
bnxt_en: ethtool: support PAM4 link speeds up to 200G
bnxt_en: avoid link reset if speed is not changed
Michael Chan (6):
bnxt_en: Update firmware interface spec to 1.10.1.65.
bnxt_en: Handle ethernet link being disabled by firmware.
bnxt_en: Report FEC settings to ethtool.
bnxt_en: Report Active FEC encoding during link up.
bnxt_en: Implement ethtool set_fec_param() method.
bnxt_en: Improve preset max value for ethtool -l.
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 168 ++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 155 +++++--- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 294 ++++++++++++-- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 375 +++++++++++++++--- .../net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 +- 5 files changed, 810 insertions(+), 184 deletions(-)
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 2/11 bnxt_en: refactor code to limit speed advertising
From: Edwin Peer <[email protected]>
Extract the code for determining an advertised speed is no longer supported into a separate function. This will avoid some code duplication in a later patch when supporting PAM4 speeds, since these speeds are specified in a separate field.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +12 -8
@@ -8835,6 +8835,13 @@ static int bnxt_hwrm_phy_qcaps(struct bnxt *bp)return rc; } +static bool bnxt_support_dropped (u16 advertising,u16 supported) +{ +u16 diff = advertising ^ supported; + +return ((supported | diff) != supported); +} +static int bnxt_update_link (struct bnxt *bp,bool chng_link_state) {int rc =0 ;
@@ -8842,7 +8849,6 @@ static int bnxt_update_link(struct bnxt *bp, bool chng_link_state)struct hwrm_port_phy_qcfg_input req = {0 };struct hwrm_port_phy_qcfg_output *resp = bp->hwrm_cmd_resp_addr;u8 link_up = link_info->link_up; -u16 diff;bnxt_hwrm_cmd_hdr_init (bp, &req,HWRM_PORT_PHY_QCFG ,-1 ,-1 );
@@ -8941,13 +8947,11 @@ static int bnxt_update_link(struct bnxt *bp, bool chng_link_state)if (!BNXT_PHY_CFG_ABLE (bp))return 0 ; - diff = link_info->support_auto_speeds ^ link_info->advertising; -if ((link_info->support_auto_speeds | diff) != - link_info->support_auto_speeds) { -/* An advertised speed is no longer supported, so we need to -* update the advertisement settings. Caller holds RTNL -* so we can modify link settings. -*/ +/* Check if any advertised speeds are no longer supported. The caller +* holds the link_lock mutex, so we can modify link_info settings. +*/ +if (bnxt_support_dropped (link_info->advertising, + link_info->support_auto_speeds)) { link_info->advertising = link_info->support_auto_speeds;if (link_info->autoneg &BNXT_AUTONEG_SPEED )bnxt_hwrm_set_link_setting (bp, true, false);
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 3/11 bnxt_en: refactor bnxt_get_fw_speed()
In reply to Michael ChanFrom: Edwin Peer <[email protected]>
It will be necessary to update more than one field in the link_info structure when PAM4 speeds are added in a later patch. Instead of merely translating ethtool speed values to firmware speed values, change the responsiblity of this function to update all the necessary link_info fields required to force the speed change to the desired ethtool value. This also reduces code duplication somewhat at the two call sites, which otherwise both have to independently update link_info fields to turn off auto negotiation advertisements.
Also use the appropriate REQ_FORCE_LINK_SPEED definitions. These happen to have the same values, but req_link_speed is utilimately passed as force_link_speed in HWRM_PORT_PHY_CFG which is not defined in terms of REQ_AUTO_LINK_SPEED.
--- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +24 -23
@@ -1636,55 +1636,63 @@ static int bnxt_get_link_ksettings(struct net_device *dev,return 0 ; } -static u32 bnxt_get_fw_speed (struct net_device *dev,u32 ethtool_speed) +static int bnxt_force_link_speed (struct net_device *dev,u32 ethtool_speed) {struct bnxt *bp =netdev_priv (dev);struct bnxt_link_info *link_info = &bp->link_info;u16 support_spds = link_info->support_speeds; -u32 fw_speed =0 ; +u16 fw_speed =0 ;switch (ethtool_speed) {case SPEED_100 :if (support_spds &BNXT_LINK_SPEED_MSK_100MB ) - fw_speed =PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_100MB ; + fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_100MB ;break ;case SPEED_1000 :if (support_spds &BNXT_LINK_SPEED_MSK_1GB ) - fw_speed =PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_1GB ; + fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_1GB ;break ;case SPEED_2500 :if (support_spds &BNXT_LINK_SPEED_MSK_2_5GB ) - fw_speed =PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_2_5GB ; + fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_2_5GB ;break ;case SPEED_10000 :if (support_spds &BNXT_LINK_SPEED_MSK_10GB ) - fw_speed =PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_10GB ; + fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_10GB ;break ;case SPEED_20000 :if (support_spds &BNXT_LINK_SPEED_MSK_20GB ) - fw_speed =PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_20GB ; + fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_20GB ;break ;case SPEED_25000 :if (support_spds &BNXT_LINK_SPEED_MSK_25GB ) - fw_speed =PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_25GB ; + fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_25GB ;break ;case SPEED_40000 :if (support_spds &BNXT_LINK_SPEED_MSK_40GB ) - fw_speed =PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_40GB ; + fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_40GB ;break ;case SPEED_50000 :if (support_spds &BNXT_LINK_SPEED_MSK_50GB ) - fw_speed =PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_50GB ; + fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_50GB ;break ;case SPEED_100000 :if (support_spds &BNXT_LINK_SPEED_MSK_100GB ) - fw_speed =PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_100GB ; + fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_100GB ;break ; -default : + } + +if (!fw_speed) {netdev_err (dev,"unsupported speed!\n" ); -break ; +return -EINVAL ; } -return fw_speed; + + link_info->req_link_speed = fw_speed; + link_info->req_duplex =BNXT_LINK_DUPLEX_FULL ; + link_info->autoneg =0 ; + link_info->advertising =0 ; + +return 0 ; }u16 bnxt_get_fw_auto_link_speeds (u32 advertising)
@@ -1737,7 +1745,6 @@ static int bnxt_set_link_ksettings(struct net_device *dev,*/ set_pause = true; }else { -u16 fw_speed;u8 phy_type = link_info->phy_type; if (phy_type == PORT_PHY_QCFG_RESP_PHY_TYPE_BASET ||
@@ -1753,15 +1760,9 @@ static int bnxt_set_link_ksettings(struct net_device *dev, goto set_setting_exit; } speed = base->speed; - fw_speed =bnxt_get_fw_speed (dev, speed); -if (!fw_speed) { - rc = -EINVAL ; + rc =bnxt_force_link_speed (dev, speed); +if (rc) goto set_setting_exit; - } - link_info->req_link_speed = fw_speed; - link_info->req_duplex =BNXT_LINK_DUPLEX_FULL ; - link_info->autoneg =0 ; - link_info->advertising =0 ; }if (netif_running (dev))
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 1/11 bnxt_en: Update firmware interface spec to 1.10.1.65.
In reply to Michael ChanThe main changes include FEC, ECN statistics, HWRM_PORT_PHY_QCFG response size reduction, and a new counter added to ctx_hw_stats_ext struct to support the new 58818 chip.
The ctx_hw_stats_ext structure is now the superset supporting the new 58818 chips and the prior P5 chips. Add a new flag to identify the new chip and use constants for the chip specific ring statistics sizes instead of the size of the structure.
Because the HWRM_PORT_PHY_QCFG response structure size has shrunk back to 96 bytes, the workaround added earlier to limit the size of this message for forwarding to the VF can be removed.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 16 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 71 ++-- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 10 +- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 375 +++++++++++++++--- .../net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 +- 5 files changed, 361 insertions(+), 113 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +11 -5
@@ -5343,13 +5343,16 @@ static int bnxt_hwrm_vnic_qcaps(struct bnxt *bp)* VLAN_STRIP_CAP properly. */ if ((flags &VNIC_QCAPS_RESP_FLAGS_VLAN_STRIP_CAP ) || - ((bp->flags &BNXT_FLAG_CHIP_P5 ) && + (BNXT_CHIP_P5_THOR (bp) && !(bp->fw_cap &BNXT_FW_CAP_EXT_HW_STATS_SUPPORTED ))) bp->fw_cap |=BNXT_FW_CAP_VLAN_RX_STRIP ; bp->max_tpa_v2 =le16_to_cpu (resp->max_aggs_supported); -if (bp->max_tpa_v2) - bp->hw_ring_stats_size = -sizeof (struct ctx_hw_stats_ext ); +if (bp->max_tpa_v2) { +if (BNXT_CHIP_P5_THOR (bp)) + bp->hw_ring_stats_size =BNXT_RING_STATS_SIZE_P5 ; +else + bp->hw_ring_stats_size =BNXT_RING_STATS_SIZE_P5_SR2 ; + } }mutex_unlock (&bp->hwrm_cmd_lock);return rc;
@@ -12233,8 +12236,11 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)if (rc) goto init_err_pci_clean; -if (BNXT_CHIP_P5 (bp)) +if (BNXT_CHIP_P5 (bp)) { bp->flags |=BNXT_FLAG_CHIP_P5 ; +if (BNXT_CHIP_SR2 (bp)) + bp->flags |=BNXT_FLAG_CHIP_SR2 ; + } rc =bnxt_alloc_rss_indir_tbl (bp);if (rc)
drivers/net/ethernet/broadcom/bnxt/bnxt.h +25 -46
105 lines not on this page · raw message
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +7 -3
@@ -172,6 +172,7 @@ static const char * const bnxt_ring_tpa2_stats_str[] = {"rx_tpa_pkt" ,"rx_tpa_bytes" ,"rx_tpa_errors" , + "rx_tpa_events", }; static const char * const bnxt_rx_sw_stats_str[] = {
@@ -462,9 +463,12 @@ static const struct {static int bnxt_get_num_tpa_ring_stats (struct bnxt *bp) {if (BNXT_SUPPORTS_TPA (bp)) { -if (bp->max_tpa_v2) -return ARRAY_SIZE (bnxt_ring_tpa2_stats_str); -return ARRAY_SIZE (bnxt_ring_tpa_stats_str); +if (bp->max_tpa_v2) { +if (BNXT_CHIP_P5_THOR (bp)) +return BNXT_NUM_TPA_RING_STATS_P5 ; +return BNXT_NUM_TPA_RING_STATS_P5_SR2 ; + } +return BNXT_NUM_TPA_RING_STATS ; }return 0 ; }
drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h +317 -58
586 lines not on this page · raw message
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +1 -1
@@ -1029,7 +1029,7 @@ static int bnxt_vf_set_link(struct bnxt *bp, struct bnxt_vf_info *vf) rc =bnxt_hwrm_exec_fwd_resp ( bp, vf,sizeof (struct hwrm_port_phy_qcfg_input )); }else { -struct hwrm_port_phy_qcfg_output_compat phy_qcfg_resp = {0 }; +struct hwrm_port_phy_qcfg_output phy_qcfg_resp = {0 };struct hwrm_port_phy_qcfg_input *phy_qcfg_req; phy_qcfg_req =
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 4/11 bnxt_en: add basic infrastructure to support PAM4 link speeds
In reply to Michael ChanFrom: Edwin Peer <[email protected]>
The firmware interface has added support for new link speeds using PAM4 modulation. Expand the bnxt_link_info structure to closely mirror the new firmware structures. Add logic to copy the PAM4 capabilities and settings from the firmware.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 74 ++++++++++++++++------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 12 ++++ 2 files changed, 65 insertions(+), 21 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +53 -21
@@ -8827,6 +8827,9 @@ static int bnxt_hwrm_phy_qcaps(struct bnxt *bp)if (resp->supported_speeds_auto_mode) link_info->support_auto_speeds =le16_to_cpu (resp->supported_speeds_auto_mode); +if (resp->supported_pam4_speeds_auto_mode) + link_info->support_pam4_auto_speeds = +le16_to_cpu (resp->supported_pam4_speeds_auto_mode); bp->port_count = resp->port_cnt;
@@ -8849,6 +8852,7 @@ static int bnxt_update_link(struct bnxt *bp, bool chng_link_state)struct hwrm_port_phy_qcfg_input req = {0 };struct hwrm_port_phy_qcfg_output *resp = bp->hwrm_cmd_resp_addr;u8 link_up = link_info->link_up; +bool support_changed = false;bnxt_hwrm_cmd_hdr_init (bp, &req,HWRM_PORT_PHY_QCFG ,-1 ,-1 );
@@ -8875,10 +8879,17 @@ static int bnxt_update_link(struct bnxt *bp, bool chng_link_state)else link_info->link_speed =0 ; link_info->force_link_speed =le16_to_cpu (resp->force_link_speed); + link_info->force_pam4_link_speed = +le16_to_cpu (resp->force_pam4_link_speed); link_info->support_speeds =le16_to_cpu (resp->support_speeds); + link_info->support_pam4_speeds =le16_to_cpu (resp->support_pam4_speeds); link_info->auto_link_speeds =le16_to_cpu (resp->auto_link_speed_mask); + link_info->auto_pam4_link_speeds = +le16_to_cpu (resp->auto_pam4_link_speed_mask); link_info->lp_auto_link_speeds =le16_to_cpu (resp->link_partner_adv_speeds); + link_info->lp_auto_pam4_link_speeds = + resp->link_partner_pam4_adv_speeds; link_info->preemphasis =le32_to_cpu (resp->preemphasis); link_info->phy_ver[0 ] = resp->phy_maj; link_info->phy_ver[1 ] = resp->phy_min;
@@ -8953,9 +8964,15 @@ static int bnxt_update_link(struct bnxt *bp, bool chng_link_state)if (bnxt_support_dropped (link_info->advertising, link_info->support_auto_speeds)) { link_info->advertising = link_info->support_auto_speeds; -if (link_info->autoneg &BNXT_AUTONEG_SPEED ) -bnxt_hwrm_set_link_setting (bp, true, false); + support_changed = true; } +if (bnxt_support_dropped (link_info->advertising_pam4, + link_info->support_pam4_auto_speeds)) { + link_info->advertising_pam4 = link_info->support_pam4_auto_speeds; + support_changed = true; + } +if (support_changed && (link_info->autoneg &BNXT_AUTONEG_SPEED )) +bnxt_hwrm_set_link_setting (bp, true, false);return 0 ; }
@@ -9014,27 +9031,30 @@ bnxt_hwrm_set_pause_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req) } } -static void bnxt_hwrm_set_link_common (struct bnxt *bp, -struct hwrm_port_phy_cfg_input *req) +static void bnxt_hwrm_set_link_common (struct bnxt *bp,struct hwrm_port_phy_cfg_input *req) { -u8 autoneg = bp->link_info.autoneg; -u16 fw_link_speed = bp->link_info.req_link_speed; -u16 advertising = bp->link_info.advertising; - -if (autoneg &BNXT_AUTONEG_SPEED ) { - req->auto_mode |= -PORT_PHY_CFG_REQ_AUTO_MODE_SPEED_MASK ; - - req->enables |=cpu_to_le32 ( -PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED_MASK ); - req->auto_link_speed_mask =cpu_to_le16 (advertising); - +if (bp->link_info.autoneg &BNXT_AUTONEG_SPEED ) { + req->auto_mode |=PORT_PHY_CFG_REQ_AUTO_MODE_SPEED_MASK ; +if (bp->link_info.advertising) { + req->enables |=cpu_to_le32 (PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED_MASK ); + req->auto_link_speed_mask =cpu_to_le16 (bp->link_info.advertising); + } +if (bp->link_info.advertising_pam4) { + req->enables |= +cpu_to_le32 (PORT_PHY_CFG_REQ_ENABLES_AUTO_PAM4_LINK_SPEED_MASK ); + req->auto_link_pam4_speed_mask = +cpu_to_le16 (bp->link_info.advertising_pam4); + } req->enables |=cpu_to_le32 (PORT_PHY_CFG_REQ_ENABLES_AUTO_MODE ); - req->flags |= -cpu_to_le32 (PORT_PHY_CFG_REQ_FLAGS_RESTART_AUTONEG ); + req->flags |=cpu_to_le32 (PORT_PHY_CFG_REQ_FLAGS_RESTART_AUTONEG ); }else { - req->force_link_speed =cpu_to_le16 (fw_link_speed); req->flags |=cpu_to_le32 (PORT_PHY_CFG_REQ_FLAGS_FORCE ); +if (bp->link_info.req_signal_mode ==BNXT_SIG_MODE_PAM4 ) { + req->force_pam4_link_speed =cpu_to_le16 (bp->link_info.req_link_speed); + req->enables |=cpu_to_le32 (PORT_PHY_CFG_REQ_ENABLES_FORCE_PAM4_LINK_SPEED ); + }else { + req->force_link_speed =cpu_to_le16 (bp->link_info.req_link_speed); + } }/* tell chimp that the setting takes effect immediately */
@@ -9430,14 +9450,19 @@ static int bnxt_update_phy_setting(struct bnxt *bp)if (!(link_info->autoneg &BNXT_AUTONEG_SPEED )) {if (BNXT_AUTO_MODE (link_info->auto_mode)) update_link = true; -if (link_info->req_link_speed != link_info->force_link_speed) +if (link_info->req_signal_mode ==BNXT_SIG_MODE_NRZ && + link_info->req_link_speed != link_info->force_link_speed) + update_link = true; +else if (link_info->req_signal_mode ==BNXT_SIG_MODE_PAM4 && + link_info->req_link_speed != link_info->force_pam4_link_speed) update_link = true;if (link_info->req_duplex != link_info->duplex_setting) update_link = true; }else {if (link_info->auto_mode ==BNXT_LINK_AUTO_NONE ) update_link = true; -if (link_info->advertising != link_info->auto_link_speeds) +if (link_info->advertising != link_info->auto_link_speeds || + link_info->advertising_pam4 != link_info->auto_pam4_link_speeds) update_link = true; }
@@ -10697,8 +10722,15 @@ static void bnxt_init_ethtool_link_settings(struct bnxt *bp) link_info->autoneg |=BNXT_AUTONEG_FLOW_CTRL ; } link_info->advertising = link_info->auto_link_speeds; + link_info->advertising_pam4 = link_info->auto_pam4_link_speeds; }else { link_info->req_link_speed = link_info->force_link_speed; + link_info->req_signal_mode =BNXT_SIG_MODE_NRZ ; +if (link_info->force_pam4_link_speed) { + link_info->req_link_speed = + link_info->force_pam4_link_speed; + link_info->req_signal_mode =BNXT_SIG_MODE_PAM4 ; + } link_info->req_duplex = link_info->duplex_setting; }if (link_info->autoneg &BNXT_AUTONEG_FLOW_CTRL )
drivers/net/ethernet/broadcom/bnxt/bnxt.h +12 -0
@@ -1188,6 +1188,7 @@ struct bnxt_link_info {#define BNXT_LINK_SPEED_50GB PORT_PHY_QCFG_RESP_LINK_SPEED_50GB#define BNXT_LINK_SPEED_100GB PORT_PHY_QCFG_RESP_LINK_SPEED_100GBu16 support_speeds; +u16 support_pam4_speeds;u16 auto_link_speeds;/* fw adv setting */ #define BNXT_LINK_SPEED_MSK_100MB PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_100MB#define BNXT_LINK_SPEED_MSK_1GB PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_1GB
@@ -1199,9 +1200,16 @@ struct bnxt_link_info {#define BNXT_LINK_SPEED_MSK_40GB PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_40GB#define BNXT_LINK_SPEED_MSK_50GB PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_50GB#define BNXT_LINK_SPEED_MSK_100GB PORT_PHY_QCFG_RESP_SUPPORT_SPEEDS_100GB +u16 auto_pam4_link_speeds; +#define BNXT_LINK_PAM4_SPEED_MSK_50GB PORT_PHY_QCFG_RESP_SUPPORT_PAM4_SPEEDS_50G +#define BNXT_LINK_PAM4_SPEED_MSK_100GB PORT_PHY_QCFG_RESP_SUPPORT_PAM4_SPEEDS_100G +#define BNXT_LINK_PAM4_SPEED_MSK_200GB PORT_PHY_QCFG_RESP_SUPPORT_PAM4_SPEEDS_200Gu16 support_auto_speeds; +u16 support_pam4_auto_speeds;u16 lp_auto_link_speeds; +u16 lp_auto_pam4_link_speeds;u16 force_link_speed; +u16 force_pam4_link_speed;u32 preemphasis;u8 module_status;u16 fec_cfg;
@@ -1213,10 +1221,14 @@ struct bnxt_link_info {u8 autoneg;#define BNXT_AUTONEG_SPEED 1#define BNXT_AUTONEG_FLOW_CTRL 2 +u8 req_signal_mode; +#define BNXT_SIG_MODE_NRZ PORT_PHY_QCFG_RESP_SIGNAL_MODE_NRZ +#define BNXT_SIG_MODE_PAM4 PORT_PHY_QCFG_RESP_SIGNAL_MODE_PAM4u8 req_duplex;u8 req_flow_ctrl;u16 req_link_speed;u16 advertising;/* user adv setting */ +u16 advertising_pam4;bool force_link_chng;bool phy_retry;
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 5/11 bnxt_en: ethtool: support PAM4 link speeds up to 200G
In reply to Michael ChanFrom: Edwin Peer <[email protected]>
Add ethtool PAM4 link modes for:
50000baseCR_Full
100000baseCR2_Full
200000baseCR4_Full--- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 71 ++++++++++++++++--- 1 file changed, 63 insertions(+), 8 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +63 -8
@@ -1507,6 +1507,32 @@ u32 _bnxt_fw_to_ethtool_adv_spds(u16 fw_speeds, u8 fw_pause) (fw_speeds) |=BNXT_LINK_SPEED_MSK_100GB ; \ } +#define BNXT_FW_TO_ETHTOOL_PAM4_SPDS (fw_speeds, lk_ksettings, name) \ +{ \ + if ((fw_speeds) & BNXT_LINK_PAM4_SPEED_MSK_50GB) \ + ethtool_link_ksettings_add_link_mode(lk_ksettings, name,\ + 50000baseCR_Full); \ + if ((fw_speeds) & BNXT_LINK_PAM4_SPEED_MSK_100GB) \ + ethtool_link_ksettings_add_link_mode(lk_ksettings, name,\ + 100000baseCR2_Full);\ + if ((fw_speeds) & BNXT_LINK_PAM4_SPEED_MSK_200GB) \ + ethtool_link_ksettings_add_link_mode(lk_ksettings, name,\ + 200000baseCR4_Full);\ +} + +#define BNXT_ETHTOOL_TO_FW_PAM4_SPDS (fw_speeds, lk_ksettings, name) \ +{ \ + if (ethtool_link_ksettings_test_link_mode(lk_ksettings, name, \ + 50000baseCR_Full)) \ + (fw_speeds) |= BNXT_LINK_PAM4_SPEED_MSK_50GB; \ + if (ethtool_link_ksettings_test_link_mode(lk_ksettings, name, \ + 100000baseCR2_Full)) \ + (fw_speeds) |= BNXT_LINK_PAM4_SPEED_MSK_100GB; \ + if (ethtool_link_ksettings_test_link_mode(lk_ksettings, name, \ + 200000baseCR4_Full)) \ + (fw_speeds) |= BNXT_LINK_PAM4_SPEED_MSK_200GB; \ +} +static void bnxt_fw_to_ethtool_advertised_spds (struct bnxt_link_info *link_info,struct ethtool_link_ksettings *lk_ksettings) {
@@ -1517,6 +1543,8 @@ static void bnxt_fw_to_ethtool_advertised_spds(struct bnxt_link_info *link_info, fw_pause = link_info->auto_pause_setting;BNXT_FW_TO_ETHTOOL_SPDS (fw_speeds, fw_pause, lk_ksettings, advertising); + fw_speeds = link_info->advertising_pam4; +BNXT_FW_TO_ETHTOOL_PAM4_SPDS (fw_speeds, lk_ksettings, advertising); } static void bnxt_fw_to_ethtool_lp_adv(struct bnxt_link_info *link_info,
@@ -1530,6 +1558,8 @@ static void bnxt_fw_to_ethtool_lp_adv(struct bnxt_link_info *link_info,BNXT_FW_TO_ETHTOOL_SPDS (fw_speeds, fw_pause, lk_ksettings, lp_advertising); + fw_speeds = link_info->lp_auto_pam4_link_speeds; +BNXT_FW_TO_ETHTOOL_PAM4_SPDS (fw_speeds, lk_ksettings, lp_advertising); } static void bnxt_fw_to_ethtool_support_spds(struct bnxt_link_info *link_info,
@@ -1538,12 +1568,15 @@ static void bnxt_fw_to_ethtool_support_spds(struct bnxt_link_info *link_info,u16 fw_speeds = link_info->support_speeds;BNXT_FW_TO_ETHTOOL_SPDS (fw_speeds,0 , lk_ksettings, supported); + fw_speeds = link_info->support_pam4_speeds; +BNXT_FW_TO_ETHTOOL_PAM4_SPDS (fw_speeds, lk_ksettings, supported);ethtool_link_ksettings_add_link_mode (lk_ksettings, supported, Pause);ethtool_link_ksettings_add_link_mode (lk_ksettings, supported, Asym_Pause); -if (link_info->support_auto_speeds) +if (link_info->support_auto_speeds || + link_info->support_pam4_auto_speeds)ethtool_link_ksettings_add_link_mode (lk_ksettings, supported, Autoneg); }
@@ -1640,7 +1673,9 @@ static int bnxt_force_link_speed(struct net_device *dev, u32 ethtool_speed) {struct bnxt *bp =netdev_priv (dev);struct bnxt_link_info *link_info = &bp->link_info; +u16 support_pam4_spds = link_info->support_pam4_speeds;u16 support_spds = link_info->support_speeds; +u8 sig_mode =BNXT_SIG_MODE_NRZ ;u16 fw_speed =0 ;switch (ethtool_speed) {
@@ -1673,12 +1708,26 @@ static int bnxt_force_link_speed(struct net_device *dev, u32 ethtool_speed) fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_40GB ;break ;case SPEED_50000 : -if (support_spds &BNXT_LINK_SPEED_MSK_50GB ) +if (support_spds &BNXT_LINK_SPEED_MSK_50GB ) { fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_50GB ; + }else if (support_pam4_spds &BNXT_LINK_PAM4_SPEED_MSK_50GB ) { + fw_speed =PORT_PHY_CFG_REQ_FORCE_PAM4_LINK_SPEED_50GB ; + sig_mode =BNXT_SIG_MODE_PAM4 ; + }break ;case SPEED_100000 : -if (support_spds &BNXT_LINK_SPEED_MSK_100GB ) +if (support_spds &BNXT_LINK_SPEED_MSK_100GB ) { fw_speed =PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_100GB ; + }else if (support_pam4_spds &BNXT_LINK_PAM4_SPEED_MSK_100GB ) { + fw_speed =PORT_PHY_CFG_REQ_FORCE_PAM4_LINK_SPEED_100GB ; + sig_mode =BNXT_SIG_MODE_PAM4 ; + } +break ; +case SPEED_200000 : +if (support_pam4_spds &BNXT_LINK_PAM4_SPEED_MSK_200GB ) { + fw_speed =PORT_PHY_CFG_REQ_FORCE_PAM4_LINK_SPEED_200GB ; + sig_mode =BNXT_SIG_MODE_PAM4 ; + }break ; }
@@ -1688,9 +1737,11 @@ static int bnxt_force_link_speed(struct net_device *dev, u32 ethtool_speed) } link_info->req_link_speed = fw_speed; + link_info->req_signal_mode = sig_mode; link_info->req_duplex =BNXT_LINK_DUPLEX_FULL ; link_info->autoneg =0 ; link_info->advertising =0 ; + link_info->advertising_pam4 =0 ;return 0 ; }
@@ -1724,7 +1775,6 @@ static int bnxt_set_link_ksettings(struct net_device *dev,struct bnxt_link_info *link_info = &bp->link_info;const struct ethtool_link_settings *base = &lk_ksettings->base;bool set_pause = false; -u16 fw_advertising =0 ;u32 speed;int rc =0 ;
@@ -1733,13 +1783,18 @@ static int bnxt_set_link_ksettings(struct net_device *dev,mutex_lock (&bp->link_lock);if (base->autoneg ==AUTONEG_ENABLE ) { -BNXT_ETHTOOL_TO_FW_SPDS (fw_advertising, lk_ksettings, + link_info->advertising =0 ; + link_info->advertising_pam4 =0 ; +BNXT_ETHTOOL_TO_FW_SPDS (link_info->advertising, lk_ksettings, advertising); +BNXT_ETHTOOL_TO_FW_PAM4_SPDS (link_info->advertising_pam4, + lk_ksettings, advertising); link_info->autoneg |=BNXT_AUTONEG_SPEED ; -if (!fw_advertising) +if (!link_info->advertising && !link_info->advertising_pam4) { link_info->advertising = link_info->support_auto_speeds; -else - link_info->advertising = fw_advertising; + link_info->advertising_pam4 = + link_info->support_pam4_auto_speeds; + }/* any change to autoneg will cause link change, therefore the * driver should put back the original pause setting in autoneg */
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 11/11 bnxt_en: Improve preset max value for ethtool -l.
In reply to Michael ChanThe current logic that calculates the preset maximum value for combined channel does not take into account the rings used for XDP and mqprio TCs. Each of these features will reduce the number of TX rings. Add the logic to divide the TX rings accordingly based on whether the device is currently in XDP mode and whether TCs are in use.
--- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +7 -2
@@ -801,7 +801,7 @@ static void bnxt_get_channels(struct net_device *dev,struct bnxt *bp =netdev_priv (dev);struct bnxt_hw_resc *hw_resc = &bp->hw_resc;int max_rx_rings, max_tx_rings, tcs; -int max_tx_sch_inputs; +int max_tx_sch_inputs, tx_grps;/* Get the most up-to-date max_tx_sch_inputs. */ if (netif_running (dev) &&BNXT_NEW_RM (bp))
@@ -811,6 +811,12 @@ static void bnxt_get_channels(struct net_device *dev,bnxt_get_max_rings (bp, &max_rx_rings, &max_tx_rings, true);if (max_tx_sch_inputs) max_tx_rings =min_t (int, max_tx_rings, max_tx_sch_inputs); + + tcs =netdev_get_num_tc (dev); + tx_grps =max (tcs,1 ); +if (bp->tx_nr_rings_xdp) + tx_grps++; + max_tx_rings /= tx_grps; channel->max_combined =min_t (int, max_rx_rings, max_tx_rings);if (bnxt_get_max_rings (bp, &max_rx_rings, &max_tx_rings, false)) {
@@ -820,7 +826,6 @@ static void bnxt_get_channels(struct net_device *dev,if (max_tx_sch_inputs) max_tx_rings =min_t (int, max_tx_rings, max_tx_sch_inputs); - tcs =netdev_get_num_tc (dev);if (tcs >1 ) max_tx_rings /= tcs;
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 10/11 bnxt_en: Implement ethtool set_fec_param() method.
In reply to Michael ChanThis feature allows the user to set the different FEC modes on the NIC port. Any new setting will take effect immediately after a link toggle.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 44 +++++++++++++ .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 62 +++++++++++++++++++ 3 files changed, 107 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +1 -1
@@ -8890,7 +8890,7 @@ static bool bnxt_support_dropped(u16 advertising, u16 supported)return ((supported | diff) != supported); } -static int bnxt_update_link (struct bnxt *bp,bool chng_link_state) +int bnxt_update_link (struct bnxt *bp,bool chng_link_state) {int rc =0 ;struct bnxt_link_info *link_info = &bp->link_info;
drivers/net/ethernet/broadcom/bnxt/bnxt.h +44 -0
56 lines not on this page · raw message
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +62 -0
74 lines not on this page · raw message
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 7/11 bnxt_en: avoid link reset if speed is not changed
In reply to Michael ChanFrom: Edwin Peer <[email protected]>
PORT_PHY_CONFIG is always sent with REQ_FLAGS_RESET_PHY set. This flag must be set in order for the firmware to institute the requested PHY change immediately, but it results in a link flap. This is unnecessary and results in an improved user experience if the PHY reconfiguration is avoided when the user requested speed does not constitute a change.
--- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +9 -1
@@ -1736,6 +1736,11 @@ static int bnxt_force_link_speed(struct net_device *dev, u32 ethtool_speed)return -EINVAL ; } +if (link_info->req_link_speed == fw_speed && + link_info->req_signal_mode == sig_mode && + link_info->autoneg ==0 ) +return -EALREADY ; + link_info->req_link_speed = fw_speed; link_info->req_signal_mode = sig_mode; link_info->req_duplex =BNXT_LINK_DUPLEX_FULL ;
@@ -1816,8 +1821,11 @@ static int bnxt_set_link_ksettings(struct net_device *dev, } speed = base->speed; rc =bnxt_force_link_speed (dev, speed); -if (rc) +if (rc) { +if (rc == -EALREADY ) + rc =0 ; goto set_setting_exit; + } }if (netif_running (dev))
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 9/11 bnxt_en: Report Active FEC encoding during link up.
In reply to Michael ChanThe current code is reporting the FEC configured settings during link up. Change it to report the more useful active FEC encoding that may be negotiated or auto detected.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 29 ++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +26 -3
@@ -8737,6 +8737,30 @@ void bnxt_tx_enable(struct bnxt *bp)netif_carrier_on (bp->dev); } +static char *bnxt_report_fec (struct bnxt_link_info *link_info) +{ +u8 active_fec = link_info->active_fec_sig_mode & +PORT_PHY_QCFG_RESP_ACTIVE_FEC_MASK ; + +switch (active_fec) { +default : +case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_NONE_ACTIVE : +return "None" ; +case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_CLAUSE74_ACTIVE : +return "Clause 74 BaseR" ; +case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_CLAUSE91_ACTIVE : +return "Clause 91 RS(528,514)" ; +case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_RS544_1XN_ACTIVE : +return "Clause 91 RS544_1XN" ; +case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_RS544_IEEE_ACTIVE : +return "Clause 91 RS(544,514)" ; +case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_RS272_1XN_ACTIVE : +return "Clause 91 RS272_1XN" ; +case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_RS272_IEEE_ACTIVE : +return "Clause 91 RS(272,257)" ; + } +} +static void bnxt_report_link (struct bnxt *bp) {if (bp->link_info.link_up) {
@@ -8767,10 +8791,9 @@ static void bnxt_report_link(struct bnxt *bp) "not active"); fec = bp->link_info.fec_cfg;if (!(fec &PORT_PHY_QCFG_RESP_FEC_CFG_FEC_NONE_SUPPORTED )) -netdev_info (bp->dev,"FEC autoneg %s encodings: %s\n" , +netdev_info (bp->dev,"FEC autoneg %s encoding: %s\n" , (fec &BNXT_FEC_AUTONEG ) ?"on" :"off" , - (fec &BNXT_FEC_ENC_BASE_R ) ?"BaseR" : - (fec &BNXT_FEC_ENC_RS ) ?"RS" :"None" ); +bnxt_report_fec (&bp->link_info)); }else {netif_carrier_off (bp->dev);netdev_err (bp->dev,"NIC Link is Down\n" );
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 8/11 bnxt_en: Report FEC settings to ethtool.
In reply to Michael ChanImplement .get_fecparam() method to report the configured and active FEC settings. Also report the supported and advertised FEC settings to the .get_link_ksettings() method.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 18 +++- .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 89 +++++++++++++++++++ 3 files changed, 109 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +3 -2
@@ -8960,9 +8960,10 @@ static int bnxt_update_link(struct bnxt *bp, bool chng_link_state) } link_info->fec_cfg =PORT_PHY_QCFG_RESP_FEC_CFG_FEC_NONE_SUPPORTED ; -if (bp->hwrm_spec_code >=0x10504 ) +if (bp->hwrm_spec_code >=0x10504 ) { link_info->fec_cfg =le16_to_cpu (resp->fec_cfg); - + link_info->active_fec_sig_mode = resp->active_fec_signal_mode; + }/* TODO: need to add more logic to report VF link */ if (chng_link_state) {if (link_info->phy_link_status ==BNXT_LINK_LINK )
drivers/net/ethernet/broadcom/bnxt/bnxt.h +17 -1
@@ -1215,10 +1215,26 @@ struct bnxt_link_info {u16 force_pam4_link_speed;u32 preemphasis;u8 module_status; +u8 active_fec_sig_mode;u16 fec_cfg; +#define BNXT_FEC_NONE PORT_PHY_QCFG_RESP_FEC_CFG_FEC_NONE_SUPPORTED +#define BNXT_FEC_AUTONEG_CAP PORT_PHY_QCFG_RESP_FEC_CFG_FEC_AUTONEG_SUPPORTED#define BNXT_FEC_AUTONEG PORT_PHY_QCFG_RESP_FEC_CFG_FEC_AUTONEG_ENABLED +#define BNXT_FEC_ENC_BASE_R_CAP \ + PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE74_SUPPORTED#define BNXT_FEC_ENC_BASE_R PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE74_ENABLED -#define BNXT_FEC_ENC_RS PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE91_ENABLED +#define BNXT_FEC_ENC_RS_CAP \ + PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE91_SUPPORTED +#define BNXT_FEC_ENC_LLRS_CAP \ + (PORT_PHY_QCFG_RESP_FEC_CFG_FEC_RS272_1XN_SUPPORTED | \ + PORT_PHY_QCFG_RESP_FEC_CFG_FEC_RS272_IEEE_SUPPORTED) +#define BNXT_FEC_ENC_RS \ + (PORT_PHY_QCFG_RESP_FEC_CFG_FEC_CLAUSE91_ENABLED | \ + PORT_PHY_QCFG_RESP_FEC_CFG_FEC_RS544_1XN_ENABLED | \ + PORT_PHY_QCFG_RESP_FEC_CFG_FEC_RS544_IEEE_ENABLED) +#define BNXT_FEC_ENC_LLRS \ + (PORT_PHY_QCFG_RESP_FEC_CFG_FEC_RS272_1XN_ENABLED | \ + PORT_PHY_QCFG_RESP_FEC_CFG_FEC_RS272_IEEE_ENABLED)/* copy of requested setting from ethtool cmd */ u8 autoneg;
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +89 -0
131 lines not on this page · raw message
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 6/11 bnxt_en: Handle ethernet link being disabled by firmware.
In reply to Michael ChanOn some 200G dual port NICs, if one port is configured to 200G, firmware will disable the ethernet link on the other port. Firmware will send notification to the driver for the disabled port when this happens. Define a new field in the link_info structure to keep track of this state. The new phy_state field replaces the unused loop_back field.
Log a message when the phy_state changes state. In the disabled state, disallow any PHY configurations on the disabled port as the firmware will fail all calls to configure the PHY in this state.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 22 ++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt.h | 10 +++++++--- 2 files changed, 29 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +22 -0
@@ -8777,6 +8777,16 @@ static void bnxt_report_link(struct bnxt *bp) } } +static bool bnxt_phy_qcaps_no_speed (struct hwrm_port_phy_qcaps_output *resp) +{ +if (!resp->supported_speeds_auto_mode && + !resp->supported_speeds_force_mode && + !resp->supported_pam4_speeds_auto_mode && + !resp->supported_pam4_speeds_force_mode) +return true; +return false; +} +static int bnxt_hwrm_phy_qcaps (struct bnxt *bp) {int rc =0 ;
@@ -8824,6 +8834,18 @@ static int bnxt_hwrm_phy_qcaps(struct bnxt *bp)if (resp->flags &PORT_PHY_QCAPS_RESP_FLAGS_CUMULATIVE_COUNTERS_ON_RESET ) bp->fw_cap |=BNXT_FW_CAP_PORT_STATS_NO_RESET ; +if (bp->hwrm_spec_code >=0x10a01 ) { +if (bnxt_phy_qcaps_no_speed (resp)) { + link_info->phy_state =BNXT_PHY_STATE_DISABLED ; +netdev_warn (bp->dev,"Ethernet link disabled\n" ); + }else if (link_info->phy_state ==BNXT_PHY_STATE_DISABLED ) { + link_info->phy_state =BNXT_PHY_STATE_ENABLED ; +netdev_info (bp->dev,"Ethernet link enabled\n" ); +/* Phy re-enabled, reprobe the speeds */ + link_info->support_auto_speeds =0 ; + link_info->support_pam4_auto_speeds =0 ; + } + }if (resp->supported_speeds_auto_mode) link_info->support_auto_speeds =le16_to_cpu (resp->supported_speeds_auto_mode);
drivers/net/ethernet/broadcom/bnxt/bnxt.h +7 -3
@@ -1152,7 +1152,10 @@ struct bnxt_link_info {#define BNXT_LINK_SIGNAL PORT_PHY_QCFG_RESP_LINK_SIGNAL#define BNXT_LINK_LINK PORT_PHY_QCFG_RESP_LINK_LINKu8 wire_speed; -u8 loop_back; +u8 phy_state; +#define BNXT_PHY_STATE_ENABLED 0 +#define BNXT_PHY_STATE_DISABLED 1 +u8 link_up;u8 duplex;#define BNXT_LINK_DUPLEX_HALF PORT_PHY_QCFG_RESP_DUPLEX_STATE_HALF
@@ -1601,8 +1604,9 @@ struct bnxt {#define BNXT_NPAR (bp) ((bp)->port_partition_type)#define BNXT_MH (bp) ((bp)->flags & BNXT_FLAG_MULTI_HOST)#define BNXT_SINGLE_PF (bp) (BNXT_PF(bp) && !BNXT_NPAR(bp) && !BNXT_MH(bp)) -#define BNXT_PHY_CFG_ABLE (bp) (BNXT_SINGLE_PF(bp) || \ - ((bp)->fw_cap & BNXT_FW_CAP_SHARED_PORT_CFG)) +#define BNXT_PHY_CFG_ABLE (bp) ((BNXT_SINGLE_PF(bp) || \ + ((bp)->fw_cap & BNXT_FW_CAP_SHARED_PORT_CFG)) && \ + (bp)->link_info.phy_state == BNXT_PHY_STATE_ENABLED)#define BNXT_CHIP_TYPE_NITRO_A0 (bp) ((bp)->flags & BNXT_FLAG_CHIP_NITRO_A0)#define BNXT_RX_PAGE_MODE (bp) ((bp)->flags & BNXT_FLAG_RX_PAGE_MODE)#define BNXT_SUPPORTS_TPA (bp) (!BNXT_CHIP_TYPE_NITRO_A0(bp) && \
Signature · 1 line
2.18.1
David Miller
maintainerFrom: Michael Chan <[email protected]>
Date: Sun, 27 Sep 2020 13:42:09 -0400
Quoted 5 lines
This patch series adds 2 main features to the
bnxt_endriver: 200G link speed support and FEC support with some refactoring of the link speed logic. The firmware interface is updated to have proper support for these 2 features. The ethtool preset max channel value is also adjusted properly to account for XDP and TCs.
Series applied, thanks Michael.