diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-17 09:25:26 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-07-17 09:25:26 -0400 |
commit | 4bf311ddfbffe12d41ad1a3c311ab727db6f72cb (patch) | |
tree | 9d19a2774e83637d86dc876f3af22af1dacf0bec /drivers/pci/pci.c | |
parent | 597d0cae0f99f62501e229bed50e8149604015bb (diff) | |
parent | 82d6897fefca6206bca7153805b4c5359ce97fc4 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index cf57d7de3765..9f79dd6d51ab 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/dma.h> /* isa_dma_bridge_buggy */ | 19 | #include <asm/dma.h> /* isa_dma_bridge_buggy */ |
20 | #include "pci.h" | 20 | #include "pci.h" |
21 | 21 | ||
22 | unsigned int pci_pm_d3_delay = 10; | ||
22 | 23 | ||
23 | /** | 24 | /** |
24 | * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children | 25 | * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children |
@@ -313,6 +314,14 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
313 | } else if (dev->current_state == state) | 314 | } else if (dev->current_state == state) |
314 | return 0; /* we're already there */ | 315 | return 0; /* we're already there */ |
315 | 316 | ||
317 | /* | ||
318 | * If the device or the parent bridge can't support PCI PM, ignore | ||
319 | * the request if we're doing anything besides putting it into D0 | ||
320 | * (which would only happen on boot). | ||
321 | */ | ||
322 | if ((state == PCI_D1 || state == PCI_D2) && pci_no_d1d2(dev)) | ||
323 | return 0; | ||
324 | |||
316 | /* find PCI PM capability in list */ | 325 | /* find PCI PM capability in list */ |
317 | pm = pci_find_capability(dev, PCI_CAP_ID_PM); | 326 | pm = pci_find_capability(dev, PCI_CAP_ID_PM); |
318 | 327 | ||
@@ -363,7 +372,7 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
363 | /* Mandatory power management transition delays */ | 372 | /* Mandatory power management transition delays */ |
364 | /* see PCI PM 1.1 5.6.1 table 18 */ | 373 | /* see PCI PM 1.1 5.6.1 table 18 */ |
365 | if (state == PCI_D3hot || dev->current_state == PCI_D3hot) | 374 | if (state == PCI_D3hot || dev->current_state == PCI_D3hot) |
366 | msleep(10); | 375 | msleep(pci_pm_d3_delay); |
367 | else if (state == PCI_D2 || dev->current_state == PCI_D2) | 376 | else if (state == PCI_D2 || dev->current_state == PCI_D2) |
368 | udelay(200); | 377 | udelay(200); |
369 | 378 | ||