Skip to content

Commit 551acdc

Browse files
committed
Merge tag 'net-5.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter, ipsec, and wireless. A few last minute revert / disable and fix patches came down from our sub-trees. We're not waiting for any fixes at this point. Current release - regressions: - Revert "netfilter: nat: force port remap to prevent shadowing well-known ports", restore working conntrack on asymmetric paths - Revert "ath10k: drop beacon and probe response which leak from other channel", restore working AP and mesh mode on QCA9984 - eth: intel: fix hang during reboot/shutdown Current release - new code bugs: - netfilter: nf_tables: disable register tracking, it needs more work to cover all corner cases Previous releases - regressions: - ipv6: fix skb_over_panic in __ip6_append_data when (admin-only) extension headers get specified - esp6: fix ESP over TCP/UDP, interpret ipv6_skip_exthdr's return value more selectively - bnx2x: fix driver load failure when FW not present in initrd Previous releases - always broken: - vsock: stop destroying unrelated sockets in nested virtualization - packet: fix slab-out-of-bounds access in packet_recvmsg() Misc: - add Paolo Abeni to networking maintainers!" * tag 'net-5.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (26 commits) iavf: Fix hang during reboot/shutdown net: mscc: ocelot: fix backwards compatibility with single-chain tc-flower offload net: bcmgenet: skip invalid partial checksums bnx2x: fix built-in kernel driver load failure net: phy: mscc: Add MODULE_FIRMWARE macros net: dsa: Add missing of_node_put() in dsa_port_parse_of net: handle ARPHRD_PIMREG in dev_is_mac_header_xmit() Revert "ath10k: drop beacon and probe response which leak from other channel" hv_netvsc: Add check for kvmalloc_array iavf: Fix double free in iavf_reset_task ice: destroy flow director filter mutex after releasing VSIs ice: fix NULL pointer dereference in ice_update_vsi_tx_ring_stats() Add Paolo Abeni to networking maintainers atm: eni: Add check for dma_map_single net/packet: fix slab-out-of-bounds access in packet_recvmsg() net: mdio: mscc-miim: fix duplicate debugfs entry net: phy: marvell: Fix invalid comparison in the resume and suspend functions esp6: fix check on ipv6_skip_exthdr's return value net: dsa: microchip: add spi_device_id tables netfilter: nf_tables: disable register tracking ...
2 parents c81801e + b04683f commit 551acdc

33 files changed

Lines changed: 154 additions & 133 deletions

File tree

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13376,6 +13376,7 @@ F: net/core/drop_monitor.c
1337613376
NETWORKING DRIVERS
1337713377
M: "David S. Miller" <davem@davemloft.net>
1337813378
M: Jakub Kicinski <kuba@kernel.org>
13379+
M: Paolo Abeni <pabeni@redhat.com>
1337913380
L: netdev@vger.kernel.org
1338013381
S: Maintained
1338113382
Q: https://patchwork.kernel.org/project/netdevbpf/list/
@@ -13422,6 +13423,7 @@ F: tools/testing/selftests/drivers/net/dsa/
1342213423
NETWORKING [GENERAL]
1342313424
M: "David S. Miller" <davem@davemloft.net>
1342413425
M: Jakub Kicinski <kuba@kernel.org>
13426+
M: Paolo Abeni <pabeni@redhat.com>
1342513427
L: netdev@vger.kernel.org
1342613428
S: Maintained
1342713429
Q: https://patchwork.kernel.org/project/netdevbpf/list/

drivers/atm/eni.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,8 @@ DPRINTK("iovcnt = %d\n",skb_shinfo(skb)->nr_frags);
11121112
skb_data3 = skb->data[3];
11131113
paddr = dma_map_single(&eni_dev->pci_dev->dev,skb->data,skb->len,
11141114
DMA_TO_DEVICE);
1115+
if (dma_mapping_error(&eni_dev->pci_dev->dev, paddr))
1116+
return enq_next;
11151117
ENI_PRV_PADDR(skb) = paddr;
11161118
/* prepare DMA queue entries */
11171119
j = 0;

drivers/net/dsa/microchip/ksz8795_spi.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,23 @@ static const struct of_device_id ksz8795_dt_ids[] = {
124124
};
125125
MODULE_DEVICE_TABLE(of, ksz8795_dt_ids);
126126

