From bd62e271401c5ebf33a0dd24d89baf706f213251 Mon Sep 17 00:00:00 2001 From: Kenji Kaneshige Date: Fri, 25 Nov 2005 12:28:53 +0900 Subject: [PATCH] shpchp: fix improper wait for command completion Current SHPCHP driver uses msleep_interruptible() function to wait for a command completion event. But I think this would cause an unnecessary long wait until timeout, if command completion interrupt came before task state was changed to TASK_INTERRUPTIBLE. This patch fixes this issue. With this patch, command completion becomes faster as follows: o Without this patch # time echo 1 > power real 0m4.708s user 0m0.000s sys 0m0.524s o With this patch # time echo 1 > power real 0m2.221s user 0m0.000s sys 0m0.532s Signed-off-by: Kenji Kaneshige Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/shpchp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/pci/hotplug/shpchp.h') diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index 55b0cd15f348..ce0e9b6ce833 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h @@ -101,6 +101,7 @@ struct controller { u32 cap_offset; unsigned long mmio_base; unsigned long mmio_size; + volatile int cmd_busy; }; struct hotplug_params { -- cgit v1.2.3