提交 d50234c3 编写于 作者: X Xu Tian

fix pci watchdog plug into pcie.0 issue

Signed-off-by: NXu Tian <xutian@redhat.com>
上级 c5fd0e9c
...@@ -51,6 +51,7 @@ def run(test, params, env): ...@@ -51,6 +51,7 @@ def run(test, params, env):
if watchdog_device == "i6300esb": if watchdog_device == "i6300esb":
error_context.context("checking pci info to ensure have WDT" error_context.context("checking pci info to ensure have WDT"
" device", logging.info) " device", logging.info)
session.cmd("echo 1 > /sys/bus/pci/rescan")
o = session.cmd_output("lspci") o = session.cmd_output("lspci")
if o: if o:
wdt_pci_info = re.findall(".*6300ESB Watchdog Timer", o) wdt_pci_info = re.findall(".*6300ESB Watchdog Timer", o)
...@@ -283,8 +284,11 @@ def run(test, params, env): ...@@ -283,8 +284,11 @@ def run(test, params, env):
test.fail("Can find watchdog pci") test.fail("Can find watchdog pci")
plug_watchdog_device = params.get("plug_watchdog_device", "i6300esb") plug_watchdog_device = params.get("plug_watchdog_device", "i6300esb")
machine_type = params.get("machine_type")
watchdog_device_add = ("device_add driver=%s, id=%s" watchdog_device_add = ("device_add driver=%s, id=%s"
% (plug_watchdog_device, "watchdog")) % (plug_watchdog_device, "watchdog"))
if machine_type == "q35":
watchdog_device_add += ",bus=pcie-pci-bridge-0,addr=0x1f"
watchdog_device_del = ("device_del id=%s" % "watchdog") watchdog_device_del = ("device_del id=%s" % "watchdog")
error_context.context(("Hotplug watchdog device '%s'" % error_context.context(("Hotplug watchdog device '%s'" %
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册