Skip to content

Commit f75b6f3

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Clear up some recent tipc regressions because of registration ordering. Fix from Junwei Hu. 2) tipc's TLV_SET() can read past the end of the supplied buffer during the copy. From Chris Packham. 3) ptp example program doesn't match the kernel, from Richard Cochran. 4) Outgoing message type fix in qrtr, from Bjorn Andersson. 5) Flow control regression in stmmac, from Tan Tee Min. 6) Fix inband autonegotiation in phylink, from Russell King. 7) Fix sk_bound_dev_if handling in rawv6_bind(), from Mike Manning. 8) Fix usbnet crash after disconnect, from Kloetzke Jan. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits) usbnet: fix kernel crash after disconnect selftests: fib_rule_tests: use pre-defined DEV_ADDR net-next: net: Fix typos in ip-sysctl.txt ipv6: Consider sk_bound_dev_if when binding a raw socket to an address net: phylink: ensure inband AN works correctly usbnet: ipheth: fix racing condition net: stmmac: dma channel control register need to be init first net: stmmac: fix ethtool flow control not able to get/set net: qrtr: Fix message type of outgoing packets networking: : fix typos in code comments ptp: Fix example program to match kernel. fddi: fix typos in code comments selftests: fib_rule_tests: enable forwarding before ipv4 from/iif test selftests: fib_rule_tests: fix local IPv4 address typo tipc: Avoid copying bytes beyond the supplied data 2/2] net: xilinx_emaclite: use readx_poll_timeout() in mdio wait function 1/2] net: axienet: use readx_poll_timeout() in mdio wait function vlan: Mark expected switch fall-through macvlan: Mark expected switch fall-through net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query ...
2 parents 86f9e56 + ad70411 commit f75b6f3

File tree

23 files changed

+104
-162
lines changed

23 files changed

+104
-162
lines changed

Documentation/networking/ip-sysctl.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,10 @@ tcp_comp_sack_delay_ns - LONG INTEGER
560560
Default : 1,000,000 ns (1 ms)
561561

562562
tcp_comp_sack_nr - INTEGER
563-
Max numer of SACK that can be compressed.
563+
Max number of SACK that can be compressed.
564564
Using 0 disables SACK compression.
565565

566-
Detault : 44
566+
Default : 44
567567

568568
tcp_slow_start_after_idle - BOOLEAN
569569
If set, provide RFC2861 behavior and time out the congestion

Documentation/networking/segmentation-offloads.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The following technologies are described:
1818
* Generic Segmentation Offload - GSO
1919
* Generic Receive Offload - GRO
2020
* Partial Generic Segmentation Offload - GSO_PARTIAL
21-
* SCTP accelleration with GSO - GSO_BY_FRAGS
21+
* SCTP acceleration with GSO - GSO_BY_FRAGS
2222

2323

2424
TCP Segmentation Offload
@@ -148,7 +148,7 @@ that the IPv4 ID field is incremented in the case that a given header does
148148
not have the DF bit set.
149149

150150

151-
SCTP accelleration with GSO
151+
SCTP acceleration with GSO
152152
===========================
153153

154154
SCTP - despite the lack of hardware support - can still take advantage of

drivers/net/ethernet/mellanox/mlx4/en_ethtool.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,6 +2010,8 @@ static int mlx4_en_set_tunable(struct net_device *dev,
20102010
return ret;
20112011
}
20122012

2013+
#define MLX4_EEPROM_PAGE_LEN 256
2014+
20132015
static int mlx4_en_get_module_info(struct net_device *dev,
20142016
struct ethtool_modinfo *modinfo)
20152017
{
@@ -2044,7 +2046,7 @@ static int mlx4_en_get_module_info(struct net_device *dev,
20442046
break;
20452047
case MLX4_MODULE_ID_SFP:
20462048
modinfo->type = ETH_MODULE_SFF_8472;
2047-
modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
2049+
modinfo->eeprom_len = MLX4_EEPROM_PAGE_LEN;
20482050
break;
20492051
default:
20502052
return -EINVAL;

drivers/net/ethernet/mellanox/mlx4/port.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,11 +2077,6 @@ int mlx4_get_module_info(struct mlx4_dev *dev, u8 port,
20772077
size -= offset + size - I2C_PAGE_SIZE;
20782078

20792079
i2c_addr = I2C_ADDR_LOW;
2080-
if (offset >= I2C_PAGE_SIZE) {
2081-
/* Reset offset to high page */
2082-
i2c_addr = I2C_ADDR_HIGH;
2083-
offset -= I2C_PAGE_SIZE;
2084-
}
20852080

20862081
cable_info = (struct mlx4_cable_info *)inmad->data;
20872082
cable_info->dev_mem_address = cpu_to_be16(offset);

drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ stmmac_get_pauseparam(struct net_device *netdev,
460460
} else {
461461
if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
462462
netdev->phydev->supported) ||
463-
linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
463+
!linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
464464
netdev->phydev->supported))
465465
return;
466466
}
@@ -491,7 +491,7 @@ stmmac_set_pauseparam(struct net_device *netdev,
491491
} else {
492492
if (!linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
493493
phy->supported) ||
494-
linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
494+
!linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
495495
phy->supported))
496496
return -EOPNOTSUPP;
497497
}

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2208,6 +2208,10 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
22082208
if (priv->plat->axi)
22092209
stmmac_axi(priv, priv->ioaddr, priv->plat->axi);
22102210

