The names of PCI reset scopes aren't sychronized with firmware.
The patch fixes it.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
 };
 
 enum OpalPciResetScope {
-       OPAL_PHB_COMPLETE = 1, OPAL_PCI_LINK = 2, OPAL_PHB_ERROR = 3,
-       OPAL_PCI_HOT_RESET = 4, OPAL_PCI_FUNDAMENTAL_RESET = 5,
-       OPAL_PCI_IODA_TABLE_RESET = 6,
+       OPAL_RESET_PHB_COMPLETE         = 1,
+       OPAL_RESET_PCI_LINK             = 2,
+       OPAL_RESET_PHB_ERROR            = 3,
+       OPAL_RESET_PCI_HOT              = 4,
+       OPAL_RESET_PCI_FUNDAMENTAL      = 5,
+       OPAL_RESET_PCI_IODA_TABLE       = 6
 };
 
 enum OpalPciReinitScope {
 
        if (option == EEH_RESET_FUNDAMENTAL ||
            option == EEH_RESET_HOT)
                rc = opal_pci_reset(phb->opal_id,
-                               OPAL_PHB_COMPLETE,
+                               OPAL_RESET_PHB_COMPLETE,
                                OPAL_ASSERT_RESET);
        else if (option == EEH_RESET_DEACTIVATE)
                rc = opal_pci_reset(phb->opal_id,
-                               OPAL_PHB_COMPLETE,
+                               OPAL_RESET_PHB_COMPLETE,
                                OPAL_DEASSERT_RESET);
        if (rc < 0)
                goto out;
         */
        if (option == EEH_RESET_FUNDAMENTAL)
                rc = opal_pci_reset(phb->opal_id,
-                               OPAL_PCI_FUNDAMENTAL_RESET,
+                               OPAL_RESET_PCI_FUNDAMENTAL,
                                OPAL_ASSERT_RESET);
        else if (option == EEH_RESET_HOT)
                rc = opal_pci_reset(phb->opal_id,
-                               OPAL_PCI_HOT_RESET,
+                               OPAL_RESET_PCI_HOT,
                                OPAL_ASSERT_RESET);
        else if (option == EEH_RESET_DEACTIVATE)
                rc = opal_pci_reset(phb->opal_id,
-                               OPAL_PCI_HOT_RESET,
+                               OPAL_RESET_PCI_HOT,
                                OPAL_DEASSERT_RESET);
        if (rc < 0)
                goto out;
                    (option == EEH_RESET_HOT ||
                    option == EEH_RESET_FUNDAMENTAL)) {
                        rc = opal_pci_reset(phb->opal_id,
-                                           OPAL_PHB_ERROR,
+                                           OPAL_RESET_PHB_ERROR,
                                            OPAL_ASSERT_RESET);
                        if (rc != OPAL_SUCCESS) {
                                pr_warn("%s: Failure %lld clearing "
 
 
 static void pnv_pci_ioda_shutdown(struct pnv_phb *phb)
 {
-       opal_pci_reset(phb->opal_id, OPAL_PCI_IODA_TABLE_RESET,
+       opal_pci_reset(phb->opal_id, OPAL_RESET_PCI_IODA_TABLE,
                       OPAL_ASSERT_RESET);
 }
 
        pci_add_flags(PCI_REASSIGN_ALL_RSRC);
 
        /* Reset IODA tables to a clean state */
-       rc = opal_pci_reset(phb_id, OPAL_PCI_IODA_TABLE_RESET, OPAL_ASSERT_RESET);
+       rc = opal_pci_reset(phb_id, OPAL_RESET_PCI_IODA_TABLE, OPAL_ASSERT_RESET);
        if (rc)
                pr_warning("  OPAL Error %ld performing IODA table reset !\n", rc);