Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315104
b: refs/heads/master
c: 41812db
h: refs/heads/master
v: v3
  • Loading branch information
Jitendra Kalsaria authored and David S. Miller committed Jul 11, 2012
1 parent 73ad41c commit 8d55754
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f62a23a7cb601fb30c4a8b8a5ba1c6bb7f5148b3
refs/heads/master: 41812db8e2111abbebff4fccffecab1fc1eb090c
12 changes: 11 additions & 1 deletion trunk/drivers/net/ethernet/qlogic/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2556,7 +2556,7 @@ static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev)

if (unlikely(atomic_read(&tx_ring->tx_count) < 2)) {
netif_info(qdev, tx_queued, qdev->ndev,
"%s: shutting down tx queue %d du to lack of resources.\n",
"%s: BUG! shutting down tx queue %d due to lack of resources.\n",
__func__, tx_ring_idx);
netif_stop_subqueue(ndev, tx_ring->wq_id);
atomic_inc(&tx_ring->queue_stopped);
Expand Down Expand Up @@ -2610,6 +2610,16 @@ static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev)
tx_ring->prod_idx, skb->len);

atomic_dec(&tx_ring->tx_count);

if (unlikely(atomic_read(&tx_ring->tx_count) < 2)) {
netif_stop_subqueue(ndev, tx_ring->wq_id);
if ((atomic_read(&tx_ring->tx_count) > (tx_ring->wq_len / 4)))
/*
* The queue got stopped because the tx_ring was full.
* Wake it up, because it's now at least 25% empty.
*/
netif_wake_subqueue(qdev->ndev, tx_ring->wq_id);
}
return NETDEV_TX_OK;
}

Expand Down

0 comments on commit 8d55754

Please sign in to comment.