-/* $OpenBSD: xl.c,v 1.89 2010/05/19 15:27:35 oga Exp $ */
+/* $OpenBSD: xl.c,v 1.90 2010/08/06 02:45:53 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
void xl_start(struct ifnet *);
void xl_start_90xB(struct ifnet *);
int xl_ioctl(struct ifnet *, u_long, caddr_t);
-void xl_init(void *);
-void xl_stop(struct xl_softc *);
void xl_freetxrx(struct xl_softc *);
void xl_watchdog(struct ifnet *);
void xl_shutdown(void *);
-/* $OpenBSD: xlreg.h,v 1.20 2009/12/22 21:10:25 naddy Exp $ */
+/* $OpenBSD: xlreg.h,v 1.21 2010/08/06 02:45:53 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998
extern int xl_intr(void *);
extern void xl_attach(struct xl_softc *);
extern int xl_detach(struct xl_softc *);
+void xl_init(void *);
+void xl_stop(struct xl_softc *);
-/* $OpenBSD: if_xl_pci.c,v 1.29 2010/04/08 00:23:53 tedu Exp $ */
+/* $OpenBSD: if_xl_pci.c,v 1.30 2010/08/06 02:45:54 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
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);
void xl_pci_intr_ack(struct xl_softc *);
struct xl_pci_softc {
};
struct cfattach xl_pci_ca = {
- sizeof(struct xl_pci_softc), xl_pci_match, xl_pci_attach, xl_pci_detach
+ sizeof(struct xl_pci_softc), xl_pci_match, xl_pci_attach, xl_pci_detach,
+ xl_pci_activate
};
const struct pci_matchid xl_pci_devices[] = {
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_stop(sc);
+ config_activate_children(self, act);
+ break;
+ case DVACT_RESUME:
+ 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)
{