Skip to content

Commit 02dc96e

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: 1) Sanity check URB networking device parameters to avoid divide by zero, from Oliver Neukum. 2) Disable global multicast filter in NCSI, otherwise LLDP and IPV6 don't work properly. Longer term this needs a better fix tho. From Vijay Khemka. 3) Small fixes to selftests (use ping when ping6 is not present, etc.) from David Ahern. 4) Bring back rt_uses_gateway member of struct rtable, it's semantics were not well understood and trying to remove it broke things. From David Ahern. 5) Move usbnet snaity checking, ignore endpoints with invalid wMaxPacketSize. From Bjørn Mork. 6) Missing Kconfig deps for sja1105 driver, from Mao Wenan. 7) Various small fixes to the mlx5 DR steering code, from Alaa Hleihel, Alex Vesker, and Yevgeny Kliteynik 8) Missing CAP_NET_RAW checks in various places, from Ori Nimron. 9) Fix crash when removing sch_cbs entry while offloading is enabled, from Vinicius Costa Gomes. 10) Signedness bug fixes, generally in looking at the result given by of_get_phy_mode() and friends. From Dan Crapenter. 11) Disable preemption around BPF_PROG_RUN() calls, from Eric Dumazet. 12) Don't create VRF ipv6 rules if ipv6 is disabled, from David Ahern. 13) Fix quantization code in tcp_bbr, from Kevin Yang. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (127 commits) net: tap: clean up an indentation issue nfp: abm: fix memory leak in nfp_abm_u32_knode_replace tcp: better handle TCP_USER_TIMEOUT in SYN_SENT state sk_buff: drop all skb extensions on free and skb scrubbing tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions Documentation: Clarify trap's description mlxsw: spectrum: Clear VLAN filters during port initialization net: ena: clean up indentation issue NFC: st95hf: clean up indentation issue net: phy: micrel: add Asym Pause workaround for KSZ9021 net: socionext: ave: Avoid using netdev_err() before calling register_netdev() ptp: correctly disable flags on old ioctls lib: dimlib: fix help text typos net: dsa: microchip: Always set regmap stride to 1 nfp: flower: fix memory leak in nfp_flower_spawn_vnic_reprs nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs net/sched: Set default of CONFIG_NET_TC_SKB_EXT to N vrf: Do not attempt to create IPv6 mcast rule if IPv6 is disabled net: sched: sch_sfb: don't call qdisc_put() while holding tree lock ...
2 parents edf445a + faeacb6 commit 02dc96e

File tree

169 files changed

+1225
-1307
lines changed

Some content is hidden

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

169 files changed

+1225
-1307
lines changed

Documentation/devicetree/bindings/net/adi,adin.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ properties:
3636
enum: [ 4, 8, 12, 16, 20, 24 ]
3737
default: 8
3838

39-
adi,disable-energy-detect:
40-
description: |
41-
Disables Energy Detect Powerdown Mode (default disabled, i.e energy detect
42-
is enabled if this property is unspecified)
43-
type: boolean
44-
4539
examples:
4640
- |
4741
ethernet {
@@ -68,6 +62,5 @@ examples:
6862
reg = <1>;
6963
7064
adi,fifo-depth-bits = <16>;
71-
adi,disable-energy-detect;
7265
};
7366
};

Documentation/devicetree/bindings/net/micrel-ksz90x1.txt

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,36 @@ and therefore may overwrite them.
1212
KSZ9021:
1313

1414
All skew control options are specified in picoseconds. The minimum
15-
value is 0, the maximum value is 3000, and it is incremented by 200ps
16-
steps.
15+
value is 0, the maximum value is 3000, and it can be specified in 200ps
16+
steps, *but* these values are in not fact what you get because this chip's
17+
skew values actually increase in 120ps steps, starting from -840ps. The
18+
incorrect values came from an error in the original KSZ9021 datasheet
19+
before it was corrected in revision 1.2 (Feb 2014), but it is too late to
20+
change the driver now because of the many existing device trees that have
21+
been created using values that go up in increments of 200.
22+
23+
The following table shows the actual skew delay you will get for each of the
24+
possible devicetree values, and the number that will be programmed into the
25+
corresponding pad skew register:
26+
27+
Device Tree Value Delay Pad Skew Register Value
28+
-----------------------------------------------------
29+
0 -840ps 0000
30+
200 -720ps 0001
31+
400 -600ps 0010
32+
600 -480ps 0011
33+
800 -360ps 0100
34+
1000 -240ps 0101
35+
1200 -120ps 0110
36+
1400 0ps 0111
37+
1600 120ps 1000
38+
1800 240ps 1001
39+
2000 360ps 1010
40+
2200 480ps 1011
41+
2400 600ps 1100
42+
2600 720ps 1101
43+
2800 840ps 1110
44+
3000 960ps 1111
1745

