Skip to content

Commit f2afccf

Browse files
committed
Merge tag 'net-6.3-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from wireless and can. Current release - regressions: - wifi: mac80211: - fix potential null pointer dereference - fix receiving mesh packets in forwarding=0 networks - fix mesh forwarding Current release - new code bugs: - virtio/vsock: fix leaks due to missing skb owner Previous releases - regressions: - raw: fix NULL deref in raw_get_next(). - sctp: check send stream number after wait_for_sndbuf - qrtr: - fix a refcount bug in qrtr_recvmsg() - do not do DEL_SERVER broadcast after DEL_CLIENT - wifi: brcmfmac: fix SDIO suspend/resume regression - wifi: mt76: fix use-after-free in fw features query. - can: fix race between isotp_sendsmg() and isotp_release() - eth: mtk_eth_soc: fix remaining throughput regression - eth: ice: reset FDIR counter in FDIR init stage Previous releases - always broken: - core: don't let netpoll invoke NAPI if in xmit context - icmp: guard against too small mtu - ipv6: fix an uninit variable access bug in __ip6_make_skb() - wifi: mac80211: fix the size calculation of ieee80211_ie_len_eht_cap() - can: fix poll() to not report false EPOLLOUT events - eth: gve: secure enough bytes in the first TX desc for all TCP pkts" * tag 'net-6.3-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (47 commits) net: stmmac: check fwnode for phy device before scanning for phy net: stmmac: Add queue reset into stmmac_xdp_open() function selftests: net: rps_default_mask.sh: delete veth link specifically net: fec: make use of MDIO C45 quirk can: isotp: fix race between isotp_sendsmg() and isotp_release() can: isotp: isotp_ops: fix poll() to not report false EPOLLOUT events can: isotp: isotp_recvmsg(): use sock_recv_cmsgs() to get SOCK_RXQ_OVFL infos can: j1939: j1939_tp_tx_dat_new(): fix out-of-bounds memory access gve: Secure enough bytes in the first TX desc for all TCP pkts netlink: annotate lockless accesses to nlk->max_recvmsg_len ethtool: reset #lanes when lanes is omitted ping: Fix potentail NULL deref for /proc/net/icmp. raw: Fix NULL deref in raw_get_next(). ice: Reset FDIR counter in FDIR init stage ice: fix wrong fallback logic for FDIR net: stmmac: fix up RX flow hash indirection table when setting channels net: ethernet: ti: am65-cpsw: Fix mdio cleanup in probe wifi: mt76: ignore key disable commands wifi: ath11k: reduce the MHI timeout to 20s ipv6: Fix an uninit variable access bug in __ip6_make_skb() ...
2 parents 8f2e1a8 + 8fbc10b commit f2afccf

File tree

52 files changed

+408
-244
lines changed

Some content is hidden

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

52 files changed

