View | Details | Raw Unified | Return to bug 203885 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/pci/pci.c (-3 / +14 lines)
Lines 890-898 static int pci_raw_set_power_state(struct pci_dev *dev, pci_power_t state) Link Here
890
890
891
	pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
891
	pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
892
	dev->current_state = (pmcsr & PCI_PM_CTRL_STATE_MASK);
892
	dev->current_state = (pmcsr & PCI_PM_CTRL_STATE_MASK);
893
	if (dev->current_state != state && printk_ratelimit())
893
	if (dev->current_state != state && printk_ratelimit()) {
894
		pci_info(dev, "Refused to change power state, currently in D%d\n",
894
		pci_info(dev, "Refused to change power state, currently in D%d, PMCSR=0x%04x\n",
895
			 dev->current_state);
895
			 dev->current_state, pmcsr);
896
897
		msleep(10);
898
		pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
899
		pci_info(dev, "second read, PMCSR=0x%04x\n", pmcsr);
900
		msleep(10);
901
		pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
902
		pci_info(dev, "third read, PMCSR=0x%04x\n", pmcsr);
903
		msleep(50);
904
		pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
905
		pci_info(dev, "last read, PMCSR=0x%04x\n", pmcsr);
906
	}
896
907
897
	/*
908
	/*
898
	 * According to section 5.4.1 of the "PCI BUS POWER MANAGEMENT
909
	 * According to section 5.4.1 of the "PCI BUS POWER MANAGEMENT

Return to bug 203885