Skip to content

Commit eb2eb51

Browse files
committed
Merge tag 'net-5.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from bpf, netfilter, and ieee802154. Current release - regressions: - Partially revert "net/smc: Add netlink net namespace support", fix uABI breakage - netfilter: - nft_ct: fix use after free when attaching zone template - nft_byteorder: track register operations Previous releases - regressions: - ipheth: fix EOVERFLOW in ipheth_rcvbulk_callback - phy: qca8081: fix speeds lower than 2.5Gb/s - sched: fix use-after-free in tc_new_tfilter() Previous releases - always broken: - tcp: fix mem under-charging with zerocopy sendmsg() - tcp: add missing tcp_skb_can_collapse() test in tcp_shift_skb_data() - neigh: do not trigger immediate probes on NUD_FAILED from neigh_managed_work, avoid a deadlock - bpf: use VM_MAP instead of VM_ALLOC for ringbuf, avoid KASAN false-positives - netfilter: nft_reject_bridge: fix for missing reply from prerouting - smc: forward wakeup to smc socket waitqueue after fallback - ieee802154: - return meaningful error codes from the netlink helpers - mcr20a: fix lifs/sifs periods - at86rf230, ca8210: stop leaking skbs on error paths - macsec: add missing un-offload call for NETDEV_UNREGISTER of parent - ax25: add refcount in ax25_dev to avoid UAF bugs - eth: mlx5e: - fix SFP module EEPROM query - fix broken SKB allocation in HW-GRO - IPsec offload: fix tunnel mode crypto for non-TCP/UDP flows - eth: amd-xgbe: - fix skb data length underflow - ensure reset of the tx_timer_active flag, avoid Tx timeouts - eth: stmmac: fix runtime pm use in stmmac_dvr_remove() - eth: e1000e: handshake with CSME starts from Alder Lake platforms" * tag 'net-5.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (69 commits) ax25: fix reference count leaks of ax25_dev net: stmmac: ensure PTP time register reads are consistent net: ipa: request IPA register values be retained dt-bindings: net: qcom,ipa: add optional qcom,qmp property tools/resolve_btfids: Do not print any commands when building silently bpf: Use VM_MAP instead of VM_ALLOC for ringbuf net, neigh: Do not trigger immediate probes on NUD_FAILED from neigh_managed_work tcp: add missing tcp_skb_can_collapse() test in tcp_shift_skb_data() net: sparx5: do not refer to skb after passing it on Partially revert "net/smc: Add netlink net namespace support" net/mlx5e: Avoid field-overflowing memcpy() net/mlx5e: Use struct_group() for memcpy() region net/mlx5e: Avoid implicit modify hdr for decap drop rule net/mlx5e: IPsec: Fix tunnel mode crypto offload for non TCP/UDP traffic net/mlx5e: IPsec: Fix crypto offload for non TCP/UDP encapsulated traffic net/mlx5e: Don't treat small ceil values as unlimited in HTB offload net/mlx5: E-Switch, Fix uninitialized variable modact net/mlx5e: Fix handling of wrong devices during bond netevent net/mlx5e: Fix broken SKB allocation in HW-GRO net/mlx5e: Fix wrong calculation of header index in HW_GRO ...
2 parents 551007a + 87563a0 commit eb2eb51

Some content is hidden

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

78 files changed

+877
-453
lines changed

Documentation/devicetree/bindings/net/qcom,ipa.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ properties:
107107
- const: imem
108108
- const: config
109109

110+
qcom,qmp:
111+
$ref: /schemas/types.yaml#/definitions/phandle
112+
description: phandle to the AOSS side-channel message RAM
113+
110114
qcom,smem-states:
111115
$ref: /schemas/types.yaml#/definitions/phandle-array
112116
description: State bits used in by the AP to signal the modem.
@@ -222,6 +226,8 @@ examples:
222226
"imem",
223227
"config";
224228
229+
qcom,qmp = <&aoss_qmp>;
230+
225231
qcom,smem-states = <&ipa_smp2p_out 0>,
226232
<&ipa_smp2p_out 1>;
227233
qcom,smem-state-names = "ipa-clock-enabled-valid",

MAINTAINERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4157,9 +4157,8 @@ N: csky
41574157
K: csky
41584158

41594159
CA8210 IEEE-802.15.4 RADIO DRIVER
4160-
M: Harry Morris <[email protected]>
41614160
4162-
S: Maintained
4161+
S: Orphan
41634162
W: https://github.com/Cascoda/ca8210-linux.git
41644163
F: Documentation/devicetree/bindings/net/ieee802154/ca8210.txt
41654164
F: drivers/net/ieee802154/ca8210.c

drivers/net/dsa/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ config NET_DSA_LANTIQ_GSWIP
3636
config NET_DSA_MT7530
3737
tristate "MediaTek MT753x and MT7621 Ethernet switch support"
3838
select NET_DSA_TAG_MTK
39+
select MEDIATEK_GE_PHY
3940
help
4041
This enables support for the MediaTek MT7530, MT7531, and MT7621
4142
Ethernet switch chips.

drivers/net/ethernet/amd/xgbe/xgbe-drv.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,9 @@ static void xgbe_stop_timers(struct xgbe_prv_data *pdata)
721721
if (!channel->tx_ring)
722722
break;
723723

724+
/* Deactivate the Tx timer */
724725
del_timer_sync(&channel->tx_timer);
726+
channel->tx_timer_active = 0;
725727
}
726728
}
727729

@@ -2550,6 +2552,14 @@ static int xgbe_rx_poll(struct xgbe_channel *channel, int budget)
25502552
buf2_len = xgbe_rx_buf2_len(rdata, packet, len);
25512553
len += buf2_len;
25522554

