diff options
author | jhb <jhb@FreeBSD.org> | 2009-11-19 19:35:15 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-11-19 19:35:15 +0000 |
commit | e98d19f3128514b8d65f4944e817a2822c608b6f (patch) | |
tree | c1ec347083804ec4f2d4c9e5a94bfd98c3aebf52 /sys/dev/vge/if_vgevar.h | |
parent | fe250fcdf4c9009883dd08122d4d08d2f070dcc8 (diff) | |
download | FreeBSD-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.h | 3 |
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; |