Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
  vlan: allow nested vlan_do_receive()
  ipv6: fix route lookup in addrconf_prefix_rcv()
  bonding: eliminate bond_close race conditions
  qlcnic: fix beacon and LED test.
  qlcnic: Updated License file
  qlcnic: updated reset sequence
  qlcnic: reset loopback mode if promiscous mode setting fails.
  qlcnic: skip IDC ack check in fw reset path.
  i825xx: Fix incorrect dependency for BVME6000_NET
  ipv6: fix route error binding peer in func icmp6_dst_alloc
  ipv6: fix error propagation in ip6_ufo_append_data()
  stmmac: update normal descriptor structure (v2)
  stmmac: fix NULL pointer dereference in capabilities fixup (v2)
  stmmac: fix a bug while checking the HW cap reg (v2)
  be2net: Changing MAC Address of a VF was broken.
  be2net: Refactored be_cmds.c file.
  bnx2x: update driver version to 1.70.30-0
  bnx2x: use FW 7.0.29.0
  bnx2x: Enable changing speed when port type is PORT_DA
  bnx2x: Fix 54618se LED behavior
  ...
  • Loading branch information
Linus Torvalds committed Oct 31, 2011
2 parents 83f89ca + 6a32e4f commit 1a4ceab
Show file tree
Hide file tree
Showing 39 changed files with 634 additions and 567 deletions.
51 changes: 6 additions & 45 deletions Documentation/networking/LICENSE.qlcnic
Original file line number Diff line number Diff line change
@@ -1,61 +1,22 @@
Copyright (c) 2009-2010 QLogic Corporation
Copyright (c) 2009-2011 QLogic Corporation
QLogic Linux qlcnic NIC Driver

This program includes a device driver for Linux 2.6 that may be
distributed with QLogic hardware specific firmware binary file.
You may modify and redistribute the device driver code under the
GNU General Public License (a copy of which is attached hereto as
Exhibit A) published by the Free Software Foundation (version 2).

You may redistribute the hardware specific firmware binary file
under the following terms:

1. Redistribution of source code (only if applicable),
must retain the above copyright notice, this list of
conditions and the following disclaimer.

2. Redistribution in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.

3. The name of QLogic Corporation may not be used to
endorse or promote products derived from this software
without specific prior written permission

REGARDLESS OF WHAT LICENSING MECHANISM IS USED OR APPLICABLE,
THIS PROGRAM IS PROVIDED BY QLOGIC CORPORATION "AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

USER ACKNOWLEDGES AND AGREES THAT USE OF THIS PROGRAM WILL NOT
CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, OR
OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT,
TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN
ANY OTHER QLOGIC HARDWARE OR SOFTWARE EITHER SOLELY OR IN
COMBINATION WITH THIS PROGRAM.


EXHIBIT A

GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble
Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Expand Down Expand Up @@ -105,7 +66,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.

GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains
Expand Down Expand Up @@ -304,7 +265,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY
NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
Expand Down
8 changes: 2 additions & 6 deletions drivers/net/bonding/bond_3ad.c
Original file line number Diff line number Diff line change
Expand Up @@ -2110,9 +2110,6 @@ void bond_3ad_state_machine_handler(struct work_struct *work)

read_lock(&bond->lock);

if (bond->kill_timers)
goto out;

//check if there are any slaves
if (bond->slave_cnt == 0)
goto re_arm;
Expand Down Expand Up @@ -2161,9 +2158,8 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
}

re_arm:
if (!bond->kill_timers)
queue_delayed_work(bond->wq, &bond->ad_work, ad_delta_in_ticks);
out:
queue_delayed_work(bond->wq, &bond->ad_work, ad_delta_in_ticks);

read_unlock(&bond->lock);
}

Expand Down
16 changes: 7 additions & 9 deletions drivers/net/bonding/bond_alb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1343,10 +1343,6 @@ void bond_alb_monitor(struct work_struct *work)

read_lock(&bond->lock);

if (bond->kill_timers) {
goto out;
}

if (bond->slave_cnt == 0) {
bond_info->tx_rebalance_counter = 0;
bond_info->lp_counter = 0;
Expand Down Expand Up @@ -1401,10 +1397,13 @@ void bond_alb_monitor(struct work_struct *work)

/*
* dev_set_promiscuity requires rtnl and
* nothing else.
* nothing else. Avoid race with bond_close.
*/
read_unlock(&bond->lock);
rtnl_lock();
if (!rtnl_trylock()) {
read_lock(&bond->lock);
goto re_arm;
}

bond_info->rlb_promisc_timeout_counter = 0;

Expand Down Expand Up @@ -1440,9 +1439,8 @@ void bond_alb_monitor(struct work_struct *work)
}