2555+
if (buf2_len > rdata->rx.buf.dma_len) {
2556+
/* Hardware inconsistency within the descriptors
2557+
* that has resulted in a length underflow.
2558+
*/
2559+
error = 1;
2560+
goto skip_data;
2561+
}
2562+
25532563
if (!skb) {
25542564
skb = xgbe_create_skb(pdata, napi, rdata,
25552565
buf1_len);
@@ -2579,8 +2589,10 @@ static int xgbe_rx_poll(struct xgbe_channel *channel, int budget)
25792589
if (!last || context_next)
25802590
goto read_again;
25812591

2582-
if (!skb)
2592+
if (!skb || error) {
2593+
dev_kfree_skb(skb);
25832594
goto next_packet;
2595+
}
25842596

25852597
/* Be sure we don't exceed the configured MTU */
25862598
max_len = netdev->mtu + ETH_HLEN;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static int gve_adminq_parse_err(struct gve_priv *priv, u32 status)
301301
*/
302302
static int gve_adminq_kick_and_wait(struct gve_priv *priv)
303303
{
304-
u32 tail, head;
304+
int tail, head;
305305
int i;
306306

307307
tail = ioread32be(&priv->reg_bar0->adminq_event_counter);

drivers/net/ethernet/intel/e1000e/e1000.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ enum e1000_boards {
115115
board_pch_lpt,
116116
board_pch_spt,
117117
board_pch_cnp,
118-
board_pch_tgp
118+
board_pch_tgp,
119+
board_pch_adp
119120
};
120121

121122
struct e1000_ps_page {
@@ -502,6 +503,7 @@ extern const struct e1000_info e1000_pch_lpt_info;
502503
extern const struct e1000_info e1000_pch_spt_info;
503504
extern const struct e1000_info e1000_pch_cnp_info;
504505
extern const struct e1000_info e1000_pch_tgp_info;
506+
extern const struct e1000_info e1000_pch_adp_info;
505507
extern const struct e1000_info e1000_es2_info;
506508

507509
void e1000e_ptp_init(struct e1000_adapter *adapter);

drivers/net/ethernet/intel/e1000e/ich8lan.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6021,3 +6021,23 @@ const struct e1000_info e1000_pch_tgp_info = {
60216021
.phy_ops = &ich8_phy_ops,
60226022
.nvm_ops = &spt_nvm_ops,
60236023
};
6024+
6025+
const struct e1000_info e1000_pch_adp_info = {
6026+
.mac = e1000_pch_adp,
6027+
.flags = FLAG_IS_ICH
6028+
| FLAG_HAS_WOL
6029+
| FLAG_HAS_HW_TIMESTAMP
6030+
| FLAG_HAS_CTRLEXT_ON_LOAD
6031+
| FLAG_HAS_AMT
6032+
| FLAG_HAS_FLASH
6033+
| FLAG_HAS_JUMBO_FRAMES
6034+
| FLAG_APME_IN_WUC,
6035+
.flags2 = FLAG2_HAS_PHY_STATS
6036+
| FLAG2_HAS_EEE,
6037+
.pba = 26,
6038+
.max_hw_frame_size = 9022,
6039+
.get_variants = e1000_get_variants_ich8lan,
6040+
.mac_ops = &ich8_mac_ops,
6041+
.phy_ops = &ich8_phy_ops,
6042+
.nvm_ops = &spt_nvm_ops,
6043+
};

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ static const struct e1000_info *e1000_info_tbl[] = {
5252
[board_pch_spt] = &e1000_pch_spt_info,
5353
[board_pch_cnp] = &e1000_pch_cnp_info,
5454
[board_pch_tgp] = &e1000_pch_tgp_info,
55+
[board_pch_adp] = &e1000_pch_adp_info,
5556
};
5657

5758
struct e1000_reg_info {
@@ -6341,7 +6342,8 @@ static void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
63416342
u32 mac_data;
63426343
u16 phy_data;
63436344

6344-
if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID) {
6345+
if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID &&
6346+
hw->mac.type >= e1000_pch_adp) {
63456347
/* Request ME configure the device for S0ix */
63466348
mac_data = er32(H2ME);
63476349
mac_data |= E1000_H2ME_START_DPG;
@@ -6490,7 +6492,8 @@ static void e1000e_s0ix_exit_flow(struct e1000_adapter *adapter)
64906492
u16 phy_data;
64916493
u32 i = 0;
64926494

6493-
if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID) {
6495+
if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID &&
6496+
hw->mac.type >= e1000_pch_adp) {
64946497
/* Request ME unconfigure the device from S0ix */
64956498
mac_data = er32(H2ME);
64966499
mac_data &= ~E1000_H2ME_START_DPG;
@@ -7898,22 +7901,22 @@ static const struct pci_device_id e1000_pci_tbl[] = {
78987901
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V14), board_pch_tgp },
78997902
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_LM15), board_pch_tgp },
79007903
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_TGP_I219_V15), board_pch_tgp },
7901-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM23), board_pch_tgp },
7902-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V23), board_pch_tgp },
7903-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM16), board_pch_tgp },
7904-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V16), board_pch_tgp },
7905-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM17), board_pch_tgp },
7906-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V17), board_pch_tgp },
7907-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM22), board_pch_tgp },
7908-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V22), board_pch_tgp },
7909-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM18), board_pch_tgp },
7910-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V18), board_pch_tgp },
7911-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM19), board_pch_tgp },
7912-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V19), board_pch_tgp },
7913-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM20), board_pch_tgp },
7914-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V20), board_pch_tgp },
7915-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM21), board_pch_tgp },
7916-
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V21), board_pch_tgp },
7904+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM23), board_pch_adp },
7905+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V23), board_pch_adp },
7906+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM16), board_pch_adp },
7907+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V16), board_pch_adp },
7908+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_LM17), board_pch_adp },
7909+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_ADP_I219_V17), board_pch_adp },
7910+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_LM22), board_pch_adp },
7911+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_RPL_I219_V22), board_pch_adp },
7912+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM18), board_pch_adp },
7913+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V18), board_pch_adp },
7914+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_LM19), board_pch_adp },
7915+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_MTP_I219_V19), board_pch_adp },
7916+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM20), board_pch_adp },
7917+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V20), board_pch_adp },
7918+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_LM21), board_pch_adp },
7919+
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_LNP_I219_V21), board_pch_adp },
79177920

