diff options
author | jmg <jmg@FreeBSD.org> | 2005-04-01 16:22:50 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2005-04-01 16:22:50 +0000 |
commit | b2cee2c19cefe56ac9ccc5ea4e048b662e94d8bd (patch) | |
tree | f02f1987b696e4580532f8288ee2ac2eb31c7e30 /sys/dev | |
parent | 992d45983f0fcbe1f2c6252d66aee575113bdcc9 (diff) | |
download | FreeBSD-src-b2cee2c19cefe56ac9ccc5ea4e048b662e94d8bd.zip FreeBSD-src-b2cee2c19cefe56ac9ccc5ea4e048b662e94d8bd.tar.gz |
move the statement about switching power states to just before we do it, so
we don't print a false statement if the destination powerstate is
unsupported...
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pci.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index ceb0c75..e24b3b1 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -509,11 +509,6 @@ pci_set_powerstate_method(device_t dev, device_t child, int state) if (oldstate == state) return (0); - if (bootverbose) - printf( - "pci%d:%d:%d: Transition from D%d to D%d\n", - dinfo->cfg.bus, dinfo->cfg.slot, dinfo->cfg.func, - oldstate, state); /* * The PCI power management specification states that after a state * transition between PCI power states, system software must @@ -556,6 +551,13 @@ pci_set_powerstate_method(device_t dev, device_t child, int state) default: return (EINVAL); } + + if (bootverbose) + printf( + "pci%d:%d:%d: Transition from D%d to D%d\n", + dinfo->cfg.bus, dinfo->cfg.slot, dinfo->cfg.func, + oldstate, state); + PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_status, status, 2); if (delay) DELAY(delay); |