diff options
author | Roland Dreier <rdreier@cisco.com> | 2007-10-09 18:47:37 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:55:31 -0400 |
commit | bfe13f54f5028cff034e3b6247e9f433908f4f4f (patch) | |
tree | 428853641da40769b53629e393a582a0e6956d45 /include/linux/netdevice.h | |
parent | 9153f66a5b8e63c61374df4e6a4cbd0056e45178 (diff) |
ibm_emac: Convert to use napi_struct independent of struct net_device
Commit da3dedd9 ("[NET]: Make NAPI polling independent of struct
net_device objects.") changed the interface to NAPI polling. Fix up
the ibm_emac driver so that it works with this new interface. This is
actually a nice cleanup because ibm_emac is one of the drivers that
wants to have multiple NAPI structures for a single net_device.
Tested with the internal MAC of a PowerPC 440SPe SoC with an AMCC
'Yucca' evaluation board.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 91cd3f3db50..4848c7afa4e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -349,6 +349,16 @@ static inline void napi_schedule(struct napi_struct *n) | |||
349 | __napi_schedule(n); | 349 | __napi_schedule(n); |
350 | } | 350 | } |
351 | 351 | ||
352 | /* Try to reschedule poll. Called by dev->poll() after napi_complete(). */ | ||
353 | static inline int napi_reschedule(struct napi_struct *napi) | ||
354 | { | ||
355 | if (napi_schedule_prep(napi)) { | ||
356 | __napi_schedule(napi); | ||
357 | return 1; | ||
358 | } | ||
359 | return 0; | ||
360 | } | ||
361 | |||
352 | /** | 362 | /** |
353 | * napi_complete - NAPI processing complete | 363 | * napi_complete - NAPI processing complete |
354 | * @n: napi context | 364 | * @n: napi context |