Skip to content

Commit dea08e6

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "Looks like a lot, but mostly driver fixes scattered all over as usual. Of note: 1) Add conditional sched in nf conntrack in cleanup to avoid NMI watchdogs. From Florian Westphal. 2) Fix deadlock in nfnetlink cttimeout, also from Floarian. 3) Fix handling of slaves in bonding ARP monitor validation, from Jay Vosburgh. 4) Callers of ip_cmsg_send() are responsible for freeing IP options, some were not doing so. Fix from Eric Dumazet. 5) Fix per-cpu bugs in mvneta driver, from Gregory CLEMENT. 6) Fix vlan handling in mv88e6xxx DSA driver, from Vivien Didelot. 7) bcm7xxx PHY driver bug fixes from Florian Fainelli. 8) Avoid unaligned accesses to protocol headers wrt. GRE, from Alexander Duyck. 9) SKB leaks and other problems in arc_emac driver, from Alexander Kochetkov. 10) tcp_v4_inbound_md5_hash() releases listener socket instead of request socket on error path, oops. Fix from Eric Dumazet. 11) Missing socket release in pppoe_rcv_core() that seems to have existed basically forever. From Guillaume Nault. 12) Missing slave_dev unregister in dsa_slave_create() error path, from Florian Fainelli. 13) crypto_alloc_hash() never returns NULL, fix return value check in __tcp_alloc_md5sig_pool. From Insu Yun. 14) Properly expire exception route entries in ipv4, from Xin Long. 15) Fix races in tcp/dccp listener socket dismantle, from Eric Dumazet. 16) Don't set IFF_TX_SKB_SHARING in vxlan, geneve, or GRE, it's not legal. These drivers modify the SKB on transmit. From Jiri Benc. 17) Fix regression in the initialziation of netdev->tx_queue_len. From Phil Sutter. 18) Missing unlock in tipc_nl_add_bc_link() error path, from Insu Yun. 19) SCTP port hash sizing does not properly ensure that table is a power of two in size. From Neil Horman. 20) Fix initializing of software copy of MAC address in fmvj18x_cs driver, from Ken Kawasaki" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (129 commits) bnx2x: Fix 84833 phy command handler bnx2x: Fix led setting for 84858 phy. bnx2x: Correct 84858 PHY fw version bnx2x: Fix 84833 RX CRC bnx2x: Fix link-forcing for KR2 net: ethernet: davicom: fix devicetree irq resource fmvj18x_cs: fix incorrect indexing of dev->dev_addr[] when copying the MAC address Driver: Vmxnet3: Update Rx ring 2 max size net: netcp: rework the code for get/set sw_data in dma desc soc: ti: knav_dma: rename pad in struct knav_dma_desc to sw_data net: ti: netcp: restore get/set_pad_info() functionality MAINTAINERS: Drop myself as xen netback maintainer sctp: Fix port hash table size computation can: ems_usb: Fix possible tx overflow Bluetooth: hci_core: Avoid mixing up req_complete and req_complete_skb net: bcmgenet: Fix internal PHY link state af_unix: Don't use continue to re-execute unix_stream_read_generic loop unix_diag: fix incorrect sign extension in unix_lookup_by_ino bnxt_en: Failure to update PHY is not fatal condition. bnxt_en: Remove unnecessary call to update PHY settings. ...
2 parents 5c102d0 + d856626 commit dea08e6

File tree

124 files changed

+3110
-2240
lines changed

Some content is hidden

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

124 files changed

+3110
-2240
lines changed

Documentation/devicetree/bindings/net/renesas,ravb.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ Example:
8282
"ch16", "ch17", "ch18", "ch19",
8383
"ch20", "ch21", "ch22", "ch23",
8484
"ch24";
85-
clocks = <&mstp8_clks R8A7795_CLK_ETHERAVB>;
86-
power-domains = <&cpg_clocks>;
85+
clocks = <&cpg CPG_MOD 812>;
86+
power-domains = <&cpg>;
8787
phy-mode = "rgmii-id";
8888
phy-handle = <&phy0>;
8989

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12013,7 +12013,6 @@ F: arch/arm64/xen/
1201312013
F: arch/arm64/include/asm/xen/
1201412014

1201512015
XEN NETWORK BACKEND DRIVER
12016-
M: Ian Campbell <[email protected]>
1201712016
M: Wei Liu <[email protected]>
1201812017
L: [email protected] (moderated for non-subscribers)
1201912018

