diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2011-02-26 01:40:05 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-03-07 21:05:27 -0500 |
commit | 667c75651025049b39a2b5b83d8fc09a7967cce3 (patch) | |
tree | 56f3f5a0c9ef8718069d1d11f281760fb02de729 /drivers/net/ixgbe | |
parent | 037c6d0a33453bf025c6d6b21e5a0fabe117a797 (diff) |
ixgbe: clear correct counters for flow control on 82599
The 82599 was not correctly having some of it's counters cleared for flow
control. This change corrects that.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.c | 34 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_type.h | 2 |
2 files changed, 29 insertions, 7 deletions
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 94a56217027c..85cc30143738 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -136,17 +136,29 @@ s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw) | |||
136 | IXGBE_READ_REG(hw, IXGBE_MRFC); | 136 | IXGBE_READ_REG(hw, IXGBE_MRFC); |
137 | IXGBE_READ_REG(hw, IXGBE_RLEC); | 137 | IXGBE_READ_REG(hw, IXGBE_RLEC); |
138 | IXGBE_READ_REG(hw, IXGBE_LXONTXC); | 138 | IXGBE_READ_REG(hw, IXGBE_LXONTXC); |
139 | IXGBE_READ_REG(hw, IXGBE_LXONRXC); | ||
140 | IXGBE_READ_REG(hw, IXGBE_LXOFFTXC); | 139 | IXGBE_READ_REG(hw, IXGBE_LXOFFTXC); |
141 | IXGBE_READ_REG(hw, IXGBE_LXOFFRXC); | 140 | if (hw->mac.type >= ixgbe_mac_82599EB) { |
141 | IXGBE_READ_REG(hw, IXGBE_LXONRXCNT); | ||
142 | IXGBE_READ_REG(hw, IXGBE_LXOFFRXCNT); | ||
143 | } else { | ||
144 | IXGBE_READ_REG(hw, IXGBE_LXONRXC); | ||
145 | IXGBE_READ_REG(hw, IXGBE_LXOFFRXC); | ||
146 | } | ||
142 | 147 | ||
143 | for (i = 0; i < 8; i++) { | 148 | for (i = 0; i < 8; i++) { |
144 | IXGBE_READ_REG(hw, IXGBE_PXONTXC(i)); | 149 | IXGBE_READ_REG(hw, IXGBE_PXONTXC(i)); |
145 | IXGBE_READ_REG(hw, IXGBE_PXONRXC(i)); | ||
146 | IXGBE_READ_REG(hw, IXGBE_PXOFFTXC(i)); | 150 | IXGBE_READ_REG(hw, IXGBE_PXOFFTXC(i)); |
147 | IXGBE_READ_REG(hw, IXGBE_PXOFFRXC(i)); | 151 | if (hw->mac.type >= ixgbe_mac_82599EB) { |
152 | IXGBE_READ_REG(hw, IXGBE_PXONRXCNT(i)); | ||
153 | IXGBE_READ_REG(hw, IXGBE_PXOFFRXCNT(i)); | ||
154 | } else { | ||
155 | IXGBE_READ_REG(hw, IXGBE_PXONRXC(i)); | ||
156 | IXGBE_READ_REG(hw, IXGBE_PXOFFRXC(i)); | ||
157 | } | ||
148 | } | 158 | } |
149 | 159 | if (hw->mac.type >= ixgbe_mac_82599EB) | |
160 | for (i = 0; i < 8; i++) | ||
161 | IXGBE_READ_REG(hw, IXGBE_PXON2OFFCNT(i)); | ||
150 | IXGBE_READ_REG(hw, IXGBE_PRC64); | 162 | IXGBE_READ_REG(hw, IXGBE_PRC64); |
151 | IXGBE_READ_REG(hw, IXGBE_PRC127); | 163 | IXGBE_READ_REG(hw, IXGBE_PRC127); |
152 | IXGBE_READ_REG(hw, IXGBE_PRC255); | 164 | IXGBE_READ_REG(hw, IXGBE_PRC255); |
@@ -184,9 +196,17 @@ s32 ixgbe_clear_hw_cntrs_generic(struct ixgbe_hw *hw) | |||
184 | IXGBE_READ_REG(hw, IXGBE_BPTC); | 196 | IXGBE_READ_REG(hw, IXGBE_BPTC); |
185 | for (i = 0; i < 16; i++) { | 197 | for (i = 0; i < 16; i++) { |
186 | IXGBE_READ_REG(hw, IXGBE_QPRC(i)); | 198 | IXGBE_READ_REG(hw, IXGBE_QPRC(i)); |
187 | IXGBE_READ_REG(hw, IXGBE_QBRC(i)); | ||
188 | IXGBE_READ_REG(hw, IXGBE_QPTC(i)); | 199 | IXGBE_READ_REG(hw, IXGBE_QPTC(i)); |
189 | IXGBE_READ_REG(hw, IXGBE_QBTC(i)); | 200 | if (hw->mac.type >= ixgbe_mac_82599EB) { |
201 | IXGBE_READ_REG(hw, IXGBE_QBRC_L(i)); | ||
202 | IXGBE_READ_REG(hw, IXGBE_QBRC_H(i)); | ||
203 | IXGBE_READ_REG(hw, IXGBE_QBTC_L(i)); | ||
204 | IXGBE_READ_REG(hw, IXGBE_QBTC_H(i)); | ||
205 | IXGBE_READ_REG(hw, IXGBE_QPRDC(i)); | ||
206 | } else { | ||
207 | IXGBE_READ_REG(hw, IXGBE_QBRC(i)); | ||
208 | IXGBE_READ_REG(hw, IXGBE_QBTC(i)); | ||
209 | } | ||
190 | } | 210 | } |
191 | 211 | ||
192 | return 0; | 212 | return 0; |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index 013751db5fc0..13a45c7c89d0 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -659,6 +659,8 @@ | |||
659 | #define IXGBE_QPTC(_i) (0x06030 + ((_i) * 0x40)) /* 16 of these */ | 659 | #define IXGBE_QPTC(_i) (0x06030 + ((_i) * 0x40)) /* 16 of these */ |
660 | #define IXGBE_QBRC(_i) (0x01034 + ((_i) * 0x40)) /* 16 of these */ | 660 | #define IXGBE_QBRC(_i) (0x01034 + ((_i) * 0x40)) /* 16 of these */ |
661 | #define IXGBE_QBTC(_i) (0x06034 + ((_i) * 0x40)) /* 16 of these */ | 661 | #define IXGBE_QBTC(_i) (0x06034 + ((_i) * 0x40)) /* 16 of these */ |
662 | #define IXGBE_QBRC_L(_i) (0x01034 + ((_i) * 0x40)) /* 16 of these */ | ||
663 | #define IXGBE_QBRC_H(_i) (0x01038 + ((_i) * 0x40)) /* 16 of these */ | ||
662 | #define IXGBE_QPRDC(_i) (0x01430 + ((_i) * 0x40)) /* 16 of these */ | 664 | #define IXGBE_QPRDC(_i) (0x01430 + ((_i) * 0x40)) /* 16 of these */ |
663 | #define IXGBE_QBTC_L(_i) (0x08700 + ((_i) * 0x8)) /* 16 of these */ | 665 | #define IXGBE_QBTC_L(_i) (0x08700 + ((_i) * 0x8)) /* 16 of these */ |
664 | #define IXGBE_QBTC_H(_i) (0x08704 + ((_i) * 0x8)) /* 16 of these */ | 666 | #define IXGBE_QBTC_H(_i) (0x08704 + ((_i) * 0x8)) /* 16 of these */ |