提交 9be00d67 编写于 作者: M Matt Jared 提交者: Jeff Kirsher

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: NMatt Jared <matthew.a.jared@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 c29af37f
......@@ -1142,8 +1142,10 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
if (mode == I40E_LINK_ACTIVITY)
blink = false;
gpio_val |= (blink ? 1 : 0) <<
I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT;
if (blink)
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);
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册