drivers/infiniband/hw/mlx4/qp.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,9 +1681,12 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
16811681
}
16821682

16831683
if (qp->ibqp.uobject)
1684-
context->usr_page = cpu_to_be32(to_mucontext(ibqp->uobject->context)->uar.index);
1684+
context->usr_page = cpu_to_be32(
1685+
mlx4_to_hw_uar_index(dev->dev,
1686+
to_mucontext(ibqp->uobject->context)->uar.index));
16851687
else
1686-
context->usr_page = cpu_to_be32(dev->priv_uar.index);
1688+
context->usr_page = cpu_to_be32(
1689+
mlx4_to_hw_uar_index(dev->dev, dev->priv_uar.index));
16871690

16881691
if (attr_mask & IB_QP_DEST_QPN)
16891692
context->remote_qpn = cpu_to_be32(attr->dest_qp_num);

drivers/isdn/gigaset/ser-gigaset.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,7 @@ static void gigaset_freecshw(struct cardstate *cs)
373373

374374
static void gigaset_device_release(struct device *dev)
375375
{
376-
struct cardstate *cs = dev_get_drvdata(dev);
377-
378-
if (!cs)
379-
return;
380-
dev_set_drvdata(dev, NULL);
381-
kfree(cs->hw.ser);
382-
cs->hw.ser = NULL;
376+
kfree(container_of(dev, struct ser_cardstate, dev.dev));
383377
}
384378

