@@ -4557,6 +4557,9 @@ static void
4557
4557
bnxt_hwrm_set_pause_common (struct bnxt * bp , struct hwrm_port_phy_cfg_input * req )
4558
4558
{
4559
4559
if (bp -> link_info .autoneg & BNXT_AUTONEG_FLOW_CTRL ) {
4560
+ if (bp -> hwrm_spec_code >= 0x10201 )
4561
+ req -> auto_pause =
4562
+ PORT_PHY_CFG_REQ_AUTO_PAUSE_AUTONEG_PAUSE ;
4560
4563
if (bp -> link_info .req_flow_ctrl & BNXT_LINK_PAUSE_RX )
4561
4564
req -> auto_pause |= PORT_PHY_CFG_REQ_AUTO_PAUSE_RX ;
4562
4565
if (bp -> link_info .req_flow_ctrl & BNXT_LINK_PAUSE_TX )
@@ -4570,6 +4573,11 @@ bnxt_hwrm_set_pause_common(struct bnxt *bp, struct hwrm_port_phy_cfg_input *req)
4570
4573
req -> force_pause |= PORT_PHY_CFG_REQ_FORCE_PAUSE_TX ;
4571
4574
req -> enables |=
4572
4575
cpu_to_le32 (PORT_PHY_CFG_REQ_ENABLES_FORCE_PAUSE );
4576
+ if (bp -> hwrm_spec_code >= 0x10201 ) {
4577
+ req -> auto_pause = req -> force_pause ;
4578
+ req -> enables |= cpu_to_le32 (
4579
+ PORT_PHY_CFG_REQ_ENABLES_AUTO_PAUSE );
4580
+ }
4573
4581
}
4574
4582
}
4575
4583
@@ -4656,7 +4664,8 @@ static int bnxt_update_phy_setting(struct bnxt *bp)
4656
4664
return rc ;
4657
4665
}
4658
4666
if ((link_info -> autoneg & BNXT_AUTONEG_FLOW_CTRL ) &&
4659
- link_info -> auto_pause_setting != link_info -> req_flow_ctrl )
4667
+ (link_info -> auto_pause_setting & BNXT_LINK_PAUSE_BOTH ) !=
4668
+ link_info -> req_flow_ctrl )
4660
4669
update_pause = true;
4661
4670
if (!(link_info -> autoneg & BNXT_AUTONEG_FLOW_CTRL ) &&
4662
4671
link_info -> force_pause_setting != link_info -> req_flow_ctrl )
@@ -5825,15 +5834,24 @@ static int bnxt_probe_phy(struct bnxt *bp)
5825
5834
5826
5835
/*initialize the ethool setting copy with NVM settings */
5827
5836
if (BNXT_AUTO_MODE (link_info -> auto_mode )) {
5828
- link_info -> autoneg = BNXT_AUTONEG_SPEED |
5829
- BNXT_AUTONEG_FLOW_CTRL ;
5837
+ link_info -> autoneg = BNXT_AUTONEG_SPEED ;
5838
+ if (bp -> hwrm_spec_code >= 0x10201 ) {
5839
+ if (link_info -> auto_pause_setting &
5840
+ PORT_PHY_CFG_REQ_AUTO_PAUSE_AUTONEG_PAUSE )
5841
+ link_info -> autoneg |= BNXT_AUTONEG_FLOW_CTRL ;
5842
+ } else {
5843
+ link_info -> autoneg |= BNXT_AUTONEG_FLOW_CTRL ;
5844
+ }
5830
5845
link_info -> advertising = link_info -> auto_link_speeds ;
5831
- link_info -> req_flow_ctrl = link_info -> auto_pause_setting ;
5832
5846
} else {
5833
5847
link_info -> req_link_speed = link_info -> force_link_speed ;
5834
5848
link_info -> req_duplex = link_info -> duplex_setting ;
5835
- link_info -> req_flow_ctrl = link_info -> force_pause_setting ;
5836
5849
}
5850
+ if (link_info -> autoneg & BNXT_AUTONEG_FLOW_CTRL )
5851
+ link_info -> req_flow_ctrl =
5852
+ link_info -> auto_pause_setting & BNXT_LINK_PAUSE_BOTH ;
5853
+ else
5854
+ link_info -> req_flow_ctrl = link_info -> force_pause_setting ;
5837
5855
return rc ;
5838
5856
}
5839
5857
0 commit comments