pciehp: wait for 1000ms before LED operation after power off
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Thu, 20 Dec 2007 10:43:56 +0000 (19:43 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 23:04:28 +0000 (15:04 -0800)
After turning power off, we must wait for at least 1 second *before*
LED operation.

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
drivers/pci/hotplug/pciehp_hpc.c

index 4cb2c623e17bd4171e984d59247a519d505f3282..b23061c56115f9c65e5fb6dadedf3a1d5339d725 100644 (file)
@@ -195,12 +195,6 @@ 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);
        }
 }
 
@@ -610,12 +604,6 @@ 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);
index 8c2d6c9b92c5de55daf6ff9d610661f1511d49e1..b2cde04ede1ad793a1c58d0a0cfcaa6691e75d33 100644 (file)
@@ -674,6 +674,13 @@ static int hpc_power_off_slot(struct slot * slot)
        dbg("%s: SLOTCTRL %x write cmd %x\n",
            __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd);
 
+       /*
+        * 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);
+
        return retval;
 }