Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111891
b: refs/heads/master
c: 4fdeca3
h: refs/heads/master
i:
  111889: 6cd8757
  111887: b1715d0
v: v3
  • Loading branch information
Lennert Buytenhek authored and Lennert Buytenhek committed Sep 5, 2008
1 parent bd3a605 commit 03ce089
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 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: ac840605f3b1d9b99e1e6629a54994f8e003ff91
refs/heads/master: 4fdeca3f4e7e35f6c19e87617c23fbb59dfb1a63
27 changes: 8 additions & 19 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,9 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
for (i = 0; i < mp->txq_count; i++)
txq_reclaim(mp->txq + i, 0);

if (netif_carrier_ok(mp->dev)) {
spin_lock_irq(&mp->lock);
__txq_maybe_wake(mp->txq);
spin_unlock_irq(&mp->lock);
}
spin_lock_irq(&mp->lock);
__txq_maybe_wake(mp->txq);
spin_unlock_irq(&mp->lock);
}
#endif

Expand Down Expand Up @@ -1765,7 +1763,6 @@ static void handle_link_event(struct mv643xx_eth_private *mp)
printk(KERN_INFO "%s: link down\n", dev->name);

netif_carrier_off(dev);
netif_stop_queue(dev);

for (i = 0; i < mp->txq_count; i++) {
struct tx_queue *txq = mp->txq + i;
Expand Down Expand Up @@ -1799,10 +1796,8 @@ static void handle_link_event(struct mv643xx_eth_private *mp)
speed, duplex ? "full" : "half",
fc ? "en" : "dis");

if (!netif_carrier_ok(dev)) {
if (!netif_carrier_ok(dev))
netif_carrier_on(dev);
netif_wake_queue(dev);
}
}

static irqreturn_t mv643xx_eth_irq(int irq, void *dev_id)
Expand Down Expand Up @@ -1851,11 +1846,9 @@ static irqreturn_t mv643xx_eth_irq(int irq, void *dev_id)
* Enough space again in the primary TX queue for a
* full packet?
*/
if (netif_carrier_ok(dev)) {
spin_lock(&mp->lock);
__txq_maybe_wake(mp->txq);
spin_unlock(&mp->lock);
}
spin_lock(&mp->lock);
__txq_maybe_wake(mp->txq);
spin_unlock(&mp->lock);
}

/*
Expand Down Expand Up @@ -2060,7 +2053,6 @@ static int mv643xx_eth_open(struct net_device *dev)
}

netif_carrier_off(dev);
netif_stop_queue(dev);

port_start(mp);

Expand Down Expand Up @@ -2123,7 +2115,6 @@ static int mv643xx_eth_stop(struct net_device *dev)
del_timer_sync(&mp->rx_oom);

netif_carrier_off(dev);
netif_stop_queue(dev);

free_irq(dev->irq, dev);

Expand Down Expand Up @@ -2184,11 +2175,9 @@ static void tx_timeout_task(struct work_struct *ugly)
mp = container_of(ugly, struct mv643xx_eth_private, tx_timeout_task);
if (netif_running(mp->dev)) {
netif_stop_queue(mp->dev);

port_reset(mp);
port_start(mp);

__txq_maybe_wake(mp->txq);
netif_wake_queue(mp->dev);
}
}

Expand Down

0 comments on commit 03ce089

Please sign in to comment.