+408
-244
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5601,7 +5601,7 @@ static const struct mv88e6xxx_ops mv88e6393x_ops = {
56015601
* .port_set_upstream_port method.
56025602
*/
56035603
.set_egress_port = mv88e6393x_set_egress_port,
5604-
.watchdog_ops = &mv88e6390_watchdog_ops,
5604+
.watchdog_ops = &mv88e6393x_watchdog_ops,
56055605
.mgmt_rsvd2cpu = mv88e6393x_port_mgmt_rsvd2cpu,
56065606
.pot_clear = mv88e6xxx_g2_pot_clear,
56075607
.reset = mv88e6352_g1_reset,

drivers/net/dsa/mv88e6xxx/global2.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,26 @@ const struct mv88e6xxx_irq_ops mv88e6390_watchdog_ops = {
943943
.irq_free = mv88e6390_watchdog_free,
944944
};
945945

946+
static int mv88e6393x_watchdog_action(struct mv88e6xxx_chip *chip, int irq)
947+
{
948+
mv88e6390_watchdog_action(chip, irq);
949+
950+
/* Fix for clearing the force WD event bit.
951+
* Unreleased erratum on mv88e6393x.
952+
*/
953+
mv88e6xxx_g2_write(chip, MV88E6390_G2_WDOG_CTL,
954+
MV88E6390_G2_WDOG_CTL_UPDATE |
955+
MV88E6390_G2_WDOG_CTL_PTR_EVENT);
956+
957+
return IRQ_HANDLED;
958+
}
959+
960+
const struct mv88e6xxx_irq_ops mv88e6393x_watchdog_ops = {
961+
.irq_action = mv88e6393x_watchdog_action,
962+
.irq_setup = mv88e6390_watchdog_setup,
963+
.irq_free = mv88e6390_watchdog_free,
964+
};
965+
946966
static irqreturn_t mv88e6xxx_g2_watchdog_thread_fn(int irq, void *dev_id)
947967
{
948968
struct mv88e6xxx_chip *chip = dev_id;

drivers/net/dsa/mv88e6xxx/global2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ int mv88e6xxx_g2_device_mapping_write(struct mv88e6xxx_chip *chip, int target,
369369
extern const struct mv88e6xxx_irq_ops mv88e6097_watchdog_ops;
370370
extern const struct mv88e6xxx_irq_ops mv88e6250_watchdog_ops;
371371
extern const struct mv88e6xxx_irq_ops mv88e6390_watchdog_ops;
372+
extern const struct mv88e6xxx_irq_ops mv88e6393x_watchdog_ops;
372373

373374
extern const struct mv88e6xxx_avb_ops mv88e6165_avb_ops;
374375
extern const struct mv88e6xxx_avb_ops mv88e6352_avb_ops;

drivers/net/ethernet/freescale/fec.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,11 @@ struct bufdesc_ex {
507507
/* i.MX6Q adds pm_qos support */
508508
#define FEC_QUIRK_HAS_PMQOS BIT(23)
509509

510+
/* Not all FEC hardware block MDIOs support accesses in C45 mode.
511+
* Older blocks in the ColdFire parts do not support it.
512+
*/
513+
#define FEC_QUIRK_HAS_MDIO_C45 BIT(24)
514+
510515
struct bufdesc_prop {
511516
int qid;
512517
/* Address of Rx and Tx buffers */

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,30 +100,32 @@ struct fec_devinfo {
100100

101101
static const struct fec_devinfo fec_imx25_info = {
102102
.quirks = FEC_QUIRK_USE_GASKET | FEC_QUIRK_MIB_CLEAR |
103-
FEC_QUIRK_HAS_FRREG,
103+
FEC_QUIRK_HAS_FRREG | FEC_QUIRK_HAS_MDIO_C45,
104104
};
105105

106106
static const struct fec_devinfo fec_imx27_info = {
107-
.quirks = FEC_QUIRK_MIB_CLEAR | FEC_QUIRK_HAS_FRREG,
107+
.quirks = FEC_QUIRK_MIB_CLEAR | FEC_QUIRK_HAS_FRREG |
108+
FEC_QUIRK_HAS_MDIO_C45,
108109
};
109110

110111
static const struct fec_devinfo fec_imx28_info = {
111112
.quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_SWAP_FRAME |
112113
FEC_QUIRK_SINGLE_MDIO | FEC_QUIRK_HAS_RACC |
113114
FEC_QUIRK_HAS_FRREG | FEC_QUIRK_CLEAR_SETUP_MII |
114-
FEC_QUIRK_NO_HARD_RESET,
115+
FEC_QUIRK_NO_HARD_RESET | FEC_QUIRK_HAS_MDIO_C45,
115116
};
116117

117118
static const struct fec_devinfo fec_imx6q_info = {
118119
.quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
119120
FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
120121
FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR006358 |
121122
FEC_QUIRK_HAS_RACC | FEC_QUIRK_CLEAR_SETUP_MII |
122-
FEC_QUIRK_HAS_PMQOS,
123+
FEC_QUIRK_HAS_PMQOS | FEC_QUIRK_HAS_MDIO_C45,
123124
};
124125

125126
static const struct fec_devinfo fec_mvf600_info = {
126-
.quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_RACC,
127+
.quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_RACC |
128+
FEC_QUIRK_HAS_MDIO_C45,
127129
};
128130

129131
static const struct fec_devinfo fec_imx6x_info = {
@@ -132,15 +134,17 @@ static const struct fec_devinfo fec_imx6x_info = {
132134
FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB |
133135
FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE |
134136
FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE |
135-
FEC_QUIRK_CLEAR_SETUP_MII | FEC_QUIRK_HAS_MULTI_QUEUES,
137+
FEC_QUIRK_CLEAR_SETUP_MII | FEC_QUIRK_HAS_MULTI_QUEUES |
138+
FEC_QUIRK_HAS_MDIO_C45,
136139
};
137140

138141
static const struct fec_devinfo fec_imx6ul_info = {
139142
.quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
140143
FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
141144
FEC_QUIRK_HAS_VLAN | FEC_QUIRK_ERR007885 |
142145
FEC_QUIRK_BUG_CAPTURE | FEC_QUIRK_HAS_RACC |
143-
FEC_QUIRK_HAS_COALESCE | FEC_QUIRK_CLEAR_SETUP_MII,
146+
FEC_QUIRK_HAS_COALESCE | FEC_QUIRK_CLEAR_SETUP_MII |
147+
FEC_QUIRK_HAS_MDIO_C45,
144148
};
145149

146150
static const struct fec_devinfo fec_imx8mq_info = {
@@ -150,7 +154,8 @@ static const struct fec_devinfo fec_imx8mq_info = {
150154
FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE |
151155
FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE |
152156
FEC_QUIRK_CLEAR_SETUP_MII | FEC_QUIRK_HAS_MULTI_QUEUES |
153-
FEC_QUIRK_HAS_EEE | FEC_QUIRK_WAKEUP_FROM_INT2,
157+
FEC_QUIRK_HAS_EEE | FEC_QUIRK_WAKEUP_FROM_INT2 |
158+
FEC_QUIRK_HAS_MDIO_C45,
154159
};
155160

156161
static const struct fec_devinfo fec_imx8qm_info = {
@@ -160,14 +165,15 @@ static const struct fec_devinfo fec_imx8qm_info = {
160165
FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE |
161166
FEC_QUIRK_HAS_RACC | FEC_QUIRK_HAS_COALESCE |
162167
FEC_QUIRK_CLEAR_SETUP_MII | FEC_QUIRK_HAS_MULTI_QUEUES |
163-
FEC_QUIRK_DELAYED_CLKS_SUPPORT,
168+
FEC_QUIRK_DELAYED_CLKS_SUPPORT | FEC_QUIRK_HAS_MDIO_C45,
164169
};
165170

166171
static const struct fec_devinfo fec_s32v234_info = {
167172
.quirks = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
168173
FEC_QUIRK_HAS_BUFDESC_EX | FEC_QUIRK_HAS_CSUM |
169174
FEC_QUIRK_HAS_VLAN | FEC_QUIRK_HAS_AVB |
170-
FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE,
175+
FEC_QUIRK_ERR007885 | FEC_QUIRK_BUG_CAPTURE |
176+
FEC_QUIRK_HAS_MDIO_C45,
171177
};
172178

173179
static struct platform_device_id fec_devtype[] = {
@@ -2434,8 +2440,10 @@ static int fec_enet_mii_init(struct platform_device *pdev)
24342440
fep->mii_bus->name = "fec_enet_mii_bus";
24352441
fep->mii_bus->read = fec_enet_mdio_read_c22;
24362442
fep->mii_bus->write = fec_enet_mdio_write_c22;
2437-
fep->mii_bus->read_c45 = fec_enet_mdio_read_c45;
2438-
fep->mii_bus->write_c45 = fec_enet_mdio_write_c45;
2443+
if (fep->quirks & FEC_QUIRK_HAS_MDIO_C45) {
2444+
fep->mii_bus->read_c45 = fec_enet_mdio_read_c45;
2445+
fep->mii_bus->write_c45 = fec_enet_mdio_write_c45;
2446+
}
24392447
snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
24402448
pdev->name, fep->dev_id + 1);
24412449
fep->mii_bus->priv = fep;

drivers/net/ethernet/google/gve/gve.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747

4848
#define GVE_RX_BUFFER_SIZE_DQO 2048
4949

50+
#define GVE_GQ_TX_MIN_PKT_DESC_BYTES 182
51+
5052
/* Each slot in the desc ring has a 1:1 mapping to a slot in the data ring */
5153
struct gve_rx_desc_queue {
5254
struct gve_rx_desc *desc_ring; /* the descriptor ring */

drivers/net/ethernet/google/gve/gve_tx.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ static inline int gve_skb_fifo_bytes_required(struct gve_tx_ring *tx,
284284
int bytes;
285285
int hlen;
286286

287-
hlen = skb_is_gso(skb) ? skb_checksum_start_offset(skb) +
288-
tcp_hdrlen(skb) : skb_headlen(skb);
287+
hlen = skb_is_gso(skb) ? skb_checksum_start_offset(skb) + tcp_hdrlen(skb) :
288+
min_t(int, GVE_GQ_TX_MIN_PKT_DESC_BYTES, skb->len);
289289

290290
pad_bytes = gve_tx_fifo_pad_alloc_one_frag(&tx->tx_fifo,
291291
hlen);
@@ -454,13 +454,11 @@ static int gve_tx_add_skb_copy(struct gve_priv *priv, struct gve_tx_ring *tx, st
454454
pkt_desc = &tx->desc[idx];
455455

456456
l4_hdr_offset = skb_checksum_start_offset(skb);
457-
/* If the skb is gso, then we want the tcp header in the first segment
458-
* otherwise we want the linear portion of the skb (which will contain
459-
* the checksum because skb->csum_start and skb->csum_offset are given
460-
* relative to skb->head) in the first segment.
457+
/* If the skb is gso, then we want the tcp header alone in the first segment
458+
* otherwise we want the minimum required by the gVNIC spec.
461459
*/
462460
hlen = is_gso ? l4_hdr_offset + tcp_hdrlen(skb) :
463-
skb_headlen(skb);
461+
min_t(int, GVE_GQ_TX_MIN_PKT_DESC_BYTES, skb->len);
464462

465463
info->skb = skb;
466464
/* We don't want to split the header, so if necessary, pad to the end

drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,21 @@ static void ice_vc_fdir_rem_prof_all(struct ice_vf *vf)
541541
}
542542
}
543543

544+
/**
545+
* ice_vc_fdir_reset_cnt_all - reset all FDIR counters for this VF FDIR
546+
* @fdir: pointer to the VF FDIR structure
547+
*/
548+
static void ice_vc_fdir_reset_cnt_all(struct ice_vf_fdir *fdir)
549+
{
550+
enum ice_fltr_ptype flow;
551+
552+
for (flow = ICE_FLTR_PTYPE_NONF_NONE;
553+
flow < ICE_FLTR_PTYPE_MAX; flow++) {
554+
fdir->fdir_fltr_cnt[flow][0] = 0;
555+
fdir->fdir_fltr_cnt[flow][1] = 0;
556+
}
557+
}
558+
544559
/**
545560
* ice_vc_fdir_has_prof_conflict
546561
* @vf: pointer to the VF structure
@@ -1871,7 +1886,7 @@ int ice_vc_add_fdir_fltr(struct ice_vf *vf, u8 *msg)
18711886
v_ret = VIRTCHNL_STATUS_SUCCESS;
18721887
stat->status = VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE;
18731888
dev_dbg(dev, "VF %d: set FDIR context failed\n", vf->vf_id);
1874-
goto err_free_conf;
1889+
goto err_rem_entry;
18751890
}
18761891

18771892
ret = ice_vc_fdir_write_fltr(vf, conf, true, is_tun);
@@ -1880,15 +1895,16 @@ int ice_vc_add_fdir_fltr(struct ice_vf *vf, u8 *msg)
18801895
stat->status = VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE;
18811896
dev_err(dev, "VF %d: writing FDIR rule failed, ret:%d\n",
18821897
vf->vf_id, ret);
1883-
goto err_rem_entry;
1898+
goto err_clr_irq;
18841899
}
18851900

18861901
exit:
18871902
kfree(stat);
18881903
return ret;
18891904

1890-
err_rem_entry:
1905+
err_clr_irq:
18911906
ice_vc_fdir_clear_irq_ctx(vf);
1907+
err_rem_entry:
18921908
ice_vc_fdir_remove_entry(vf, conf, conf->flow_id);
18931909
err_free_conf:
18941910
devm_kfree(dev, conf);
@@ -1997,6 +2013,7 @@ void ice_vf_fdir_init(struct ice_vf *vf)
19972013
spin_lock_init(&fdir->ctx_lock);
19982014
fdir->ctx_irq.flags = 0;
19992015
fdir->ctx_done.flags = 0;
2016+
ice_vc_fdir_reset_cnt_all(fdir);
20002017
}
20012018

20022019
/**

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ static void mtk_mac_link_up(struct phylink_config *config,
753753
MAC_MCR_FORCE_RX_FC);
754754

755755
/* Configure speed */
756+
mac->speed = speed;
756757
switch (speed) {
757758
case SPEED_2500:
758759
case SPEED_1000:
@@ -3235,6 +3236,9 @@ static int mtk_device_event(struct notifier_block *n, unsigned long event, void
32353236
if (dp->index >= MTK_QDMA_NUM_QUEUES)
32363237
return NOTIFY_DONE;
32373238

3239+
if (mac->speed > 0 && mac->speed <= s.base.speed)
3240+
s.base.speed = 0;
3241+
32383242
mtk_set_queue_speed(eth, dp->index + 3, s.base.speed);
32393243

32403244
return NOTIFY_DONE;

drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ static void intel_speed_mode_2500(struct net_device *ndev, void *intel_data)
251251
priv->plat->mdio_bus_data->xpcs_an_inband = false;
252252
} else {
253253
priv->plat->max_speed = 1000;
254-
priv->plat->mdio_bus_data->xpcs_an_inband = true;
255254
}
256255
}
257256

0 commit comments

Comments
 (0)