aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio/sge.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-11-17 20:00:34 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-02 00:16:37 -0500
commit86c27d275507d81da179b571f35d34df61f7c6d3 (patch)
treec542c0d6c855877aef08544035b126b5604dc2df /drivers/net/chelsio/sge.c
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/sge.c')
-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)
929# define __netif_rx_complete(dev) netif_rx_complete(dev) 929# define __netif_rx_complete(dev) netif_rx_complete(dev)
930#endif 930#endif
931 931
932/*
933 * We cannot use the standard netif_rx_schedule_prep() because we have multiple
934 * ports plus the TOE all multiplexing onto a single response queue, therefore
935 * accepting new responses cannot depend on the state of any particular port.
936 * So define our own equivalent that omits the netif_running() test.
937 */
938static inline int napi_schedule_prep(struct net_device *dev)
939{
940 return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
941}
942
943
944/** 932/**
945 * sge_rx - process an ingress ethernet packet 933 * sge_rx - process an ingress ethernet packet
946 * @sge: the sge structure 934 * @sge: the sge structure
@@ -1241,10 +1229,10 @@ static irqreturn_t t1_interrupt_napi(int irq, void *data)
1241 if (e->GenerationBit == q->genbit) { 1229 if (e->GenerationBit == q->genbit) {
1242 if (e->DataValid || 1230 if (e->DataValid ||
1243 process_pure_responses(adapter, e)) { 1231 process_pure_responses(adapter, e)) {
1244 if (likely(napi_schedule_prep(sge->netdev))) 1232 if (likely(__netif_rx_schedule_prep(sge->netdev)))
1245 __netif_rx_schedule(sge->netdev); 1233 __netif_rx_schedule(sge->netdev);
1246 else 1234 else if (net_ratelimit())
1247 printk(KERN_CRIT 1235 printk(KERN_INFO
1248 "NAPI schedule failure!\n"); 1236 "NAPI schedule failure!\n");
1249 } else 1237 } else
1250 writel(q->cidx, adapter->regs + A_SG_SLEEPING); 1238 writel(q->cidx, adapter->regs + A_SG_SLEEPING);