powerpc/eeh: Fix trivial error in eeh_restore_dev_state()
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 3 Jun 2015 04:52:59 +0000 (14:52 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 7 Jun 2015 09:11:49 +0000 (19:11 +1000)
Commit 28158cd "powerpc/eeh: Enhance pcibios_set_pcie_reset_state()"
introduced a fix for a problem where certain configurations could lead to
pci_reset_function() destroying the state of PCI devices other than the one
specified.

Unfortunately, the fix has a trivial bug - it calls pci_save_state() again,
when it should be calling pci_restore_state().  This corrects the problem.

Cc: Gavin Shan <gwshan@au1.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh.c

index 23e0aa7736434d6f8dd7a828ee89cdb87d548537..51dcdf66e9e66aad463d4d4bbeb9528a896fa12e 100644 (file)
@@ -717,7 +717,7 @@ static void *eeh_restore_dev_state(void *data, void *userdata)
 
        /* The caller should restore state for the specified device */
        if (pdev != dev)
-               pci_save_state(pdev);
+               pci_restore_state(pdev);
 
        return NULL;
 }
This page took 0.026742 seconds and 5 git commands to generate.