]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
PCI hotplug: pciehp: remove unnecessary wait after turning power off
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Fri, 24 Oct 2008 05:26:35 +0000 (14:26 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 7 Jan 2009 19:12:21 +0000 (11:12 -0800)
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>
drivers/pci/hotplug/pciehp_ctrl.c

index fead63c6b49ec676fda835c2fa04b2b6fd348d22..ff4034502d240355b9e5dfd4c02b226606ba2f52 100644 (file)
@@ -178,15 +178,14 @@ static void set_slot_off(struct controller *ctrl, struct slot * pslot)
                                 "Issue of Slot Power Off command failed\n");
                        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);
        }
 
-       /*
-        * 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);
-
        if (PWR_LED(ctrl))
                pslot->hpc_ops->green_led_off(pslot);
 
@@ -286,15 +285,14 @@ static int remove_board(struct slot *p_slot)
                                 "Issue of Slot Disable command failed\n");
                        return retval;
                }
+               /*
+                * 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);
        }
 
-       /*
-        * 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);
-
        if (PWR_LED(ctrl))
                /* turn off Green LED */
                p_slot->hpc_ops->green_led_off(p_slot);