Skip to content

Commit 5e0fac6

Browse files
dingtianhongJeff Kirsher
authored andcommitted
net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag
The ixgbe driver use the compile check to determine if it can send TLPs to Root Port with the Relaxed Ordering Attribute set, this is too inconvenient, now the new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING has been added to the kernel and we could check the bit4 in the PCIe Device Control register to determine whether we should use the Relaxed Ordering Attributes or not, so use this new way in the ixgbe driver. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Acked-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
1 parent f4986d2 commit 5e0fac6

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -175,31 +175,9 @@ static s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw)
175175
**/
176176
static s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw)
177177
{
178-
#ifndef CONFIG_SPARC
179-
u32 regval;
180-
u32 i;
181-
#endif
182178
s32 ret_val;
183179

184180
ret_val = ixgbe_start_hw_generic(hw);
185-
186-
#ifndef CONFIG_SPARC
187-
/* Disable relaxed ordering */
188-
for (i = 0; ((i < hw->mac.max_tx_queues) &&
189-
(i < IXGBE_DCA_MAX_QUEUES_82598)); i++) {
190-
regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i));
191-
regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN;
192-
IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), regval);
193-
}
194-
195-
for (i = 0; ((i < hw->mac.max_rx_queues) &&
196-
(i < IXGBE_DCA_MAX_QUEUES_82598)); i++) {
197-
regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i));
198-
regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN |
199-
IXGBE_DCA_RXCTRL_HEAD_WRO_EN);
200-
IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval);
201-
}
202-
#endif
203181
if (ret_val)
204182
return ret_val;
205183

drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -366,25 +366,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw)
366366
}
367367
IXGBE_WRITE_FLUSH(hw);
368368

369-
#ifndef CONFIG_SPARC
370-
/* Disable relaxed ordering */
371-
for (i = 0; i < hw->mac.max_tx_queues; i++) {
372-
u32 regval;
373-
374-
regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i));
375-
regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN;
376-
IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), regval);
377-
}
378-
379-
for (i = 0; i < hw->mac.max_rx_queues; i++) {
380-
u32 regval;
381-
382-
regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i));
383-
regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN |
384-
IXGBE_DCA_RXCTRL_HEAD_WRO_EN);
385-
IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval);
386-
}
387-
#endif
388369
return 0;
389370
}
390371

0 commit comments

Comments
 (0)