Skip to content

Commit 6911967

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from David Miller: 1) Don't get per-cpu pointer with preemption enabled in nft_set_pipapo, fix from Stefano Brivio. 2) Fix memory leak in ctnetlink, from Pablo Neira Ayuso. 3) Multiple definitions of MPTCP_PM_MAX_ADDR, from Geliang Tang. 4) Accidently disabling NAPI in non-error paths of macb_open(), from Charles Keepax. 5) Fix races between alx_stop and alx_remove, from Zekun Shen. 6) We forget to re-enable SRIOV during resume in bnxt_en driver, from Michael Chan. 7) Fix memory leak in ipv6_mc_destroy_dev(), from Wang Hai. 8) rxtx stats use wrong index in mvpp2 driver, from Sven Auhagen. 9) Fix memory leak in mptcp_subflow_create_socket error path, from Wei Yongjun. 10) We should not adjust the TCP window advertised when sending dup acks in non-SACK mode, because it won't be counted as a dup by the sender if the window size changes. From Eric Dumazet. 11) Destroy the right number of queues during remove in mvpp2 driver, from Sven Auhagen. 12) Various WOL and PM fixes to e1000 driver, from Chen Yu, Vaibhav Gupta, and Arnd Bergmann. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (35 commits) e1000e: fix unused-function warning e1000: use generic power management e1000e: Do not wake up the system via WOL if device wakeup is disabled lan743x: add MODULE_DEVICE_TABLE for module loading alias mlxsw: spectrum: Adjust headroom buffers for 8x ports bareudp: Fixed configuration to avoid having garbage values mvpp2: remove module bugfix tcp: grow window for OOO packets only for SACK flows mptcp: fix memory leak in mptcp_subflow_create_socket() netfilter: flowtable: Make nf_flow_table_offload_add/del_cb inline net/sched: act_ct: Make tcf_ct_flow_table_restore_skb inline net: dsa: sja1105: fix PTP timestamping with large tc-taprio cycles mvpp2: ethtool rxtx stats fix MAINTAINERS: switch to my private email for Renesas Ethernet drivers rocker: fix incorrect error handling in dma_rings_init test_objagg: Fix potential memory leak in error handling net: ethernet: mtk-star-emac: simplify interrupt handling mld: fix memory leak in ipv6_mc_destroy_dev() bnxt_en: Return from timer if interface is not in open state. bnxt_en: Fix AER reset logic on 57500 chips. ...
2 parents 26c20ff + c9f66b4 commit 6911967

File tree

33 files changed

+309
-314
lines changed

33 files changed

+309
-314
lines changed

MAINTAINERS

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11369,14 +11369,6 @@ L: [email protected]
1136911369
S: Supported
1137011370
F: drivers/dma/at_xdmac.c
1137111371

11372-
MICROSEMI ETHERNET SWITCH DRIVER
11373-
M: Alexandre Belloni <[email protected]>
11374-
M: Microchip Linux Driver Support <[email protected]>
11375-
11376-
S: Supported
11377-
F: drivers/net/ethernet/mscc/
11378-
F: include/soc/mscc/ocelot*
11379-
1138011372
MICROSEMI MIPS SOCS
1138111373
M: Alexandre Belloni <[email protected]>
1138211374
M: Microchip Linux Driver Support <[email protected]>
@@ -12335,6 +12327,18 @@ M: Peter Zijlstra <[email protected]>
1233512327
S: Supported
1233612328
F: tools/objtool/
1233712329

