Commit 
804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and
core_configure()") caused a network performance regression due to the GBE
LTR ignore that it added during probe. The fix will move the ignore to
occur at suspend-time (so as to not affect suspend power). This will
require the ability to enable the LTR again on resume. Modify
pmc_core_send_ltr_ignore() to allow enabling an LTR.
Fixes: 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()")
Signed-off-by: "David E. Box" <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20231223032548.1680738-5-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
 
         * when a cable is attached. Tell the PMC to ignore it.
         */
        dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n");
-       pmc_core_send_ltr_ignore(pmcdev, 3);
+       pmc_core_send_ltr_ignore(pmcdev, 3, 1);
 
        return 0;
 }
 
         * when a cable is attached. Tell the PMC to ignore it.
         */
        dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n");
-       pmc_core_send_ltr_ignore(pmcdev, 3);
+       pmc_core_send_ltr_ignore(pmcdev, 3, 1);
 
        return 0;
 }
 
 }
 DEFINE_SHOW_ATTRIBUTE(pmc_core_pll);
 
-int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value)
+int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value, int ignore)
 {
        struct pmc *pmc;
        const struct pmc_reg_map *map;
        mutex_lock(&pmcdev->lock);
 
        reg = pmc_core_reg_read(pmc, map->ltr_ignore_offset);
-       reg |= BIT(ltr_index);
+       if (ignore)
+               reg |= BIT(ltr_index);
+       else
+               reg &= ~BIT(ltr_index);
        pmc_core_reg_write(pmc, map->ltr_ignore_offset, reg);
 
        mutex_unlock(&pmcdev->lock);
        if (err)
                return err;
 
-       err = pmc_core_send_ltr_ignore(pmcdev, value);
+       err = pmc_core_send_ltr_ignore(pmcdev, value, 1);
 
        return err == 0 ? count : err;
 }
 
 extern const struct pmc_reg_map mtl_ioem_reg_map;
 
 extern void pmc_core_get_tgl_lpm_reqs(struct platform_device *pdev);
-extern int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value);
+int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value, int ignore);
 
 int pmc_core_resume_common(struct pmc_dev *pmcdev);
 int get_primary_reg_base(struct pmc *pmc);
 
         * when a cable is attached. Tell the PMC to ignore it.
         */
        dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n");
-       pmc_core_send_ltr_ignore(pmcdev, 3);
+       pmc_core_send_ltr_ignore(pmcdev, 3, 1);
 
        return 0;
 }
 
         * when a cable is attached. Tell the PMC to ignore it.
         */
        dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n");
-       pmc_core_send_ltr_ignore(pmcdev, 3);
+       pmc_core_send_ltr_ignore(pmcdev, 3, 1);
 
        return 0;
 }