aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-09-14 19:06:14 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-16 02:48:03 -0400
commit793b883ed12a6ae6e2901ddb5e038b77d6f0c0ac (patch)
treed485606a0a7f2b70c9ee0d118fbdedf589f89a2c /include/linux/netdevice.h
parentd7f6884ae0ae6e406ec3500fcde16e8f51642460 (diff)
[PATCH] sky2: driver update.
Here is revised patch against netdev sky2 branch. It includes whitespace fixes, all the changes from the previous review as well as some optimizations and timing fixes to solve some of the hangs. The stall problem is better but not perfect. It appears that under stress the chip can't keep up with the bus and sends a pause frame, then hangs. This version is for testing, and hopefully other eyes might see the root cause of the problem. I don't want to reinvent the ugly watchdog code in the syskonnect version of sk98lin. If you read it you will see, the original driver writer and the hardware developer obviously didn't understand each other. Dual port support is included, but not tested yet. It did require small change to NAPI since both ports share same IRQ. Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 7c717907896d..5e90557715ab 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -780,11 +780,15 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
780} 780}
781 781
782/* Schedule rx intr now? */ 782/* Schedule rx intr now? */
783static inline int netif_rx_schedule_test(struct net_device *dev)
784{
785 return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
786}
783 787
788/* Schedule only if device is up */
784static inline int netif_rx_schedule_prep(struct net_device *dev) 789static inline int netif_rx_schedule_prep(struct net_device *dev)
785{ 790{
786 return netif_running(dev) && 791 return netif_running(dev) && netif_rx_schedule_test(dev);
787 !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
788} 792}
789 793
790/* Add interface to tail of rx poll list. This assumes that _prep has 794/* Add interface to tail of rx poll list. This assumes that _prep has