|
@@ -2096,14 +2096,15 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
((skb_shinfo(skb)->frags[i].size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0);
|
|
((skb_shinfo(skb)->frags[i].size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ spin_lock_irqsave(&np->lock, flags);
|
|
empty_slots = nv_get_empty_tx_slots(np);
|
|
empty_slots = nv_get_empty_tx_slots(np);
|
|
if (unlikely(empty_slots <= entries)) {
|
|
if (unlikely(empty_slots <= entries)) {
|
|
- spin_lock_irqsave(&np->lock, flags);
|
|
|
|
netif_stop_queue(dev);
|
|
netif_stop_queue(dev);
|
|
np->tx_stop = 1;
|
|
np->tx_stop = 1;
|
|
spin_unlock_irqrestore(&np->lock, flags);
|
|
spin_unlock_irqrestore(&np->lock, flags);
|
|
return NETDEV_TX_BUSY;
|
|
return NETDEV_TX_BUSY;
|
|
}
|
|
}
|
|
|
|
+ spin_unlock_irqrestore(&np->lock, flags);
|
|
|
|
|
|
start_tx = put_tx = np->put_tx.orig;
|
|
start_tx = put_tx = np->put_tx.orig;
|
|
|
|
|
|
@@ -2214,14 +2215,15 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
|
|
((skb_shinfo(skb)->frags[i].size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0);
|
|
((skb_shinfo(skb)->frags[i].size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ spin_lock_irqsave(&np->lock, flags);
|
|
empty_slots = nv_get_empty_tx_slots(np);
|
|
empty_slots = nv_get_empty_tx_slots(np);
|
|
if (unlikely(empty_slots <= entries)) {
|
|
if (unlikely(empty_slots <= entries)) {
|
|
- spin_lock_irqsave(&np->lock, flags);
|
|
|
|
netif_stop_queue(dev);
|
|
netif_stop_queue(dev);
|
|
np->tx_stop = 1;
|
|
np->tx_stop = 1;
|
|
spin_unlock_irqrestore(&np->lock, flags);
|
|
spin_unlock_irqrestore(&np->lock, flags);
|
|
return NETDEV_TX_BUSY;
|
|
return NETDEV_TX_BUSY;
|
|
}
|
|
}
|
|
|
|
+ spin_unlock_irqrestore(&np->lock, flags);
|
|
|
|
|
|
start_tx = put_tx = np->put_tx.ex;
|
|
start_tx = put_tx = np->put_tx.ex;
|
|
start_tx_ctx = np->put_tx_ctx;
|
|
start_tx_ctx = np->put_tx_ctx;
|