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
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;
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)
* 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);
}
/*
}
netif_carrier_off(dev);
- netif_stop_queue(dev);
port_start(mp);
del_timer_sync(&mp->rx_oom);
netif_carrier_off(dev);
- netif_stop_queue(dev);
free_irq(dev->irq, dev);
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);
}
}