提交 50277c8b 编写于 作者: Y Yijing Wang 提交者: Bjorn Helgaas

PCI: pciehp: Don't turn slot off when hot-added device already exists

If we found device already exists during hot add device, we should leave
it, not turn the slot off.
Signed-off-by: NYijing Wang <wangyijing@huawei.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 50b52fde
......@@ -233,7 +233,8 @@ static int board_added(struct slot *p_slot)
if (retval) {
ctrl_err(ctrl, "Cannot add device at %04x:%02x:00\n",
pci_domain_nr(parent), parent->number);
goto err_exit;
if (retval != -EEXIST)
goto err_exit;
}
pciehp_green_led_on(p_slot);
......
......@@ -50,7 +50,7 @@ int pciehp_configure_device(struct slot *p_slot)
"at %04x:%02x:00, cannot hot-add\n", pci_name(dev),
pci_domain_nr(parent), parent->number);
pci_dev_put(dev);
ret = -EINVAL;
ret = -EEXIST;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册