Skip to content

Commit 24cac70

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix rtnl deadlock in ipvs, from Julian Anastasov. 2) s390 qeth fixes from Julian Wiedmann (control IO completion stalls, bad MAC address update sequence, request side races on command IO timeouts). 3) Handle seq_file overflow properly in l2tp, from Guillaume Nault. 4) Fix VLAN priority mappings in cpsw driver, from Ivan Khoronzhuk. 5) Packet scheduler ife action fixes (malformed TLV lengths, etc.) from Alexander Aring. 6) Fix out of bounds access in tcp md5 option parser, from Jann Horn. 7) Missing netlink attribute policies in rtm_ipv6_policy table, from Eric Dumazet. 8) Missing socket address length checks in l2tp and pppoe connect, from Guillaume Nault. 9) Fix netconsole over team and bonding, from Xin Long. 10) Fix race with AF_PACKET socket state bitfields, from Willem de Bruijn. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (51 commits) ice: Fix insufficient memory issue in ice_aq_manage_mac_read sfc: ARFS filter IDs net: ethtool: Add missing kernel doc for FEC parameters packet: fix bitfield update race ice: Do not check INTEVENT bit for OICR interrupts ice: Fix incorrect comment for action type ice: Fix initialization for num_nodes_added igb: Fix the transmission mode of queue 0 for Qav mode ixgbevf: ensure xdp_ring resources are free'd on error exit team: fix netconsole setup over team amd-xgbe: Only use the SFP supported transceiver signals amd-xgbe: Improve KR auto-negotiation and training amd-xgbe: Add pre/post auto-negotiation phy hooks pppoe: check sockaddr length in pppoe_connect() l2tp: check sockaddr length in pppol2tp_connect() net: phy: marvell: clear wol event before setting it ipv6: add RTA_TABLE and RTA_PREFSRC to rtm_ipv6_policy bonding: do not set slave_dev npinfo before slave_enable_netpoll in bond_enslave tcp: don't read out-of-bounds opsize ibmvnic: Clean actual number of RX or TX pools ...
2 parents 6d08b06 + d19efb7 commit 24cac70

Some content is hidden

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

64 files changed

+1163
-463
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,8 +1660,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
16601660
} /* switch(bond_mode) */
16611661

