Skip to content

Commit 052b93d

Browse files
MariuszStachuraJeff Kirsher
authored andcommitted
i40e: do not enter PHY debug mode while setting LEDs behaviour
Previous implementation of LED set/get functions required to enter PHY debug mode, in order to prevent access to it from FW and SW at the same time. Reset of all ports was a unwanted side effect. Signed-off-by: Mariusz Stachura <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 19b7960 commit 052b93d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/net/ethernet/intel/i40e/i40e_ethtool.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,9 @@ static int i40e_set_phys_id(struct net_device *netdev,
20102010
if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) {
20112011
pf->led_status = i40e_led_get(hw);
20122012
} else {
2013-
i40e_aq_set_phy_debug(hw, I40E_PHY_DEBUG_ALL, NULL);
2013+
if (!(hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE))
2014+
i40e_aq_set_phy_debug(hw, I40E_PHY_DEBUG_ALL,
2015+
NULL);
20142016
ret = i40e_led_get_phy(hw, &temp_status,
20152017
&pf->phy_led_val);
20162018
pf->led_status = temp_status;
@@ -2035,7 +2037,8 @@ static int i40e_set_phys_id(struct net_device *netdev,
20352037
ret = i40e_led_set_phy(hw, false, pf->led_status,
20362038
(pf->phy_led_val |
20372039
I40E_PHY_LED_MODE_ORIG));
2038-
i40e_aq_set_phy_debug(hw, 0, NULL);
2040+
if (!(hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE))
2041+
i40e_aq_set_phy_debug(hw, 0, NULL);
20392042
}
20402043
break;
20412044
default:

0 commit comments

Comments
 (0)