aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/declance.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/declance.c b/drivers/net/declance.c
index b62405a69180..2b22e580c4de 100644
--- a/drivers/net/declance.c
+++ b/drivers/net/declance.c
@@ -895,6 +895,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
895 struct lance_private *lp = netdev_priv(dev); 895 struct lance_private *lp = netdev_priv(dev);
896 volatile struct lance_regs *ll = lp->ll; 896 volatile struct lance_regs *ll = lp->ll;
897 volatile u16 *ib = (volatile u16 *)dev->mem_start; 897 volatile u16 *ib = (volatile u16 *)dev->mem_start;
898 unsigned long flags;
898 int entry, len; 899 int entry, len;
899 900
900 len = skb->len; 901 len = skb->len;
@@ -907,6 +908,8 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
907 908
908 dev->stats.tx_bytes += len; 909 dev->stats.tx_bytes += len;
909 910
911 spin_lock_irqsave(&lp->lock, flags);
912
910 entry = lp->tx_new; 913 entry = lp->tx_new;
911 *lib_ptr(ib, btx_ring[entry].length, lp->type) = (-len); 914 *lib_ptr(ib, btx_ring[entry].length, lp->type) = (-len);
912 *lib_ptr(ib, btx_ring[entry].misc, lp->type) = 0; 915 *lib_ptr(ib, btx_ring[entry].misc, lp->type) = 0;
@@ -925,6 +928,8 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
925 /* Kick the lance: transmit now */ 928 /* Kick the lance: transmit now */
926 writereg(&ll->rdp, LE_C0_INEA | LE_C0_TDMD); 929 writereg(&ll->rdp, LE_C0_INEA | LE_C0_TDMD);
927 930
931 spin_unlock_irqrestore(&lp->lock, flags);
932
928 dev->trans_start = jiffies; 933 dev->trans_start = jiffies;
929 dev_kfree_skb(skb); 934 dev_kfree_skb(skb);
930 935