16621662
#ifdef CONFIG_NET_POLL_CONTROLLER
1663-
slave_dev->npinfo = bond->dev->npinfo;
1664-
if (slave_dev->npinfo) {
1663+
if (bond->dev->npinfo) {
16651664
if (slave_enable_netpoll(new_slave)) {
16661665
netdev_info(bond_dev, "master_dev is using netpoll, but new slave device does not support netpoll\n");
16671666
res = -EBUSY;

drivers/net/ethernet/amd/xgbe/xgbe-common.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,10 @@
13211321
#define MDIO_VEND2_AN_STAT 0x8002
13221322
#endif
13231323

1324+
#ifndef MDIO_VEND2_PMA_CDR_CONTROL
1325+
#define MDIO_VEND2_PMA_CDR_CONTROL 0x8056
1326+
#endif
1327+
13241328
#ifndef MDIO_CTRL1_SPEED1G
13251329
#define MDIO_CTRL1_SPEED1G (MDIO_CTRL1_SPEED10G & ~BMCR_SPEED100)
13261330
#endif
@@ -1369,6 +1373,10 @@
13691373
#define XGBE_AN_CL37_TX_CONFIG_MASK 0x08
13701374
#define XGBE_AN_CL37_MII_CTRL_8BIT 0x0100
13711375

1376+
#define XGBE_PMA_CDR_TRACK_EN_MASK 0x01
1377+
#define XGBE_PMA_CDR_TRACK_EN_OFF 0x00
1378+
#define XGBE_PMA_CDR_TRACK_EN_ON 0x01
1379+
13721380
/* Bit setting and getting macros
13731381
* The get macro will extract the current bit field value from within
13741382
* the variable

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,22 @@ void xgbe_debugfs_init(struct xgbe_prv_data *pdata)
519519
"debugfs_create_file failed\n");
520520
}
521521

522+
if (pdata->vdata->an_cdr_workaround) {
523+
pfile = debugfs_create_bool("an_cdr_workaround", 0600,
524+
pdata->xgbe_debugfs,
525+
&pdata->debugfs_an_cdr_workaround);
526+
if (!pfile)
527+
netdev_err(pdata->netdev,
528+
"debugfs_create_bool failed\n");
529+
530+
pfile = debugfs_create_bool("an_cdr_track_early", 0600,
531+
pdata->xgbe_debugfs,
532+
&pdata->debugfs_an_cdr_track_early);
533+
if (!pfile)
534+
netdev_err(pdata->netdev,
535+
"debugfs_create_bool failed\n");
536+
}
537+
522538
kfree(buf);
523539
}
524540

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ int xgbe_config_netdev(struct xgbe_prv_data *pdata)
349349
XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, UDP4TE, 1);
350350

351351
/* Call MDIO/PHY initialization routine */
352+
pdata->debugfs_an_cdr_workaround = pdata->vdata->an_cdr_workaround;
352353
ret = pdata->phy_if.phy_init(pdata);
353354
if (ret)
354355
return ret;

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

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,16 @@ static void xgbe_an73_disable(struct xgbe_prv_data *pdata)
432432
xgbe_an73_set(pdata, false, false);
433433
xgbe_an73_disable_interrupts(pdata);
434434

435+
pdata->an_start = 0;
436+
435437
netif_dbg(pdata, link, pdata->netdev, "CL73 AN disabled\n");
436438
}
437439

438440
static void xgbe_an_restart(struct xgbe_prv_data *pdata)
439441
{
442+
if (pdata->phy_if.phy_impl.an_pre)
443+
pdata->phy_if.phy_impl.an_pre(pdata);
444+
440445
switch (pdata->an_mode) {
441446
case XGBE_AN_MODE_CL73:
442447
case XGBE_AN_MODE_CL73_REDRV:
@@ -453,6 +458,9 @@ static void xgbe_an_restart(struct xgbe_prv_data *pdata)
453458

454459
static void xgbe_an_disable(struct xgbe_prv_data *pdata)
455460
{
461+
if (pdata->phy_if.phy_impl.an_post)
462+
pdata->phy_if.phy_impl.an_post(pdata);
463+
456464
switch (pdata->an_mode) {
457465
case XGBE_AN_MODE_CL73:
458466
case XGBE_AN_MODE_CL73_REDRV:
@@ -505,11 +513,11 @@ static enum xgbe_an xgbe_an73_tx_training(struct xgbe_prv_data *pdata,
505513
XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL,
506514
reg);
507515

508-
if (pdata->phy_if.phy_impl.kr_training_post)
509-
pdata->phy_if.phy_impl.kr_training_post(pdata);
510-
511516
netif_dbg(pdata, link, pdata->netdev,
512517
"KR training initiated\n");
518+
519+
if (pdata->phy_if.phy_impl.kr_training_post)
520+
pdata->phy_if.phy_impl.kr_training_post(pdata);
513521
}
514522

515523
return XGBE_AN_PAGE_RECEIVED;
@@ -637,11 +645,11 @@ static enum xgbe_an xgbe_an73_incompat_link(struct xgbe_prv_data *pdata)
637645
return XGBE_AN_NO_LINK;
638646
}
639647

640-
xgbe_an73_disable(pdata);
648+
xgbe_an_disable(pdata);
641649

642650
xgbe_switch_mode(pdata);
643651

644-
xgbe_an73_restart(pdata);
652+
xgbe_an_restart(pdata);
645653

646654
return XGBE_AN_INCOMPAT_LINK;
647655
}
@@ -820,6 +828,9 @@ static void xgbe_an37_state_machine(struct xgbe_prv_data *pdata)
820828
pdata->an_result = pdata->an_state;
821829
pdata->an_state = XGBE_AN_READY;
822830

831+
if (pdata->phy_if.phy_impl.an_post)
832+
pdata->phy_if.phy_impl.an_post(pdata);
833+
823834
netif_dbg(pdata, link, pdata->netdev, "CL37 AN result: %s\n",
824835
xgbe_state_as_string(pdata->an_result));
825836
}
@@ -903,6 +914,9 @@ static void xgbe_an73_state_machine(struct xgbe_prv_data *pdata)
903914
pdata->kx_state = XGBE_RX_BPA;
904915
pdata->an_start = 0;
905916

917+
if (pdata->phy_if.phy_impl.an_post)
918+
pdata->phy_if.phy_impl.an_post(pdata);
919+
906920
netif_dbg(pdata, link, pdata->netdev, "CL73 AN result: %s\n",
907921
xgbe_state_as_string(pdata->an_result));
908922
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ static const struct xgbe_version_data xgbe_v2a = {
456456
.irq_reissue_support = 1,
457457
.tx_desc_prefetch = 5,
458458
.rx_desc_prefetch = 5,
459+
.an_cdr_workaround = 1,
459460
};
460461

461462
static const struct xgbe_version_data xgbe_v2b = {
@@ -470,6 +471,7 @@ static const struct xgbe_version_data xgbe_v2b = {
470471
.irq_reissue_support = 1,
471472
.tx_desc_prefetch = 5,
472473
.rx_desc_prefetch = 5,
474+
.an_cdr_workaround = 1,
473475
};
474476

475477
static const struct pci_device_id xgbe_pci_table[] = {

0 commit comments

Comments
 (0)