aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/ixp4xx_hss.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan/ixp4xx_hss.c')
-rw-r--r--drivers/net/wan/ixp4xx_hss.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index 3bf7d3f447db..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);
@@ -1249,7 +1251,7 @@ static int __devinit hss_init_one(struct platform_device *pdev)
1249 return -ENOMEM; 1251 return -ENOMEM;
1250 1252
1251 if ((port->npe = npe_request(0)) == NULL) { 1253 if ((port->npe = npe_request(0)) == NULL) {
1252 err = -ENOSYS; 1254 err = -ENODEV;
1253 goto err_free; 1255 goto err_free;
1254 } 1256 }
1255 1257
@@ -1311,7 +1313,7 @@ static int __init hss_init_module(void)
1311 if ((ixp4xx_read_feature_bits() & 1313 if ((ixp4xx_read_feature_bits() &
1312 (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) != 1314 (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) !=
1313 (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS)) 1315 (IXP4XX_FEATURE_HDLC | IXP4XX_FEATURE_HSS))
1314 return -ENOSYS; 1316 return -ENODEV;
1315 1317
1316 spin_lock_init(&npe_lock); 1318 spin_lock_init(&npe_lock);
1317 1319