To prevent race conditions with other reset events.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
{
struct bnx2 *bp = container_of(work, struct bnx2, reset_task);
{
struct bnx2 *bp = container_of(work, struct bnx2, reset_task);
- if (!netif_running(bp->dev))
+ rtnl_lock();
+ if (!netif_running(bp->dev)) {
+ rtnl_unlock();
atomic_set(&bp->intr_sem, 1);
bnx2_netif_start(bp);
atomic_set(&bp->intr_sem, 1);
bnx2_netif_start(bp);