re_arm:
if (!bond->kill_timers)
queue_delayed_work(bond->wq, &bond->alb_work, alb_delta_in_ticks);
out:
queue_delayed_work(bond->wq, &bond->alb_work, alb_delta_in_ticks);

read_unlock(&bond->lock);
}

Expand Down
96 changes: 52 additions & 44 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,6 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)

read_lock(&bond->lock);

if (bond->kill_timers)
goto out;

/* rejoin all groups on bond device */
__bond_resend_igmp_join_requests(bond->dev);

Expand All @@ -789,9 +786,9 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
__bond_resend_igmp_join_requests(vlan_dev);
}

if ((--bond->igmp_retrans > 0) && !bond->kill_timers)
if (--bond->igmp_retrans > 0)
queue_delayed_work(bond->wq, &bond->mcast_work, HZ/5);
out:

read_unlock(&bond->lock);
}

Expand Down Expand Up @@ -2517,10 +2514,11 @@ void bond_mii_monitor(struct work_struct *work)
struct bonding *bond = container_of(work, struct bonding,
mii_work.work);
bool should_notify_peers = false;
unsigned long delay;

read_lock(&bond->lock);
if (bond->kill_timers)
goto out;

delay = msecs_to_jiffies(bond->params.miimon);

if (bond->slave_cnt == 0)
goto re_arm;
Expand All @@ -2529,7 +2527,15 @@ void bond_mii_monitor(struct work_struct *work)

if (bond_miimon_inspect(bond)) {
read_unlock(&bond->lock);
rtnl_lock();

/* Race avoidance with bond_close cancel of workqueue */
if (!rtnl_trylock()) {
read_lock(&bond->lock);
delay = 1;
should_notify_peers = false;
goto re_arm;
}

read_lock(&bond->lock);

bond_miimon_commit(bond);
Expand All @@ -2540,14 +2546,18 @@ void bond_mii_monitor(struct work_struct *work)
}

re_arm:
if (bond->params.miimon && !bond->kill_timers)
queue_delayed_work(bond->wq, &bond->mii_work,
msecs_to_jiffies(bond->params.miimon));
out:
if (bond->params.miimon)
queue_delayed_work(bond->wq, &bond->mii_work, delay);

read_unlock(&bond->lock);

if (should_notify_peers) {
rtnl_lock();
if (!rtnl_trylock()) {
read_lock(&bond->lock);
bond->send_peer_notif++;
read_unlock(&bond->lock);
return;
}
netdev_bonding_change(bond->dev, NETDEV_NOTIFY_PEERS);
rtnl_unlock();
}
Expand Down Expand Up @@ -2789,9 +2799,6 @@ void bond_loadbalance_arp_mon(struct work_struct *work)

delta_in_ticks = msecs_to_jiffies(bond->params.arp_interval);

if (bond->kill_timers)
goto out;

if (bond->slave_cnt == 0)
goto re_arm;

Expand Down Expand Up @@ -2888,9 +2895,9 @@ void bond_loadbalance_arp_mon(struct work_struct *work)
}

re_arm:
if (bond->params.arp_interval && !bond->kill_timers)
if (bond->params.arp_interval)
queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks);
out:

read_unlock(&bond->lock);
}

Expand Down Expand Up @@ -3131,9 +3138,6 @@ void bond_activebackup_arp_mon(struct work_struct *work)

read_lock(&bond->lock);

if (bond->kill_timers)
goto out;

delta_in_ticks = msecs_to_jiffies(bond->params.arp_interval);

if (bond->slave_cnt == 0)
Expand All @@ -3143,7 +3147,15 @@ void bond_activebackup_arp_mon(struct work_struct *work)

