From e98d19f3128514b8d65f4944e817a2822c608b6f Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 19 Nov 2009 19:35:15 +0000 Subject: 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. --- sys/dev/vge/if_vgevar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/dev/vge/if_vgevar.h') 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; -- cgit v1.1