Commit 37e84174 authored by Alexandru Gagniuc's avatar Alexandru Gagniuc Committed by Yang Yingliang
Browse files

Intel:PCI: pciehp: Wait for PDS if in-band presence is disabled

mainline inclusion
from mainline-v5.7-rc1
commit f496648b
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I47H3V
CVE: NA

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

commit f496648b upstream.
Backport summary: for 4.19 kernel ICX PCIe Gen4 support.

When in-band presence detect is disabled, PDS may come up at any time or
not at all.  PDS being low may indicate that the card is still mating, and
we could expect contact bounce to bring down the link as well.

It is reasonable to assume that most cards will mate in a hotplug slot in
about a second.  Thus, when we know PDS only reflects out-of-band presence
detect, it's worthwhile to wait the extra second or so to make sure the
card is properly mated before loading the driver and to prevent the hotplug
code from disabling a device if the presence detect change goes active
after the device is enabled.

Link: https://lore.kernel.org/r/20191025190047.38130-3-stuart.w.hayes@gmail.com


[bhelgaas: use ctrl_info() instead of pci_info()]
Signed-off-by: default avatarAlexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: default avatarStuart Hayes <stuart.w.hayes@gmail.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: default avatarLukas Wunner <lukas@wunner.de>

(cherry picked from commit f496648b)
Signed-off-by: default avatarEthan Zhao <haifeng.zhao@intel.com>
Signed-off-by: default avatarJackie Liu <liuyun01@kylinos.cn>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent f2305154
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment