Skip to content

Commit 5766cd6

Browse files
committed
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2017-10-09 This series contains updates to ixgbe and arch/Kconfig. Mark fixes a case where PHY register access is not supported and we were returning a PHY address, when we should have been returning -EOPNOTSUPP. Sabrina Dubroca fixes the use of a logical "and" when it should have been the bitwise "and" operator. Ding Tianhong reverts the commit that added the Kconfig bool option ARCH_WANT_RELAX_ORDER, since there is now a new flag PCI_DEV_FLAGS_NO_RELAXED_ORDERING that has been added to indicate that Relaxed Ordering Attributes should not be used for Transaction Layer Packets. Then follows up with making the needed changes to ixgbe to use the new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag. John Fastabend fixes an issue in the ring accounting when the transmit ring parameters are changed via ethtool when an XDP program is attached. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 996b44f + 8e67902 commit 5766cd6

File tree

6 files changed

+13
-54
lines changed

6 files changed

+13
-54
lines changed

arch/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -937,9 +937,6 @@ config STRICT_MODULE_RWX
937937
and non-text memory will be made non-executable. This provides
938938
protection against certain security exploits (e.g. writing to text)
939939

940-
config ARCH_WANT_RELAX_ORDER
941-
bool
942-
943940
config ARCH_HAS_REFCOUNT
944941
bool
945942
help

arch/sparc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ config SPARC
4444
select ARCH_HAS_SG_CHAIN
4545
select CPU_NO_EFFICIENT_FFS
4646
select LOCKDEP_SMALL if LOCKDEP
47-
select ARCH_WANT_RELAX_ORDER
4847

4948
config SPARC32
5049
def_bool !64BIT

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_ARCH_WANT_RELAX_ORDER
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

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
10481048
{
10491049
struct ixgbe_adapter *adapter = netdev_priv(netdev);
10501050
struct ixgbe_ring *temp_ring;
1051-
int i, err = 0;
1051+
int i, j, err = 0;
10521052
u32 new_rx_count, new_tx_count;
10531053

10541054
if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))
@@ -1085,8 +1085,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
10851085
}
10861086

10871087
/* allocate temporary buffer to store rings in */
1088-
i = max_t(int, adapter->num_tx_queues, adapter->num_rx_queues);
1089-
i = max_t(int, i, adapter->num_xdp_queues);
1088+
i = max_t(int, adapter->num_tx_queues + adapter->num_xdp_queues,
1089+
adapter->num_rx_queues);
10901090
temp_ring = vmalloc(i * sizeof(struct ixgbe_ring));
10911091

10921092
if (!temp_ring) {
@@ -1118,8 +1118,8 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
11181118
}
11191119
}
11201120

1121-
for (i = 0; i < adapter->num_xdp_queues; i++) {
1122-
memcpy(&temp_ring[i], adapter->xdp_ring[i],
1121+
for (j = 0; j < adapter->num_xdp_queues; j++, i++) {
1122+
memcpy(&temp_ring[i], adapter->xdp_ring[j],
11231123
sizeof(struct ixgbe_ring));
11241124

11251125
temp_ring[i].count = new_tx_count;
@@ -1139,10 +1139,10 @@ static int ixgbe_set_ringparam(struct net_device *netdev,
11391139
memcpy(adapter->tx_ring[i], &temp_ring[i],
11401140
sizeof(struct ixgbe_ring));
11411141
}
1142-
for (i = 0; i < adapter->num_xdp_queues; i++) {
1143-
ixgbe_free_tx_resources(adapter->xdp_ring[i]);
1142+
for (j = 0; j < adapter->num_xdp_queues; j++, i++) {
1143+
ixgbe_free_tx_resources(adapter->xdp_ring[j]);
11441144

1145-
memcpy(adapter->xdp_ring[i], &temp_ring[i],
1145+
memcpy(adapter->xdp_ring[j], &temp_ring[i],
11461146
sizeof(struct ixgbe_ring));
11471147
}
11481148

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4881,7 +4881,7 @@ static void ixgbe_clear_udp_tunnel_port(struct ixgbe_adapter *adapter, u32 mask)
48814881
IXGBE_FLAG_GENEVE_OFFLOAD_CAPABLE)))
48824882
return;
48834883

4884-
vxlanctrl = IXGBE_READ_REG(hw, IXGBE_VXLANCTRL) && ~mask;
4884+
vxlanctrl = IXGBE_READ_REG(hw, IXGBE_VXLANCTRL) & ~mask;
48854885
IXGBE_WRITE_REG(hw, IXGBE_VXLANCTRL, vxlanctrl);
48864886

48874887
if (mask & IXGBE_VXLANCTRL_VXLAN_UDPPORT_MASK)
@@ -8529,6 +8529,10 @@ static int ixgbe_ioctl(struct net_device *netdev, struct ifreq *req, int cmd)
85298529
return ixgbe_ptp_set_ts_config(adapter, req);
85308530
case SIOCGHWTSTAMP:
85318531
return ixgbe_ptp_get_ts_config(adapter, req);
8532+
case SIOCGMIIPHY:
8533+
if (!adapter->hw.phy.ops.read_reg)
8534+
return -EOPNOTSUPP;
8535+
/* fall through */
85328536
default:
85338537
return mdio_mii_ioctl(&adapter->hw.phy.mdio, if_mii(req), cmd);
85348538
}

0 commit comments

Comments
 (0)