Skip to content

Commit c94eee8

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Fix two regressions in ipv6 route lookups, particularly wrt output interface specifications in the lookup key. From David Ahern. 2) Fix checks in ipv6 IPSEC tunnel pre-encap fragmentation, from Herbert Xu. 3) Fix mis-advertisement of 1000BASE-T on bcm63xx_enet, from Simon Arlott. 4) Some smsc phys misbehave with energy detect mode enabled, so add a DT property and disable it on such switches. From Heiko Schocher. 5) Fix TSO corruption on TX in mv643xx_eth, from Philipp Kirchhofer. 6) Fix regression added by removal of openvswitch vport stats, from James Morse. 7) Vendor Kconfig options should be bool, not tristate, from Andreas Schwab. 8) Use non-_BH() net stats bump in tcp_xmit_probe_skb(), otherwise we barf during TCP REPAIR operations. 9) Fix various bugs in openvswitch conntrack support, from Joe Stringer. 10) Fix NETLINK_LIST_MEMBERSHIPS locking, from David Herrmann. 11) Don't have VSOCK do sock_put() in interrupt context, from Jorgen Hansen. 12) Fix skb_realloc_headroom() failures properly in ISDN, from Karsten Keil. 13) Add some device IDs to qmi_wwan, from Bjorn Mork. 14) Fix ovs egress tunnel information when using lwtunnel devices, from Pravin B Shelar. 15) Add missing NETIF_F_FRAGLIST to macvtab feature list, from Jason Wang. 16) Fix incorrect handling of throw routes when the result of the throw cannot find a match, from Xin Long. 17) Protect ipv6 MTU calculations from wrap-around, from Hannes Frederic Sowa. 18) Fix failed autonegotiation on KSZ9031 micrel PHYs, from Nathan Sullivan. 19) Add missing memory barries in descriptor accesses or xgbe driver, from Thomas Lendacky. 20) Fix release conditon test in pppoe_release(), from Guillaume Nault. 21) Fix gianfar bugs wrt filter configuration, from Claudiu Manoil. 22) Fix violations of RX buffer alignment in sh_eth driver, from Sergei Shtylyov. 23) Fixing missing of_node_put() calls in various places around the networking, from Julia Lawall. 24) Fix incorrect leaf now walking in ipv4 routing tree, from Alexander Duyck. 25) RDS doesn't check pskb_pull()/pskb_trim() return values, from Sowmini Varadhan. 26) Fix VLAN configuration in mlx4 driver, from Jack Morgenstein. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (79 commits) ipv6: protect mtu calculation of wrap-around and infinite loop by rounding issues Revert "Merge branch 'ipv6-overflow-arith'" net/mlx4: Copy/set only sizeof struct mlx4_eqe bytes net/mlx4_en: Explicitly set no vlan tags in WQE ctrl segment when no vlan is present vhost: fix performance on LE hosts bpf: sample: define aarch64 specific registers amd-xgbe: Fix race between access of desc and desc index RDS-TCP: Recover correctly from pskb_pull()/pksb_trim() failure in rds_tcp_data_recv forcedeth: fix unilateral interrupt disabling in netpoll path openvswitch: Fix skb leak using IPv6 defrag ipv6: Export nf_ct_frag6_consume_orig() openvswitch: Fix double-free on ip_defrag() errors fib_trie: leaf_walk_rcu should not compute key if key is less than pn->key net: mv643xx_eth: add missing of_node_put ath6kl: add missing of_node_put net: phy: mdio: add missing of_node_put netdev/phy: add missing of_node_put net: netcp: add missing of_node_put net: thunderx: add missing of_node_put ipv6: gre: support SIT encapsulation ...
2 parents 38dab9a + 89bc784 commit c94eee8

Some content is hidden

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

89 files changed

+894
-477
lines changed

Documentation/devicetree/bindings/net/cpsw.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Required properties:
3939
Optional properties:
4040
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
4141
- mac-address : See ethernet.txt file in the same directory
42+
- phy-handle : See ethernet.txt file in the same directory
4243

4344
Note: "ti,hwmods" field is used to fetch the base address and irq
4445
resources from TI, omap hwmod data base during device registration.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
SMSC LAN87xx Ethernet PHY
2+
3+
Some boards require special tuning values. Configure them
4+
through an Ethernet OF device node.
5+
6+
Optional properties:
7+
8+
- smsc,disable-energy-detect:
9+
If set, do not enable energy detect mode for the SMSC phy.
10+
default: enable energy detect mode
11+
12+
Examples:
13+
smsc phy with disabled energy detect mode on an am335x based board.
14+
&davinci_mdio {
15+
pinctrl-names = "default", "sleep";
16+
pinctrl-0 = <&davinci_mdio_default>;
17+
pinctrl-1 = <&davinci_mdio_sleep>;
18+
status = "okay";
19+
20+
ethernetphy0: ethernet-phy@0 {
21+
reg = <0>;
22+
smsc,disable-energy-detect;
23+
};
24+
};

MAINTAINERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4428,6 +4428,14 @@ L: linuxppc-dev@lists.ozlabs.org
44284428
S: Maintained
44294429
F: drivers/net/ethernet/freescale/ucc_geth*
44304430

4431+
FREESCALE eTSEC ETHERNET DRIVER (GIANFAR)
4432+
M: Claudiu Manoil <claudiu.manoil@freescale.com>
4433+
L: netdev@vger.kernel.org
4434+
S: Maintained
4435+
F: drivers/net/ethernet/freescale/gianfar*
4436+
X: drivers/net/ethernet/freescale/gianfar_ptp.c
4437+
F: Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
4438+
44314439
FREESCALE QUICC ENGINE UCC UART DRIVER
44324440
M: Timur Tabi <timur@tabi.org>
44334441
L: linuxppc-dev@lists.ozlabs.org

drivers/isdn/hisax/isdnl2.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,7 +1247,7 @@ static void
12471247
l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
12481248
{
12491249
struct PStack *st = fi->userdata;
1250-
struct sk_buff *skb;
1250+
struct sk_buff *skb, *nskb;
12511251
struct Layer2 *l2 = &st->l2;
12521252
u_char header[MAX_HEADER_LEN];
12531253
int i, hdr_space_needed;
@@ -1262,14 +1262,10 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
12621262
return;
12631263

12641264
hdr_space_needed = l2headersize(l2, 0);
1265-
if (hdr_space_needed > skb_headroom(skb)) {
1266-
struct sk_buff *orig_skb = skb;
1267-
1268-
skb = skb_realloc_headroom(skb, hdr_space_needed);
1269-
if (!skb) {
1270-
dev_kfree_skb(orig_skb);
1271-
return;
1272-
}
1265+
nskb = skb_realloc_headroom(skb, hdr_space_needed);
1266+
if (!nskb) {
1267+
skb_queue_head(&l2->i_queue, skb);
1268+
return;
12731269
}
12741270
spin_lock_irqsave(&l2->lock, flags);
12751271
if (test_bit(FLG_MOD128, &l2->flag))
@@ -1282,7 +1278,7 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
12821278
p1);
12831279
dev_kfree_skb(l2->windowar[p1]);
12841280
}
1285-
l2->windowar[p1] = skb_clone(skb, GFP_ATOMIC);
1281+
l2->windowar[p1] = skb;
12861282

12871283
i = sethdraddr(&st->l2, header, CMD);
12881284

