Skip to contentSkip to conversation

backporting PCI PM calls

DISCUSSION Johannes Berg 1 participant 1 message Apr 12, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

We have a bug report against our driver in compat that will affect everyone else too. In

commit f60dc0138aa19769bf8bab9f93b043235428b66f

Author: John W. Linville <[email protected]>
Date:   Mon Oct 25 16:12:37 2010 -0400

iwlwifi: Convert to new PCI PM framework

and the similar patches to other drivers all drivers were converted to use .driver.pm suspend/resume callbacks, and that removed

        pci_save_state(pdev);
        pci_disable_device(pdev);
        pci_set_power_state(pdev, PCI_D3hot);

on suspend and the corresponding calls on resume. The compat backport never added them back but just re-wired the callbacks, so on older kernels we don't call these functions at all any more, and that breaks suspend/resume.

Anyone have ideas of how to handle it? Maybe with compat_pci_suspend(), whatever that is? If it even needs to exist -- maybe we could redefine SIMPLE_DEV_PM_OPS in compat instead or in addition?

johannes