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>
This commit is contained in:
parent
c29af37fd5
commit
9be00d6757
|
@ -1142,8 +1142,10 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
|
||||||
if (mode == I40E_LINK_ACTIVITY)
|
if (mode == I40E_LINK_ACTIVITY)
|
||||||
blink = false;
|
blink = false;
|
||||||
|
|
||||||
gpio_val |= (blink ? 1 : 0) <<
|
if (blink)
|
||||||
I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT;
|
gpio_val |= (1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT);
|
||||||
|
else
|
||||||
|
gpio_val &= ~(1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT);
|
||||||
|
|
||||||
wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val);
|
wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue