Re: [PATCH] kexec: fix pci device initialization fail after kexec (2.6.23-rc2). (Related to e1000 doesn't resume properly from standby)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, 6 August 2007 15:42, Joonwoo Park wrote:
> Hi.
> I think that the pci_set_power_state() has bug.
> The specification says that some delays is required.

And they are in place, AFAICS (from drivers/pci/pci.c):

	/* Mandatory power management transition delays */
	/* see PCI PM 1.1 5.6.1 table 18 */
	if (state == PCI_D3hot || dev->current_state == PCI_D3hot)
		msleep(pci_pm_d3_delay);
	else if (state == PCI_D2 || dev->current_state == PCI_D2)
		udelay(200);

> Simon, please can I know whether it works to you?
> It is seems to the things are related.
> 
> Joonwoo Park.
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 37c00f6..9f78064 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -493,8 +493,14 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
>    * restore at least the BARs so that the device will be
>    * accessible to its driver.
>    */
> - if (need_restore)
> + if (need_restore) {
> +   /* The specification also says that "Must ensure that all of
> +    * its PCI signal drivers remain disabled for the duration of
> +    * the D3hot to D0 Uninitialized state transition".
> +    */
> +   msleep(10);

It's too late for the delay.

>     pci_restore_bars(dev);
> + }
> 
>   return 0;
>  }

Greetings,
Rafael


-- 
"Premature optimization is the root of all evil." - Donald Knuth
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux