aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2008-10-24 01:26:35 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 14:12:21 -0500
commitc7b4fee3808a061ee0e704ba596ace56bf65a83d (patch)
tree956bc9c28c2920e8b4660c446de5b47b56f7cba3 /drivers/pci/hotplug
parent9eff02e2042f96fb2aedd02e032eca1c5333d767 (diff)
PCI hotplug: pciehp: remove unnecessary wait after turning power off
The pciehp driver waits for 1000 msec after turning power off to make sure the power has been completely removed. But this 1000 msec wait is not needed if a slot doesn't implement power control because software cannot control the power. Power will be automatically removed at adapter removal time on such a slot Tested-by: "Phil Endecott" <phil_pibbu_endecott@chezphil.org> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index fead63c6b49e..ff4034502d24 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -178,15 +178,14 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
178 "Issue of Slot Power Off command failed\n"); 178 "Issue of Slot Power Off command failed\n");
179 return; 179 return;
180 } 180 }
181 /*
182 * After turning power off, we must wait for at least 1 second
183 * before taking any action that relies on power having been
184 * removed from the slot/adapter.
185 */
186 msleep(1000);
181 } 187 }
182 188
183 /*
184 * After turning power off, we must wait for at least 1 second
185 * before taking any action that relies on power having been
186 * removed from the slot/adapter.
187 */
188 msleep(1000);
189
190 if (PWR_LED(ctrl)) 189 if (PWR_LED(ctrl))
191 pslot->hpc_ops->green_led_off(pslot); 190 pslot->hpc_ops->green_led_off(pslot);
192 191
@@ -286,15 +285,14 @@ static int remove_board(struct slot *p_slot)
286 "Issue of Slot Disable command failed\n"); 285 "Issue of Slot Disable command failed\n");
287 return retval; 286 return retval;
288 } 287 }
288 /*
289 * After turning power off, we must wait for at least 1 second
290 * before taking any action that relies on power having been
291 * removed from the slot/adapter.
292 */
293 msleep(1000);
289 } 294 }
290 295
291 /*
292 * After turning power off, we must wait for at least 1 second
293 * before taking any action that relies on power having been
294 * removed from the slot/adapter.
295 */
296 msleep(1000);
297
298 if (PWR_LED(ctrl)) 296 if (PWR_LED(ctrl))
299 /* turn off Green LED */ 297 /* turn off Green LED */
300 p_slot->hpc_ops->green_led_off(p_slot); 298 p_slot->hpc_ops->green_led_off(p_slot);