From: David S. Miller Date: Fri, 16 Dec 2011 07:11:14 +0000 (-0500) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Tag: v3.3-rc1~182^2~207 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b26e478f8fd5b575684f021b05a5c6236ebb911a;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git Merge git://git./linux/kernel/git/davem/net Conflicts: drivers/net/ethernet/freescale/fsl_pq_mdio.c net/batman-adv/translation-table.c net/ipv6/route.c --- b26e478f8fd5b575684f021b05a5c6236ebb911a diff --cc drivers/net/ethernet/freescale/fec.c index 01ee9cc,c136230..4ea2bdc --- a/drivers/net/ethernet/freescale/fec.c +++ b/drivers/net/ethernet/freescale/fec.c @@@ -1040,14 -1032,10 +1041,14 @@@ static int fec_enet_mii_init(struct pla * mdio interface in board design, and need to be configured by * fec0 mii_bus. */ - if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && pdev->id > 0) { + if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && fep->dev_id > 0) { /* fec1 uses fec0 mii_bus */ - fep->mii_bus = fec0_mii_bus; - return 0; + if (mii_cnt && fec0_mii_bus) { + fep->mii_bus = fec0_mii_bus; + mii_cnt++; + return 0; + } + return -ENOENT; } fep->mii_timeout = 0; diff --cc drivers/net/ethernet/freescale/fsl_pq_mdio.c index f109602,4d9f84b..9eb8159 --- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c +++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c @@@ -356,16 -356,16 +356,15 @@@ static int fsl_pq_mdio_probe(struct pla if (prop) tbiaddr = *prop; + } - if (tbiaddr == -1) { - err = -EBUSY; - - goto err_free_irqs; - } else { - out_be32(tbipa, tbiaddr); - } + if (tbiaddr == -1) { + err = -EBUSY; - + goto err_free_irqs; ++ } else { ++ out_be32(tbipa, tbiaddr); } - out_be32(tbipa, tbiaddr); - err = of_mdiobus_register(new_bus, np); if (err) { printk (KERN_ERR "%s: Cannot register as MDIO bus\n", diff --cc net/batman-adv/translation-table.c index cc87acf,5f09a57..46a2b37 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@@ -242,10 -245,12 +242,11 @@@ void tt_local_add(struct net_device *so if (tt_global_entry) { /* This node is probably going to update its tt table */ tt_global_entry->orig_node->tt_poss_change = true; - /* The global entry has to be marked as PENDING and has to be + /* The global entry has to be marked as ROAMING and has to be * kept for consistency purpose */ - tt_global_entry->flags |= TT_CLIENT_ROAM; + tt_global_entry->common.flags |= TT_CLIENT_PENDING; + tt_global_entry->roam_at = jiffies; - - send_roam_adv(bat_priv, tt_global_entry->addr, + send_roam_adv(bat_priv, tt_global_entry->common.addr, tt_global_entry->orig_node); } out: @@@ -668,9 -704,21 +670,21 @@@ void tt_global_del(struct bat_priv *bat if (tt_global_entry->orig_node == orig_node) { if (roaming) { - tt_global_entry->common.flags |= TT_CLIENT_ROAM; - tt_global_entry->roam_at = jiffies; - goto out; + /* if we are deleting a global entry due to a roam + * event, there are two possibilities: + * 1) the client roamed from node A to node B => we mark + * it with TT_CLIENT_ROAM, we start a timer and we + * wait for node B to claim it. In case of timeout + * the entry is purged. + * 2) the client roamed to us => we can directly delete + * the global entry, since it is useless now. */ + tt_local_entry = tt_local_hash_find(bat_priv, - tt_global_entry->addr); ++ tt_global_entry->common.addr); + if (!tt_local_entry) { - tt_global_entry->flags |= TT_CLIENT_ROAM; ++ tt_global_entry->common.flags |= TT_CLIENT_ROAM; + tt_global_entry->roam_at = jiffies; + goto out; + } } _tt_global_del(bat_priv, tt_global_entry, message); } diff --cc net/ipv6/route.c index 4bf362b,b582a0a..ad43854 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@@ -727,11 -727,11 +727,11 @@@ static struct rt6_info *rt6_alloc_cow(c struct neighbour *neigh; int attempts = !in_softirq(); - if (!(rt->rt6i_flags&RTF_GATEWAY)) { + if (!(rt->rt6i_flags & RTF_GATEWAY)) { - if (rt->rt6i_dst.plen != 128 && + if (ort->rt6i_dst.plen != 128 && ipv6_addr_equal(&ort->rt6i_dst.addr, daddr)) rt->rt6i_flags |= RTF_ANYCAST; - ipv6_addr_copy(&rt->rt6i_gateway, daddr); + rt->rt6i_gateway = *daddr; } rt->rt6i_flags |= RTF_CACHE;