aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cpmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cpmac.c')
-rw-r--r--drivers/net/cpmac.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 7f3f62e1b113..fbd4280c102c 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -544,7 +544,7 @@ fatal_error:
544 544
545 spin_unlock(&priv->rx_lock); 545 spin_unlock(&priv->rx_lock);
546 netif_rx_complete(priv->dev, napi); 546 netif_rx_complete(priv->dev, napi);
547 netif_stop_queue(priv->dev); 547 netif_tx_stop_all_queues(priv->dev);
548 napi_disable(&priv->napi); 548 napi_disable(&priv->napi);
549 549
550 atomic_inc(&priv->reset_pending); 550 atomic_inc(&priv->reset_pending);
@@ -569,11 +569,7 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev)
569 569
570 len = max(skb->len, ETH_ZLEN); 570 len = max(skb->len, ETH_ZLEN);
571 queue = skb_get_queue_mapping(skb); 571 queue = skb_get_queue_mapping(skb);
572#ifdef CONFIG_NETDEVICES_MULTIQUEUE
573 netif_stop_subqueue(dev, queue); 572 netif_stop_subqueue(dev, queue);
574#else
575 netif_stop_queue(dev);
576#endif
577 573
578 desc = &priv->desc_ring[queue]; 574 desc = &priv->desc_ring[queue];
579 if (unlikely(desc->dataflags & CPMAC_OWN)) { 575 if (unlikely(desc->dataflags & CPMAC_OWN)) {
@@ -626,24 +622,14 @@ static void cpmac_end_xmit(struct net_device *dev, int queue)
626 622
627 dev_kfree_skb_irq(desc->skb); 623 dev_kfree_skb_irq(desc->skb);
628 desc->skb = NULL; 624 desc->skb = NULL;
629#ifdef CONFIG_NETDEVICES_MULTIQUEUE
630 if (netif_subqueue_stopped(dev, queue)) 625 if (netif_subqueue_stopped(dev, queue))
631 netif_wake_subqueue(dev, queue); 626 netif_wake_subqueue(dev, queue);
632#else
633 if (netif_queue_stopped(dev))
634 netif_wake_queue(dev);
635#endif
636 } else { 627 } else {
637 if (netif_msg_tx_err(priv) && net_ratelimit()) 628 if (netif_msg_tx_err(priv) && net_ratelimit())
638 printk(KERN_WARNING 629 printk(KERN_WARNING
639 "%s: end_xmit: spurious interrupt\n", dev->name); 630 "%s: end_xmit: spurious interrupt\n", dev->name);
640#ifdef CONFIG_NETDEVICES_MULTIQUEUE
641 if (netif_subqueue_stopped(dev, queue)) 631 if (netif_subqueue_stopped(dev, queue))
642 netif_wake_subqueue(dev, queue); 632 netif_wake_subqueue(dev, queue);
643#else
644 if (netif_queue_stopped(dev))
645 netif_wake_queue(dev);
646#endif
647 } 633 }
648} 634}
649 635
@@ -764,9 +750,7 @@ static void cpmac_hw_error(struct work_struct *work)
764 barrier(); 750 barrier();
765 atomic_dec(&priv->reset_pending); 751 atomic_dec(&priv->reset_pending);
766 752
767 for (i = 0; i < CPMAC_QUEUES; i++) 753 netif_tx_wake_all_queues(priv->dev);
768 netif_wake_subqueue(priv->dev, i);
769 netif_wake_queue(priv->dev);
770 cpmac_write(priv->regs, CPMAC_MAC_INT_ENABLE, 3); 754 cpmac_write(priv->regs, CPMAC_MAC_INT_ENABLE, 3);
771} 755}
772 756
@@ -795,7 +779,7 @@ static void cpmac_check_status(struct net_device *dev)
795 dev->name, tx_code, tx_channel, macstatus); 779 dev->name, tx_code, tx_channel, macstatus);
796 } 780 }
797 781
798 netif_stop_queue(dev); 782 netif_tx_stop_all_queues(dev);
799 cpmac_hw_stop(dev); 783 cpmac_hw_stop(dev);
800 if (schedule_work(&priv->reset_work)) 784 if (schedule_work(&priv->reset_work))
801 atomic_inc(&priv->reset_pending); 785 atomic_inc(&priv->reset_pending);
@@ -856,9 +840,7 @@ static void cpmac_tx_timeout(struct net_device *dev)
856 barrier(); 840 barrier();
857 atomic_dec(&priv->reset_pending); 841 atomic_dec(&priv->reset_pending);
858 842
859 netif_wake_queue(priv->dev); 843 netif_tx_wake_all_queues(priv->dev);
860 for (i = 0; i < CPMAC_QUEUES; i++)
861 netif_wake_subqueue(dev, i);
862} 844}
863 845
864static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) 846static int cpmac_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
@@ -949,7 +931,7 @@ static void cpmac_adjust_link(struct net_device *dev)
949 931
950 spin_lock(&priv->lock); 932 spin_lock(&priv->lock);
951 if (priv->phy->link) { 933 if (priv->phy->link) {
952 netif_start_queue(dev); 934 netif_tx_start_all_queues(dev);
953 if (priv->phy->duplex != priv->oldduplex) { 935 if (priv->phy->duplex != priv->oldduplex) {
954 new_state = 1; 936 new_state = 1;
955 priv->oldduplex = priv->phy->duplex; 937 priv->oldduplex = priv->phy->duplex;
@@ -963,10 +945,10 @@ static void cpmac_adjust_link(struct net_device *dev)
963 if (!priv->oldlink) { 945 if (!priv->oldlink) {
964 new_state = 1; 946 new_state = 1;
965 priv->oldlink = 1; 947 priv->oldlink = 1;
966 netif_schedule(dev); 948 netif_tx_schedule_all(dev);
967 } 949 }
968 } else if (priv->oldlink) { 950 } else if (priv->oldlink) {
969 netif_stop_queue(dev); 951 netif_tx_stop_all_queues(dev);
970 new_state = 1; 952 new_state = 1;
971 priv->oldlink = 0; 953 priv->oldlink = 0;
972 priv->oldspeed = 0; 954 priv->oldspeed = 0;
@@ -1086,7 +1068,7 @@ static int cpmac_stop(struct net_device *dev)
1086 struct cpmac_priv *priv = netdev_priv(dev); 1068 struct cpmac_priv *priv = netdev_priv(dev);
1087 struct resource *mem; 1069 struct resource *mem;
1088 1070
1089 netif_stop_queue(dev); 1071 netif_tx_stop_all_queues(dev);
1090 1072
1091 cancel_work_sync(&priv->reset_work); 1073 cancel_work_sync(&priv->reset_work);
1092 napi_disable(&priv->napi); 1074 napi_disable(&priv->napi);
@@ -1179,7 +1161,6 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
1179 dev->set_multicast_list = cpmac_set_multicast_list; 1161 dev->set_multicast_list = cpmac_set_multicast_list;
1180 dev->tx_timeout = cpmac_tx_timeout; 1162 dev->tx_timeout = cpmac_tx_timeout;
1181 dev->ethtool_ops = &cpmac_ethtool_ops; 1163 dev->ethtool_ops = &cpmac_ethtool_ops;
1182 dev->features |= NETIF_F_MULTI_QUEUE;
1183 1164
1184 netif_napi_add(dev, &priv->napi, cpmac_poll, 64); 1165 netif_napi_add(dev, &priv->napi, cpmac_poll, 64);
1185 1166