1846
Optional properties:
1947

Documentation/devicetree/bindings/net/renesas,ravb.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Required properties:
1818
R-Car Gen2 and RZ/G1 devices.
1919

2020
- "renesas,etheravb-r8a774a1" for the R8A774A1 SoC.
21+
- "renesas,etheravb-r8a774b1" for the R8A774B1 SoC.
2122
- "renesas,etheravb-r8a774c0" for the R8A774C0 SoC.
2223
- "renesas,etheravb-r8a7795" for the R8A7795 SoC.
2324
- "renesas,etheravb-r8a7796" for the R8A7796 SoC.

Documentation/devicetree/bindings/net/snps,dwmac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ properties:
113113
const: stmmaceth
114114

115115
mac-mode:
116-
maxItems: 1
116+
$ref: ethernet-controller.yaml#/properties/phy-connection-type
117117
description:
118118
The property is identical to 'phy-mode', and assumes that there is mode
119119
converter in-between the MAC & PHY (e.g. GMII-to-RGMII). This converter

Documentation/networking/devlink-trap.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ be added to the following table:
143143
* - ``port_list_is_empty``
144144
- ``drop``
145145
- Traps packets that the device decided to drop in case they need to be
146-
flooded and the flood list is empty
146+
flooded (e.g., unknown unicast, unregistered multicast) and there are
147+
no ports the packets should be flooded to
147148
* - ``port_loopback_filter``
148149
- ``drop``
149150
- Traps packets that the device decided to drop in case after layer 2

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ F: drivers/net/ethernet/alacritech/*
643643

644644
FORCEDETH GIGABIT ETHERNET DRIVER
645645
M: Rain River <[email protected]>
646+
M: Zhu Yanjun <[email protected]>
646647
647648
S: Maintained
648649
F: drivers/net/ethernet/nvidia/*

drivers/atm/he.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
16901690

16911691
if (RBRQ_HBUF_ERR(he_dev->rbrq_head)) {
16921692
hprintk("HBUF_ERR! (cid 0x%x)\n", cid);
1693-
atomic_inc(&vcc->stats->rx_drop);
1693+
atomic_inc(&vcc->stats->rx_drop);
16941694
goto return_host_buffers;
16951695
}
16961696

drivers/infiniband/core/addr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static bool has_gateway(const struct dst_entry *dst, sa_family_t family)
352352

353353
if (family == AF_INET) {
354354
rt = container_of(dst, struct rtable, dst);
355-
return rt->rt_gw_family == AF_INET;
355+
return rt->rt_uses_gateway;
356356
}
357357

358358
rt6 = container_of(dst, struct rt6_info, dst);

drivers/isdn/mISDN/socket.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ base_sock_create(struct net *net, struct socket *sock, int protocol, int kern)
754754

755755
if (sock->type != SOCK_RAW)
756756
return -ESOCKTNOSUPPORT;
757+
if (!capable(CAP_NET_RAW))
758+
return -EPERM;
757759

758760
sk = sk_alloc(net, PF_ISDN, GFP_KERNEL, &mISDN_proto, kern);
759761
if (!sk)

drivers/net/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ config FUJITSU_ES
487487
depends on ACPI
488488
help
489489
This driver provides support for Extended Socket network device
490-
on Extended Partitioning of FUJITSU PRIMEQUEST 2000 E2 series.
490+
on Extended Partitioning of FUJITSU PRIMEQUEST 2000 E2 series.
491491

492492
config THUNDERBOLT_NET
493493
tristate "Networking over Thunderbolt cable"

drivers/net/arcnet/Kconfig

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ config ARCNET_CAP
5656
tristate "Enable CAP mode packet interface"
5757
help
5858
ARCnet "cap mode" packet encapsulation. Used to get the hardware
59-
acknowledge back to userspace. After the initial protocol byte every
60-
packet is stuffed with an extra 4 byte "cookie" which doesn't
61-
actually appear on the network. After transmit the driver will send
62-
back a packet with protocol byte 0 containing the status of the
63-
transmission:
64-
0=no hardware acknowledge
65-
1=excessive nak
66-
2=transmission accepted by the receiver hardware
67-
68-
Received packets are also stuffed with the extra 4 bytes but it will
69-
be random data.
70-
71-
Cap only listens to protocol 1-8.
59+
acknowledge back to userspace. After the initial protocol byte every
60+
packet is stuffed with an extra 4 byte "cookie" which doesn't
61+
actually appear on the network. After transmit the driver will send
62+
back a packet with protocol byte 0 containing the status of the
63+
transmission:
64+
0=no hardware acknowledge
65+
1=excessive nak
66+
2=transmission accepted by the receiver hardware
67+
68+
Received packets are also stuffed with the extra 4 bytes but it will
69+
be random data.
70+
71+
Cap only listens to protocol 1-8.
7272

7373
config ARCNET_COM90xx
7474
tristate "ARCnet COM90xx (normal) chipset driver"

drivers/net/arcnet/arcnet.c

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,31 +1063,34 @@ EXPORT_SYMBOL(arcnet_interrupt);
10631063
static void arcnet_rx(struct net_device *dev, int bufnum)
10641064
{
10651065
struct arcnet_local *lp = netdev_priv(dev);
1066-
struct archdr pkt;
1066+
union {
1067+
struct archdr pkt;
1068+
char buf[512];
1069+
} rxdata;
10671070
struct arc_rfc1201 *soft;
10681071
int length, ofs;
10691072

1070-
soft = &pkt.soft.rfc1201;
1073+
soft = &rxdata.pkt.soft.rfc1201;
10711074

1072-
lp->hw.copy_from_card(dev, bufnum, 0, &pkt, ARC_HDR_SIZE);
1073-
if (pkt.hard.offset[0]) {
1074-
ofs = pkt.hard.offset[0];
1075+
lp->hw.copy_from_card(dev, bufnum, 0, &rxdata.pkt, ARC_HDR_SIZE);
1076+
if (rxdata.pkt.hard.offset[0]) {
1077+
ofs = rxdata.pkt.hard.offset[0];
10751078
length = 256 - ofs;
10761079
} else {
1077-
ofs = pkt.hard.offset[1];
1080+
ofs = rxdata.pkt.hard.offset[1];
10781081
length = 512 - ofs;
10791082
}
10801083

10811084
/* get the full header, if possible */
1082-
if (sizeof(pkt.soft) <= length) {
1083-
lp->hw.copy_from_card(dev, bufnum, ofs, soft, sizeof(pkt.soft));
1085+
if (sizeof(rxdata.pkt.soft) <= length) {
1086+
lp->hw.copy_from_card(dev, bufnum, ofs, soft, sizeof(rxdata.pkt.soft));
10841087
} else {
1085-
memset(&pkt.soft, 0, sizeof(pkt.soft));
1088+
memset(&rxdata.pkt.soft, 0, sizeof(rxdata.pkt.soft));
10861089
lp->hw.copy_from_card(dev, bufnum, ofs, soft, length);
10871090
}
10881091

10891092
arc_printk(D_DURING, dev, "Buffer #%d: received packet from %02Xh to %02Xh (%d+4 bytes)\n",
1090-
bufnum, pkt.hard.source, pkt.hard.dest, length);
1093+
bufnum, rxdata.pkt.hard.source, rxdata.pkt.hard.dest, length);
10911094