127+
static const struct spi_device_id ksz8795_spi_ids[] = {
128+
{ "ksz8765" },
129+
{ "ksz8794" },
130+
{ "ksz8795" },
131+
{ "ksz8863" },
132+
{ "ksz8873" },
133+
{ },
134+
};
135+
MODULE_DEVICE_TABLE(spi, ksz8795_spi_ids);
136+
127137
static struct spi_driver ksz8795_spi_driver = {
128138
.driver = {
129139
.name = "ksz8795-switch",
130140
.owner = THIS_MODULE,
131141
.of_match_table = of_match_ptr(ksz8795_dt_ids),
132142
},
143+
.id_table = ksz8795_spi_ids,
133144
.probe = ksz8795_spi_probe,
134145
.remove = ksz8795_spi_remove,
135146
.shutdown = ksz8795_spi_shutdown,

drivers/net/dsa/microchip/ksz9477_spi.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,24 @@ static const struct of_device_id ksz9477_dt_ids[] = {
9898
};
9999
MODULE_DEVICE_TABLE(of, ksz9477_dt_ids);
100100

101+
static const struct spi_device_id ksz9477_spi_ids[] = {
102+
{ "ksz9477" },
103+
{ "ksz9897" },
104+
{ "ksz9893" },
105+
{ "ksz9563" },
106+
{ "ksz8563" },
107+
{ "ksz9567" },
108+
{ },
109+
};
110+
MODULE_DEVICE_TABLE(spi, ksz9477_spi_ids);
111+
101112
static struct spi_driver ksz9477_spi_driver = {
102113
.driver = {
103114
.name = "ksz9477-switch",
104115
.owner = THIS_MODULE,
105116
.of_match_table = of_match_ptr(ksz9477_dt_ids),
106117
},
118+
.id_table = ksz9477_spi_ids,
107119
.probe = ksz9477_spi_probe,
108120
.remove = ksz9477_spi_remove,
109121
.shutdown = ksz9477_spi_shutdown,

drivers/net/ethernet/atheros/alx/main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,11 @@ static int alx_change_mtu(struct net_device *netdev, int mtu)
11811181
alx->hw.mtu = mtu;
11821182
alx->rxbuf_size = max(max_frame, ALX_DEF_RXBUF_SIZE);
11831183
netdev_update_features(netdev);
1184-
if (netif_running(netdev))
1184+
if (netif_running(netdev)) {
1185+
mutex_lock(&alx->mtx);
11851186
alx_reinit(alx);
1187+
mutex_unlock(&alx->mtx);
1188+
}
11861189
return 0;
11871190
}
11881191

drivers/net/ethernet/broadcom/bnx2x/bnx2x.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2533,6 +2533,4 @@ void bnx2x_register_phc(struct bnx2x *bp);
25332533
* Meant for implicit re-load flows.
25342534
*/
25352535
int bnx2x_vlan_reconfigure_vid(struct bnx2x *bp);
2536-
int bnx2x_init_firmware(struct bnx2x *bp);
2537-
void bnx2x_release_firmware(struct bnx2x *bp);
25382536
#endif /* bnx2x.h */

drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,24 +2364,30 @@ int bnx2x_compare_fw_ver(struct bnx2x *bp, u32 load_code, bool print_err)
23642364
/* is another pf loaded on this engine? */
23652365
if (load_code != FW_MSG_CODE_DRV_LOAD_COMMON_CHIP &&
23662366
load_code != FW_MSG_CODE_DRV_LOAD_COMMON) {
2367-
/* build my FW version dword */
2368-
u32 my_fw = (bp->fw_major) + (bp->fw_minor << 8) +
2369-
(bp->fw_rev << 16) + (bp->fw_eng << 24);
2367+
u8 loaded_fw_major, loaded_fw_minor, loaded_fw_rev, loaded_fw_eng;
2368+
u32 loaded_fw;
23702369

23712370
/* read loaded FW from chip */
2372-
u32 loaded_fw = REG_RD(bp, XSEM_REG_PRAM);
2371+
loaded_fw = REG_RD(bp, XSEM_REG_PRAM);
23732372

2374-
DP(BNX2X_MSG_SP, "loaded fw %x, my fw %x\n",
2375-
loaded_fw, my_fw);
2373+
loaded_fw_major = loaded_fw & 0xff;
2374+
loaded_fw_minor = (loaded_fw >> 8) & 0xff;
2375+
loaded_fw_rev = (loaded_fw >> 16) & 0xff;
2376+
loaded_fw_eng = (loaded_fw >> 24) & 0xff;
2377+
2378+
DP(BNX2X_MSG_SP, "loaded fw 0x%x major 0x%x minor 0x%x rev 0x%x eng 0x%x\n",
2379+
loaded_fw, loaded_fw_major, loaded_fw_minor, loaded_fw_rev, loaded_fw_eng);
23762380

23772381
/* abort nic load if version mismatch */
2378-
if (my_fw != loaded_fw) {
2382+
if (loaded_fw_major != BCM_5710_FW_MAJOR_VERSION ||
2383+
loaded_fw_minor != BCM_5710_FW_MINOR_VERSION ||
2384+
loaded_fw_eng != BCM_5710_FW_ENGINEERING_VERSION ||
2385+
loaded_fw_rev < BCM_5710_FW_REVISION_VERSION_V15) {
23792386
if (print_err)
2380-
BNX2X_ERR("bnx2x with FW %x was already loaded which mismatches my %x FW. Aborting\n",
2381-
loaded_fw, my_fw);
2387+
BNX2X_ERR("loaded FW incompatible. Aborting\n");
23822388
else
2383-
BNX2X_DEV_INFO("bnx2x with FW %x was already loaded which mismatches my %x FW, possibly due to MF UNDI\n",
2384-
loaded_fw, my_fw);
2389+
BNX2X_DEV_INFO("loaded FW incompatible, possibly due to MF UNDI\n");
2390+
23852391
return -EBUSY;
23862392
}
23872393
}

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12319,15 +12319,6 @@ static int bnx2x_init_bp(struct bnx2x *bp)
1231912319

1232012320
bnx2x_read_fwinfo(bp);
1232112321

12322-
if (IS_PF(bp)) {
12323-
rc = bnx2x_init_firmware(bp);
12324-
12325-
if (rc) {
12326-
bnx2x_free_mem_bp(bp);
12327-
return rc;
12328-
}
12329-
}
12330-
1233112322
func = BP_FUNC(bp);
1233212323

1233312324
/* need to reset chip if undi was active */
@@ -12340,7 +12331,6 @@ static int bnx2x_init_bp(struct bnx2x *bp)
1234012331

1234112332
rc = bnx2x_prev_unload(bp);
1234212333
if (rc) {
12343-
bnx2x_release_firmware(bp);
1234412334
bnx2x_free_mem_bp(bp);
1234512335
return rc;
1234612336
}
@@ -13409,7 +13399,7 @@ do { \
1340913399
(u8 *)bp->arr, len); \
1341013400
} while (0)
1341113401

13412-
int bnx2x_init_firmware(struct bnx2x *bp)
13402+
static int bnx2x_init_firmware(struct bnx2x *bp)
1341313403
{
1341413404
const char *fw_file_name, *fw_file_name_v15;
1341513405
struct bnx2x_fw_file_hdr *fw_hdr;
@@ -13509,7 +13499,7 @@ int bnx2x_init_firmware(struct bnx2x *bp)
1350913499
return rc;
1351013500
}
1351113501

13512-
void bnx2x_release_firmware(struct bnx2x *bp)
13502+
static void bnx2x_release_firmware(struct bnx2x *bp)
1351313503
{
1351413504
kfree(bp->init_ops_offsets);
1351513505
kfree(bp->init_ops);
@@ -14026,7 +14016,6 @@ static int bnx2x_init_one(struct pci_dev *pdev,
1402614016
return 0;
1402714017

1402814018
init_one_freemem:
14029-
bnx2x_release_firmware(bp);
1403014019
bnx2x_free_mem_bp(bp);
1403114020

1403214021
init_one_exit:

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,8 +2287,10 @@ static unsigned int bcmgenet_desc_rx(struct bcmgenet_rx_ring *ring,
22872287
dma_length_status = status->length_status;
22882288
if (dev->features & NETIF_F_RXCSUM) {
22892289
rx_csum = (__force __be16)(status->rx_csum & 0xffff);
2290-
skb->csum = (__force __wsum)ntohs(rx_csum);
2291-
skb->ip_summed = CHECKSUM_COMPLETE;
2290+
if (rx_csum) {
2291+
skb->csum = (__force __wsum)ntohs(rx_csum);
2292+
skb->ip_summed = CHECKSUM_COMPLETE;
2293+
}
22922294
}
22932295

22942296
/* DMA flags and length are still valid no matter how

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,13 @@ static void iavf_watchdog_task(struct work_struct *work)
25412541
queue_delayed_work(iavf_wq, &adapter->watchdog_task, HZ * 2);
25422542
}
25432543

2544+
/**
2545+
* iavf_disable_vf - disable VF
2546+
* @adapter: board private structure
2547+
*
2548+
* Set communication failed flag and free all resources.
2549+
* NOTE: This function is expected to be called with crit_lock being held.
2550+
**/
25442551
static void iavf_disable_vf(struct iavf_adapter *adapter)
25452552
{
25462553
struct iavf_mac_filter *f, *ftmp;
@@ -2595,7 +2602,6 @@ static void iavf_disable_vf(struct iavf_adapter *adapter)
25952602
memset(adapter->vf_res, 0, IAVF_VIRTCHNL_VF_RESOURCE_SIZE);
25962603
iavf_shutdown_adminq(&adapter->hw);
25972604
adapter->netdev->flags &= ~IFF_UP;
2598-
mutex_unlock(&adapter->crit_lock);
25992605
adapter->flags &= ~IAVF_FLAG_RESET_PENDING;
26002606
iavf_change_state(adapter, __IAVF_DOWN);
26012607
wake_up(&adapter->down_waitqueue);
@@ -4614,6 +4620,13 @@ static void iavf_remove(struct pci_dev *pdev)
46144620
struct iavf_hw *hw = &adapter->hw;
46154621
int err;
46164622

4623+
/* When reboot/shutdown is in progress no need to do anything
4624+
* as the adapter is already REMOVE state that was set during
4625+
* iavf_shutdown() callback.
4626+
*/
4627+
if (adapter->state == __IAVF_REMOVE)
4628+
return;
4629+
46174630
set_bit(__IAVF_IN_REMOVE_TASK, &adapter->crit_section);
46184631
/* Wait until port initialization is complete.
46194632
* There are flows where register/unregister netdev may race.

0 commit comments

Comments
 (0)