aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2011-07-21 18:43:29 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-08-29 04:25:51 -0400
commit634cdca5637475b74dbc7bd72208f5fdc5904d38 (patch)
treebf76f800af306a4ce7878001c02d5971412178b2 /drivers/net/ethernet/intel
parente7589eab92919483d624eb3356cf3ac80efc0790 (diff)
ixgbe: PFC not cleared on X540 devices
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. 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>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c4
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_type.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c
index ade98200288c..d64fb872978e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c
@@ -252,8 +252,10 @@ s32 ixgbe_dcb_config_pfc_82599(struct ixgbe_hw *hw, u8 pfc_en)
252 reg &= ~IXGBE_MFLCN_RFCE; 252 reg &= ~IXGBE_MFLCN_RFCE;
253 reg |= IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_DPF; 253 reg |= IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_DPF;
254 254
255 if (hw->mac.type == ixgbe_mac_X540) 255 if (hw->mac.type == ixgbe_mac_X540) {
256 reg &= ~IXGBE_MFLCN_RPFCE_MASK;
256 reg |= pfc_en << IXGBE_MFLCN_RPFCE_SHIFT; 257 reg |= pfc_en << IXGBE_MFLCN_RPFCE_SHIFT;
258 }
257 259
258 IXGBE_WRITE_REG(hw, IXGBE_MFLCN, reg); 260 IXGBE_WRITE_REG(hw, IXGBE_MFLCN, reg);
259 261
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index e0d970ebab7a..9f618ee7d333 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -1834,6 +1834,7 @@ enum {
1834#define IXGBE_MFLCN_DPF 0x00000002 /* Discard Pause Frame */ 1834#define IXGBE_MFLCN_DPF 0x00000002 /* Discard Pause Frame */
1835#define IXGBE_MFLCN_RPFCE 0x00000004 /* Receive Priority FC Enable */ 1835#define IXGBE_MFLCN_RPFCE 0x00000004 /* Receive Priority FC Enable */
1836#define IXGBE_MFLCN_RFCE 0x00000008 /* Receive FC Enable */ 1836#define IXGBE_MFLCN_RFCE 0x00000008 /* Receive FC Enable */
1837#define IXGBE_MFLCN_RPFCE_MASK 0x00000FE0 /* Receive FC Mask */
1837 1838
1838#define IXGBE_MFLCN_RPFCE_SHIFT 4 1839#define IXGBE_MFLCN_RPFCE_SHIFT 4
1839 1840