12330+
OCELOT ETHERNET SWITCH DRIVER
12331+
M: Microchip Linux Driver Support <[email protected]>
12332+
M: Vladimir Oltean <[email protected]>
12333+
M: Claudiu Manoil <[email protected]>
12334+
M: Alexandre Belloni <[email protected]>
12335+
12336+
S: Supported
12337+
F: drivers/net/dsa/ocelot/*
12338+
F: drivers/net/ethernet/mscc/
12339+
F: include/soc/mscc/ocelot*
12340+
F: net/dsa/tag_ocelot.c
12341+
1233812342
OCXL (Open Coherent Accelerator Processor Interface OpenCAPI) DRIVER
1233912343
M: Frederic Barrat <[email protected]>
1234012344
M: Andrew Donnellan <[email protected]>
@@ -14534,7 +14538,7 @@ F: Documentation/devicetree/bindings/i2c/renesas,iic-emev2.txt
1453414538
F: drivers/i2c/busses/i2c-emev2.c
1453514539

1453614540
RENESAS ETHERNET DRIVERS
14537-
R: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
14541+
R: Sergei Shtylyov <sergei.shtylyov@gmail.com>
1453814542
1453914543
1454014544
F: Documentation/devicetree/bindings/net/renesas,*.txt
@@ -18254,14 +18258,6 @@ S: Maintained
1825418258
F: drivers/input/serio/userio.c
1825518259
F: include/uapi/linux/userio.h
1825618260

18257-
VITESSE FELIX ETHERNET SWITCH DRIVER
18258-
M: Vladimir Oltean <[email protected]>
18259-
M: Claudiu Manoil <[email protected]>
18260-
18261-
S: Maintained
18262-
F: drivers/net/dsa/ocelot/*
18263-
F: net/dsa/tag_ocelot.c
18264-
1826518261
VIVID VIRTUAL VIDEO DRIVER
1826618262
M: Hans Verkuil <[email protected]>
1826718263

drivers/net/bareudp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,8 @@ static int bareudp_validate(struct nlattr *tb[], struct nlattr *data[],
552552
static int bareudp2info(struct nlattr *data[], struct bareudp_conf *conf,
553553
struct netlink_ext_ack *extack)
554554
{
555+
memset(conf, 0, sizeof(*conf));
556+
555557
if (!data[IFLA_BAREUDP_PORT]) {
556558
NL_SET_ERR_MSG(extack, "port not specified");
557559
return -EINVAL;

drivers/net/dsa/sja1105/sja1105_ptp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -891,16 +891,16 @@ void sja1105_ptp_txtstamp_skb(struct dsa_switch *ds, int port,
891891

892892
mutex_lock(&ptp_data->lock);
893893

894-
rc = sja1105_ptpclkval_read(priv, &ticks, NULL);
894+
rc = sja1105_ptpegr_ts_poll(ds, port, &ts);
895895
if (rc < 0) {
896-
dev_err(ds->dev, "Failed to read PTP clock: %d\n", rc);
896+
dev_err(ds->dev, "timed out polling for tstamp\n");
897897
kfree_skb(skb);
898898
goto out;
899899
}
900900

901-
rc = sja1105_ptpegr_ts_poll(ds, port, &ts);
901+
rc = sja1105_ptpclkval_read(priv, &ticks, NULL);
902902
if (rc < 0) {
903-
dev_err(ds->dev, "timed out polling for tstamp\n");
903+
dev_err(ds->dev, "Failed to read PTP clock: %d\n", rc);
904904
kfree_skb(skb);
905905
goto out;
906906
}

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,12 @@ static int __alx_open(struct alx_priv *alx, bool resume)
12491249

12501250
static void __alx_stop(struct alx_priv *alx)
12511251
{
1252-
alx_halt(alx);
12531252
alx_free_irq(alx);
1253+
1254+
cancel_work_sync(&alx->link_check_wk);
1255+
cancel_work_sync(&alx->reset_wk);
1256+
1257+
alx_halt(alx);
12541258
alx_free_rings(alx);
12551259
alx_free_napis(alx);
12561260
}
@@ -1855,9 +1859,6 @@ static void alx_remove(struct pci_dev *pdev)
18551859
struct alx_priv *alx = pci_get_drvdata(pdev);
18561860
struct alx_hw *hw = &alx->hw;
18571861

1858-
cancel_work_sync(&alx->link_check_wk);
1859-
cancel_work_sync(&alx->reset_wk);
1860-
18611862
/* restore permanent mac address */
18621863
alx_set_macaddr(hw, hw->perm_addr);
18631864

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10037,7 +10037,7 @@ static void bnxt_timer(struct timer_list *t)
1003710037
struct bnxt *bp = from_timer(bp, t, timer);
1003810038
struct net_device *dev = bp->dev;
1003910039

10040-
if (!netif_running(dev))
10040+
if (!netif_running(dev) || !test_bit(BNXT_STATE_OPEN, &bp->state))
1004110041
return;
1004210042

1004310043
if (atomic_read(&bp->intr_sem) != 0)
@@ -12133,19 +12133,9 @@ static int bnxt_resume(struct device *device)
1213312133
goto resume_exit;
1213412134
}
1213512135