79187921
{ 0, 0, 0, 0, 0, 0, 0 } /* terminate list */
79197922
};

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ enum i40e_state_t {
144144
__I40E_VIRTCHNL_OP_PENDING,
145145
__I40E_RECOVERY_MODE,
146146
__I40E_VF_RESETS_DISABLED, /* disable resets during i40e_remove */
147+
__I40E_IN_REMOVE,
147148
__I40E_VFS_RELEASING,
148149
/* This must be last as it determines the size of the BITMAP */
149150
__I40E_STATE_SIZE__,

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5372,14 +5372,24 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
53725372
/* There is no need to reset BW when mqprio mode is on. */
53735373
if (pf->flags & I40E_FLAG_TC_MQPRIO)
53745374
return 0;
5375-
if (!vsi->mqprio_qopt.qopt.hw && !(pf->flags & I40E_FLAG_DCB_ENABLED)) {
5375+
5376+
if (!vsi->mqprio_qopt.qopt.hw) {
5377+
if (pf->flags & I40E_FLAG_DCB_ENABLED)
5378+
goto skip_reset;
5379+
5380+
if (IS_ENABLED(CONFIG_I40E_DCB) &&
5381+
i40e_dcb_hw_get_num_tc(&pf->hw) == 1)
5382+
goto skip_reset;
5383+
53765384
ret = i40e_set_bw_limit(vsi, vsi->seid, 0);
53775385
if (ret)
53785386
dev_info(&pf->pdev->dev,
53795387
"Failed to reset tx rate for vsi->seid %u\n",
53805388
vsi->seid);
53815389
return ret;
53825390
}
5391+
5392+
skip_reset:
53835393
memset(&bw_data, 0, sizeof(bw_data));
53845394
bw_data.tc_valid_bits = enabled_tc;
53855395
for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)
@@ -10853,6 +10863,9 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit,
1085310863
bool lock_acquired)
1085410864
{
1085510865
int ret;
10866+
10867+
if (test_bit(__I40E_IN_REMOVE, pf->state))
10868+
return;
1085610869
/* Now we wait for GRST to settle out.
1085710870
* We don't have to delete the VEBs or VSIs from the hw switch
1085810871
* because the reset will make them disappear.
@@ -12212,6 +12225,8 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
1221212225

1221312226
vsi->req_queue_pairs = queue_count;
1221412227
i40e_prep_for_reset(pf);
12228+
if (test_bit(__I40E_IN_REMOVE, pf->state))
12229+
return pf->alloc_rss_size;
1221512230

1221612231
pf->alloc_rss_size = new_rss_size;
1221712232

@@ -13038,6 +13053,10 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi, struct bpf_prog *prog,
1303813053
if (need_reset)
1303913054
i40e_prep_for_reset(pf);
1304013055

13056+
/* VSI shall be deleted in a moment, just return EINVAL */
13057+
if (test_bit(__I40E_IN_REMOVE, pf->state))
13058+
return -EINVAL;
13059+
1304113060
old_prog = xchg(&vsi->xdp_prog, prog);
1304213061

1304313062
if (need_reset) {
@@ -15928,8 +15947,13 @@ static void i40e_remove(struct pci_dev *pdev)
1592815947
i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), 0);
1592915948
i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), 0);
1593015949

15931-
while (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state))
15950+
/* Grab __I40E_RESET_RECOVERY_PENDING and set __I40E_IN_REMOVE
15951+
* flags, once they are set, i40e_rebuild should not be called as
15952+
* i40e_prep_for_reset always returns early.
15953+
*/
15954+
while (test_and_set_bit(__I40E_RESET_RECOVERY_PENDING, pf->state))
1593215955
usleep_range(1000, 2000);
15956+
set_bit(__I40E_IN_REMOVE, pf->state);
1593315957

1593415958
if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {
1593515959
set_bit(__I40E_VF_RESETS_DISABLED, pf->state);
@@ -16128,6 +16152,9 @@ static void i40e_pci_error_reset_done(struct pci_dev *pdev)
1612816152
{
1612916153
struct i40e_pf *pf = pci_get_drvdata(pdev);
1613016154

16155+
if (test_bit(__I40E_IN_REMOVE, pf->state))
16156+
return;
16157+
1613116158
i40e_reset_and_rebuild(pf, false, false);
1613216159
}
1613316160

0 commit comments

Comments
 (0)