diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2007-10-22 23:00:46 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2007-10-22 23:00:46 +0000 |
commit | c09265ae199ebf1e4d7ef8d3ab846478d7a093e1 (patch) | |
tree | f985c89aef05fe936bf4f777a8f4263cb1953a87 /sys | |
parent | 0f994151a073841ff33e23da98323059b5c517b5 (diff) |
only output on situations where power state is D3. unify the message in
such cases. ok brad@ kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_atw_pci.c | 23 | ||||
-rw-r--r-- | sys/dev/pci/if_epic_pci.c | 22 | ||||
-rw-r--r-- | sys/dev/pci/if_pcn.c | 21 | ||||
-rw-r--r-- | sys/dev/pci/if_rtw_pci.c | 22 | ||||
-rw-r--r-- | sys/dev/pci/if_sf_pci.c | 15 | ||||
-rw-r--r-- | sys/dev/pci/if_stge.c | 21 |
6 files changed, 50 insertions, 74 deletions
diff --git a/sys/dev/pci/if_atw_pci.c b/sys/dev/pci/if_atw_pci.c index 170d1b53edc..5fc217d7a04 100644 --- a/sys/dev/pci/if_atw_pci.c +++ b/sys/dev/pci/if_atw_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atw_pci.c,v 1.8 2007/10/22 03:16:35 fgsch Exp $ */ +/* $OpenBSD: if_atw_pci.c,v 1.9 2007/10/22 23:00:45 fgsch Exp $ */ /* $NetBSD: if_atw_pci.c,v 1.7 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -178,19 +178,14 @@ atw_pci_attach(struct device *parent, struct device *self, void *aux) * any meanings. -dcy */ state = pci_set_powerstate(pc, pa->pa_tag, PCI_PMCSR_STATE_D0); - if (state != PCI_PMCSR_STATE_D0) { - if (state == PCI_PMCSR_STATE_D3) { - /* - * The card has lost all configuration data in - * this state, so punt. - */ - printf(": unable to wake up from power state D3, " - "reboot required.\n"); - return; - } else { - printf(": waking up from power state D%d\n%s", - state, sc->sc_dev.dv_xname); - } + if (state == PCI_PMCSR_STATE_D3) { + /* + * The card has lost all configuration data in + * this state, so punt. + */ + printf(": unable to wake up from power state D3, " + "reboot required.\n"); + return; } /* diff --git a/sys/dev/pci/if_epic_pci.c b/sys/dev/pci/if_epic_pci.c index eef2e5147c2..7b24758f343 100644 --- a/sys/dev/pci/if_epic_pci.c +++ b/sys/dev/pci/if_epic_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_epic_pci.c,v 1.6 2007/10/22 03:16:35 fgsch Exp $ */ +/* $OpenBSD: if_epic_pci.c,v 1.7 2007/10/22 23:00:45 fgsch Exp $ */ /* $NetBSD: if_epic_pci.c,v 1.28 2005/02/27 00:27:32 perry Exp $ */ /*- @@ -161,18 +161,14 @@ epic_pci_attach(struct device *parent, struct device *self, void *aux) int state, ioh_valid, memh_valid; state = pci_set_powerstate(pc, pa->pa_tag, PCI_PMCSR_STATE_D0); - if (state != PCI_PMCSR_STATE_D0) { - if (state == PCI_PMCSR_STATE_D3) { - /* - * IO and MEM are disabled. We can't enable - * the card because the BARs might be invalid. - */ - printf(": unable to wake up from power state D3, " - "reboot required.\n"); - return; - } else { - printf(": waking up from power state D%d\n", state); - } + if (state == PCI_PMCSR_STATE_D3) { + /* + * IO and MEM are disabled. We can't enable + * the card because the BARs might be invalid. + */ + printf(": unable to wake up from power state D3, " + "reboot required.\n"); + return; } /* diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c index 089bf7f5f46..2cd7d0dbe64 100644 --- a/sys/dev/pci/if_pcn.c +++ b/sys/dev/pci/if_pcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pcn.c,v 1.16 2007/10/22 03:16:35 fgsch Exp $ */ +/* $OpenBSD: if_pcn.c,v 1.17 2007/10/22 23:00:45 fgsch Exp $ */ /* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */ /* @@ -614,17 +614,14 @@ pcn_attach(struct device *parent, struct device *self, void *aux) /* Get it out of power save mode, if needed. */ state = pci_set_powerstate(pc, pa->pa_tag, PCI_PMCSR_STATE_D0); - if (state != PCI_PMCSR_STATE_D0) { - if (state == PCI_PMCSR_STATE_D3) { - /* - * The card has lost all configuration data in - * this state, so punt. - */ - printf(": unable to wake from power state D3\n"); - return; - } else { - printf(": waking up from power date D%d", state); - } + if (state == PCI_PMCSR_STATE_D3) { + /* + * The card has lost all configuration data in + * this state, so punt. + */ + printf(": unable to wake up from power state D3, " + "reboot required.\n"); + return; } /* diff --git a/sys/dev/pci/if_rtw_pci.c b/sys/dev/pci/if_rtw_pci.c index 47a5961577a..0c386b8f23a 100644 --- a/sys/dev/pci/if_rtw_pci.c +++ b/sys/dev/pci/if_rtw_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rtw_pci.c,v 1.9 2007/10/22 03:16:35 fgsch Exp $ */ +/* $OpenBSD: if_rtw_pci.c,v 1.10 2007/10/22 23:00:45 fgsch Exp $ */ /* $NetBSD: if_rtw_pci.c,v 1.1 2004/09/26 02:33:36 dyoung Exp $ */ /*- @@ -189,18 +189,14 @@ rtw_pci_attach(struct device *parent, struct device *self, void *aux) * any meanings. -dcy */ state = pci_set_powerstate(pc, pa->pa_tag, PCI_PMCSR_STATE_D0); - if (state != PCI_PMCSR_STATE_D0) { - if (state == PCI_PMCSR_STATE_D3) { - /* - * The card has lost all configuration data in - * this state, so punt. - */ - printf(": unable to wake up from power state D3, " - "reboot required.\n"); - return; - } else { - printf(": waking up from power state D%d\n", state); - } + if (state == PCI_PMCSR_STATE_D3) { + /* + * The card has lost all configuration data in + * this state, so punt. + */ + printf(": unable to wake up from power state D3, " + "reboot required.\n"); + return; } /* diff --git a/sys/dev/pci/if_sf_pci.c b/sys/dev/pci/if_sf_pci.c index abe23af56c1..742347e9170 100644 --- a/sys/dev/pci/if_sf_pci.c +++ b/sys/dev/pci/if_sf_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sf_pci.c,v 1.3 2007/10/22 03:16:35 fgsch Exp $ */ +/* $OpenBSD: if_sf_pci.c,v 1.4 2007/10/22 23:00:45 fgsch Exp $ */ /* $NetBSD: if_sf_pci.c,v 1.10 2006/06/17 23:34:27 christos Exp $ */ /*- @@ -116,15 +116,10 @@ sf_pci_attach(struct device *parent, struct device *self, void *aux) pcireg_t reg; state = pci_set_powerstate(pa->pa_pc, pa->pa_tag, PCI_PMCSR_STATE_D0); - if (state != PCI_PMCSR_STATE_D0) { - if (state == PCI_PMCSR_STATE_D3) { - printf("%s: unable to wake up from power state D3\n", - sc->sc_dev.dv_xname); - return; - } else { - printf(": waking up from power state D%d\n%s", - state, sc->sc_dev.dv_xname); - } + if (state == PCI_PMCSR_STATE_D3) { + printf(": unable to wake up from power state D3, " + "reboot required.\n"); + return; } /* diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index a837a531c33..1a621c0e1f6 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_stge.c,v 1.36 2007/10/22 03:16:35 fgsch Exp $ */ +/* $OpenBSD: if_stge.c,v 1.37 2007/10/22 23:00:45 fgsch Exp $ */ /* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */ /*- @@ -220,17 +220,14 @@ stge_attach(struct device *parent, struct device *self, void *aux) /* Get it out of power save mode if needed. */ state = pci_set_powerstate(pc, pa->pa_tag, PCI_PMCSR_STATE_D0); - if (state != PCI_PMCSR_STATE_D0) { - if (state == PCI_PMCSR_STATE_D3) { - /* - * The card has lost all configuration data in - * this state, so punt. - */ - printf(": unable to wake up from power state D3\n"); - return; - } else { - printf(": waking up from power state D%d\n", state); - } + if (state == PCI_PMCSR_STATE_D3) { + /* + * The card has lost all configuration data in + * this state, so punt. + */ + printf(": unable to wake up from power state D3, " + "reboot required.\n"); + return; } /* |