10921095
dev->stats.rx_packets++;
10931096
dev->stats.rx_bytes += length + ARC_HDR_SIZE;
@@ -1096,13 +1099,13 @@ static void arcnet_rx(struct net_device *dev, int bufnum)
10961099
if (arc_proto_map[soft->proto]->is_ip) {
10971100
if (BUGLVL(D_PROTO)) {
10981101
struct ArcProto
1099-
*oldp = arc_proto_map[lp->default_proto[pkt.hard.source]],
1102+
*oldp = arc_proto_map[lp->default_proto[rxdata.pkt.hard.source]],
11001103
*newp = arc_proto_map[soft->proto];
11011104

11021105
if (oldp != newp) {
11031106
arc_printk(D_PROTO, dev,
11041107
"got protocol %02Xh; encap for host %02Xh is now '%c' (was '%c')\n",
1105-
soft->proto, pkt.hard.source,
1108+
soft->proto, rxdata.pkt.hard.source,
11061109
newp->suffix, oldp->suffix);
11071110
}
11081111
}
@@ -1111,10 +1114,10 @@ static void arcnet_rx(struct net_device *dev, int bufnum)
11111114
lp->default_proto[0] = soft->proto;
11121115

11131116
/* in striking contrast, the following isn't a hack. */
1114-
lp->default_proto[pkt.hard.source] = soft->proto;
1117+
lp->default_proto[rxdata.pkt.hard.source] = soft->proto;
11151118
}
11161119
/* call the protocol-specific receiver. */
1117-
arc_proto_map[soft->proto]->rx(dev, bufnum, &pkt, length);
1120+
arc_proto_map[soft->proto]->rx(dev, bufnum, &rxdata.pkt, length);
11181121
}
11191122

