[next,S83-V5,5/9] i40e: Fix for blinking activity instead of link LEDs

Message ID 20171218101703.75823-1-alice.michael@intel.com
State Accepted
Delegated to: Jeff Kirsher
Headers show
Series
  • [next,S83-V5,1/9] i40e/i40evf: Enable NVMUpdate to retrieve AdminQ and add preservation flags for NVM update
Related show

Commit Message

Alice Michael Dec. 18, 2017, 10:17 a.m.
From: Michal Kuchta <michal.kuchta@intel.com>

This fix solves an issue occurring while calling i40e_led_set function
from the driver with "blink" parameter set as TRUE. This call resulted
in Activity LED blinking instead of Link LED, which may lead to errors
in physically identyfying the port, since Activity LED may be blinking
for different reasons aswell.

Signed-off-by: Michal Kuchta <michal.kuchta@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Bowers, AndrewX Dec. 22, 2017, 4:45 p.m. | #1
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On
> Behalf Of Alice Michael
> Sent: Monday, December 18, 2017 2:17 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan@lists.osuosl.org
> Cc: Kuchta, Michal <michal.kuchta@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S83-V5 5/9] i40e: Fix for blinking
> activity instead of link LEDs
> 
> From: Michal Kuchta <michal.kuchta@intel.com>
> 
> This fix solves an issue occurring while calling i40e_led_set function from the
> driver with "blink" parameter set as TRUE. This call resulted in Activity LED
> blinking instead of Link LED, which may lead to errors in physically identyfying
> the port, since Activity LED may be blinking for different reasons aswell.
> 
> Signed-off-by: Michal Kuchta <michal.kuchta@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_common.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index cf929cc..ee6052e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -1486,6 +1486,7 @@  u32 i40e_led_get(struct i40e_hw *hw)
 		case I40E_COMBINED_ACTIVITY:
 		case I40E_FILTER_ACTIVITY:
 		case I40E_MAC_ACTIVITY:
+		case I40E_LINK_ACTIVITY:
 			continue;
 		default:
 			break;
@@ -1534,6 +1535,7 @@  void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
 		case I40E_COMBINED_ACTIVITY:
 		case I40E_FILTER_ACTIVITY:
 		case I40E_MAC_ACTIVITY:
+		case I40E_LINK_ACTIVITY:
 			continue;
 		default:
 			break;
@@ -1544,9 +1546,6 @@  void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
 		gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) &
 			     I40E_GLGEN_GPIO_CTL_LED_MODE_MASK);
 
-		if (mode == I40E_LINK_ACTIVITY)
-			blink = false;
-
 		if (blink)
 			gpio_val |= BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT);
 		else