if (bond_ab_arp_inspect(bond, delta_in_ticks)) {
read_unlock(&bond->lock);
rtnl_lock();

/* Race avoidance with bond_close flush of workqueue */
if (!rtnl_trylock()) {
read_lock(&bond->lock);
delta_in_ticks = 1;
should_notify_peers = false;
goto re_arm;
}

read_lock(&bond->lock);

bond_ab_arp_commit(bond, delta_in_ticks);
Expand All @@ -3156,13 +3168,18 @@ void bond_activebackup_arp_mon(struct work_struct *work)
bond_ab_arp_probe(bond);

re_arm:
if (bond->params.arp_interval && !bond->kill_timers)
if (bond->params.arp_interval)
queue_delayed_work(bond->wq, &bond->arp_work, delta_in_ticks);
out:

read_unlock(&bond->lock);

if (should_notify_peers) {
rtnl_lock();
if (!rtnl_trylock()) {
read_lock(&bond->lock);
bond->send_peer_notif++;
read_unlock(&bond->lock);
return;
}
netdev_bonding_change(bond->dev, NETDEV_NOTIFY_PEERS);
rtnl_unlock();
}
Expand Down Expand Up @@ -3424,8 +3441,6 @@ static int bond_open(struct net_device *bond_dev)
struct slave *slave;
int i;

bond->kill_timers = 0;

/* reset slave->backup and slave->inactive */
read_lock(&bond->lock);
if (bond->slave_cnt > 0) {
Expand Down Expand Up @@ -3494,33 +3509,30 @@ static int bond_close(struct net_device *bond_dev)

bond->send_peer_notif = 0;

/* signal timers not to re-arm */
bond->kill_timers = 1;

write_unlock_bh(&bond->lock);

if (bond->params.miimon) { /* link check interval, in milliseconds. */
cancel_delayed_work(&bond->mii_work);
cancel_delayed_work_sync(&bond->mii_work);
}

if (bond->params.arp_interval) { /* arp interval, in milliseconds. */
cancel_delayed_work(&bond->arp_work);
cancel_delayed_work_sync(&bond->arp_work);
}

switch (bond->params.mode) {
case BOND_MODE_8023AD:
cancel_delayed_work(&bond->ad_work);
cancel_delayed_work_sync(&bond->ad_work);
break;
case BOND_MODE_TLB:
case BOND_MODE_ALB:
cancel_delayed_work(&bond->alb_work);
cancel_delayed_work_sync(&bond->alb_work);
break;
default:
break;
}

if (delayed_work_pending(&bond->mcast_work))
cancel_delayed_work(&bond->mcast_work);
cancel_delayed_work_sync(&bond->mcast_work);

if (bond_is_lb(bond)) {
/* Must be called only after all
Expand Down Expand Up @@ -4367,26 +4379,22 @@ static void bond_setup(struct net_device *bond_dev)

static void bond_work_cancel_all(struct bonding *bond)
{
write_lock_bh(&bond->lock);
bond->kill_timers = 1;
write_unlock_bh(&bond->lock);

if (bond->params.miimon && delayed_work_pending(&bond->mii_work))
cancel_delayed_work(&bond->mii_work);
cancel_delayed_work_sync(&bond->mii_work);

if (bond->params.arp_interval && delayed_work_pending(&bond->arp_work))
cancel_delayed_work(&bond->arp_work);
cancel_delayed_work_sync(&bond->arp_work);

if (bond->params.mode == BOND_MODE_ALB &&
delayed_work_pending(&bond->alb_work))
cancel_delayed_work(&bond->alb_work);
cancel_delayed_work_sync(&bond->alb_work);

if (bond->params.mode == BOND_MODE_8023AD &&
delayed_work_pending(&bond->ad_work))
cancel_delayed_work(&bond->ad_work);
cancel_delayed_work_sync(&bond->ad_work);

if (delayed_work_pending(&bond->mcast_work))
cancel_delayed_work(&bond->mcast_work);
cancel_delayed_work_sync(&bond->mcast_work);
}

/*
Expand Down
1 change: 0 additions & 1 deletion drivers/net/bonding/bonding.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ struct bonding {
struct slave *);
rwlock_t lock;
rwlock_t curr_slave_lock;
s8 kill_timers;
u8 send_peer_notif;
s8 setup_by_slave;
s8 igmp_retrans;
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* (you will need to reboot afterwards) */
/* #define BNX2X_STOP_ON_ERROR */

#define DRV_MODULE_VERSION "1.70.00-0"
#define DRV_MODULE_RELDATE "2011/06/13"
#define DRV_MODULE_VERSION "1.70.30-0"
#define DRV_MODULE_RELDATE "2011/10/25"
#define BNX2X_BC_VER 0x040200

#if defined(CONFIG_DCB)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
PORT_HW_CFG_PHY_SELECTION_FIRST_PHY;
break;
case PORT_FIBRE:
case PORT_DA:
if (bp->port.supported[cfg_idx] & SUPPORTED_FIBRE)
break; /* no port change */

Expand Down
Loading

0 comments on commit 1a4ceab

Please sign in to comment.