summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp/if_fxpvar.h
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2003-04-25 09:01:54 +0000
committernjl <njl@FreeBSD.org>2003-04-25 09:01:54 +0000
commit9b009b5d4a635a9c3df7f41004b6713c4e43e498 (patch)
tree21feb5e67761ea8d7688591eb227d4e9c6f5e8cf /sys/dev/fxp/if_fxpvar.h
parentb15a9b8776135db9c5788b9625ab112909dbc343 (diff)
downloadFreeBSD-src-9b009b5d4a635a9c3df7f41004b6713c4e43e498.zip
FreeBSD-src-9b009b5d4a635a9c3df7f41004b6713c4e43e498.tar.gz
Make fxp(4) INTR_MPSAFE (but do not enable MPSAFE just yet):
- Add fxp_start_body() and change fxp_start() to just acquire locks and then call fxp_start_body(). Places that would call fxp_start() with locks held (mutex recursion) now call fxp_start_body() directly. Remove MTX_RECURSE flag from sc_mtx. [gallatin] - Change fxp_attach() to work without the softc lock, saving interrupt hooking until the head of fxp_attach(). - Call ether_ifattach() before overriding ifp parameters. This reverts part of 1.155. - Remove multiple error paths in fxp_attach(). - Teardown interrupt in fxp_detach() before unlocking the softc. - Make sure mutex is not held in fxp_release() - Delete the miibus instance and/or self in fxp_release(), not in fxp_detach(). This can happen if attach fails partway through. - Move ifmedia_removeall to fxp_release() since attach may fail after media have been allocated. - Add locking to fxp_suspend, fxp_resume, fxp_start, fxp_intr, fxp_poll, fxp_tick, fxp_ioctl, fxp_watchdog. - Pass in ifp to fxp_intr_body since its callers sometimes already use it. - Add compatibility define for INTR_MPSAFE for 4.x. [gallatin] - You don't need to bzero softc. Ideas from: gallatin, mux Tested by: >400M packets of dd/ssh, NFS, ping on i386 UP
Diffstat (limited to 'sys/dev/fxp/if_fxpvar.h')
-rw-r--r--sys/dev/fxp/if_fxpvar.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/fxp/if_fxpvar.h b/sys/dev/fxp/if_fxpvar.h
index 1cb3cf5..0dee4ad 100644
--- a/sys/dev/fxp/if_fxpvar.h
+++ b/sys/dev/fxp/if_fxpvar.h
@@ -104,6 +104,9 @@
#if __FreeBSD_version < 500000
#define FXP_LOCK(_sc)
#define FXP_UNLOCK(_sc)
+#define INTR_MPSAFE 0
+#define mtx_owned(a) 0
+#define mtx_assert(a, b)
#define mtx_init(a, b, c, d)
#define mtx_destroy(a)
struct mtx { int dummy; };
OpenPOWER on IntegriCloud