summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_ctrl.c
diff options
context:
space:
mode:
authorKenji Kaneshige2011-07-11 03:15:45 +0200
committerJesse Barnes2011-07-22 18:06:41 +0200
commit0cab0841dc1400f633a7e1ac1e448518692f927a (patch)
tree2b4ba002d6d4ee69ad351a2bcf7f9c484f696d2f /drivers/pci/hotplug/pciehp_ctrl.c
parentx86/PCI: Preserve existing pci=bfsort whitelist for Dell systems (diff)
downloadkernel-qcow2-linux-0cab0841dc1400f633a7e1ac1e448518692f927a.tar.gz
kernel-qcow2-linux-0cab0841dc1400f633a7e1ac1e448518692f927a.tar.xz
kernel-qcow2-linux-0cab0841dc1400f633a7e1ac1e448518692f927a.zip
PCI: pciehp: change wait time for valid configuration access
Naoki Yanagimoto reported that configuration read on some hot-added PCIe device returns invalid value. This patch fixes this problem. According to the PCIe spec, software must wait for at least 1 second to judge if the hot-added device is broken after Data Link Layer State Changed Event. This patch changes pciehp driver to wait for 1 second after the Data Link Layer State Changed Event is detected before initiating a configuration access instead of 100 ms. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Tested-by: Naoki Yanagimoto <yanagimoto@np.css.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_ctrl.c')
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index 085dbb5fc168..1e9c9aacc3a6 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -213,6 +213,9 @@ static int board_added(struct slot *p_slot)
goto err_exit;
}
+ /* Wait for 1 second after checking link training status */
+ msleep(1000);
+
/* Check for a power fault */
if (ctrl->power_fault_detected || pciehp_query_power_fault(p_slot)) {
ctrl_err(ctrl, "Power fault on slot %s\n", slot_name(p_slot));