summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_en_pci.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-08-21 06:24:40 +0000
committermsmith <msmith@FreeBSD.org>1999-08-21 06:24:40 +0000
commitb51f157bff8b959d943b0836a1c57f065b9318d5 (patch)
treee447ab34080a4d202ed41db3476df31ef1f56a50 /sys/pci/if_en_pci.c
parenta753b272ec1066c690e1ba83c8780af55e3a6c78 (diff)
downloadFreeBSD-src-b51f157bff8b959d943b0836a1c57f065b9318d5.zip
FreeBSD-src-b51f157bff8b959d943b0836a1c57f065b9318d5.tar.gz
Implement a new generic mechanism for attaching handler functions to
events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green
Diffstat (limited to 'sys/pci/if_en_pci.c')
-rw-r--r--sys/pci/if_en_pci.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/pci/if_en_pci.c b/sys/pci/if_en_pci.c
index 0f0e3a7..30d9e98 100644
--- a/sys/pci/if_en_pci.c
+++ b/sys/pci/if_en_pci.c
@@ -70,7 +70,7 @@
static void en_pci_attach __P((pcici_t, int));
static const char *en_pci_probe __P((pcici_t, pcidi_t));
-static void en_pci_shutdown __P((int, void *));
+static void en_pci_shutdown __P((void *, int));
/*
* local structures
@@ -266,7 +266,8 @@ int unit;
* doing so could allow DMA to corrupt kernel memory during the
* reboot before the driver initializes.
*/
- at_shutdown(en_pci_shutdown, scp, SHUTDOWN_POST_SYNC);
+ EVENTHANDLER_REGISTER(shutdown_post_sync, en_pci_shutdown, scp,
+ SHUTDOWN_PRI_DEFAULT);
if (!pci_map_int(config_id, en_intr, (void *) sc, &net_imask)) {
printf("%s: couldn't establish interrupt\n", sc->sc_dev.dv_xname);
@@ -304,8 +305,8 @@ int unit;
static void
en_pci_shutdown(
- int howto,
- void *sc)
+ void *sc,
+ int howto)
{
struct en_pci_softc *psc = (struct en_pci_softc *)sc;
OpenPOWER on IntegriCloud