diff options
author | Matt Jared <matthew.a.jared@intel.com> | 2015-01-24 04:58:28 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-02-09 03:33:33 -0500 |
commit | 9be00d67579710d8383f2bf030a649f9c76289e7 (patch) | |
tree | d25ec5ced6bfb0f4b43e88de877b230b685e9c8b /drivers/net | |
parent | c29af37fd5b7b649b57139cee6bf730c996fe756 (diff) |
i40e: fix led blink toggle to enable steady state
Make sure to clear the GPIO blink field, instead of OR'ing against zero
if the field is already '1'.
Change-ID: Ie52a52abd48f6f52b20778a6b8b0c542dfc9245c
Signed-off-by: Matt Jared <matthew.a.jared@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_common.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index 5669bfa39f14..11a9ffebf8d8 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c | |||
@@ -1142,8 +1142,10 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink) | |||
1142 | if (mode == I40E_LINK_ACTIVITY) | 1142 | if (mode == I40E_LINK_ACTIVITY) |
1143 | blink = false; | 1143 | blink = false; |
1144 | 1144 | ||
1145 | gpio_val |= (blink ? 1 : 0) << | 1145 | if (blink) |
1146 | I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT; | 1146 | gpio_val |= (1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); |
1147 | else | ||
1148 | gpio_val &= ~(1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); | ||
1147 | 1149 | ||
1148 | wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val); | 1150 | wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val); |
1149 | break; | 1151 | break; |