MPSAFE patch for fxp(4)

From: Nate Lawson <nate_at_root.org>
Date: Thu, 10 Apr 2003 16:48:47 -0700 (PDT)
I have completed a patch for fxp(4) to enable MPSAFE operation.  Please
test it if you have one of these devices.  Particularly interesting cases
are DEVICE_POLLING and SMP and non-i386 archs.  I have tested it
thoroughly on an i386 UP box both as a module and compiled into the
kernel.  The one necessary fix by gallatin_at_ to vm/uma_core.c is included
as well.

-Nate

Make fxp(4) INTR_MPSAFE:
- 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.
- 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]

Ideas from:	gallatin, mux
Tested by:	>200M packets of dd/ssh, NFS, ping on i386 UP

Received on Thu Apr 10 2003 - 14:48:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:03 UTC