11201123
static void null_rx(struct net_device *dev, int bufnum,

drivers/net/can/usb/Kconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ config CAN_EMS_USB
1515
from EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de).
1616

1717
config CAN_ESD_USB2
18-
tristate "ESD USB/2 CAN/USB interface"
19-
---help---
20-
This driver supports the CAN-USB/2 interface
21-
from esd electronic system design gmbh (http://www.esd.eu).
18+
tristate "ESD USB/2 CAN/USB interface"
19+
---help---
20+
This driver supports the CAN-USB/2 interface
21+
from esd electronic system design gmbh (http://www.esd.eu).
2222

2323
config CAN_GS_USB
2424
tristate "Geschwister Schneider UG interfaces"

drivers/net/dsa/b53/b53_serdes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause
2-
*
1+
/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
2+
/*
33
* Northstar Plus switch SerDes/SGMII PHY definitions
44
*
55
* Copyright (C) 2018 Florian Fainelli <[email protected]>

drivers/net/dsa/lantiq_pce.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: GPL-2.0
1+
/* SPDX-License-Identifier: GPL-2.0 */
22
/*
33
* PCE microcode extracted from UGW 7.1.1 switch api
44
*

drivers/net/dsa/microchip/ksz_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ static inline void ksz_pwrite32(struct ksz_device *dev, int port, int offset,
303303
{ \
304304
.name = #width, \
305305
.val_bits = (width), \
306-
.reg_stride = (width) / 8, \
306+
.reg_stride = 1, \
307307
.reg_bits = (regbits) + (regalign), \
308308
.pad_bits = (regpad), \
309309
.max_register = BIT(regbits) - 1, \

drivers/net/dsa/qca8k.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,9 @@ qca8k_port_enable(struct dsa_switch *ds, int port,
936936
{
937937
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
938938

939+
if (!dsa_is_user_port(ds, port))
940+
return 0;
941+
939942
qca8k_port_set_status(priv, port, 1);
940943
priv->port_sts[port].enabled = 1;
941944

drivers/net/dsa/sja1105/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ config NET_DSA_SJA1105_PTP
2727
config NET_DSA_SJA1105_TAS
2828
bool "Support for the Time-Aware Scheduler on NXP SJA1105"
2929
depends on NET_DSA_SJA1105
30+
depends on NET_SCH_TAPRIO
3031
help
3132
This enables support for the TTEthernet-based egress scheduling
3233
engine in the SJA1105 DSA driver, which is controlled using a

drivers/net/ethernet/Kconfig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,6 @@ source "drivers/net/ethernet/neterion/Kconfig"
140140
source "drivers/net/ethernet/netronome/Kconfig"
141141
source "drivers/net/ethernet/ni/Kconfig"
142142
source "drivers/net/ethernet/8390/Kconfig"
143-
144-
config NET_NETX
145-
tristate "NetX Ethernet support"
146-
select MII
147-
depends on ARCH_NETX
148-
---help---
149-
This is support for the Hilscher netX builtin Ethernet ports
150-
151-
To compile this driver as a module, choose M here. The module
152-
will be called netx-eth.
153-
154143
source "drivers/net/ethernet/nvidia/Kconfig"
155144
source "drivers/net/ethernet/nxp/Kconfig"
156145
source "drivers/net/ethernet/oki-semi/Kconfig"

drivers/net/ethernet/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ obj-$(CONFIG_NET_VENDOR_NATSEMI) += natsemi/
6464
obj-$(CONFIG_NET_VENDOR_NETERION) += neterion/
6565
obj-$(CONFIG_NET_VENDOR_NETRONOME) += netronome/
6666
obj-$(CONFIG_NET_VENDOR_NI) += ni/
67-
obj-$(CONFIG_NET_NETX) += netx-eth.o
6867
obj-$(CONFIG_NET_VENDOR_NVIDIA) += nvidia/
6968
obj-$(CONFIG_LPC_ENET) += nxp/
7069
obj-$(CONFIG_NET_VENDOR_OKI) += oki-semi/

drivers/net/ethernet/allwinner/Kconfig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ config NET_VENDOR_ALLWINNER
2121
if NET_VENDOR_ALLWINNER
2222

2323
config SUN4I_EMAC
24-
tristate "Allwinner A10 EMAC support"
24+
tristate "Allwinner A10 EMAC support"
2525
depends on ARCH_SUNXI
2626
depends on OF
2727
select CRC32
2828
select MII
2929
select PHYLIB
3030
select MDIO_SUN4I
31-
---help---
32-
Support for Allwinner A10 EMAC ethernet driver.
31+
---help---
32+
Support for Allwinner A10 EMAC ethernet driver.
3333

34-
To compile this driver as a module, choose M here. The module
35-
will be called sun4i-emac.
34+
To compile this driver as a module, choose M here. The module
35+
will be called sun4i-emac.
3636

3737
endif # NET_VENDOR_ALLWINNER

drivers/net/ethernet/amazon/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ if NET_VENDOR_AMAZON
1919
config ENA_ETHERNET
2020
tristate "Elastic Network Adapter (ENA) support"
2121
depends on PCI_MSI && !CPU_BIG_ENDIAN
22+
select DIMLIB
2223
---help---
2324
This driver supports Elastic Network Adapter (ENA)"
2425

drivers/net/ethernet/amazon/ena/ena_eth_com.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ static int ena_com_sq_update_llq_tail(struct ena_com_io_sq *io_sq)
211211

212212
pkt_ctrl->curr_bounce_buf =
213213
ena_com_get_next_bounce_buffer(&io_sq->bounce_buf_ctrl);
214-
memset(io_sq->llq_buf_ctrl.curr_bounce_buf,
215-
0x0, llq_info->desc_list_entry_size);
214+
memset(io_sq->llq_buf_ctrl.curr_bounce_buf,
215+
0x0, llq_info->desc_list_entry_size);
216216

217217
pkt_ctrl->idx = 0;
218218
if (unlikely(llq_info->desc_stride_ctrl == ENA_ADMIN_SINGLE_DESC_PER_ENTRY))

drivers/net/ethernet/aquantia/atlantic/aq_vec.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -306,27 +306,24 @@ irqreturn_t aq_vec_isr_legacy(int irq, void *private)
306306
{
307307
struct aq_vec_s *self = private;
308308
u64 irq_mask = 0U;
309-
irqreturn_t err = 0;
309+
int err;
310310

311-
if (!self) {
312-
err = -EINVAL;
313-
goto err_exit;
314-
}
311+
if (!self)
312+
return IRQ_NONE;
315313
err = self->aq_hw_ops->hw_irq_read(self->aq_hw, &irq_mask);
316314
if (err < 0)
317-
goto err_exit;
315+
return IRQ_NONE;
318316

319317
if (irq_mask) {
320318
self->aq_hw_ops->hw_irq_disable(self->aq_hw,
321319
1U << self->aq_ring_param.vec_idx);
322320
napi_schedule(&self->napi);
323321
} else {
324322
self->aq_hw_ops->hw_irq_enable(self->aq_hw, 1U);
325-
err = IRQ_NONE;
323+
return IRQ_NONE;
326324
}
327325

328-
err_exit:
329-
return err >= 0 ? IRQ_HANDLED : IRQ_NONE;
326+
return IRQ_HANDLED;
330327
}
331328

332329
cpumask_t *aq_vec_get_affinity_mask(struct aq_vec_s *self)

0 commit comments

Comments
 (0)