12136-
if (bnxt_hwrm_queue_qportcfg(bp)) {
12137-
rc = -ENODEV;
12136+
rc = bnxt_hwrm_func_qcaps(bp);
12137+
if (rc)
1213812138
goto resume_exit;
12139-
}
12140-
12141-
if (bp->hwrm_spec_code >= 0x10803) {
12142-
if (bnxt_alloc_ctx_mem(bp)) {
12143-
rc = -ENODEV;
12144-
goto resume_exit;
12145-
}
12146-
}
12147-
if (BNXT_NEW_RM(bp))
12148-
bnxt_hwrm_func_resc_qcaps(bp, false);
1214912139

1215012140
if (bnxt_hwrm_func_drv_rgtr(bp, NULL, 0, false)) {
1215112141
rc = -ENODEV;
@@ -12161,6 +12151,8 @@ static int bnxt_resume(struct device *device)
1216112151

1216212152
resume_exit:
1216312153
bnxt_ulp_start(bp, rc);
12154+
if (!rc)
12155+
bnxt_reenable_sriov(bp);
1216412156
rtnl_unlock();
1216512157
return rc;
1216612158
}
@@ -12204,6 +12196,9 @@ static pci_ers_result_t bnxt_io_error_detected(struct pci_dev *pdev,
1220412196
bnxt_close(netdev);
1220512197

1220612198
pci_disable_device(pdev);
12199+
bnxt_free_ctx_mem(bp);
12200+
kfree(bp->ctx);
12201+
bp->ctx = NULL;
1220712202
rtnl_unlock();
1220812203

1220912204
/* Request a slot slot reset. */
@@ -12237,12 +12232,16 @@ static pci_ers_result_t bnxt_io_slot_reset(struct pci_dev *pdev)
1223712232
pci_set_master(pdev);
1223812233

1223912234
err = bnxt_hwrm_func_reset(bp);
12240-
if (!err && netif_running(netdev))
12241-
err = bnxt_open(netdev);
12242-
12243-
if (!err)
12244-
result = PCI_ERS_RESULT_RECOVERED;
12235+
if (!err) {
12236+
err = bnxt_hwrm_func_qcaps(bp);
12237+
if (!err && netif_running(netdev))
12238+
err = bnxt_open(netdev);
12239+
}
1224512240
bnxt_ulp_start(bp, err);
12241+
if (!err) {
12242+
bnxt_reenable_sriov(bp);
12243+
result = PCI_ERS_RESULT_RECOVERED;
12244+
}
1224612245
}
1224712246

1224812247
if (result != PCI_ERS_RESULT_RECOVERED) {

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,15 +2565,14 @@ static int macb_open(struct net_device *dev)
25652565
if (bp->ptp_info)
25662566
bp->ptp_info->ptp_init(dev);
25672567

2568+
return 0;
2569+
25682570
napi_exit:
25692571
for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
25702572
napi_disable(&queue->napi);
25712573
pm_exit:
2572-
if (err) {
2573-
pm_runtime_put_sync(&bp->pdev->dev);
2574-
return err;
2575-
}
2576-
return 0;
2574+
pm_runtime_put_sync(&bp->pdev->dev);
2575+
return err;
25772576
}
25782577

25792578
static int macb_close(struct net_device *dev)

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,12 +842,13 @@ static int ibmvnic_login(struct net_device *netdev)
842842
struct ibmvnic_adapter *adapter = netdev_priv(netdev);
843843
unsigned long timeout = msecs_to_jiffies(30000);
844844
int retry_count = 0;
845+
int retries = 10;
845846
bool retry;
846847
int rc;
847848

