Re: [PATCH 5/9] PCI PM: remove PCI_D3cold, PCI_UNKNOWN, and PCI_POWER_ERROR

From: Pavel Machek
Date: Tue Jun 13 2006 - 08:46:58 EST


Hi!

> PCI_D3cold is not a software enter-able power state. Rather, it's the
> state a card enters when Vcc is removed. Moreover, PCI power management

Well, you admit it may be useful in future, still you do big
search&replace to remove it... I do not think we want that.

(Maybe removing D3cold is useful, but even if it is, please don't
rename D3hot).

> does not have any error reporting or failure states. This patch removes

No, but we want something to return when error happens in
pci_choose_state.

> diff -urN a/drivers/pci/pm.c b/drivers/pci/pm.c
> --- a/drivers/pci/pm.c 2006-06-04 01:38:35.000000000 -0400
> +++ b/drivers/pci/pm.c 2006-06-04 01:38:10.000000000 -0400
> @@ -168,11 +163,6 @@
> pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
> pmcsr |= state;
> break;
> - 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 */
> default:
> pmcsr = 0;
> break;

So how do you handle bootup?

> @@ -197,21 +187,6 @@
>
> dev->current_state = state;
>
> - /* According to section 5.4.1 of the "PCI BUS POWER MANAGEMENT
> - * INTERFACE SPECIFICATION, REV. 1.2", a device transitioning
> - * from D3hot to D0 _may_ perform an internal reset, thereby
> - * going to "D0 Uninitialized" rather than "D0 Initialized".
> - * For example, at least some versions of the 3c905B and the
> - * 3c556B exhibit this behaviour.
> - *
> - * At least some laptop BIOSen (e.g. the Thinkpad T21) leave
> - * devices in a D3hot state at boot. Consequently, we need to
> - * restore at least the BARs so that the device will be
> - * accessible to its driver.
> - */
> - if (need_restore)
> - pci_restore_bars(dev);
> -
> return 0;
> }
>

This does not really belong to this patchset....?

Pavel
--
Thanks for all the (sleeping) penguins.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/