Re: [PATCH 6/9] PCI PM: call platform helpers properly

From: Benjamin Herrenschmidt
Date: Mon Jun 05 2006 - 20:31:15 EST



> - pci_write_config_word(dev, pm->pm_offset + PCI_PM_CTRL, pmcsr);
> + /* call platform helpers (e.g. ACPI) before restoring power */
> + if (state == PCI_D0 && platform_pci_set_power_state)
> + platform_pci_set_power_state(dev, state);

I think the platform helper need to be able to either return from the
function directly or at least you should read back the state before
continuing. The platform helper may call into firmware which might
handle the complete state transition. Thus, when you come back from it,
you probably need to check the device-state, or provide return codes for
the platform helper to affect the code flow of the rest of the function.

Ben.


-
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/