提交 a6470d0a 编写于 作者: J Jianmin Lv 提交者: openeuler-sync-bot

PCI: PM: Fix pcie mrrs restoring

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6BWFP

--------------------------------

Don't limit mmrs during resume, so that saved value can be
restored.

Fix patch "PCI: loongson: Improve the MRRS quirk for LS7A"
Signed-off-by: NJianmin Lv <lvjianmin@loongson.cn>
Change-Id: I63c49e5c1d7e2a0a6eb3de9faa13cef1f94a4462
(cherry picked from commit 269d4b06)
上级 e7963536
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <linux/aer.h> #include <linux/aer.h>
#include <linux/suspend.h>
#include "pci.h" #include "pci.h"
DEFINE_MUTEX(pci_slot_mutex); DEFINE_MUTEX(pci_slot_mutex);
...@@ -147,6 +148,11 @@ static bool pci_bridge_d3_disable; ...@@ -147,6 +148,11 @@ static bool pci_bridge_d3_disable;
/* Force bridge_d3 for all PCIe ports */ /* Force bridge_d3 for all PCIe ports */
static bool pci_bridge_d3_force; static bool pci_bridge_d3_force;
#ifndef CONFIG_PM_SLEEP
suspend_state_t pm_suspend_target_state;
#define pm_suspend_target_state (PM_SUSPEND_ON)
#endif
static int __init pcie_port_pm_setup(char *str) static int __init pcie_port_pm_setup(char *str)
{ {
if (!strcmp(str, "off")) if (!strcmp(str, "off"))
...@@ -5769,7 +5775,8 @@ int pcie_set_readrq(struct pci_dev *dev, int rq) ...@@ -5769,7 +5775,8 @@ int pcie_set_readrq(struct pci_dev *dev, int rq)
v = (ffs(rq) - 8) << 12; v = (ffs(rq) - 8) << 12;
if (bridge->no_inc_mrrs) { if (pm_suspend_target_state == PM_SUSPEND_ON &&
bridge->no_inc_mrrs) {
if (rq > pcie_get_readrq(dev)) if (rq > pcie_get_readrq(dev))
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册