]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: PFC not cleared on X540 devices
authorJohn Fastabend <john.r.fastabend@intel.com>
Thu, 21 Jul 2011 22:43:29 +0000 (22:43 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 14:00:55 +0000 (22:00 +0800)
X540 devices do not clear PFC before sets. This results in
the device possibly responding to PFC frames that the user
has disabled. Although it would also be wrong for the peer
to be transmitting these frames. Now we clear the register
before set.

(cherry picked from commit 634cdca5637475b74dbc7bd72208f5fdc5904d38)
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/ixgbe/ixgbe_dcb_82599.c
drivers/net/ixgbe/ixgbe_type.h

index ade98200288c617d812f2b3fd29ab3fb22a635bd..d64fb872978ebb14cf36ab9c5e7dd839a5e5453b 100644 (file)
@@ -252,8 +252,10 @@ s32 ixgbe_dcb_config_pfc_82599(struct ixgbe_hw *hw, u8 pfc_en)
                reg &= ~IXGBE_MFLCN_RFCE;
                reg |= IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_DPF;
 
-               if (hw->mac.type == ixgbe_mac_X540)
+               if (hw->mac.type == ixgbe_mac_X540) {
+                       reg &= ~IXGBE_MFLCN_RPFCE_MASK;
                        reg |= pfc_en << IXGBE_MFLCN_RPFCE_SHIFT;
+               }
 
                IXGBE_WRITE_REG(hw, IXGBE_MFLCN, reg);
 
index f21d12d905cdda48ef08e6da9c2a5c7cc1e3456f..ef3460661928b050157284fe308d7309392e9c17 100644 (file)
@@ -1832,6 +1832,7 @@ enum {
 #define IXGBE_MFLCN_DPF         0x00000002 /* Discard Pause Frame */
 #define IXGBE_MFLCN_RPFCE       0x00000004 /* Receive Priority FC Enable */
 #define IXGBE_MFLCN_RFCE        0x00000008 /* Receive FC Enable */
+#define IXGBE_MFLCN_RPFCE_MASK 0x00000FE0 /* Receive FC Mask */
 
 #define IXGBE_MFLCN_RPFCE_SHIFT                 4