aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khc@pm.waw.pl>2009-05-23 17:14:10 -0400
committerKrzysztof Hałasa <khc@pm.waw.pl>2009-05-23 17:14:10 -0400
commit6a68afe3a2971953e218e509b16eae0ece43f9ac (patch)
tree959bdf3adb548365ae7cc07204d1c323e6820036 /drivers/net
parenta6a9fb857b5599b3cefef5576967389c1c43eb4c (diff)
IXP4xx: Ethernet and WAN drivers now support "high" hardware queues.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/arm/ixp4xx_eth.c15
-rw-r--r--drivers/net/wan/ixp4xx_hss.c10
2 files changed, 15 insertions, 10 deletions
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c
index a740053d3af3..d304c731c470 100644
--- a/drivers/net/arm/ixp4xx_eth.c
+++ b/drivers/net/arm/ixp4xx_eth.c
@@ -456,7 +456,8 @@ static inline void queue_put_desc(unsigned int queue, u32 phys,
456 debug_desc(phys, desc); 456 debug_desc(phys, desc);
457 BUG_ON(phys & 0x1F); 457 BUG_ON(phys & 0x1F);
458 qmgr_put_entry(queue, phys); 458 qmgr_put_entry(queue, phys);
459 BUG_ON(qmgr_stat_overflow(queue)); 459 /* Don't check for queue overflow here, we've allocated sufficient
460 length and queues >= 32 don't support this check anyway. */
460} 461}
461 462
462 463
@@ -512,8 +513,8 @@ static int eth_poll(struct napi_struct *napi, int budget)
512#endif 513#endif
513 napi_complete(napi); 514 napi_complete(napi);
514 qmgr_enable_irq(rxq); 515 qmgr_enable_irq(rxq);
515 if (!qmgr_stat_empty(rxq) && 516 if (!qmgr_stat_nearly_empty(rxq) &&
516 napi_reschedule(napi)) { 517 napi_reschedule(napi)) { /* really empty in fact */
517#if DEBUG_RX 518#if DEBUG_RX
518 printk(KERN_DEBUG "%s: eth_poll" 519 printk(KERN_DEBUG "%s: eth_poll"
519 " napi_reschedule successed\n", 520 " napi_reschedule successed\n",
@@ -630,7 +631,8 @@ static void eth_txdone_irq(void *unused)
630 port->tx_buff_tab[n_desc] = NULL; 631 port->tx_buff_tab[n_desc] = NULL;
631 } 632 }
632 633
633 start = qmgr_stat_empty(port->plat->txreadyq); 634 /* really empty in fact */
635 start = qmgr_stat_nearly_empty(port->plat->txreadyq);
634 queue_put_desc(port->plat->txreadyq, phys, desc); 636 queue_put_desc(port->plat->txreadyq, phys, desc);
635 if (start) { 637 if (start) {
636#if DEBUG_TX 638#if DEBUG_TX
@@ -708,13 +710,14 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev)
708 queue_put_desc(TX_QUEUE(port->id), tx_desc_phys(port, n), desc); 710 queue_put_desc(TX_QUEUE(port->id), tx_desc_phys(port, n), desc);
709 dev->trans_start = jiffies; 711 dev->trans_start = jiffies;
710 712
711 if (qmgr_stat_empty(txreadyq)) { 713 if (qmgr_stat_nearly_empty(txreadyq)) { /* really empty in fact */
712#if DEBUG_TX 714#if DEBUG_TX
713 printk(KERN_DEBUG "%s: eth_xmit queue full\n", dev->name); 715 printk(KERN_DEBUG "%s: eth_xmit queue full\n", dev->name);
714#endif 716#endif
715 netif_stop_queue(dev); 717 netif_stop_queue(dev);
716 /* we could miss TX ready interrupt */ 718 /* we could miss TX ready interrupt */
717 if (!qmgr_stat_empty(txreadyq)) { 719 /* really empty in fact */
720 if (!qmgr_stat_nearly_empty(txreadyq)) {
718#if DEBUG_TX 721#if DEBUG_TX
719 printk(KERN_DEBUG "%s: eth_xmit ready again\n", 722 printk(KERN_DEBUG "%s: eth_xmit ready again\n",
720 dev->name); 723 dev->name);
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index 765a7f5d6aa4..1e56e58c6605 100644
--- a/drivers/net/wan/ixp4xx_hss.c
+++ b/drivers/net/wan/ixp4xx_hss.c
@@ -579,7 +579,8 @@ static inline void queue_put_desc(unsigned int queue, u32 phys,
579 debug_desc(phys, desc); 579 debug_desc(phys, desc);
580 BUG_ON(phys & 0x1F); 580 BUG_ON(phys & 0x1F);
581 qmgr_put_entry(queue, phys); 581 qmgr_put_entry(queue, phys);
582 BUG_ON(qmgr_stat_overflow(queue)); 582 /* Don't check for queue overflow here, we've allocated sufficient
583 length and queues >= 32 don't support this check anyway. */
583} 584}
584 585
585 586
@@ -789,7 +790,8 @@ static void hss_hdlc_txdone_irq(void *pdev)
789 free_buffer_irq(port->tx_buff_tab[n_desc]); 790 free_buffer_irq(port->tx_buff_tab[n_desc]);
790 port->tx_buff_tab[n_desc] = NULL; 791 port->tx_buff_tab[n_desc] = NULL;
791 792
792 start = qmgr_stat_empty(port->plat->txreadyq); 793 /* really empty in fact */
794 start = qmgr_stat_nearly_empty(port->plat->txreadyq);
793 queue_put_desc(port->plat->txreadyq, 795 queue_put_desc(port->plat->txreadyq,
794 tx_desc_phys(port, n_desc), desc); 796 tx_desc_phys(port, n_desc), desc);
795 if (start) { 797 if (start) {
@@ -867,13 +869,13 @@ static int hss_hdlc_xmit(struct sk_buff *skb, struct net_device *dev)
867 queue_put_desc(queue_ids[port->id].tx, tx_desc_phys(port, n), desc); 869 queue_put_desc(queue_ids[port->id].tx, tx_desc_phys(port, n), desc);
868 dev->trans_start = jiffies; 870 dev->trans_start = jiffies;
869 871
870 if (qmgr_stat_empty(txreadyq)) { 872 if (qmgr_stat_nearly_empty(txreadyq)) { /* really empty in fact */
871#if DEBUG_TX 873#if DEBUG_TX
872 printk(KERN_DEBUG "%s: hss_hdlc_xmit queue full\n", dev->name); 874 printk(KERN_DEBUG "%s: hss_hdlc_xmit queue full\n", dev->name);
873#endif 875#endif
874 netif_stop_queue(dev); 876 netif_stop_queue(dev);
875 /* we could miss TX ready interrupt */ 877 /* we could miss TX ready interrupt */
876 if (!qmgr_stat_empty(txreadyq)) { 878 if (!qmgr_stat_nearly_empty(txreadyq)) {
877#if DEBUG_TX 879#if DEBUG_TX
878 printk(KERN_DEBUG "%s: hss_hdlc_xmit ready again\n", 880 printk(KERN_DEBUG "%s: hss_hdlc_xmit ready again\n",
879 dev->name); 881 dev->name);