diff options
author | Robert Nagy <robert@cvs.openbsd.org> | 2005-05-27 18:57:20 +0000 |
---|---|---|
committer | Robert Nagy <robert@cvs.openbsd.org> | 2005-05-27 18:57:20 +0000 |
commit | fa161475baff484beb7cc471d504f6ccafa77c52 (patch) | |
tree | b2e24432bd2cc6a89f0ee47a19251d3b693000cb | |
parent | 1a896445c7694d2ce95289d51e5b56d7af4632e9 (diff) |
make sure to enable socket on resume.
in order for the enable to work disable the socket on suspend.
lot of help from mickey@
ok jsg@ millert@
-rw-r--r-- | sys/dev/cardbus/if_atw_cardbus.c | 17 | ||||
-rw-r--r-- | sys/dev/cardbus/if_rtw_cardbus.c | 17 | ||||
-rw-r--r-- | sys/dev/ic/atw.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/atwvar.h | 3 | ||||
-rw-r--r-- | sys/dev/ic/rtw.c | 4 |
5 files changed, 12 insertions, 33 deletions
diff --git a/sys/dev/cardbus/if_atw_cardbus.c b/sys/dev/cardbus/if_atw_cardbus.c index c940725e14f..2a160255470 100644 --- a/sys/dev/cardbus/if_atw_cardbus.c +++ b/sys/dev/cardbus/if_atw_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atw_cardbus.c,v 1.8 2005/05/16 01:36:25 brad Exp $ */ +/* $OpenBSD: if_atw_cardbus.c,v 1.9 2005/05/27 18:57:19 robert Exp $ */ /* $NetBSD: if_atw_cardbus.c,v 1.9 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -331,21 +331,10 @@ atw_cardbus_disable(struct atw_softc *sc) void atw_cardbus_power(struct atw_softc *sc, int why) { - struct atw_cardbus_softc *csc = (void *) sc; - printf("%s: atw_cardbus_power\n", sc->sc_dev.dv_xname); - if (why == PWR_RESUME) { - /* - * Give the PCI configuration registers a kick - * in the head. - */ -#ifdef DIAGNOSTIC - if (ATW_IS_ENABLED(sc) == 0) - panic("atw_cardbus_power"); -#endif - atw_cardbus_setup(csc); - } + if (why == PWR_RESUME) + atw_enable(sc); } void diff --git a/sys/dev/cardbus/if_rtw_cardbus.c b/sys/dev/cardbus/if_rtw_cardbus.c index 9aef539f7d3..26b6ea9c168 100644 --- a/sys/dev/cardbus/if_rtw_cardbus.c +++ b/sys/dev/cardbus/if_rtw_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rtw_cardbus.c,v 1.5 2005/05/16 01:36:25 brad Exp $ */ +/* $OpenBSD: if_rtw_cardbus.c,v 1.6 2005/05/27 18:57:19 robert Exp $ */ /* $NetBSD: if_rtw_cardbus.c,v 1.4 2004/12/20 21:05:34 dyoung Exp $ */ /*- @@ -395,22 +395,11 @@ rtw_cardbus_disable(struct rtw_softc *sc) void rtw_cardbus_power(struct rtw_softc *sc, int why) { - struct rtw_cardbus_softc *csc = (void *) sc; - RTW_DPRINTF(RTW_DEBUG_ATTACH, ("%s: rtw_cardbus_power\n", sc->sc_dev.dv_xname)); - if (why == PWR_RESUME) { - /* - * Give the PCI configuration registers a kick - * in the head. - */ -#ifdef DIAGNOSTIC - if ((sc->sc_flags & RTW_F_ENABLED) == 0) - panic("rtw_cardbus_power"); -#endif - rtw_cardbus_setup(csc); - } + if (why == PWR_RESUME) + rtw_enable(sc); } void diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index e041d206292..de7f788852d 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.30 2005/03/26 16:35:25 naddy Exp $ */ +/* $OpenBSD: atw.c,v 1.31 2005/05/27 18:57:19 robert Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -3923,7 +3923,7 @@ atw_power(int why, void *arg) /* XXX do nothing. */ break; case PWR_SUSPEND: - atw_stop(ifp, 0); + atw_stop(ifp, 1); if (sc->sc_power != NULL) (*sc->sc_power)(sc, why); break; diff --git a/sys/dev/ic/atwvar.h b/sys/dev/ic/atwvar.h index e9c1596438c..331749bdb67 100644 --- a/sys/dev/ic/atwvar.h +++ b/sys/dev/ic/atwvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atwvar.h,v 1.7 2004/07/25 13:36:08 millert Exp $ */ +/* $OpenBSD: atwvar.h,v 1.8 2005/05/27 18:57:19 robert Exp $ */ /* $NetBSD: atwvar.h,v 1.13 2004/07/23 07:07:55 dyoung Exp $ */ /* @@ -473,6 +473,7 @@ void atw_attach(struct atw_softc *); int atw_detach(struct atw_softc *); int atw_activate(struct device *, enum devact); int atw_intr(void *arg); +int atw_enable(struct atw_softc *); void atw_power(int, void *); void atw_shutdown(void *); diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index 3021736b225..609406e2f4b 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtw.c,v 1.27 2005/05/23 23:14:30 jsg Exp $ */ +/* $OpenBSD: rtw.c,v 1.28 2005/05/27 18:57:18 robert Exp $ */ /* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */ /*- * Copyright (c) 2004, 2005 David Young. All rights reserved. @@ -3289,7 +3289,7 @@ rtw_power(int why, void *arg) /* XXX do nothing. */ break; case PWR_SUSPEND: - rtw_stop(ifp, 0); + rtw_stop(ifp, 1); if (sc->sc_power != NULL) (*sc->sc_power)(sc, why); break; |