diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2005-11-24 22:28:53 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-09 15:13:17 -0500 |
commit | bd62e271401c5ebf33a0dd24d89baf706f213251 (patch) | |
tree | 77b8e2cd249df83b0d256f8126047a037a1fc542 /drivers/pci/hotplug/shpchp.h | |
parent | f467f6187fc60c954a9509b3a3e17ef89a4f6f22 (diff) |
[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>
Diffstat (limited to 'drivers/pci/hotplug/shpchp.h')
-rw-r--r-- | drivers/pci/hotplug/shpchp.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 { | |||
101 | u32 cap_offset; | 101 | u32 cap_offset; |
102 | unsigned long mmio_base; | 102 | unsigned long mmio_base; |
103 | unsigned long mmio_size; | 103 | unsigned long mmio_size; |
104 | volatile int cmd_busy; | ||
104 | }; | 105 | }; |
105 | 106 | ||
106 | struct hotplug_params { | 107 | struct hotplug_params { |