848849
do {
849850
retry = false;
850-
if (retry_count > IBMVNIC_MAX_QUEUES) {
851+
if (retry_count > retries) {
851852
netdev_warn(netdev, "Login attempts exceeded\n");
852853
return -1;
853854
}
@@ -862,11 +863,23 @@ static int ibmvnic_login(struct net_device *netdev)
862863

863864
if (!wait_for_completion_timeout(&adapter->init_done,
864865
timeout)) {
865-
netdev_warn(netdev, "Login timed out\n");
866-
return -1;
866+
netdev_warn(netdev, "Login timed out, retrying...\n");
867+
retry = true;
868+
adapter->init_done_rc = 0;
869+
retry_count++;
870+
continue;
867871
}
868872

869-
if (adapter->init_done_rc == PARTIALSUCCESS) {
873+
if (adapter->init_done_rc == ABORTED) {
874+
netdev_warn(netdev, "Login aborted, retrying...\n");
875+
retry = true;
876+
adapter->init_done_rc = 0;
877+
retry_count++;
878+
/* FW or device may be busy, so
879+
* wait a bit before retrying login
880+
*/
881+
msleep(500);
882+
} else if (adapter->init_done_rc == PARTIALSUCCESS) {
870883
retry_count++;
871884
release_sub_crqs(adapter, 1);
872885

drivers/net/ethernet/intel/e1000/e1000_main.c

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,8 @@ static int e1000_vlan_rx_kill_vid(struct net_device *netdev,
151151
__be16 proto, u16 vid);
152152
static void e1000_restore_vlan(struct e1000_adapter *adapter);
153153

154-
#ifdef CONFIG_PM
155-
static int e1000_suspend(struct pci_dev *pdev, pm_message_t state);
156-
static int e1000_resume(struct pci_dev *pdev);
157-
#endif
154+
static int __maybe_unused e1000_suspend(struct device *dev);
155+
static int __maybe_unused e1000_resume(struct device *dev);
158156
static void e1000_shutdown(struct pci_dev *pdev);
159157

160158
#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -179,16 +177,16 @@ static const struct pci_error_handlers e1000_err_handler = {
179177
.resume = e1000_io_resume,
180178
};
181179

180+
static SIMPLE_DEV_PM_OPS(e1000_pm_ops, e1000_suspend, e1000_resume);
181+
182182
static struct pci_driver e1000_driver = {
183183
.name = e1000_driver_name,
184184
.id_table = e1000_pci_tbl,
185185
.probe = e1000_probe,
186186
.remove = e1000_remove,
187-
#ifdef CONFIG_PM
188-
/* Power Management Hooks */
189-
.suspend = e1000_suspend,
190-
.resume = e1000_resume,
191-
#endif
187+
.driver = {
188+
.pm = &e1000_pm_ops,
189+
},
192190
.shutdown = e1000_shutdown,
193191
.err_handler = &e1000_err_handler
194192
};
@@ -5060,9 +5058,6 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
50605058
struct e1000_hw *hw = &adapter->hw;
50615059
u32 ctrl, ctrl_ext, rctl, status;
50625060
u32 wufc = adapter->wol;
5063-
#ifdef CONFIG_PM
5064-
int retval = 0;
5065-
#endif
50665061

50675062
netif_device_detach(netdev);
50685063

@@ -5076,12 +5071,6 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
50765071
e1000_down(adapter);
50775072
}
50785073

5079-
#ifdef CONFIG_PM
5080-
retval = pci_save_state(pdev);
5081-
if (retval)
5082-
return retval;
5083-
#endif
5084-
50855074
status = er32(STATUS);
50865075
if (status & E1000_STATUS_LU)
50875076
wufc &= ~E1000_WUFC_LNKC;
@@ -5142,37 +5131,26 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake)
51425131
return 0;
51435132
}
51445133

5145-
#ifdef CONFIG_PM
5146-
static int e1000_suspend(struct pci_dev *pdev, pm_message_t state)
5134+
static int __maybe_unused e1000_suspend(struct device *dev)
51475135
{
51485136
int retval;
5137+
struct pci_dev *pdev = to_pci_dev(dev);
51495138
bool wake;
51505139

51515140
retval = __e1000_shutdown(pdev, &wake);
5152-
if (retval)
5153-
return retval;
5154-
5155-
if (wake) {
5156-
pci_prepare_to_sleep(pdev);
5157-
} else {
5158-
pci_wake_from_d3(pdev, false);
5159-
pci_set_power_state(pdev, PCI_D3hot);
5160-
}
5141+
device_set_wakeup_enable(dev, wake);
51615142

5162-
return 0;
5143+
return retval;
51635144
}
51645145

5165-
static int e1000_resume(struct pci_dev *pdev)
5146+
static int __maybe_unused e1000_resume(struct device *dev)
51665147
{
5148+
struct pci_dev *pdev = to_pci_dev(dev);
51675149
struct net_device *netdev = pci_get_drvdata(pdev);
51685150
struct e1000_adapter *adapter = netdev_priv(netdev);
51695151
struct e1000_hw *hw = &adapter->hw;
51705152
u32 err;
51715153

5172-
pci_set_power_state(pdev, PCI_D0);
5173-
pci_restore_state(pdev);
5174-
pci_save_state(pdev);
5175-
51765154
if (adapter->need_ioport)
51775155
err = pci_enable_device(pdev);
51785156
else
@@ -5209,7 +5187,6 @@ static int e1000_resume(struct pci_dev *pdev)
52095187

52105188
return 0;
52115189
}
5212-
#endif
52135190

52145191
static void e1000_shutdown(struct pci_dev *pdev)
52155192
{

0 commit comments

Comments
 (0)