summaryrefslogtreecommitdiff
path: root/drivers/net/arm/ixp4xx_eth.c
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khc@pm.waw.pl>2009-05-23 23:14:10 +0200
committerKrzysztof Hałasa <khc@pm.waw.pl>2009-05-23 23:14:10 +0200
commit6a68afe3a2971953e218e509b16eae0ece43f9ac (patch)
tree959bdf3adb548365ae7cc07204d1c323e6820036 /drivers/net/arm/ixp4xx_eth.c
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/arm/ixp4xx_eth.c')
-rw-r--r--drivers/net/arm/ixp4xx_eth.c15
1 files changed, 9 insertions, 6 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,
debug_desc(phys, desc);
BUG_ON(phys & 0x1F);
qmgr_put_entry(queue, phys);
- BUG_ON(qmgr_stat_overflow(queue));
+ /* Don't check for queue overflow here, we've allocated sufficient
+ length and queues >= 32 don't support this check anyway. */
}
@@ -512,8 +513,8 @@ static int eth_poll(struct napi_struct *napi, int budget)
#endif
napi_complete(napi);
qmgr_enable_irq(rxq);
- if (!qmgr_stat_empty(rxq) &&
- napi_reschedule(napi)) {
+ if (!qmgr_stat_nearly_empty(rxq) &&
+ napi_reschedule(napi)) { /* really empty in fact */
#if DEBUG_RX
printk(KERN_DEBUG "%s: eth_poll"
" napi_reschedule successed\n",
@@ -630,7 +631,8 @@ static void eth_txdone_irq(void *unused)
port->tx_buff_tab[n_desc] = NULL;
}
- start = qmgr_stat_empty(port->plat->txreadyq);
+ /* really empty in fact */
+ start = qmgr_stat_nearly_empty(port->plat->txreadyq);
queue_put_desc(port->plat->txreadyq, phys, desc);
if (start) {
#if DEBUG_TX
@@ -708,13 +710,14 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev)
queue_put_desc(TX_QUEUE(port->id), tx_desc_phys(port, n), desc);
dev->trans_start = jiffies;
- if (qmgr_stat_empty(txreadyq)) {
+ if (qmgr_stat_nearly_empty(txreadyq)) { /* really empty in fact */
#if DEBUG_TX
printk(KERN_DEBUG "%s: eth_xmit queue full\n", dev->name);
#endif
netif_stop_queue(dev);
/* we could miss TX ready interrupt */
- if (!qmgr_stat_empty(txreadyq)) {
+ /* really empty in fact */
+ if (!qmgr_stat_nearly_empty(txreadyq)) {
#if DEBUG_TX
printk(KERN_DEBUG "%s: eth_xmit ready again\n",
dev->name);