Skip to content

Commit ba3e208

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: net/ipv6/xfrm6_output.c net/openvswitch/flow_netlink.c net/openvswitch/vport-gre.c net/openvswitch/vport-vxlan.c net/openvswitch/vport.c net/openvswitch/vport.h The openvswitch conflicts were overlapping changes. One was the egress tunnel info fix in 'net' and the other was the vport ->send() op simplification in 'net-next'. The xfrm6_output.c conflicts was also a simplification overlapping a bug fix. Signed-off-by: David S. Miller <[email protected]>
2 parents a72c951 + ce9d9b8 commit ba3e208

Some content is hidden

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

69 files changed

+771
-404
lines changed

Documentation/devicetree/bindings/net/cpsw.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Required properties:
4646
Optional properties:
4747
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports
4848
- mac-address : See ethernet.txt file in the same directory
49+
- phy-handle : See ethernet.txt file in the same directory
4950

5051
Note: "ti,hwmods" field is used to fetch the base address and irq
5152
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+
};

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+
wmb();
15991599

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

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1811,17 +1811,19 @@ static int xgbe_tx_poll(struct xgbe_channel *channel)
18111811
struct netdev_queue *txq;
18121812
int processed = 0;
18131813
unsigned int tx_packets = 0, tx_bytes = 0;
1814+
unsigned int cur;
18141815

18151816
DBGPR("-->xgbe_tx_poll\n");
18161817

18171818
/* Nothing to do if there isn't a Tx ring for this channel */
18181819
if (!ring)
18191820
return 0;
18201821

1822+
cur = ring->cur;
18211823
txq = netdev_get_tx_queue(netdev, channel->queue_index);
18221824

18231825
while ((processed < XGBE_TX_DESC_MAX_PROC) &&
1824-
(ring->dirty != ring->cur)) {
1826+
(ring->dirty != cur)) {
18251827
rdata = XGBE_GET_DESC_DATA(ring, ring->dirty);
18261828
rdesc = rdata->rdesc;
18271829

drivers/net/ethernet/broadcom/bcm63xx_enet.c

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

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

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

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

21122117
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---

drivers/net/ethernet/intel/i40e/i40e_ethtool.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,12 @@ static void i40e_get_ethtool_stats(struct net_device *netdev,
14061406
data[i++] = (i40e_gstrings_veb_stats[j].sizeof_stat ==
14071407
sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
14081408
}
1409+
for (j = 0; j < I40E_MAX_TRAFFIC_CLASS; j++) {
1410+
data[i++] = veb->tc_stats.tc_tx_packets[j];
1411+
data[i++] = veb->tc_stats.tc_tx_bytes[j];
1412+
data[i++] = veb->tc_stats.tc_rx_packets[j];
1413+
data[i++] = veb->tc_stats.tc_rx_bytes[j];
1414+
}
14091415
}
14101416
for (j = 0; j < I40E_GLOBAL_STATS_LEN; j++) {
14111417
p = (char *)pf + i40e_gstrings_stats[j].stat_offset;

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8154,6 +8154,7 @@ static int i40e_sw_init(struct i40e_pf *pf)
81548154
if (pf->hw.func_caps.vmdq) {
81558155
pf->num_vmdq_vsis = I40E_DEFAULT_NUM_VMDQ_VSI;
81568156
pf->flags |= I40E_FLAG_VMDQ_ENABLED;
8157+
pf->num_vmdq_qps = i40e_default_queues_per_vmdq(pf);
81578158
}
81588159

81598160
#ifdef I40E_FCOE

0 commit comments

Comments
 (0)