Skip to content

Commit

Permalink
[TG3]: Remove unnecessary tx_lock
Browse files Browse the repository at this point in the history
Remove tx_lock where it is unnecessary. tg3 runs lockless and so it
requires interrupts to be disabled and sync'ed, netif_queue and NAPI
poll to be stopped before the device can be reconfigured. After
stopping everything, it is no longer necessary to get the tx_lock.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed Jun 18, 2006
1 parent 35089bb commit c71302d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2984,9 +2984,7 @@ static void tg3_tx_recover(struct tg3 *tp)
"and include system chipset information.\n", tp->dev->name);

spin_lock(&tp->lock);
spin_lock(&tp->tx_lock);
tp->tg3_flags |= TG3_FLAG_TX_RECOVERY_PENDING;
spin_unlock(&tp->tx_lock);
spin_unlock(&tp->lock);
}

Expand Down Expand Up @@ -3429,12 +3427,10 @@ static inline void tg3_full_lock(struct tg3 *tp, int irq_sync)
if (irq_sync)
tg3_irq_quiesce(tp);
spin_lock_bh(&tp->lock);
spin_lock(&tp->tx_lock);
}

static inline void tg3_full_unlock(struct tg3 *tp)
{
spin_unlock(&tp->tx_lock);
spin_unlock_bh(&tp->lock);
}

Expand Down

0 comments on commit c71302d

Please sign in to comment.