385379
/*
@@ -408,7 +402,6 @@ static int gigaset_initcshw(struct cardstate *cs)
408402
cs->hw.ser = NULL;
409403
return rc;
410404
}
411-
dev_set_drvdata(&cs->hw.ser->dev.dev, cs);
412405

413406
tasklet_init(&cs->write_tasklet,
414407
gigaset_modem_fill, (unsigned long) cs);

drivers/isdn/hardware/mISDN/netjet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ read_dma(struct tiger_ch *bc, u32 idx, int cnt)
392392
}
393393
stat = bchannel_get_rxbuf(&bc->bch, cnt);
394394
/* only transparent use the count here, HDLC overun is detected later */
395-
if (stat == ENOMEM) {
395+
if (stat == -ENOMEM) {
396396
pr_warning("%s.B%d: No memory for %d bytes\n",
397397
card->name, bc->bch.nr, cnt);
398398
return;

drivers/net/bonding/bond_main.c

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ static void bond_uninit(struct net_device *bond_dev);
214214
static struct rtnl_link_stats64 *bond_get_stats(struct net_device *bond_dev,
215215
struct rtnl_link_stats64 *stats);
216216
static void bond_slave_arr_handler(struct work_struct *work);
217+
static bool bond_time_in_interval(struct bonding *bond, unsigned long last_act,
218+
int mod);
217219

218220
/*---------------------------- General routines -----------------------------*/
219221

@@ -2127,6 +2129,7 @@ static void bond_miimon_commit(struct bonding *bond)
21272129
continue;
21282130

21292131
case BOND_LINK_UP:
2132+
bond_update_speed_duplex(slave);
21302133
bond_set_slave_link_state(slave, BOND_LINK_UP,
21312134
BOND_SLAVE_NOTIFY_NOW);
21322135
slave->last_link_up = jiffies;
@@ -2459,7 +2462,7 @@ int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
24592462
struct slave *slave)
24602463
{
24612464
struct arphdr *arp = (struct arphdr *)skb->data;
2462-
struct slave *curr_active_slave;
2465+
struct slave *curr_active_slave, *curr_arp_slave;
24632466
unsigned char *arp_ptr;
24642467
__be32 sip, tip;
24652468
int alen, is_arp = skb->protocol == __cpu_to_be16(ETH_P_ARP);
@@ -2506,26 +2509,41 @@ int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond,
25062509
&sip, &tip);
25072510

25082511
curr_active_slave = rcu_dereference(bond->curr_active_slave);
2512+
curr_arp_slave = rcu_dereference(bond->current_arp_slave);
25092513

2510-
/* Backup slaves won't see the ARP reply, but do come through
2511-
* here for each ARP probe (so we swap the sip/tip to validate
2512-
* the probe). In a "redundant switch, common router" type of
2513-
* configuration, the ARP probe will (hopefully) travel from
2514-
* the active, through one switch, the router, then the other
2515-
* switch before reaching the backup.
2514+
/* We 'trust' the received ARP enough to validate it if:
2515+
*
2516+
* (a) the slave receiving the ARP is active (which includes the
2517+
* current ARP slave, if any), or
2518+
*
2519+
* (b) the receiving slave isn't active, but there is a currently
2520+
* active slave and it received valid arp reply(s) after it became
2521+
* the currently active slave, or
2522+
*
2523+
* (c) there is an ARP slave that sent an ARP during the prior ARP
2524+
* interval, and we receive an ARP reply on any slave. We accept
2525+
* these because switch FDB update delays may deliver the ARP
2526+
* reply to a slave other than the sender of the ARP request.
25162527
*
2517-
* We 'trust' the arp requests if there is an active slave and
2518-
* it received valid arp reply(s) after it became active. This
2519-
* is done to avoid endless looping when we can't reach the
2528+
* Note: for (b), backup slaves are receiving the broadcast ARP
2529+
* request, not a reply. This request passes from the sending
2530+
* slave through the L2 switch(es) to the receiving slave. Since
2531+
* this is checking the request, sip/tip are swapped for
2532+
* validation.
2533+
*
2534+
* This is done to avoid endless looping when we can't reach the
25202535
* arp_ip_target and fool ourselves with our own arp requests.
25212536
*/
2522-
25232537
if (bond_is_active_slave(slave))
25242538
bond_validate_arp(bond, slave, sip, tip);
25252539
else if (curr_active_slave &&
25262540
time_after(slave_last_rx(bond, curr_active_slave),
25272541
curr_active_slave->last_link_up))
25282542
bond_validate_arp(bond, slave, tip, sip);
2543+
else if (curr_arp_slave && (arp->ar_op == htons(ARPOP_REPLY)) &&
2544+
bond_time_in_interval(bond,
2545+
dev_trans_start(curr_arp_slave->dev), 1))
2546+
bond_validate_arp(bond, slave, sip, tip);
25292547

25302548
out_unlock:
25312549
if (arp != (struct arphdr *)skb->data)

drivers/net/can/usb/ems_usb.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ MODULE_LICENSE("GPL v2");
117117
*/
118118
#define EMS_USB_ARM7_CLOCK 8000000
119119

120+
#define CPC_TX_QUEUE_TRIGGER_LOW 25
121+
#define CPC_TX_QUEUE_TRIGGER_HIGH 35
122+
120123
/*
121124
* CAN-Message representation in a CPC_MSG. Message object type is
122125
* CPC_MSG_TYPE_CAN_FRAME or CPC_MSG_TYPE_RTR_FRAME or
@@ -278,6 +281,11 @@ static void ems_usb_read_interrupt_callback(struct urb *urb)
278281
switch (urb->status) {
279282
case 0:
280283
dev->free_slots = dev->intr_in_buffer[1];
284+
if(dev->free_slots > CPC_TX_QUEUE_TRIGGER_HIGH){
285+
if (netif_queue_stopped(netdev)){
286+
netif_wake_queue(netdev);
287+
}
288+
}
281289
break;
282290

283291
case -ECONNRESET: /* unlink */
@@ -526,8 +534,6 @@ static void ems_usb_write_bulk_callback(struct urb *urb)
526534
/* Release context */
527535
context->echo_index = MAX_TX_URBS;
528536

529-
if (netif_queue_stopped(netdev))
530-
netif_wake_queue(netdev);
531537
}
532538

533539
/*
@@ -587,7 +593,7 @@ static int ems_usb_start(struct ems_usb *dev)
587593
int err, i;
588594

589595
dev->intr_in_buffer[0] = 0;
590-
dev->free_slots = 15; /* initial size */
596+
dev->free_slots = 50; /* initial size */
591597

592598
for (i = 0; i < MAX_RX_URBS; i++) {
593599
struct urb *urb = NULL;
@@ -835,7 +841,7 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne
835841

836842
/* Slow down tx path */
837843
if (atomic_read(&dev->active_tx_urbs) >= MAX_TX_URBS ||
838-
dev->free_slots < 5) {
844+
dev->free_slots < CPC_TX_QUEUE_TRIGGER_LOW) {
839845
netif_stop_queue(netdev);
840846
}
841847
}

drivers/net/dsa/mv88e6352.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
static const struct mv88e6xxx_switch_id mv88e6352_table[] = {
2626
{ PORT_SWITCH_ID_6172, "Marvell 88E6172" },
2727
{ PORT_SWITCH_ID_6176, "Marvell 88E6176" },
28+
{ PORT_SWITCH_ID_6240, "Marvell 88E6240" },
2829
{ PORT_SWITCH_ID_6320, "Marvell 88E6320" },
2930
{ PORT_SWITCH_ID_6320_A1, "Marvell 88E6320 (A1)" },
3031
{ PORT_SWITCH_ID_6320_A2, "Marvell 88e6320 (A2)" },

drivers/net/dsa/mv88e6xxx.c

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ static int _mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port, u16 vid)
15551555