2211+
/* DMA CSR Channel configuration */
2212+
for (chan = 0; chan < dma_csr_ch; chan++)
2213+
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
2214+
22112215
/* DMA RX Channel Configuration */
22122216
for (chan = 0; chan < rx_channels_count; chan++) {
22132217
rx_q = &priv->rx_queue[chan];
@@ -2233,10 +2237,6 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
22332237
tx_q->tx_tail_addr, chan);
22342238
}
22352239

2236-
/* DMA CSR Channel configuration */
2237-
for (chan = 0; chan < dma_csr_ch; chan++)
2238-
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
2239-
22402240
return ret;
22412241
}
22422242

drivers/net/ethernet/xilinx/xilinx_axienet.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,11 @@ static inline u32 axienet_ior(struct axienet_local *lp, off_t offset)
484484
return in_be32(lp->regs + offset);
485485
}
486486

487+
static inline u32 axinet_ior_read_mcr(struct axienet_local *lp)
488+
{
489+
return axienet_ior(lp, XAE_MDIO_MCR_OFFSET);
490+
}
491+
487492
/**
488493
* axienet_iow - Memory mapped Axi Ethernet register write
489494
* @lp: Pointer to axienet local structure

drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/of_address.h>
1212
#include <linux/of_mdio.h>
1313
#include <linux/jiffies.h>
14+
#include <linux/iopoll.h>
1415

1516
#include "xilinx_axienet.h"
1617

@@ -20,16 +21,11 @@
2021
/* Wait till MDIO interface is ready to accept a new transaction.*/
2122
int axienet_mdio_wait_until_ready(struct axienet_local *lp)
2223
{
23-
unsigned long end = jiffies + 2;
24-
while (!(axienet_ior(lp, XAE_MDIO_MCR_OFFSET) &
25-
XAE_MDIO_MCR_READY_MASK)) {
26-
if (time_before_eq(end, jiffies)) {
27-
WARN_ON(1);
28-
return -ETIMEDOUT;
29-
}
30-
udelay(1);
31-
}
32-
return 0;
24+
u32 val;
25+
26+
return readx_poll_timeout(axinet_ior_read_mcr, lp,
27+
val, val & XAE_MDIO_MCR_READY_MASK,
28+
1, 20000);
3329
}
3430

3531
/**

drivers/net/ethernet/xilinx/xilinx_emaclite.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/of_net.h>
2828
#include <linux/phy.h>
2929
#include <linux/interrupt.h>
30+
#include <linux/iopoll.h>
3031

3132
#define DRIVER_NAME "xilinx_emaclite"
3233

@@ -714,20 +715,15 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)
714715

715716
static int xemaclite_mdio_wait(struct net_local *lp)
716717
{
717-
unsigned long end = jiffies + 2;
718+
u32 val;
718719

719720
/* wait for the MDIO interface to not be busy or timeout
720721
* after some time.
721722
*/
722-
while (xemaclite_readl(lp->base_addr + XEL_MDIOCTRL_OFFSET) &
723-
XEL_MDIOCTRL_MDIOSTS_MASK) {
724-
if (time_before_eq(end, jiffies)) {
725-
WARN_ON(1);
726-
return -ETIMEDOUT;
727-
}
728-
msleep(1);
729-
}
730-
return 0;
723+
return readx_poll_timeout(xemaclite_readl,
724+
lp->base_addr + XEL_MDIOCTRL_OFFSET,
725+
val, !(val & XEL_MDIOCTRL_MDIOSTS_MASK),
726+
1000, 20000);
731727
}
732728

733729
/**

drivers/net/fddi/skfp/hwmtm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ void process_receive(struct s_smc *smc)
12061206
}
12071207
/*
12081208
* SUPERNET 3 Bug: FORMAC delivers status words
1209-
* of aborded frames to the BMU
1209+
* of aborted frames to the BMU
12101210
*/
12111211
if (len <= 4) {
12121212
DB_RX(2, "Frame length = 0");
@@ -1343,7 +1343,7 @@ void process_receive(struct s_smc *smc)
13431343
break ;
13441344
default :
13451345
/*
1346-
* unknown FC abord the frame
1346+
* unknown FC abort the frame
13471347
*/
13481348
DB_RX(2, "unknown FC error");
13491349
smt_free_mbuf(smc,mb) ;

0 commit comments

Comments
 (0)