On Fri, Oct 31, 2014 at 2:39 AM, Wilmer van der Gaast <wil...@gaast.net> wrote: > Hello Yinghai, > > On 31-10-14 02:13, Yinghai Lu wrote: >> >> Last try: >> >> Please check attached patch that will keep state consistent. > > > Good news: This last patch worked! For good measure, I ran my test twice > with a reboot in between. Worked consistently. > > And similarly, to ensure that your debugging-at-boottime-only patch wasn't > just working by accident yesterday, I tested it twice more with the same > effect.
Good. Please check if attached one on top of 3.17 only would work too. Thanks Yinghai
--- drivers/pci/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6/drivers/pci/pci.c =================================================================== --- linux-2.6.orig/drivers/pci/pci.c +++ linux-2.6/drivers/pci/pci.c @@ -1063,7 +1063,9 @@ static void pci_restore_config_space(str pci_restore_config_space_range(pdev, 4, 9, 10); pci_restore_config_space_range(pdev, 0, 3, 0); } else { - pci_restore_config_space_range(pdev, 0, 15, 0); + /* Restore BARs before the command register. */ + pci_restore_config_space_range(pdev, 4, 15, 0); + pci_restore_config_space_range(pdev, 0, 3, 0); } }