@@ -1295,8 +1291,8 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
12951291
l2->vs = (l2->vs + 1) % 8;
12961292
}
12971293
spin_unlock_irqrestore(&l2->lock, flags);
1298-
memcpy(skb_push(skb, i), header, i);
1299-
st->l2.l2l1(st, PH_PULL | INDICATION, skb);
1294+
memcpy(skb_push(nskb, i), header, i);
1295+
st->l2.l2l1(st, PH_PULL | INDICATION, nskb);
13001296
test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag);
13011297
if (!test_and_set_bit(FLG_T200_RUN, &st->l2.flag)) {
13021298
FsmDelTimer(&st->l2.t203, 13);

drivers/isdn/mISDN/layer2.c

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,7 @@ static void
14761476
l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
14771477
{
14781478
struct layer2 *l2 = fi->userdata;
1479-
struct sk_buff *skb, *nskb, *oskb;
1479+
struct sk_buff *skb, *nskb;
14801480
u_char header[MAX_L2HEADER_LEN];
14811481
u_int i, p1;
14821482

@@ -1486,48 +1486,34 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
14861486
skb = skb_dequeue(&l2->i_queue);
14871487
if (!skb)
14881488
return;
1489-
1490-
if (test_bit(FLG_MOD128, &l2->flag))
1491-
p1 = (l2->vs - l2->va) % 128;
1492-
else
1493-
p1 = (l2->vs - l2->va) % 8;
1494-
p1 = (p1 + l2->sow) % l2->window;
1495-
if (l2->windowar[p1]) {
1496-
printk(KERN_WARNING "%s: l2 try overwrite ack queue entry %d\n",
1497-
mISDNDevName4ch(&l2->ch), p1);
1498-
dev_kfree_skb(l2->windowar[p1]);
1499-
}
1500-
l2->windowar[p1] = skb;
15011489
i = sethdraddr(l2, header, CMD);
15021490
if (test_bit(FLG_MOD128, &l2->flag)) {
15031491
header[i++] = l2->vs << 1;
15041492
header[i++] = l2->vr << 1;
1493+
} else
1494+
header[i++] = (l2->vr << 5) | (l2->vs << 1);
1495+
nskb = skb_realloc_headroom(skb, i);
1496+
if (!nskb) {
1497+
printk(KERN_WARNING "%s: no headroom(%d) copy for IFrame\n",
1498+
mISDNDevName4ch(&l2->ch), i);
1499+
skb_queue_head(&l2->i_queue, skb);
1500+
return;
1501+
}
1502+
if (test_bit(FLG_MOD128, &l2->flag)) {
1503+
p1 = (l2->vs - l2->va) % 128;
15051504
l2->vs = (l2->vs + 1) % 128;
15061505
} else {
1507-
header[i++] = (l2->vr << 5) | (l2->vs << 1);
1506+
p1 = (l2->vs - l2->va) % 8;
15081507
l2->vs = (l2->vs + 1) % 8;
15091508
}
1510-
1511-
nskb = skb_clone(skb, GFP_ATOMIC);
1512-
p1 = skb_headroom(nskb);
1513-
if (p1 >= i)
1514-
memcpy(skb_push(nskb, i), header, i);
1515-
else {
1516-
printk(KERN_WARNING
1517-
"%s: L2 pull_iqueue skb header(%d/%d) too short\n",
1518-
mISDNDevName4ch(&l2->ch), i, p1);
1519-
oskb = nskb;
1520-
nskb = mI_alloc_skb(oskb->len + i, GFP_ATOMIC);
1521-
if (!nskb) {
1522-
dev_kfree_skb(oskb);
1523-
printk(KERN_WARNING "%s: no skb mem in %s\n",
1524-
mISDNDevName4ch(&l2->ch), __func__);
1525-
return;
1526-
}
1527-
memcpy(skb_put(nskb, i), header, i);
1528-
memcpy(skb_put(nskb, oskb->len), oskb->data, oskb->len);
1529-
dev_kfree_skb(oskb);
1509+
p1 = (p1 + l2->sow) % l2->window;
1510+
if (l2->windowar[p1]) {
1511+
printk(KERN_WARNING "%s: l2 try overwrite ack queue entry %d\n",
1512+
mISDNDevName4ch(&l2->ch), p1);
1513+
dev_kfree_skb(l2->windowar[p1]);
15301514
}
1515+
l2->windowar[p1] = skb;
1516+
memcpy(skb_push(nskb, i), header, i);
15311517
l2down(l2, PH_DATA_REQ, l2_newid(l2), nskb);
15321518
test_and_clear_bit(FLG_ACK_PEND, &l2->flag);
15331519
if (!test_and_set_bit(FLG_T200_RUN, &l2->flag)) {

drivers/net/ethernet/allwinner/sun4i-emac.c

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -847,21 +847,25 @@ static int emac_probe(struct platform_device *pdev)
847847
if (ndev->irq == -ENXIO) {
848848
netdev_err(ndev, "No irq resource\n");
849849
ret = ndev->irq;
850-
goto out;
850+
goto out_iounmap;
851851
}
852852

853853
db->clk = devm_clk_get(&pdev->dev, NULL);
854854
if (IS_ERR(db->clk)) {
855855
ret = PTR_ERR(db->clk);
856-
goto out;
856+
goto out_iounmap;
857857
}
858858

859-
clk_prepare_enable(db->clk);
859+
ret = clk_prepare_enable(db->clk);
860+
if (ret) {
861+
dev_err(&pdev->dev, "Error couldn't enable clock (%d)\n", ret);
862+
goto out_iounmap;
863+
}
860864

861865
ret = sunxi_sram_claim(&pdev->dev);
862866
if (ret) {
863867
dev_err(&pdev->dev, "Error couldn't map SRAM to device\n");
864-
goto out;
868+
goto out_clk_disable_unprepare;
865869
}
866870

867871
db->phy_node = of_parse_phandle(np, "phy", 0);
@@ -910,6 +914,10 @@ static int emac_probe(struct platform_device *pdev)
910914

911915
out_release_sram:
912916
sunxi_sram_release(&pdev->dev);
917+
out_clk_disable_unprepare:
918+
clk_disable_unprepare(db->clk);
919+
out_iounmap:
920+
iounmap(db->membase);
913921
out:
914922
dev_err(db->dev, "not found (%d).\n", ret);
915923

@@ -921,8 +929,12 @@ static int emac_probe(struct platform_device *pdev)
921929
static int emac_remove(struct platform_device *pdev)
922930
{
923931
struct net_device *ndev = platform_get_drvdata(pdev);
932+
struct emac_board_info *db = netdev_priv(ndev);
924933

925934
unregister_netdev(ndev);
935+
sunxi_sram_release(&pdev->dev);
936+
clk_disable_unprepare(db->clk);
937+
iounmap(db->membase);
926938
free_netdev(ndev);
927939

928940
dev_dbg(&pdev->dev, "released and freed device\n");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ static void xgbe_dev_xmit(struct xgbe_channel *channel)
15951595
packet->rdesc_count, 1);
15961596

15971597
/* Make sure ownership is written to the descriptor */
1598-
dma_wmb();
1598+
smp_wmb();
15991599

16001600
ring->cur = cur_index + 1;
16011601
if (!packet->skb->xmit_more ||

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1807,17 +1807,23 @@ static int xgbe_tx_poll(struct xgbe_channel *channel)
18071807
struct netdev_queue *txq;
18081808
int processed = 0;
18091809
unsigned int tx_packets = 0, tx_bytes = 0;
1810+
unsigned int cur;
18101811

18111812
DBGPR("-->xgbe_tx_poll\n");
18121813

18131814
/* Nothing to do if there isn't a Tx ring for this channel */
18141815
if (!ring)
18151816
return 0;
18161817

1818+
cur = ring->cur;
1819+
1820+
/* Be sure we get ring->cur before accessing descriptor data */
1821+
smp_rmb();
1822+
18171823
txq = netdev_get_tx_queue(netdev, channel->queue_index);
18181824

18191825
while ((processed < XGBE_TX_DESC_MAX_PROC) &&
1820-
(ring->dirty != ring->cur)) {
1826+
(ring->dirty != cur)) {
18211827
rdata = XGBE_GET_DESC_DATA(ring, ring->dirty);
18221828
rdesc = rdata->rdesc;
18231829

drivers/net/ethernet/broadcom/bcm63xx_enet.c

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,7 @@ static void swphy_poll_timer(unsigned long data)
20492049

20502050
for (i = 0; i < priv->num_ports; i++) {
20512051
struct bcm63xx_enetsw_port *port;
2052-
int val, j, up, advertise, lpa, lpa2, speed, duplex, media;
2052+
int val, j, up, advertise, lpa, speed, duplex, media;
20532053
int external_phy = bcm_enet_port_is_rgmii(i);
20542054
u8 override;
20552055

@@ -2092,22 +2092,27 @@ static void swphy_poll_timer(unsigned long data)
20922092
lpa = bcmenet_sw_mdio_read(priv, external_phy, port->phy_id,
20932093
MII_LPA);
20942094

2095-
lpa2 = bcmenet_sw_mdio_read(priv, external_phy, port->phy_id,
2096-
MII_STAT1000);
2097-
20982095
/* figure out media and duplex from advertise and LPA values */
20992096
media = mii_nway_result(lpa & advertise);
21002097
duplex = (media & ADVERTISE_FULL) ? 1 : 0;
2101-
if (lpa2 & LPA_1000FULL)
2102-
duplex = 1;
2103-
2104-
if (lpa2 & (LPA_1000FULL | LPA_1000HALF))
2105-
speed = 1000;
2106-
else {
2107-
if (media & (ADVERTISE_100FULL | ADVERTISE_100HALF))
2108-
speed = 100;
2109-
else
2110-
speed = 10;
2098+
2099+
if (media & (ADVERTISE_100FULL | ADVERTISE_100HALF))
2100+
speed = 100;
2101+
else
2102+
speed = 10;
2103+
2104+
if (val & BMSR_ESTATEN) {
2105+
advertise = bcmenet_sw_mdio_read(priv, external_phy,
2106+
port->phy_id, MII_CTRL1000);
2107+
2108+
lpa = bcmenet_sw_mdio_read(priv, external_phy,
2109+
port->phy_id, MII_STAT1000);
2110+
2111+
if (advertise & (ADVERTISE_1000FULL | ADVERTISE_1000HALF)
2112+
&& lpa & (LPA_1000FULL | LPA_1000HALF)) {
2113+
speed = 1000;
2114+
duplex = (lpa & LPA_1000FULL);
2115+
}
21112116
}
21122117

21132118
dev_info(&priv->pdev->dev,

drivers/net/ethernet/cavium/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
config NET_VENDOR_CAVIUM
6-
tristate "Cavium ethernet drivers"
6+
bool "Cavium ethernet drivers"
77
depends on PCI
88
default y
99
---help---

0 commit comments

Comments
 (0)