summaryrefslogtreecommitdiff
path: root/drivers/net/chelsio
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-11-17 17:00:34 -0800
committerJeff Garzik <jeff@garzik.org>2006-12-02 00:16:37 -0500
commit86c27d275507d81da179b571f35d34df61f7c6d3 (patch)
treec542c0d6c855877aef08544035b126b5604dc2df /drivers/net/chelsio
parente487647abbe66390b99f9a32ede4688b255282dd (diff)
[PATCH] chelsio: use __netif_rx_schedule_prep
The chelsio driver can use __netif_rx_schedule_prep instead of it's own test_and_set inline. Applies after the previous 4 patches. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/chelsio')
-rw-r--r--drivers/net/chelsio/sge.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 9799c12380fc..11c70b59a1a3 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -929,18 +929,6 @@ static inline void reclaim_completed_tx(struct sge *sge, struct cmdQ *q)
# define __netif_rx_complete(dev) netif_rx_complete(dev)
#endif
-/*
- * We cannot use the standard netif_rx_schedule_prep() because we have multiple
- * ports plus the TOE all multiplexing onto a single response queue, therefore
- * accepting new responses cannot depend on the state of any particular port.
- * So define our own equivalent that omits the netif_running() test.
- */
-static inline int napi_schedule_prep(struct net_device *dev)
-{
- return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
-}
-
-
/**
* sge_rx - process an ingress ethernet packet
* @sge: the sge structure
@@ -1241,10 +1229,10 @@ static irqreturn_t t1_interrupt_napi(int irq, void *data)
if (e->GenerationBit == q->genbit) {
if (e->DataValid ||
process_pure_responses(adapter, e)) {
- if (likely(napi_schedule_prep(sge->netdev)))
+ if (likely(__netif_rx_schedule_prep(sge->netdev)))
__netif_rx_schedule(sge->netdev);
- else
- printk(KERN_CRIT
+ else if (net_ratelimit())
+ printk(KERN_INFO
"NAPI schedule failure!\n");
} else
writel(q->cidx, adapter->regs + A_SG_SLEEPING);