Commit d3e9c56c authored by PJ Waskiewicz's avatar PJ Waskiewicz Committed by David S. Miller

ixgbe: Don't return error in flow control configuration if FC is off

When flow control is disabled, an invalid low/high watermark configuration
should not matter.
Signed-off-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e80e887a
...@@ -381,9 +381,11 @@ static s32 ixgbe_setup_fc_82598(struct ixgbe_hw *hw, s32 packetbuf_num) ...@@ -381,9 +381,11 @@ static s32 ixgbe_setup_fc_82598(struct ixgbe_hw *hw, s32 packetbuf_num)
* because it causes the controller to just blast out fc packets. * because it causes the controller to just blast out fc packets.
*/ */
if (!hw->fc.low_water || !hw->fc.high_water || !hw->fc.pause_time) { if (!hw->fc.low_water || !hw->fc.high_water || !hw->fc.pause_time) {
hw_dbg(hw, "Invalid water mark configuration\n"); if (hw->fc.requested_mode != ixgbe_fc_none) {
ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS; hw_dbg(hw, "Invalid water mark configuration\n");
goto out; ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS;
goto out;
}
} }
/* /*
......
...@@ -1907,9 +1907,11 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw, s32 packetbuf_num) ...@@ -1907,9 +1907,11 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw, s32 packetbuf_num)
* because it causes the controller to just blast out fc packets. * because it causes the controller to just blast out fc packets.
*/ */
if (!hw->fc.low_water || !hw->fc.high_water || !hw->fc.pause_time) { if (!hw->fc.low_water || !hw->fc.high_water || !hw->fc.pause_time) {
hw_dbg(hw, "Invalid water mark configuration\n"); if (hw->fc.requested_mode != ixgbe_fc_none) {
ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS; hw_dbg(hw, "Invalid water mark configuration\n");
goto out; ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS;
goto out;
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment