Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25687
b: refs/heads/master
c: 9484356
h: refs/heads/master
i:
  25685: 39b9203
  25683: 713b7db
  25679: 8904daa
v: v3
  • Loading branch information
Dale Farnsworth authored and Jeff Garzik committed Apr 12, 2006
1 parent 5178eb7 commit 3b1735f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 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: 5c5374087707d7848cb13f15e7c175daf346301c
refs/heads/master: 94843566d7119e049a72618a3c939d5c2be022c7
17 changes: 14 additions & 3 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,16 @@ static void mv643xx_eth_tx_timeout_task(struct net_device *dev)
{
struct mv643xx_private *mp = netdev_priv(dev);

netif_device_detach(dev);
if (!netif_running(dev))
return;

netif_stop_queue(dev);

eth_port_reset(mp->port_num);
eth_port_start(dev);
netif_device_attach(dev);

if (mp->tx_ring_size - mp->tx_desc_count >= MAX_DESCS_PER_SKB)
netif_wake_queue(dev);
}

/**
Expand Down Expand Up @@ -1186,7 +1192,12 @@ static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)

BUG_ON(netif_queue_stopped(dev));
BUG_ON(skb == NULL);
BUG_ON(mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB);

if (mp->tx_ring_size - mp->tx_desc_count < MAX_DESCS_PER_SKB) {
printk(KERN_ERR "%s: transmit with queue full\n", dev->name);
netif_stop_queue(dev);
return 1;
}

if (has_tiny_unaligned_frags(skb)) {
if ((skb_linearize(skb, GFP_ATOMIC) != 0)) {
Expand Down

0 comments on commit 3b1735f

Please sign in to comment.