ixgbe: Don't return error in flow control configuration if FC is off
authorPJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Thu, 9 Apr 2009 22:27:39 +0000 (22:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Apr 2009 09:48:00 +0000 (02:48 -0700)
When flow control is disabled, an invalid low/high watermark configuration
should not matter.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ixgbe/ixgbe_82598.c
drivers/net/ixgbe/ixgbe_common.c

index 63aacd53aab7a7af0c3995b563e4bf94dec1a07d..1e1d8b79f9e349c50e06cfc003abaa36e9f08ff5 100644 (file)
@@ -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.
         */
        if (!hw->fc.low_water || !hw->fc.high_water || !hw->fc.pause_time) {
-               hw_dbg(hw, "Invalid water mark configuration\n");
-               ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS;
-               goto out;
+               if (hw->fc.requested_mode != ixgbe_fc_none) {
+                       hw_dbg(hw, "Invalid water mark configuration\n");
+                       ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS;
+                       goto out;
+               }
        }
 
        /*
index 846c9deeaa7ad08b29eb2c45b95451408f90d3be..2d4af5d2d3f71971d8a0b0424b4a92dc11f06c69 100644 (file)
@@ -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.
         */
        if (!hw->fc.low_water || !hw->fc.high_water || !hw->fc.pause_time) {
-               hw_dbg(hw, "Invalid water mark configuration\n");
-               ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS;
-               goto out;
+               if (hw->fc.requested_mode != ixgbe_fc_none) {
+                       hw_dbg(hw, "Invalid water mark configuration\n");
+                       ret_val = IXGBE_ERR_INVALID_LINK_SETTINGS;
+                       goto out;
+               }
        }
 
        /*