Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8931
b: refs/heads/master
c: 32a3658
h: refs/heads/master
i:
  8929: 5134f8b
  8927: 7b0ee1f
v: v3
  • Loading branch information
John W. Linville authored and Linus Torvalds committed Sep 14, 2005
1 parent d47f0c8 commit 8ed4b7e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 186051d70444742bf1c2bc0257dd4696a3df66e3
refs/heads/master: 32a3658533c6f4c6bf370dd730213e802464ef9b
16 changes: 12 additions & 4 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,17 +309,25 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)

pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr);

/* If we're in D3, force entire word to 0.
/* If we're (effectively) in D3, force entire word to 0.
* This doesn't affect PME_Status, disables PME_En, and
* sets PowerState to 0.
*/
if (dev->current_state >= PCI_D3hot) {
if (!(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET))
switch (dev->current_state) {
case PCI_UNKNOWN: /* Boot-up */
if ((pmcsr & PCI_PM_CTRL_STATE_MASK) == PCI_D3hot
&& !(pmcsr & PCI_PM_CTRL_NO_SOFT_RESET))
need_restore = 1;
/* Fall-through: force to D0 */
case PCI_D3hot:
case PCI_D3cold:
case PCI_POWER_ERROR:
pmcsr = 0;
} else {
break;
default:
pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
pmcsr |= state;
break;
}

/* enter specified state */
Expand Down

0 comments on commit 8ed4b7e

Please sign in to comment.