powerpc/powernv: Drop PHB operation get_log()
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Mon, 16 Feb 2015 03:45:42 +0000 (14:45 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 16 Mar 2015 23:31:19 +0000 (10:31 +1100)
The patch drops PHB operation get_log() and merges its logic to
eeh_ops::get_log().

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/eeh-ioda.c
arch/powerpc/platforms/powernv/eeh-powernv.c
arch/powerpc/platforms/powernv/pci.h

index bd509ad08211f8b9786608a2e69e08d8c4fad0f4..7eb6e724fbc9179e04097fa0c1cb714caacb8049 100644 (file)
@@ -530,25 +530,6 @@ static int ioda_eeh_reset(struct eeh_pe *pe, int option)
        return ret;
 }
 
-/**
- * ioda_eeh_get_log - Retrieve error log
- * @pe: frozen PE
- * @severity: permanent or temporary error
- * @drv_log: device driver log
- * @len: length of device driver log
- *
- * Retrieve error log, which contains log from device driver
- * and firmware.
- */
-static int ioda_eeh_get_log(struct eeh_pe *pe, int severity,
-                           char *drv_log, unsigned long len)
-{
-       if (!eeh_has_flag(EEH_EARLY_DUMP_LOG))
-               pnv_pci_dump_phb_diag_data(pe->phb, pe->data);
-
-       return 0;
-}
-
 /**
  * ioda_eeh_configure_bridge - Configure the PCI bridges for the indicated PE
  * @pe: EEH PE
@@ -905,7 +886,6 @@ struct pnv_eeh_ops ioda_eeh_ops = {
        .set_option             = ioda_eeh_set_option,
        .get_state              = ioda_eeh_get_state,
        .reset                  = ioda_eeh_reset,
-       .get_log                = ioda_eeh_get_log,
        .configure_bridge       = ioda_eeh_configure_bridge,
        .next_error             = ioda_eeh_next_error
 };
index 641ba3378ccf75221565573209f964211fddda9b..465deb5f5f46d4a57e651332831da39d25e9ad0d 100644 (file)
@@ -533,14 +533,10 @@ static int pnv_eeh_wait_state(struct eeh_pe *pe, int max_wait)
 static int pnv_eeh_get_log(struct eeh_pe *pe, int severity,
                           char *drv_log, unsigned long len)
 {
-       struct pci_controller *hose = pe->phb;
-       struct pnv_phb *phb = hose->private_data;
-       int ret = -EEXIST;
+       if (!eeh_has_flag(EEH_EARLY_DUMP_LOG))
+               pnv_pci_dump_phb_diag_data(pe->phb, pe->data);
 
-       if (phb->eeh_ops && phb->eeh_ops->get_log)
-               ret = phb->eeh_ops->get_log(pe, severity, drv_log, len);
-
-       return ret;
+       return 0;
 }
 
 /**
index c7e047f195285807a81948189100a8e468be8bbd..1e7a623cbff42f404ebea5a27c55aeef38de4af6 100644 (file)
@@ -81,8 +81,6 @@ struct pnv_eeh_ops {
        int (*set_option)(struct eeh_pe *pe, int option);
        int (*get_state)(struct eeh_pe *pe);
        int (*reset)(struct eeh_pe *pe, int option);
-       int (*get_log)(struct eeh_pe *pe, int severity,
-                      char *drv_log, unsigned long len);
        int (*configure_bridge)(struct eeh_pe *pe);
        int (*next_error)(struct eeh_pe **pe);
 };