summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_xl_pci.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-27 15:43:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-08-27 15:43:43 +0000
commitf8f82a1aed6fc747cb9d6e8689741ffcde9d3850 (patch)
tree66cf5397d5c761f95acd146010efd0ff3bbfe34a /sys/dev/pci/if_xl_pci.c
parent331492432b764b736a5ddc8faa96012393835159 (diff)
Move the xl_pci_activate function into xl_activate so that it is in the
sub-driver, and then xl_powerhook can simply be a wrapper around it ok kettenis; discussion about nested structure aliasing with miod
Diffstat (limited to 'sys/dev/pci/if_xl_pci.c')
-rw-r--r--sys/dev/pci/if_xl_pci.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/sys/dev/pci/if_xl_pci.c b/sys/dev/pci/if_xl_pci.c
index 15bc79c4700..13ffc4dacb0 100644
--- a/sys/dev/pci/if_xl_pci.c
+++ b/sys/dev/pci/if_xl_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xl_pci.c,v 1.31 2010/08/12 14:21:55 kettenis Exp $ */
+/* $OpenBSD: if_xl_pci.c,v 1.32 2010/08/27 15:43:42 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -91,7 +91,7 @@
int xl_pci_match(struct device *, void *, void *);
void xl_pci_attach(struct device *, struct device *, void *);
int xl_pci_detach(struct device *, int);
-int xl_pci_activate(struct device *, int);
+int xl_activate(struct device *, int);
void xl_pci_intr_ack(struct xl_softc *);
struct xl_pci_softc {
@@ -103,7 +103,7 @@ struct xl_pci_softc {
struct cfattach xl_pci_ca = {
sizeof(struct xl_pci_softc), xl_pci_match, xl_pci_attach, xl_pci_detach,
- xl_pci_activate
+ xl_activate
};
const struct pci_matchid xl_pci_devices[] = {
@@ -337,31 +337,6 @@ xl_pci_detach(struct device *self, int flags)
return (0);
}
-int
-xl_pci_activate(struct device *self, int act)
-{
- struct xl_pci_softc *psc = (void *)self;
- struct xl_softc *sc = &psc->psc_softc;
- struct ifnet *ifp = &sc->sc_arpcom.ac_if;
-
- switch (act) {
- case DVACT_SUSPEND:
- if (ifp->if_flags & IFF_RUNNING) {
- xl_reset(sc);
- xl_stop(sc);
- }
- config_activate_children(self, act);
- break;
- case DVACT_RESUME:
- xl_reset(sc);
- config_activate_children(self, act);
- if (ifp->if_flags & IFF_UP)
- xl_init(sc);
- break;
- }
- return (0);
-}
-
void
xl_pci_intr_ack(struct xl_softc *sc)
{