summaryrefslogtreecommitdiffstats
path: root/sys/dev/vge/if_vgevar.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-11-19 19:35:15 +0000
committerjhb <jhb@FreeBSD.org>2009-11-19 19:35:15 +0000
commite98d19f3128514b8d65f4944e817a2822c608b6f (patch)
treec1ec347083804ec4f2d4c9e5a94bfd98c3aebf52 /sys/dev/vge/if_vgevar.h
parentfe250fcdf4c9009883dd08122d4d08d2f070dcc8 (diff)
downloadFreeBSD-src-e98d19f3128514b8d65f4944e817a2822c608b6f.zip
FreeBSD-src-e98d19f3128514b8d65f4944e817a2822c608b6f.tar.gz
Several fixes to this driver:
- Overhaul the locking to avoid recursion and add missing locking in a few places. - Don't schedule a task to call vge_start() from contexts that are safe to call vge_start() directly. Just invoke the routine directly instead (this is what all of the other NIC drivers I am familiar with do). Note that vge(4) does not use an interrupt filter handler which is the primary reason some other drivers use tasks. - Add a new private timer to drive the watchdog timer instead of using if_watchdog and if_timer. - Fixup detach by calling ether_ifdetach() before stopping the interface.
Diffstat (limited to 'sys/dev/vge/if_vgevar.h')
-rw-r--r--sys/dev/vge/if_vgevar.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/vge/if_vgevar.h b/sys/dev/vge/if_vgevar.h
index b19ed3f..c4f7edb 100644
--- a/sys/dev/vge/if_vgevar.h
+++ b/sys/dev/vge/if_vgevar.h
@@ -111,8 +111,9 @@ struct vge_softc {
int vge_rx_consumed;
int vge_link;
int vge_camidx;
- struct task vge_txtask;
struct mtx vge_mtx;
+ struct callout vge_watchdog;
+ int vge_timer;
struct mbuf *vge_head;
struct mbuf *vge_tail;
OpenPOWER on IntegriCloud