]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PCI: hotplug: pciehp: wait for 1 second after power off slot
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Thu, 5 Jul 2007 18:10:45 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 Jul 2007 23:02:12 +0000 (16:02 -0700)
According to the specification, we must wait for at least 1 second
after turning power off before taking any action that relies on power
having been removed from the slot/adapter.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/pciehp_ctrl.c

index 7f22caa70178c5d74393f5f9ca2a18e94c296435..98e541ffef3d5f9ae0d90d91f5c66b358bfc4783 100644 (file)
@@ -197,6 +197,12 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
                            __FUNCTION__);
                        return;
                }
+               /*
+                * After turning power off, we must wait for at least
+                * 1 second before taking any action that relies on
+                * power having been removed from the slot/adapter.
+                */
+               msleep(1000);
        }
 }
 
@@ -615,6 +621,12 @@ int pciehp_disable_slot(struct slot *p_slot)
                        mutex_unlock(&p_slot->ctrl->crit_sect);
                        return -EINVAL;
                }
+               /*
+                * After turning power off, we must wait for at least
+                * 1 second before taking any action that relies on
+                * power having been removed from the slot/adapter.
+                */
+               msleep(1000);
        }
 
        ret = remove_board(p_slot);