]> err.no Git - linux-2.6/blobdiff - include/linux/netdevice.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh64-2.6
[linux-2.6] / include / linux / netdevice.h
index 91cd3f3db5079a06a214b53c98b04ea60dd70c08..5a11f889e56a7f0780eb44572e4b9e2b68239c70 100644 (file)
@@ -349,6 +349,16 @@ static inline void napi_schedule(struct napi_struct *n)
                __napi_schedule(n);
 }
 
+/* Try to reschedule poll. Called by dev->poll() after napi_complete().  */
+static inline int napi_reschedule(struct napi_struct *napi)
+{
+       if (napi_schedule_prep(napi)) {
+               __napi_schedule(napi);
+               return 1;
+       }
+       return 0;
+}
+
 /**
  *     napi_complete - NAPI processing complete
  *     @n: napi context
@@ -1054,7 +1064,7 @@ extern void netdev_run_todo(void);
  *     dev_put - release reference to device
  *     @dev: network device
  *
- * Hold reference to device to keep it from being freed.
+ * Release reference to device to allow it to be freed.
  */
 static inline void dev_put(struct net_device *dev)
 {
@@ -1065,7 +1075,7 @@ static inline void dev_put(struct net_device *dev)
  *     dev_hold - get reference to device
  *     @dev: network device
  *
- * Release reference to device to allow it to be freed.
+ * Hold reference to device to keep it from being freed.
  */
 static inline void dev_hold(struct net_device *dev)
 {