15561556
if (vlan.vid != vid || !vlan.valid ||
15571557
vlan.data[port] == GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER)
1558-
return -ENOENT;
1558+
return -EOPNOTSUPP;
15591559

15601560
vlan.data[port] = GLOBAL_VTU_DATA_MEMBER_TAG_NON_MEMBER;
15611561

@@ -1582,6 +1582,7 @@ int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port,
15821582
const struct switchdev_obj_port_vlan *vlan)
15831583
{
15841584
struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
1585+
const u16 defpvid = 4000 + ds->index * DSA_MAX_PORTS + port;
15851586
u16 pvid, vid;
15861587
int err = 0;
15871588

@@ -1597,7 +1598,8 @@ int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port,
15971598
goto unlock;
15981599

15991600
if (vid == pvid) {
1600-
err = _mv88e6xxx_port_pvid_set(ds, port, 0);
1601+
/* restore reserved VLAN ID */
1602+
err = _mv88e6xxx_port_pvid_set(ds, port, defpvid);
16011603
if (err)
16021604
goto unlock;
16031605
}
@@ -1889,26 +1891,20 @@ int mv88e6xxx_port_fdb_dump(struct dsa_switch *ds, int port,
18891891

18901892
int mv88e6xxx_port_bridge_join(struct dsa_switch *ds, int port, u32 members)
18911893
{
1892-
struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
1893-
const u16 pvid = 4000 + ds->index * DSA_MAX_PORTS + port;
1894-
int err;
1895-
1896-
/* The port joined a bridge, so leave its reserved VLAN */
1897-
mutex_lock(&ps->smi_mutex);
1898-
err = _mv88e6xxx_port_vlan_del(ds, port, pvid);
1899-
if (!err)
1900-
err = _mv88e6xxx_port_pvid_set(ds, port, 0);
1901-
mutex_unlock(&ps->smi_mutex);
1902-
return err;
1894+
return 0;
19031895
}
19041896

19051897
int mv88e6xxx_port_bridge_leave(struct dsa_switch *ds, int port, u32 members)
1898+
{
1899+
return 0;
1900+
}
1901+
1902+
static int mv88e6xxx_setup_port_default_vlan(struct dsa_switch *ds, int port)
19061903
{
19071904
struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
19081905
const u16 pvid = 4000 + ds->index * DSA_MAX_PORTS + port;
19091906
int err;
19101907

1911-
/* The port left the bridge, so join its reserved VLAN */
19121908
mutex_lock(&ps->smi_mutex);
19131909
err = _mv88e6xxx_port_vlan_add(ds, port, pvid, true);
19141910
if (!err)
@@ -2192,8 +2188,7 @@ int mv88e6xxx_setup_ports(struct dsa_switch *ds)
21922188
if (dsa_is_cpu_port(ds, i) || dsa_is_dsa_port(ds, i))
21932189
continue;
21942190

2195-
/* setup the unbridged state */
2196-
ret = mv88e6xxx_port_bridge_leave(ds, i, 0);
2191+
ret = mv88e6xxx_setup_port_default_vlan(ds, i);
21972192
if (ret < 0)
21982193
return ret;
21992194
}

drivers/net/ethernet/8390/pcnet_cs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,6 +1501,7 @@ static const struct pcmcia_device_id pcnet_ids[] = {
15011501
PCMCIA_DEVICE_MANF_CARD(0x026f, 0x030a),
15021502
PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1103),
15031503
PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1121),
1504+
PCMCIA_DEVICE_MANF_CARD(0xc001, 0x0009),
15041505
PCMCIA_DEVICE_PROD_ID12("2408LAN", "Ethernet", 0x352fff7f, 0x00b2e941),
15051506
PCMCIA_DEVICE_PROD_ID1234("Socket", "CF 10/100 Ethernet Card", "Revision B", "05/11/06", 0xb38bcc2e, 0x4de88352, 0xeaca6c8d, 0x7e57c22e),
15061507
PCMCIA_DEVICE_PROD_ID123("Cardwell", "PCMCIA", "ETHERNET", 0x9533672e, 0x281f1c5d, 0x3ff7175b),

0 commit comments

Comments
 (0)