Merge branch 'stable/xen.pm.bug-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / drivers / net / ixgbe / ixgbe_dcb_82598.c
index c97cf9160dc0cc7b2e161fd511dbd1b5d7abe744..1bc57e52cee31e5aed8355d4582e76f92fdc9407 100644 (file)
@@ -233,21 +233,27 @@ s32 ixgbe_dcb_config_pfc_82598(struct ixgbe_hw *hw, u8 pfc_en)
        u32 reg, rx_pba_size;
        u8  i;
 
-       if (!pfc_en)
-               goto out;
-
-       /* Enable Transmit Priority Flow Control */
-       reg = IXGBE_READ_REG(hw, IXGBE_RMCS);
-       reg &= ~IXGBE_RMCS_TFCE_802_3X;
-       /* correct the reporting of our flow control status */
-       reg |= IXGBE_RMCS_TFCE_PRIORITY;
-       IXGBE_WRITE_REG(hw, IXGBE_RMCS, reg);
-
-       /* Enable Receive Priority Flow Control */
-       reg = IXGBE_READ_REG(hw, IXGBE_FCTRL);
-       reg &= ~IXGBE_FCTRL_RFCE;
-       reg |= IXGBE_FCTRL_RPFCE;
-       IXGBE_WRITE_REG(hw, IXGBE_FCTRL, reg);
+       if (pfc_en) {
+               /* Enable Transmit Priority Flow Control */
+               reg = IXGBE_READ_REG(hw, IXGBE_RMCS);
+               reg &= ~IXGBE_RMCS_TFCE_802_3X;
+               /* correct the reporting of our flow control status */
+               reg |= IXGBE_RMCS_TFCE_PRIORITY;
+               IXGBE_WRITE_REG(hw, IXGBE_RMCS, reg);
+
+               /* Enable Receive Priority Flow Control */
+               reg = IXGBE_READ_REG(hw, IXGBE_FCTRL);
+               reg &= ~IXGBE_FCTRL_RFCE;
+               reg |= IXGBE_FCTRL_RPFCE;
+               IXGBE_WRITE_REG(hw, IXGBE_FCTRL, reg);
+
+               /* Configure pause time */
+               for (i = 0; i < (MAX_TRAFFIC_CLASS >> 1); i++)
+                       IXGBE_WRITE_REG(hw, IXGBE_FCTTV(i), 0x68006800);
+
+               /* Configure flow control refresh threshold value */
+               IXGBE_WRITE_REG(hw, IXGBE_FCRTV, 0x3400);
+       }
 
        /*
         * Configure flow control thresholds and enable priority flow control
@@ -273,14 +279,6 @@ s32 ixgbe_dcb_config_pfc_82598(struct ixgbe_hw *hw, u8 pfc_en)
                IXGBE_WRITE_REG(hw, IXGBE_FCRTH(i), reg);
        }
 
-       /* Configure pause time */
-       for (i = 0; i < (MAX_TRAFFIC_CLASS >> 1); i++)
-               IXGBE_WRITE_REG(hw, IXGBE_FCTTV(i), 0x68006800);
-
-       /* Configure flow control refresh threshold value */
-       IXGBE_WRITE_REG(hw, IXGBE_FCRTV, 0x3400);
-
-out:
        return 0;
 }
 
This page took 0.025309 seconds and 5 git commands to generate.