--- zzzz-none-000/linux-2.6.39.4/drivers/pci/pcie/portdrv_core.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/drivers/pci/pcie/portdrv_core.c 2021-11-10 13:38:15.000000000 +0000 @@ -6,6 +6,12 @@ * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) */ +/****************************************************************** + + Includes Intel Corporation's changes/modifications dated: 07/2011. + Changed/modified portions - Copyright(c) 2011, Intel Corporation. + +******************************************************************/ #include #include #include @@ -411,7 +417,18 @@ */ int pcie_port_device_suspend(struct device *dev) { +#ifdef CONFIG_ARCH_GEN3 + int ret; + struct pci_dev *pdev = to_pci_dev(dev); + ret = device_for_each_child(dev, NULL, suspend_iter); + if (!ret) + ret = pci_save_state(pdev); + pci_disable_device(pdev); + pci_set_power_state(pdev, PCI_D3hot); + return ret; +#else return device_for_each_child(dev, NULL, suspend_iter); +#endif } static int resume_iter(struct device *dev, void *data) @@ -433,6 +450,12 @@ */ int pcie_port_device_resume(struct device *dev) { +#ifdef CONFIG_ARCH_GEN3 + struct pci_dev *pdev = to_pci_dev(dev); + pci_set_power_state(pdev, PCI_D0); + pci_restore_state(pdev); + pcie_portdrv_restore_config(pdev); +#endif return device_for_each_child(dev, NULL, resume_iter); } #endif /* PM */