summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_stge.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-10-18 21:44:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-10-18 21:44:22 +0000
commitc6f059840162b2c543b98d25d52c1ab9bef6abdb (patch)
tree995710b7c307dbd984f1a701ba82f8dd58ea7968 /sys/dev/pci/if_stge.c
parent3009bb760d67d343c20274e3b032edd5b53e2ea3 (diff)
Convert a number of old private copies of code which predates
pci_set_powerstate() to using it instead. Many of these chunks of code had bugs in them, especially missing delay() calls. Some of them were doing things our PCI subsystem is now responsible for handling. If you have any of the affected devices, please keep an eye out for regressions. ok kettenis
Diffstat (limited to 'sys/dev/pci/if_stge.c')
-rw-r--r--sys/dev/pci/if_stge.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c
index 601ace58561..4fd07399b63 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.53 2011/04/05 18:01:21 henning Exp $ */
+/* $OpenBSD: if_stge.c,v 1.54 2012/10/18 21:44:21 deraadt Exp $ */
/* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */
/*-
@@ -176,7 +176,6 @@ stge_attach(struct device *parent, struct device *self, void *aux)
bus_size_t iosize;
int ioh_valid, memh_valid;
int i, rseg, error;
- int state;
timeout_set(&sc->sc_timeout, stge_tick, sc);
@@ -206,16 +205,7 @@ stge_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dmat = pa->pa_dmat;
/* 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_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;
- }
+ pci_set_powerstate(pc, pa->pa_tag, PCI_PMCSR_STATE_D0);
/*
* Map and establish our interrupt.