diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-03-13 17:04:35 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-03-13 18:40:41 -0400 |
commit | 887012e80aeaf36968456e8085abf41aee907707 (patch) | |
tree | 1a5e687e85a2d15ca5330de8d3613270f7f37ef9 | |
parent | bc035fc55ecbe50fd087270e8312a090b5eccb3a (diff) |
ixgbe: enable relaxed ordering for SPARC
This patch makes sure that relaxed ordering is not disabled when
on SPARC, where it helps with performance.
CC: <kernel-team@fb.com>
CC: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Reported-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c index 51628b30cb1c..824a7ab79ab6 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | |||
@@ -171,17 +171,21 @@ static s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw) | |||
171 | * @hw: pointer to hardware structure | 171 | * @hw: pointer to hardware structure |
172 | * | 172 | * |
173 | * Starts the hardware using the generic start_hw function. | 173 | * Starts the hardware using the generic start_hw function. |
174 | * Disables relaxed ordering Then set pcie completion timeout | 174 | * Disables relaxed ordering for archs other than SPARC |
175 | * Then set pcie completion timeout | ||
175 | * | 176 | * |
176 | **/ | 177 | **/ |
177 | static s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) | 178 | static s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) |
178 | { | 179 | { |
180 | #ifndef CONFIG_SPARC | ||
179 | u32 regval; | 181 | u32 regval; |
180 | u32 i; | 182 | u32 i; |
183 | #endif | ||
181 | s32 ret_val; | 184 | s32 ret_val; |
182 | 185 | ||
183 | ret_val = ixgbe_start_hw_generic(hw); | 186 | ret_val = ixgbe_start_hw_generic(hw); |
184 | 187 | ||
188 | #ifndef CONFIG_SPARC | ||
185 | /* Disable relaxed ordering */ | 189 | /* Disable relaxed ordering */ |
186 | for (i = 0; ((i < hw->mac.max_tx_queues) && | 190 | for (i = 0; ((i < hw->mac.max_tx_queues) && |
187 | (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { | 191 | (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { |
@@ -197,7 +201,7 @@ static s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) | |||
197 | IXGBE_DCA_RXCTRL_HEAD_WRO_EN); | 201 | IXGBE_DCA_RXCTRL_HEAD_WRO_EN); |
198 | IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); | 202 | IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); |
199 | } | 203 | } |
200 | 204 | #endif | |
201 | if (ret_val) | 205 | if (ret_val) |
202 | return ret_val; | 206 | return ret_val; |
203 | 207 | ||
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 13b58f97b439..06d8f3cfa099 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | |||
@@ -312,7 +312,6 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw) | |||
312 | s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) | 312 | s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) |
313 | { | 313 | { |
314 | u32 i; | 314 | u32 i; |
315 | u32 regval; | ||
316 | 315 | ||
317 | /* Clear the rate limiters */ | 316 | /* Clear the rate limiters */ |
318 | for (i = 0; i < hw->mac.max_tx_queues; i++) { | 317 | for (i = 0; i < hw->mac.max_tx_queues; i++) { |
@@ -321,20 +320,25 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) | |||
321 | } | 320 | } |
322 | IXGBE_WRITE_FLUSH(hw); | 321 | IXGBE_WRITE_FLUSH(hw); |
323 | 322 | ||
323 | #ifndef CONFIG_SPARC | ||
324 | /* Disable relaxed ordering */ | 324 | /* Disable relaxed ordering */ |
325 | for (i = 0; i < hw->mac.max_tx_queues; i++) { | 325 | for (i = 0; i < hw->mac.max_tx_queues; i++) { |
326 | u32 regval; | ||
327 | |||
326 | regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); | 328 | regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); |
327 | regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; | 329 | regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; |
328 | IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), regval); | 330 | IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), regval); |
329 | } | 331 | } |
330 | 332 | ||
331 | for (i = 0; i < hw->mac.max_rx_queues; i++) { | 333 | for (i = 0; i < hw->mac.max_rx_queues; i++) { |
334 | u32 regval; | ||
335 | |||
332 | regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); | 336 | regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); |
333 | regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN | | 337 | regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN | |
334 | IXGBE_DCA_RXCTRL_HEAD_WRO_EN); | 338 | IXGBE_DCA_RXCTRL_HEAD_WRO_EN); |
335 | IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); | 339 | IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); |
336 | } | 340 | } |
337 | 341 | #endif | |
338 | return 0; | 342 | return 0; |
339 | } | 343 | } |
340 | 344 | ||