aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9192cdf5bd2c..60d3aac49ed4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1257,7 +1257,7 @@ static inline void netif_tx_wake_queue(struct netdev_queue *dev_queue)
1257{ 1257{
1258#ifdef CONFIG_NETPOLL_TRAP 1258#ifdef CONFIG_NETPOLL_TRAP
1259 if (netpoll_trap()) { 1259 if (netpoll_trap()) {
1260 clear_bit(__QUEUE_STATE_XOFF, &dev_queue->state); 1260 netif_tx_start_queue(dev_queue);
1261 return; 1261 return;
1262 } 1262 }
1263#endif 1263#endif
@@ -1363,7 +1363,8 @@ static inline int netif_running(const struct net_device *dev)
1363static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index) 1363static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index)
1364{ 1364{
1365 struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index); 1365 struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index);
1366 clear_bit(__QUEUE_STATE_XOFF, &txq->state); 1366
1367 netif_tx_start_queue(txq);
1367} 1368}
1368 1369
1369/** 1370/**
@@ -1380,7 +1381,7 @@ static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index)
1380 if (netpoll_trap()) 1381 if (netpoll_trap())
1381 return; 1382 return;
1382#endif 1383#endif
1383 set_bit(__QUEUE_STATE_XOFF, &txq->state); 1384 netif_tx_stop_queue(txq);
1384} 1385}
1385 1386
1386/** 1387/**
@@ -1394,7 +1395,8 @@ static inline int __netif_subqueue_stopped(const struct net_device *dev,
1394 u16 queue_index) 1395 u16 queue_index)
1395{ 1396{
1396 struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index); 1397 struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index);
1397 return test_bit(__QUEUE_STATE_XOFF, &txq->state); 1398
1399 return netif_tx_queue_stopped(txq);
1398} 1400}
1399 1401
1400static inline int netif_subqueue_stopped(const struct net_device *dev, 1402static inline int netif_subqueue_stopped(const struct net_device *dev,
@@ -1746,8 +1748,7 @@ static inline void netif_tx_unlock(struct net_device *dev)
1746 * force a schedule. 1748 * force a schedule.
1747 */ 1749 */
1748 clear_bit(__QUEUE_STATE_FROZEN, &txq->state); 1750 clear_bit(__QUEUE_STATE_FROZEN, &txq->state);
1749 if (!test_bit(__QUEUE_STATE_XOFF, &txq->state)) 1751 netif_schedule_queue(txq);
1750 __netif_schedule(txq->qdisc);
1751 } 1752 }
1752 spin_unlock(&dev->tx_global_lock); 1753 spin_unlock(&dev->tx_global_lock);
1753} 1754}