Skip to content

Commit d301713

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: - fix failure to add bond interfaces to a bridge, the offload-handling code was too defensive there and recent refactoring unearthed that. Users complained (Ido) - fix unnecessarily reflecting ECN bits within TOS values / QoS marking in TCP ACK and reset packets (Wei) - fix a deadlock with bpf iterator. Hopefully we're in the clear on this front now... (Yonghong) - BPF fix for clobbering r2 in bpf_gen_ld_abs (Daniel) - fix AQL on mt76 devices with FW rate control and add a couple of AQL issues in mac80211 code (Felix) - fix authentication issue with mwifiex (Maximilian) - WiFi connectivity fix: revert IGTK support in ti/wlcore (Mauro) - fix exception handling for multipath routes via same device (David Ahern) - revert back to a BH spin lock flavor for nsid_lock: there are paths which do require the BH context protection (Taehee) - fix interrupt / queue / NAPI handling in the lantiq driver (Hauke) - fix ife module load deadlock (Cong) - make an adjustment to netlink reply message type for code added in this release (the sole change touching uAPI here) (Michal) - a number of fixes for small NXP and Microchip switches (Vladimir) [ Pull request acked by David: "you can expect more of this in the future as I try to delegate more things to Jakub" ] * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (167 commits) net: mscc: ocelot: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries net: dsa: seville: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries net: dsa: felix: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries inet_diag: validate INET_DIAG_REQ_PROTOCOL attribute net: bridge: br_vlan_get_pvid_rcu() should dereference the VLAN group under RCU net: Update MAINTAINERS for MediaTek switch driver net/mlx5e: mlx5e_fec_in_caps() returns a boolean net/mlx5e: kTLS, Avoid kzalloc(GFP_KERNEL) under spinlock net/mlx5e: kTLS, Fix leak on resync error flow net/mlx5e: kTLS, Add missing dma_unmap in RX resync net/mlx5e: kTLS, Fix napi sync and possible use-after-free net/mlx5e: TLS, Do not expose FPGA TLS counter if not supported net/mlx5e: Fix using wrong stats_grps in mlx5e_update_ndo_stats() net/mlx5e: Fix multicast counter not up-to-date in "ip -s" net/mlx5e: Fix endianness when calculating pedit mask first bit net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported net/mlx5e: CT: Fix freeing ct_label mapping net/mlx5e: Fix memory leak of tunnel info when rule under multipath not ready net/mlx5e: Use synchronize_rcu to sync with NAPI net/mlx5e: Use RCU to protect rq->xdp_prog ...
2 parents 0baca07 + b334ec6 commit d301713

165 files changed

Lines changed: 1705 additions & 824 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/bpf/ringbuf.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,6 @@ in the order of reservations, but only after all previous records where
182182
already committed. It is thus possible for slow producers to temporarily hold
183183
off submitted records, that were reserved later.
184184

185-
Reservation/commit/consumer protocol is verified by litmus tests in
186-
Documentation/litmus_tests/bpf-rb/_.
187-
188185
One interesting implementation bit, that significantly simplifies (and thus
189186
speeds up as well) implementation of both producers and consumers is how data
190187
area is mapped twice contiguously back-to-back in the virtual memory. This
@@ -200,7 +197,7 @@ a self-pacing notifications of new data being availability.
200197
being available after commit only if consumer has already caught up right up to
201198
the record being committed. If not, consumer still has to catch up and thus
202199
will see new data anyways without needing an extra poll notification.
203-
Benchmarks (see tools/testing/selftests/bpf/benchs/bench_ringbuf.c_) show that
200+
Benchmarks (see tools/testing/selftests/bpf/benchs/bench_ringbufs.c) show that
204201
this allows to achieve a very high throughput without having to resort to
205202
tricks like "notify only every Nth sample", which are necessary with perf
206203
buffer. For extreme cases, when BPF program wants more manual control of

Documentation/networking/ethtool-netlink.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ Userspace to kernel:
206206
``ETHTOOL_MSG_TSINFO_GET`` get timestamping info
207207
``ETHTOOL_MSG_CABLE_TEST_ACT`` action start cable test
208208
``ETHTOOL_MSG_CABLE_TEST_TDR_ACT`` action start raw TDR cable test
209+
``ETHTOOL_MSG_TUNNEL_INFO_GET`` get tunnel offload info
209210
===================================== ================================
210211

