[PATCH] shpchp: fix improper wait for command completion
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Fri, 25 Nov 2005 03:28:53 +0000 (12:28 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 9 Jan 2006 20:13:17 +0000 (12:13 -0800)
commitbd62e271401c5ebf33a0dd24d89baf706f213251
tree77b8e2cd249df83b0d256f8126047a037a1fc542
parentf467f6187fc60c954a9509b3a3e17ef89a4f6f22
[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 <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/shpchp.h
drivers/pci/hotplug/shpchp_ctrl.c
drivers/pci/hotplug/shpchp_hpc.c