aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_si_intf.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-09-14 08:12:20 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-14 08:12:20 -0400
commit165415f700b0c77fa1f8db6198f48582639adf78 (patch)
tree088e305b0b5b0c6753072e13be1177824c3ed59d /drivers/char/ipmi/ipmi_si_intf.c
parentc324b44c34050cf2a9b58830e11c974806bd85d8 (diff)
parent2f4ba45a75d6383b4a1201169a808ffea416ffa0 (diff)
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_intf.c')
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 1abec687865c..b6e5cbfb09f8 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1019,7 +1019,7 @@ MODULE_PARM_DESC(slave_addrs, "Set the default IPMB slave address for"
1019#define IPMI_MEM_ADDR_SPACE 1 1019#define IPMI_MEM_ADDR_SPACE 1
1020#define IPMI_IO_ADDR_SPACE 2 1020#define IPMI_IO_ADDR_SPACE 2
1021 1021
1022#if defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_X86) || defined(CONFIG_PCI) 1022#if defined(CONFIG_ACPI) || defined(CONFIG_X86) || defined(CONFIG_PCI)
1023static int is_new_interface(int intf, u8 addr_space, unsigned long base_addr) 1023static int is_new_interface(int intf, u8 addr_space, unsigned long base_addr)
1024{ 1024{
1025 int i; 1025 int i;
@@ -1395,7 +1395,7 @@ static int try_init_mem(int intf_num, struct smi_info **new_info)
1395} 1395}
1396 1396
1397 1397
1398#ifdef CONFIG_ACPI_INTERPRETER 1398#ifdef CONFIG_ACPI
1399 1399
1400#include <linux/acpi.h> 1400#include <linux/acpi.h>
1401 1401
@@ -1517,6 +1517,9 @@ static int try_init_acpi(int intf_num, struct smi_info **new_info)
1517 char *io_type; 1517 char *io_type;
1518 u8 addr_space; 1518 u8 addr_space;
1519 1519
1520 if (acpi_disabled)
1521 return -ENODEV;
1522
1520 if (acpi_failure) 1523 if (acpi_failure)
1521 return -ENODEV; 1524 return -ENODEV;
1522 1525
@@ -1917,8 +1920,7 @@ static int try_get_dev_id(struct smi_info *smi_info)
1917 for (;;) 1920 for (;;)
1918 { 1921 {
1919 if (smi_result == SI_SM_CALL_WITH_DELAY) { 1922 if (smi_result == SI_SM_CALL_WITH_DELAY) {
1920 set_current_state(TASK_UNINTERRUPTIBLE); 1923 schedule_timeout_uninterruptible(1);
1921 schedule_timeout(1);
1922 smi_result = smi_info->handlers->event( 1924 smi_result = smi_info->handlers->event(
1923 smi_info->si_sm, 100); 1925 smi_info->si_sm, 100);
1924 } 1926 }
@@ -2092,7 +2094,7 @@ static int init_one_smi(int intf_num, struct smi_info **smi)
2092 rv = try_init_mem(intf_num, &new_smi); 2094 rv = try_init_mem(intf_num, &new_smi);
2093 if (rv) 2095 if (rv)
2094 rv = try_init_port(intf_num, &new_smi); 2096 rv = try_init_port(intf_num, &new_smi);
2095#ifdef CONFIG_ACPI_INTERPRETER 2097#ifdef CONFIG_ACPI
2096 if (rv && si_trydefaults) 2098 if (rv && si_trydefaults)
2097 rv = try_init_acpi(intf_num, &new_smi); 2099 rv = try_init_acpi(intf_num, &new_smi);
2098#endif 2100#endif
@@ -2253,10 +2255,8 @@ static int init_one_smi(int intf_num, struct smi_info **smi)
2253 2255
2254 /* Wait for the timer to stop. This avoids problems with race 2256 /* Wait for the timer to stop. This avoids problems with race
2255 conditions removing the timer here. */ 2257 conditions removing the timer here. */
2256 while (! new_smi->timer_stopped) { 2258 while (!new_smi->timer_stopped)
2257 set_current_state(TASK_UNINTERRUPTIBLE); 2259 schedule_timeout_uninterruptible(1);
2258 schedule_timeout(1);
2259 }
2260 2260
2261 out_err: 2261 out_err:
2262 if (new_smi->intf) 2262 if (new_smi->intf)
@@ -2376,17 +2376,14 @@ static void __exit cleanup_one_si(struct smi_info *to_clean)
2376 2376
2377 /* Wait for the timer to stop. This avoids problems with race 2377 /* Wait for the timer to stop. This avoids problems with race
2378 conditions removing the timer here. */ 2378 conditions removing the timer here. */
2379 while (! to_clean->timer_stopped) { 2379 while (!to_clean->timer_stopped)
2380 set_current_state(TASK_UNINTERRUPTIBLE); 2380 schedule_timeout_uninterruptible(1);
2381 schedule_timeout(1);
2382 }
2383 2381
2384 /* Interrupts and timeouts are stopped, now make sure the 2382 /* Interrupts and timeouts are stopped, now make sure the
2385 interface is in a clean state. */ 2383 interface is in a clean state. */
2386 while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) { 2384 while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) {
2387 poll(to_clean); 2385 poll(to_clean);
2388 set_current_state(TASK_UNINTERRUPTIBLE); 2386 schedule_timeout_uninterruptible(1);
2389 schedule_timeout(1);
2390 } 2387 }
2391 2388
2392 rv = ipmi_unregister_smi(to_clean->intf); 2389 rv = ipmi_unregister_smi(to_clean->intf);