211212
Kernel to userspace:
@@ -239,6 +240,7 @@ Kernel to userspace:
239240
``ETHTOOL_MSG_TSINFO_GET_REPLY`` timestamping info
240241
``ETHTOOL_MSG_CABLE_TEST_NTF`` Cable test results
241242
``ETHTOOL_MSG_CABLE_TEST_TDR_NTF`` Cable test TDR results
243+
``ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY`` tunnel offload info
242244
===================================== =================================
243245

244246
``GET`` requests are sent by userspace applications to retrieve device
@@ -1363,4 +1365,5 @@ are netlink only.
13631365
``ETHTOOL_SFECPARAM`` n/a
13641366
n/a ''ETHTOOL_MSG_CABLE_TEST_ACT''
13651367
n/a ''ETHTOOL_MSG_CABLE_TEST_TDR_ACT''
1368+
n/a ``ETHTOOL_MSG_TUNNEL_INFO_GET``
13661369
=================================== =====================================

MAINTAINERS

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4408,12 +4408,6 @@ T: git git://git.infradead.org/users/hch/configfs.git
44084408
F: fs/configfs/
44094409
F: include/linux/configfs.h
44104410

4411-
CONNECTOR
4412-
M: Evgeniy Polyakov <zbr@ioremap.net>
4413-
L: netdev@vger.kernel.org
4414-
S: Maintained
4415-
F: drivers/connector/
4416-
44174411
CONSOLE SUBSYSTEM
44184412
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
44194413
S: Supported
@@ -8329,8 +8323,9 @@ S: Supported
83298323
F: drivers/pci/hotplug/rpaphp*
83308324

83318325
IBM Power SRIOV Virtual NIC Device Driver
8332-
M: Thomas Falcon <tlfalcon@linux.ibm.com>
8333-
M: John Allen <jallen@linux.ibm.com>
8326+
M: Dany Madden <drt@linux.ibm.com>
8327+
M: Lijun Pan <ljp@linux.ibm.com>
8328+
M: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
83348329
L: netdev@vger.kernel.org
83358330
S: Supported
83368331
F: drivers/net/ethernet/ibm/ibmvnic.*
@@ -8344,7 +8339,7 @@ F: arch/powerpc/platforms/powernv/copy-paste.h
83448339
F: arch/powerpc/platforms/powernv/vas*
83458340

83468341
IBM Power Virtual Ethernet Device Driver
8347-
M: Thomas Falcon <tlfalcon@linux.ibm.com>
8342+
M: Cristobal Forno <cforno12@linux.ibm.com>
83488343
L: netdev@vger.kernel.org
83498344
S: Supported
83508345
F: drivers/net/ethernet/ibm/ibmveth.*
@@ -11042,6 +11037,7 @@ F: drivers/char/hw_random/mtk-rng.c
1104211037

1104311038
MEDIATEK SWITCH DRIVER
1104411039
M: Sean Wang <sean.wang@mediatek.com>
11040+
M: Landen Chao <Landen.Chao@mediatek.com>
1104511041
L: netdev@vger.kernel.org
1104611042
S: Maintained
1104711043
F: drivers/net/dsa/mt7530.*
@@ -12055,6 +12051,7 @@ Q: http://patchwork.ozlabs.org/project/netdev/list/
1205512051
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
1205612052
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
1205712053
F: Documentation/devicetree/bindings/net/
12054+
F: drivers/connector/
1205812055
F: drivers/net/
1205912056
F: include/linux/etherdevice.h
1206012057
F: include/linux/fcdevice.h

