From: David S. Miller Date: Wed, 11 May 2011 18:26:15 +0000 (-0400) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-3.6 X-Git-Tag: firefly_0821_release~7613^2~1367^2~110 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3c709f8fb43e07a0403bba4a8ca7ba00ab874994;p=firefly-linux-kernel-4.4.55.git Merge branch 'master' of /linux/kernel/git/davem/net-3.6 Conflicts: drivers/net/benet/be_main.c --- 3c709f8fb43e07a0403bba4a8ca7ba00ab874994 diff --cc drivers/net/benet/be_main.c index 7b19931acba1,9187fb4e08f1..3fb4a1f465e1 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@@ -1102,14 -1103,9 +1104,14 @@@ static void be_parse_rx_compl_v1(struc AMAP_GET_BITS(struct amap_eth_rx_compl_v1, numfrags, compl); rxcp->pkt_type = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, cast_enc, compl); - rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm, compl); - rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag, - compl); + rxcp->rss_hash = + AMAP_GET_BITS(struct amap_eth_rx_compl_v1, rsshash, rxcp); + if (rxcp->vlanf) { + rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm, - compl); - rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag, - compl); ++ compl); ++ rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag, ++ compl); + } } static void be_parse_rx_compl_v0(struct be_adapter *adapter, @@@ -1134,14 -1130,9 +1136,14 @@@ AMAP_GET_BITS(struct amap_eth_rx_compl_v0, numfrags, compl); rxcp->pkt_type = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, cast_enc, compl); - rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm, compl); - rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag, - compl); + rxcp->rss_hash = + AMAP_GET_BITS(struct amap_eth_rx_compl_v0, rsshash, rxcp); + if (rxcp->vlanf) { + rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm, - compl); - rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag, - compl); ++ compl); ++ rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag, ++ compl); + } } static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo) @@@ -1163,19 -1154,17 +1165,20 @@@ else be_parse_rx_compl_v0(adapter, compl, rxcp); - /* vlanf could be wrongly set in some cards. ignore if vtm is not set */ - if ((adapter->function_mode & 0x400) && !rxcp->vtm) - rxcp->vlanf = 0; + if (rxcp->vlanf) { + /* vlanf could be wrongly set in some cards. + * ignore if vtm is not set */ + if ((adapter->function_mode & 0x400) && !rxcp->vtm) + rxcp->vlanf = 0; - if (!lancer_chip(adapter)) - rxcp->vlan_tag = swab16(rxcp->vlan_tag); + if (!lancer_chip(adapter)) - rxcp->vid = swab16(rxcp->vid); ++ rxcp->vlan_tag = swab16(rxcp->vlan_tag); - if ((adapter->pvid == rxcp->vid) && - !adapter->vlan_tag[rxcp->vid]) - if (((adapter->pvid & VLAN_VID_MASK) == - (rxcp->vlan_tag & VLAN_VID_MASK)) && - !adapter->vlan_tag[rxcp->vlan_tag]) - rxcp->vlanf = 0; ++ if (((adapter->pvid & VLAN_VID_MASK) == ++ (rxcp->vlan_tag & VLAN_VID_MASK)) && ++ !adapter->vlan_tag[rxcp->vlan_tag]) + rxcp->vlanf = 0; + } /* As the compl has been parsed, reset it; we wont touch it again */ compl->dw[offsetof(struct amap_eth_rx_compl_v1, valid) / 32] = 0; diff --cc drivers/net/ehea/ehea_ethtool.c index 1df5f40c646d,f3bbdcef338c..7f642aef5e82 --- a/drivers/net/ehea/ehea_ethtool.c +++ b/drivers/net/ehea/ehea_ethtool.c @@@ -63,20 -51,24 +63,25 @@@ static int ehea_get_settings(struct net cmd->duplex = port->full_duplex == 1 ? DUPLEX_FULL : DUPLEX_HALF; } else { - cmd->speed = -1; + speed = ~0; cmd->duplex = -1; } + ethtool_cmd_speed_set(cmd, speed); - cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full - | SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half - | SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half - | SUPPORTED_Autoneg | SUPPORTED_FIBRE); - - cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg - | ADVERTISED_FIBRE); + if (cmd->speed == SPEED_10000) { + cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); + cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE); + cmd->port = PORT_FIBRE; + } else { + cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full + | SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full + | SUPPORTED_10baseT_Half | SUPPORTED_Autoneg + | SUPPORTED_TP); + cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg + | ADVERTISED_TP); + cmd->port = PORT_TP; + } - cmd->port = PORT_FIBRE; cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE; return 0; diff --cc net/8021q/vlan.c index 718d635d3379,0eb1a886b370..b2274d1fd605 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@@ -119,11 -124,13 +119,14 @@@ void unregister_vlan_dev(struct net_dev grp->nr_vlans--; + if (vlan->flags & VLAN_FLAG_GVRP) + vlan_gvrp_request_leave(dev); + vlan_group_set_device(grp, vlan_id, NULL); - if (!grp->killall) - synchronize_net(); - + /* Because unregister_netdevice_queue() makes sure at least one rcu + * grace period is respected before device freeing, + * we dont need to call synchronize_net() here. + */ unregister_netdevice_queue(dev, head); /* If the group is now empty, kill off the group. */