arch/arm/boot/dts/at91-sama5d2_icp.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@
116116
switch0: ksz8563@0 {
117117
compatible = "microchip,ksz8563";
118118
reg = <0>;
119-
phy-mode = "mii";
120119
reset-gpios = <&pioA PIN_PD4 GPIO_ACTIVE_LOW>;
121120

122121
spi-max-frequency = <500000>;
@@ -140,6 +139,7 @@
140139
reg = <2>;
141140
label = "cpu";
142141
ethernet = <&macb0>;
142+
phy-mode = "mii";
143143
fixed-link {
144144
speed = <100>;
145145
full-duplex;

drivers/atm/eni.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,7 @@ static int eni_init_one(struct pci_dev *pci_dev,
22242224

22252225
rc = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
22262226
if (rc < 0)
2227-
goto out;
2227+
goto err_disable;
22282228

22292229
rc = -ENOMEM;
22302230
eni_dev = kmalloc(sizeof(struct eni_dev), GFP_KERNEL);

drivers/net/dsa/microchip/ksz8795.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -932,11 +932,19 @@ static void ksz8795_port_setup(struct ksz_device *dev, int port, bool cpu_port)
932932
ksz_port_cfg(dev, port, P_PRIO_CTRL, PORT_802_1P_ENABLE, true);
933933

934934
if (cpu_port) {
935+
if (!p->interface && dev->compat_interface) {
936+
dev_warn(dev->dev,
937+
"Using legacy switch \"phy-mode\" property, because it is missing on port %d node. "
938+
"Please update your device tree.\n",
939+
port);
940+
p->interface = dev->compat_interface;
941+
}
942+
935943
/* Configure MII interface for proper network communication. */
936944
ksz_read8(dev, REG_PORT_5_CTRL_6, &data8);
937945
data8 &= ~PORT_INTERFACE_TYPE;
938946
data8 &= ~PORT_GMII_1GPS_MODE;
939-
switch (dev->interface) {
947+
switch (p->interface) {
940948
case PHY_INTERFACE_MODE_MII:
941949
p->phydev.speed = SPEED_100;
942950
break;
@@ -952,11 +960,11 @@ static void ksz8795_port_setup(struct ksz_device *dev, int port, bool cpu_port)
952960
default:
953961
data8 &= ~PORT_RGMII_ID_IN_ENABLE;
954962
data8 &= ~PORT_RGMII_ID_OUT_ENABLE;
955-
if (dev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
956-
dev->interface == PHY_INTERFACE_MODE_RGMII_RXID)
963+
if (p->interface == PHY_INTERFACE_MODE_RGMII_ID ||
964+
p->interface == PHY_INTERFACE_MODE_RGMII_RXID)
957965
data8 |= PORT_RGMII_ID_IN_ENABLE;
958-
if (dev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
959-
dev->interface == PHY_INTERFACE_MODE_RGMII_TXID)
966+
if (p->interface == PHY_INTERFACE_MODE_RGMII_ID ||
967+
p->interface == PHY_INTERFACE_MODE_RGMII_TXID)
960968
data8 |= PORT_RGMII_ID_OUT_ENABLE;
961969
data8 |= PORT_GMII_1GPS_MODE;
962970
data8 |= PORT_INTERFACE_RGMII;
@@ -1252,7 +1260,7 @@ static int ksz8795_switch_init(struct ksz_device *dev)
12521260
}
12531261

12541262
/* set the real number of ports */
1255-
dev->ds->num_ports = dev->port_cnt;
1263+
dev->ds->num_ports = dev->port_cnt + 1;
12561264

12571265
return 0;
12581266
}

drivers/net/dsa/microchip/ksz9477.c

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ static void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port)
12081208

12091209
/* configure MAC to 1G & RGMII mode */
12101210
ksz_pread8(dev, port, REG_PORT_XMII_CTRL_1, &data8);
1211-
switch (dev->interface) {
1211+
switch (p->interface) {
12121212
case PHY_INTERFACE_MODE_MII:
12131213
ksz9477_set_xmii(dev, 0, &data8);
12141214
ksz9477_set_gbit(dev, false, &data8);
@@ -1229,11 +1229,11 @@ static void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port)
12291229
ksz9477_set_gbit(dev, true, &data8);
12301230
data8 &= ~PORT_RGMII_ID_IG_ENABLE;
12311231
data8 &= ~PORT_RGMII_ID_EG_ENABLE;
1232-
if (dev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
1233-
dev->interface == PHY_INTERFACE_MODE_RGMII_RXID)
1232+
if (p->interface == PHY_INTERFACE_MODE_RGMII_ID ||
1233+
p->interface == PHY_INTERFACE_MODE_RGMII_RXID)
12341234
data8 |= PORT_RGMII_ID_IG_ENABLE;
1235-
if (dev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
1236-
dev->interface == PHY_INTERFACE_MODE_RGMII_TXID)
1235+
if (p->interface == PHY_INTERFACE_MODE_RGMII_ID ||
1236+
p->interface == PHY_INTERFACE_MODE_RGMII_TXID)
12371237
data8 |= PORT_RGMII_ID_EG_ENABLE;
12381238
p->phydev.speed = SPEED_1000;
12391239
break;
@@ -1269,23 +1269,32 @@ static void ksz9477_config_cpu_port(struct dsa_switch *ds)
12691269
dev->cpu_port = i;
12701270
dev->host_mask = (1 << dev->cpu_port);
12711271
dev->port_mask |= dev->host_mask;
1272+
p = &dev->ports[i];
12721273

12731274
/* Read from XMII register to determine host port
12741275
* interface. If set specifically in device tree
12751276
* note the difference to help debugging.
12761277
*/
12771278
interface = ksz9477_get_interface(dev, i);
1278-
if (!dev->interface)
1279-
dev->interface = interface;
1280-
if (interface && interface != dev->interface)
1279+
if (!p->interface) {
1280+
if (dev->compat_interface) {
1281+
dev_warn(dev->dev,
1282+
"Using legacy switch \"phy-mode\" property, because it is missing on port %d node. "
1283+
"Please update your device tree.\n",
1284+
i);
1285+
p->interface = dev->compat_interface;
1286+
} else {
1287+
p->interface = interface;
1288+
}
1289+
}
1290+
if (interface && interface != p->interface)
12811291
dev_info(dev->dev,
12821292
"use %s instead of %s\n",
1283-
phy_modes(dev->interface),
1293+
phy_modes(p->interface),
12841294
phy_modes(interface));
12851295

12861296
/* enable cpu port */
12871297
ksz9477_port_setup(dev, i, true);
1288-
p = &dev->ports[dev->cpu_port];
12891298
p->vid_member = dev->port_mask;
12901299
p->on = 1;
12911300
}

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ int ksz_switch_register(struct ksz_device *dev,
388388
const struct ksz_dev_ops *ops)
389389
{
390390
phy_interface_t interface;
391+
struct device_node *port;
392+
unsigned int port_num;
391393
int ret;
392394

393395
if (dev->pdata)
@@ -421,10 +423,19 @@ int ksz_switch_register(struct ksz_device *dev,
421423
/* Host port interface will be self detected, or specifically set in
422424
* device tree.
423425
*/
426+
for (port_num = 0; port_num < dev->port_cnt; ++port_num)
427+
dev->ports[port_num].interface = PHY_INTERFACE_MODE_NA;
424428
if (dev->dev->of_node) {
425429
ret = of_get_phy_mode(dev->dev->of_node, &interface);
426430
if (ret == 0)
427-
dev->interface = interface;
431+
dev->compat_interface = interface;
432+
for_each_available_child_of_node(dev->dev->of_node, port) {
433+
if (of_property_read_u32(port, "reg", &port_num))
434+
continue;
435+
if (port_num >= dev->port_cnt)
436+
return -EINVAL;
437+
of_get_phy_mode(port, &dev->ports[port_num].interface);
438+
}
428439
dev->synclko_125 = of_property_read_bool(dev->dev->of_node,
429440
"microchip,synclko-125");
430441
}

drivers/net/dsa/microchip/ksz_common.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ struct ksz_port {
3939
u32 freeze:1; /* MIB counter freeze is enabled */
4040

4141
struct ksz_port_mib mib;
42+
phy_interface_t interface;
4243
};
4344

4445
struct ksz_device {
@@ -72,7 +73,7 @@ struct ksz_device {
7273
int mib_cnt;
7374
int mib_port_cnt;
7475
int last_port; /* ports after that not used */
75-
phy_interface_t interface;
76+
phy_interface_t compat_interface;
7677
u32 regs_size;
7778
bool phy_errata_9477;
7879
bool synclko_125;

drivers/net/dsa/ocelot/felix.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,10 @@ static int felix_setup(struct dsa_switch *ds)
585585
if (err)
586586
return err;
587587

588-
ocelot_init(ocelot);
588+
err = ocelot_init(ocelot);
589+
if (err)
590+
return err;
591+
589592
if (ocelot->ptp) {
590593
err = ocelot_init_timestamp(ocelot, &ocelot_ptp_clock_info);
591594
if (err) {
@@ -640,10 +643,13 @@ static void felix_teardown(struct dsa_switch *ds)
640643
{
641644
struct ocelot *ocelot = ds->priv;
642645
struct felix *felix = ocelot_to_felix(ocelot);
646+
int port;
643647

644648
if (felix->info->mdio_bus_free)
645649
felix->info->mdio_bus_free(ocelot);
646650

651+
for (port = 0; port < ocelot->num_phys_ports; port++)
652+
ocelot_deinit_port(ocelot, port);
647653
ocelot_deinit_timestamp(ocelot);
648654
/* stop workqueue thread */
649655
ocelot_deinit(ocelot);

0 commit comments

Comments
 (0)