* modprobe ipmi_si hangs under 2.6.30-rc5
@ 2009-05-12 21:28 Ferenc Wagner
2009-05-17 0:09 ` Andrew Morton
0 siblings, 1 reply; 11+ messages in thread
From: Ferenc Wagner @ 2009-05-12 21:28 UTC (permalink / raw)
To: linux-kernel, openipmi-developer
Hi,
On a Dell PowerEdge 2650 2.6.30-rc5 can't load the ipmi_si module.
2.6.29 has no such problems:
[ 46.292160] IPMI System Interface driver.
[ 46.300321] ipmi_si: Trying SMBIOS-specified smic state machine at i/o address 0xecf4, slave address 0x20, irq 0
[ 46.408212] ipmi: Found new BMC (man_id: 0x0002a2, prod_id: 0x0000, dev_id: 0x00)
[ 46.423454] IPMI smic interface initialized
But under 2.6.30-rc5:
# modprobe ipmi_si bt_debug=7 smic_debug=7 kcs_debug=7
[ 867.851694] IPMI System Interface driver.
[ 867.859771] ipmi_si: Trying SMBIOS-specified smic state machine at i/o address 0xecf4, slave address 0x20, irq 0
[ 867.880250] start_smic_transaction - 18 01
[ 867.880263] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.880271] smic_event - state = 1, flags = 0x4c, status = 0xc0
[ 867.880278] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.884133] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.884142] smic_event - state = 2, flags = 0x4c, status = 0xc0
[ 867.884150] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.888117] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.888125] smic_event - state = 3, flags = 0x4c, status = 0xc1
[ 867.888133] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.892229] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.892245] smic_event - state = 5, flags = 0x0c, status = 0xc3
[ 867.892256] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.892270] smic_event - state = 6, flags = 0x0c, status = 0xc3
[ 867.896996] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.897008] smic_event - state = 6, flags = 0xcc, status = 0xc3
[ 867.897020] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.904022] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.904031] smic_event - state = 7, flags = 0xcc, status = 0xc4
[ 867.904038] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.908101] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.908109] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.908117] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.912129] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.912137] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.912145] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.916104] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.916112] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.916120] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.920106] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.920114] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.920121] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.924100] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.924108] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.924115] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.928115] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.928123] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.928130] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.932102] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.932110] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.932118] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.936111] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.936119] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.936127] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.940110] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.940118] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.940127] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.944123] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.944131] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.944139] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.948194] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.948205] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.948215] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.952111] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.952119] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.952127] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.956114] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.956121] smic_event - state = 8, flags = 0xcc, status = 0xc6
[ 867.956129] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.960112] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.960120] smic_event - state = 9, flags = 0x4c, status = 0xc0
[ 867.960126] smic_get result - 1c 01 00 00 00 03 38 01 3f a2 02 00 00 00
[ 867.960155] start_smic_transaction - 18 2f
[ 867.960164] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.960172] smic_event - state = 1, flags = 0x4c, status = 0xc0
[ 867.960179] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.964196] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.964204] smic_event - state = 2, flags = 0x4c, status = 0xc0
[ 867.964211] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.968106] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.968114] smic_event - state = 3, flags = 0x4c, status = 0xc1
[ 867.968122] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.972110] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.972118] smic_event - state = 5, flags = 0xcc, status = 0xc3
[ 867.972124] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.972130] smic_event - state = 6, flags = 0xcc, status = 0xc3
[ 867.972137] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.976133] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.976144] smic_event - state = 7, flags = 0xcc, status = 0xc4
[ 867.976155] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.981016] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.981024] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.981032] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.985138] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.985145] smic_event - state = 8, flags = 0xcc, status = 0xc5
[ 867.985153] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.989106] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.989114] smic_event - state = 8, flags = 0xcc, status = 0xc6
[ 867.989121] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.993115] smic_event - smic->smic_timeout = 2000000, time = 100
[ 867.993123] smic_event - state = 9, flags = 0x4c, status = 0xc0
[ 867.993129] smic_get result - 1c 2f 00 2c
[ 867.993141] start_smic_transaction - 18 30 08
[ 867.993351] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.993360] smic_event - state = 1, flags = 0x4c, status = 0xc0
[ 867.993367] smic_event - smic->smic_timeout = 2000000, time = 0
[...]
[ 867.996183] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.996190] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.996197] smic_event - state = 9, flags = 0x4c, status = 0xc0
[ 867.996203] smic_get result - 1c 30 00
[ 867.996215] smic_event - state = 0, flags = 0x4c, status = 0xc0
[ 867.996220] start_smic_transaction - 18 31
[ 867.996229] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.996236] smic_event - state = 1, flags = 0x4c, status = 0xc0
[ 867.996243] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.996250] smic_event - smic->smic_timeout = 2000000, time = 0
[ 867.996256] smic_event - smic->smic_timeout = 2000000, time = 0
[...]
This goes on through megabytes. The modprobe process didn't terminate
for 10 minutes, and there was some output like this (cleaned from
smic_events all around the place by hand):
INFO: task modprobe:6414 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
modprobe D f6805780 0 6414 4077
f48dfe68 00000082 00000000 f6805780
f48dfe48 f90271cf c046acc0 f64f6a0c
2002132c f6da1300 f6da14b4 c182acc0
00000002 f64f6a0c 186f5ef2 000000ca
f48dfe30 c0123c40 00000000 f64f69e0
f48dfe30 00000282 00000001 c032456c
Call Trace:
[<f90271cf>] ? i_ipmi_request+0x8f5/0x916 [ipmi_msghandler]
[<c0123c40>] ? check_preempt_wakeup+0x146/0x180
[<c01292c3>] ? try_to_wake_up+0x1f3/0x1fd
[<c011c70a>] ? default_spin_lock_flags+0x8/0xe
[<c031b81a>] schedule+0x8/0x17
[<f9028745>] ipmi_register_smi+0x3ca/0xba1 [ipmi_msghandler]
[<c028681c>] ? put_device+0xf/0x11
[<c028782a>] ? device_add+0x497/0x516
[<c013f2e7>] ? autoremove_wake_function+0x0/0x33
[<fc2d939c>] try_smi_init+0x58f/0x726 [ipmi_si]
[<fc2dc3e5>] init_ipmi_si+0x3e2/0x748 [ipmi_si]
[<c010304f>] do_one_initcall+0x4a/0x115
[<fc2dc003>] ? init_ipmi_si+0x0/0x748 [ipmi_si]
[<c0142c0b>] ? __blocking_notifier_call_chain+0x40/0x4c
[<c014ff97>] sys_init_module+0x87/0x18b
[<c0107c94>] sysenter_do_call+0x12/0x28
lspci -x of Class ff00:
00:04.0 Class ff00: Dell Embedded Remote Access or ERA/O
00: 28 10 0c 00 17 01 90 02 00 00 00 ff 10 20 80 00
10: 08 00 b8 fe f9 ec 00 00 e9 ec 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 28 10 0c 00
30: 00 00 00 fe 48 00 00 00 00 00 00 00 0b 01 00 00
00:04.1 Class ff00: Dell Remote Access Card III
00: 28 10 08 00 03 01 90 02 00 00 00 ff 10 20 80 00
10: 00 20 10 fe 81 ec 00 00 08 00 b0 fe 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 28 10 08 00
30: 00 00 00 00 48 00 00 00 00 00 00 00 0a 02 00 00
00:04.2 Class ff00: Dell Embedded Remote Access: BMC/SMIC device
00: 28 10 0d 00 03 01 90 02 00 00 00 ff 10 20 80 00
10: f5 ec 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 28 10 0d 00
30: 00 00 00 00 48 00 00 00 00 00 00 00 07 03 00 00
lspci -nv of the same:
00:04.0 ff00: 1028:000c
Subsystem: 1028:000c
Flags: bus master, medium devsel, latency 32, IRQ 11
Memory at feb80000 (32-bit, prefetchable) [size=4K]
I/O ports at ecf8 [size=8]
I/O ports at ece8 [size=8]
Expansion ROM at fe000000 [disabled] [size=64K]
Capabilities: [48] Power Management version 2
00:04.1 ff00: 1028:0008
Subsystem: 1028:0008
Flags: medium devsel, IRQ 23
Memory at fe102000 (32-bit, non-prefetchable) [size=4K]
I/O ports at ec80 [size=64]
Memory at feb00000 (32-bit, prefetchable) [size=512K]
Capabilities: [48] Power Management version 2
Kernel driver in use: serial
00:04.2 ff00: 1028:000d
Subsystem: 1028:000d
Flags: medium devsel, IRQ 7
I/O ports at ecf4 [size=4]
Capabilities: [48] Power Management version 2
--
Regards,
Feri.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-12 21:28 modprobe ipmi_si hangs under 2.6.30-rc5 Ferenc Wagner
@ 2009-05-17 0:09 ` Andrew Morton
2009-05-18 17:33 ` Ferenc Wagner
0 siblings, 1 reply; 11+ messages in thread
From: Andrew Morton @ 2009-05-17 0:09 UTC (permalink / raw)
To: Ferenc Wagner
Cc: linux-kernel, openipmi-developer, Corey Minyard, dann frazier
[-- Attachment #1: Type: text/plain, Size: 2719 bytes --]
On Tue, 12 May 2009 23:28:59 +0200 Ferenc Wagner <wferi@niif.hu> wrote:
> Hi,
>
> On a Dell PowerEdge 2650 2.6.30-rc5 can't load the ipmi_si module.
> 2.6.29 has no such problems:
>
> [ 46.292160] IPMI System Interface driver.
> [ 46.300321] ipmi_si: Trying SMBIOS-specified smic state machine at i/o address 0xecf4, slave address 0x20, irq 0
> [ 46.408212] ipmi: Found new BMC (man_id: 0x0002a2, prod_id: 0x0000, dev_id: 0x00)
> [ 46.423454] IPMI smic interface initialized
>
> But under 2.6.30-rc5:
>
> # modprobe ipmi_si bt_debug=7 smic_debug=7 kcs_debug=7
>
> [ 867.851694] IPMI System Interface driver.
> [ 867.859771] ipmi_si: Trying SMBIOS-specified smic state machine at i/o address 0xecf4, slave address 0x20, irq 0
> [ 867.880250] start_smic_transaction - 18 01
> [ 867.880263] smic_event - smic->smic_timeout = 2000000, time = 0
> ...
>
> [ 867.996243] smic_event - smic->smic_timeout = 2000000, time = 0
> [ 867.996250] smic_event - smic->smic_timeout = 2000000, time = 0
> [ 867.996256] smic_event - smic->smic_timeout = 2000000, time = 0
> [...]
>
>
> This goes on through megabytes. The modprobe process didn't terminate
> for 10 minutes, and there was some output like this (cleaned from
> smic_events all around the place by hand):
>
> INFO: task modprobe:6414 blocked for more than 120 seconds.
> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> modprobe D f6805780 0 6414 4077
> f48dfe68 00000082 00000000 f6805780
> f48dfe48 f90271cf c046acc0 f64f6a0c
> 2002132c f6da1300 f6da14b4 c182acc0
> 00000002 f64f6a0c 186f5ef2 000000ca
> f48dfe30 c0123c40 00000000 f64f69e0
> f48dfe30 00000282 00000001 c032456c
> Call Trace:
> [<f90271cf>] ? i_ipmi_request+0x8f5/0x916 [ipmi_msghandler]
> [<c0123c40>] ? check_preempt_wakeup+0x146/0x180
> [<c01292c3>] ? try_to_wake_up+0x1f3/0x1fd
> [<c011c70a>] ? default_spin_lock_flags+0x8/0xe
> [<c031b81a>] schedule+0x8/0x17
> [<f9028745>] ipmi_register_smi+0x3ca/0xba1 [ipmi_msghandler]
> [<c028681c>] ? put_device+0xf/0x11
> [<c028782a>] ? device_add+0x497/0x516
> [<c013f2e7>] ? autoremove_wake_function+0x0/0x33
> [<fc2d939c>] try_smi_init+0x58f/0x726 [ipmi_si]
> [<fc2dc3e5>] init_ipmi_si+0x3e2/0x748 [ipmi_si]
> [<c010304f>] do_one_initcall+0x4a/0x115
> [<fc2dc003>] ? init_ipmi_si+0x0/0x748 [ipmi_si]
> [<c0142c0b>] ? __blocking_notifier_call_chain+0x40/0x4c
> [<c014ff97>] sys_init_module+0x87/0x18b
> [<c0107c94>] sysenter_do_call+0x12/0x28
>
Well there have only been a handful of changes to ipmi since 2.6.29.
Could you try a mini-bisection?
Apply revert-1.patch, test
Apply revert-2.patch, test
Apply revert-3.patch, test
Apply revert-4.patch, test
Attached.
Thanks.
[-- Attachment #2: revert-1.patch --]
[-- Type: application/octet-stream, Size: 6339 bytes --]
From: Andrew Morton <akpm@linux-foundation.org>
commit 4dec302ff71ebf48f5784a2d2fc5e3745e6d4d52
Author: dann frazier <dannf@hp.com>
Date: Tue Apr 21 12:24:05 2009 -0700
ipmi: add oem message handling
Enable userspace to receive messages that a BMC transmits using an OEM
medium. This is used by the HP iLO2.
Based on code originally written by Patrick Schoeller.
Signed-off-by: dann frazier <dannf@hp.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/char/ipmi/ipmi_msghandler.c | 138 --------------------------
include/linux/ipmi.h | 2
include/linux/ipmi_msgdefs.h | 2
3 files changed, 5 insertions(+), 137 deletions(-)
diff -puN drivers/char/ipmi/ipmi_msghandler.c~revert-1 drivers/char/ipmi/ipmi_msghandler.c
--- a/drivers/char/ipmi/ipmi_msghandler.c~revert-1
+++ a/drivers/char/ipmi/ipmi_msghandler.c
@@ -3284,114 +3284,6 @@ static int handle_lan_get_msg_cmd(ipmi_s
return rv;
}
-/*
- * This routine will handle "Get Message" command responses with
- * channels that use an OEM Medium. The message format belongs to
- * the OEM. See IPMI 2.0 specification, Chapter 6 and
- * Chapter 22, sections 22.6 and 22.24 for more details.
- */
-static int handle_oem_get_msg_cmd(ipmi_smi_t intf,
- struct ipmi_smi_msg *msg)
-{
- struct cmd_rcvr *rcvr;
- int rv = 0;
- unsigned char netfn;
- unsigned char cmd;
- unsigned char chan;
- ipmi_user_t user = NULL;
- struct ipmi_system_interface_addr *smi_addr;
- struct ipmi_recv_msg *recv_msg;
-
- /*
- * We expect the OEM SW to perform error checking
- * so we just do some basic sanity checks
- */
- if (msg->rsp_size < 4) {
- /* Message not big enough, just ignore it. */
- ipmi_inc_stat(intf, invalid_commands);
- return 0;
- }
-
- if (msg->rsp[2] != 0) {
- /* An error getting the response, just ignore it. */
- return 0;
- }
-
- /*
- * This is an OEM Message so the OEM needs to know how
- * handle the message. We do no interpretation.
- */
- netfn = msg->rsp[0] >> 2;
- cmd = msg->rsp[1];
- chan = msg->rsp[3] & 0xf;
-
- rcu_read_lock();
- rcvr = find_cmd_rcvr(intf, netfn, cmd, chan);
- if (rcvr) {
- user = rcvr->user;
- kref_get(&user->refcount);
- } else
- user = NULL;
- rcu_read_unlock();
-
- if (user == NULL) {
- /* We didn't find a user, just give up. */
- ipmi_inc_stat(intf, unhandled_commands);
-
- /*
- * Don't do anything with these messages, just allow
- * them to be freed.
- */
-
- rv = 0;
- } else {
- /* Deliver the message to the user. */
- ipmi_inc_stat(intf, handled_commands);
-
- recv_msg = ipmi_alloc_recv_msg();
- if (!recv_msg) {
- /*
- * We couldn't allocate memory for the
- * message, so requeue it for handling
- * later.
- */
- rv = 1;
- kref_put(&user->refcount, free_user);
- } else {
- /*
- * OEM Messages are expected to be delivered via
- * the system interface to SMS software. We might
- * need to visit this again depending on OEM
- * requirements
- */
- smi_addr = ((struct ipmi_system_interface_addr *)
- &(recv_msg->addr));
- smi_addr->addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;
- smi_addr->channel = IPMI_BMC_CHANNEL;
- smi_addr->lun = msg->rsp[0] & 3;
-
- recv_msg->user = user;
- recv_msg->user_msg_data = NULL;
- recv_msg->recv_type = IPMI_OEM_RECV_TYPE;
- recv_msg->msg.netfn = msg->rsp[0] >> 2;
- recv_msg->msg.cmd = msg->rsp[1];
- recv_msg->msg.data = recv_msg->msg_data;
-
- /*
- * The message starts at byte 4 which follows the
- * the Channel Byte in the "GET MESSAGE" command
- */
- recv_msg->msg.data_len = msg->rsp_size - 4;
- memcpy(recv_msg->msg_data,
- &(msg->rsp[4]),
- msg->rsp_size - 4);
- deliver_response(recv_msg);
- }
- }
-
- return rv;
-}
-
static void copy_event_into_recv_msg(struct ipmi_recv_msg *recv_msg,
struct ipmi_smi_msg *msg)
{
@@ -3647,17 +3539,6 @@ static int handle_new_recv_msg(ipmi_smi_
goto out;
}
- /*
- ** We need to make sure the channels have been initialized.
- ** The channel_handler routine will set the "curr_channel"
- ** equal to or greater than IPMI_MAX_CHANNELS when all the
- ** channels for this interface have been initialized.
- */
- if (intf->curr_channel < IPMI_MAX_CHANNELS) {
- requeue = 1; /* Just put the message back for now */
- goto out;
- }
-
switch (intf->channels[chan].medium) {
case IPMI_CHANNEL_MEDIUM_IPMB:
if (msg->rsp[4] & 0x04) {
@@ -3693,20 +3574,11 @@ static int handle_new_recv_msg(ipmi_smi_
break;
default:
- /* Check for OEM Channels. Clients had better
- register for these commands. */
- if ((intf->channels[chan].medium
- >= IPMI_CHANNEL_MEDIUM_OEM_MIN)
- && (intf->channels[chan].medium
- <= IPMI_CHANNEL_MEDIUM_OEM_MAX)) {
- requeue = handle_oem_get_msg_cmd(intf, msg);
- } else {
- /*
- * We don't handle the channel type, so just
- * free the message.
- */
- requeue = 0;
- }
+ /*
+ * We don't handle the channel type, so just
+ * free the message.
+ */
+ requeue = 0;
}
} else if ((msg->rsp[0] == ((IPMI_NETFN_APP_REQUEST|1) << 2))
diff -puN include/linux/ipmi.h~revert-1 include/linux/ipmi.h
--- a/include/linux/ipmi.h~revert-1
+++ a/include/linux/ipmi.h
@@ -198,8 +198,6 @@ struct kernel_ipmi_msg {
response. When you send a
response message, this will
be returned. */
-#define IPMI_OEM_RECV_TYPE 5 /* The response for OEM Channels */
-
/* Note that async events and received commands do not have a completion
code as the first byte of the incoming data, unlike a response. */
diff -puN include/linux/ipmi_msgdefs.h~revert-1 include/linux/ipmi_msgdefs.h
--- a/include/linux/ipmi_msgdefs.h~revert-1
+++ a/include/linux/ipmi_msgdefs.h
@@ -115,7 +115,5 @@
#define IPMI_CHANNEL_MEDIUM_USB1 10
#define IPMI_CHANNEL_MEDIUM_USB2 11
#define IPMI_CHANNEL_MEDIUM_SYSINTF 12
-#define IPMI_CHANNEL_MEDIUM_OEM_MIN 0x60
-#define IPMI_CHANNEL_MEDIUM_OEM_MAX 0x7f
#endif /* __LINUX_IPMI_MSGDEFS_H */
_
[-- Attachment #3: revert-2.patch --]
[-- Type: application/octet-stream, Size: 7181 bytes --]
From: Andrew Morton <akpm@linux-foundation.org>
commit 25176ed670121e1e0aae5c8161713c332b786538
Author: Corey Minyard <cminyard@mvista.com>
Date: Tue Apr 21 12:24:04 2009 -0700
ipmi: fix statistics counting issues
Bela Lubkin noticed that the statistics for send IPMB and LAN commands
in the IPMI driver could be incremented even if an error occurred. Move
the increments to the proper place to avoid this.
Also add some statistics for retransmissions that failed, and some little
helper functions to neaten up the code a little.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Bela Lubkin <blubkin@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/char/ipmi/ipmi_msghandler.c | 73 +++++++-------------------
1 file changed, 22 insertions(+), 51 deletions(-)
diff -puN drivers/char/ipmi/ipmi_msghandler.c~revert-2 drivers/char/ipmi/ipmi_msghandler.c
--- a/drivers/char/ipmi/ipmi_msghandler.c~revert-2
+++ a/drivers/char/ipmi/ipmi_msghandler.c
@@ -285,11 +285,6 @@ enum ipmi_stat_indexes {
/* Events that were received with the proper format. */
IPMI_STAT_events,
- /* Retransmissions on IPMB that failed. */
- IPMI_STAT_dropped_rexmit_ipmb_commands,
-
- /* Retransmissions on LAN that failed. */
- IPMI_STAT_dropped_rexmit_lan_commands,
/* This *must* remain last, add new values above this. */
IPMI_NUM_STATS
@@ -450,20 +445,6 @@ static DEFINE_MUTEX(smi_watchers_mutex);
#define ipmi_get_stat(intf, stat) \
((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
-static int is_lan_addr(struct ipmi_addr *addr)
-{
- return addr->addr_type == IPMI_LAN_ADDR_TYPE;
-}
-
-static int is_ipmb_addr(struct ipmi_addr *addr)
-{
- return addr->addr_type == IPMI_IPMB_ADDR_TYPE;
-}
-
-static int is_ipmb_bcast_addr(struct ipmi_addr *addr)
-{
- return addr->addr_type == IPMI_IPMB_BROADCAST_ADDR_TYPE;
-}
static void free_recv_msg_list(struct list_head *q)
{
@@ -620,7 +601,8 @@ ipmi_addr_equal(struct ipmi_addr *addr1,
return (smi_addr1->lun == smi_addr2->lun);
}
- if (is_ipmb_addr(addr1) || is_ipmb_bcast_addr(addr1)) {
+ if ((addr1->addr_type == IPMI_IPMB_ADDR_TYPE)
+ || (addr1->addr_type == IPMI_IPMB_BROADCAST_ADDR_TYPE)) {
struct ipmi_ipmb_addr *ipmb_addr1
= (struct ipmi_ipmb_addr *) addr1;
struct ipmi_ipmb_addr *ipmb_addr2
@@ -630,7 +612,7 @@ ipmi_addr_equal(struct ipmi_addr *addr1,
&& (ipmb_addr1->lun == ipmb_addr2->lun));
}
- if (is_lan_addr(addr1)) {
+ if (addr1->addr_type == IPMI_LAN_ADDR_TYPE) {
struct ipmi_lan_addr *lan_addr1
= (struct ipmi_lan_addr *) addr1;
struct ipmi_lan_addr *lan_addr2
@@ -662,13 +644,14 @@ int ipmi_validate_addr(struct ipmi_addr
|| (addr->channel < 0))
return -EINVAL;
- if (is_ipmb_addr(addr) || is_ipmb_bcast_addr(addr)) {
+ if ((addr->addr_type == IPMI_IPMB_ADDR_TYPE)
+ || (addr->addr_type == IPMI_IPMB_BROADCAST_ADDR_TYPE)) {
if (len < sizeof(struct ipmi_ipmb_addr))
return -EINVAL;
return 0;
}
- if (is_lan_addr(addr)) {
+ if (addr->addr_type == IPMI_LAN_ADDR_TYPE) {
if (len < sizeof(struct ipmi_lan_addr))
return -EINVAL;
return 0;
@@ -1520,7 +1503,8 @@ static int i_ipmi_request(ipmi_user_t
memcpy(&(smi_msg->data[2]), msg->data, msg->data_len);
smi_msg->data_size = msg->data_len + 2;
ipmi_inc_stat(intf, sent_local_commands);
- } else if (is_ipmb_addr(addr) || is_ipmb_bcast_addr(addr)) {
+ } else if ((addr->addr_type == IPMI_IPMB_ADDR_TYPE)
+ || (addr->addr_type == IPMI_IPMB_BROADCAST_ADDR_TYPE)) {
struct ipmi_ipmb_addr *ipmb_addr;
unsigned char ipmb_seq;
long seqid;
@@ -1599,6 +1583,8 @@ static int i_ipmi_request(ipmi_user_t
spin_lock_irqsave(&(intf->seq_lock), flags);
+ ipmi_inc_stat(intf, sent_ipmb_commands);
+
/*
* Create a sequence number with a 1 second
* timeout and 4 retries.
@@ -1620,8 +1606,6 @@ static int i_ipmi_request(ipmi_user_t
goto out_err;
}
- ipmi_inc_stat(intf, sent_ipmb_commands);
-
/*
* Store the sequence number in the message,
* so that when the send message response
@@ -1651,7 +1635,7 @@ static int i_ipmi_request(ipmi_user_t
*/
spin_unlock_irqrestore(&(intf->seq_lock), flags);
}
- } else if (is_lan_addr(addr)) {
+ } else if (addr->addr_type == IPMI_LAN_ADDR_TYPE) {
struct ipmi_lan_addr *lan_addr;
unsigned char ipmb_seq;
long seqid;
@@ -1712,6 +1696,8 @@ static int i_ipmi_request(ipmi_user_t
spin_lock_irqsave(&(intf->seq_lock), flags);
+ ipmi_inc_stat(intf, sent_lan_commands);
+
/*
* Create a sequence number with a 1 second
* timeout and 4 retries.
@@ -1733,8 +1719,6 @@ static int i_ipmi_request(ipmi_user_t
goto out_err;
}
- ipmi_inc_stat(intf, sent_lan_commands);
-
/*
* Store the sequence number in the message,
* so that when the send message response
@@ -1953,10 +1937,6 @@ static int stat_file_read_proc(char *pag
ipmi_get_stat(intf, invalid_events));
out += sprintf(out, "events: %u\n",
ipmi_get_stat(intf, events));
- out += sprintf(out, "failed rexmit LAN msgs: %u\n",
- ipmi_get_stat(intf, dropped_rexmit_lan_commands));
- out += sprintf(out, "failed rexmit IPMB msgs: %u\n",
- ipmi_get_stat(intf, dropped_rexmit_ipmb_commands));
return (out - ((char *) page));
}
@@ -3750,7 +3730,7 @@ static void check_msg_timeout(ipmi_smi_t
list_add_tail(&msg->link, timeouts);
if (ent->broadcast)
ipmi_inc_stat(intf, timed_out_ipmb_broadcasts);
- else if (is_lan_addr(&ent->recv_msg->addr))
+ else if (ent->recv_msg->addr.addr_type == IPMI_LAN_ADDR_TYPE)
ipmi_inc_stat(intf, timed_out_lan_commands);
else
ipmi_inc_stat(intf, timed_out_ipmb_commands);
@@ -3764,17 +3744,15 @@ static void check_msg_timeout(ipmi_smi_t
*/
ent->timeout = MAX_MSG_TIMEOUT;
ent->retries_left--;
+ if (ent->recv_msg->addr.addr_type == IPMI_LAN_ADDR_TYPE)
+ ipmi_inc_stat(intf, retransmitted_lan_commands);
+ else
+ ipmi_inc_stat(intf, retransmitted_ipmb_commands);
+
smi_msg = smi_from_recv_msg(intf, ent->recv_msg, slot,
ent->seqid);
- if (!smi_msg) {
- if (is_lan_addr(&ent->recv_msg->addr))
- ipmi_inc_stat(intf,
- dropped_rexmit_lan_commands);
- else
- ipmi_inc_stat(intf,
- dropped_rexmit_ipmb_commands);
+ if (!smi_msg)
return;
- }
spin_unlock_irqrestore(&intf->seq_lock, *flags);
@@ -3786,17 +3764,10 @@ static void check_msg_timeout(ipmi_smi_t
* resent.
*/
handlers = intf->handlers;
- if (handlers) {
- if (is_lan_addr(&ent->recv_msg->addr))
- ipmi_inc_stat(intf,
- retransmitted_lan_commands);
- else
- ipmi_inc_stat(intf,
- retransmitted_ipmb_commands);
-
+ if (handlers)
intf->handlers->sender(intf->send_info,
smi_msg, 0);
- } else
+ else
ipmi_free_smi_msg(smi_msg);
spin_lock_irqsave(&intf->seq_lock, *flags);
_
[-- Attachment #4: revert-3.patch --]
[-- Type: application/octet-stream, Size: 7500 bytes --]
From: Andrew Morton <akpm@linux-foundation.org>
commit 40112ae7504745799e75ef418057f0d2cb745050
Author: Corey Minyard <minyard@acm.org>
Date: Tue Apr 21 12:24:03 2009 -0700
ipmi: test for event buffer before using
The IPMI driver would attempt to use the event buffer even if that
didn't exist on the BMC. This patch modified the IPMI driver to check
for the event buffer's existence before trying to use it.
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/char/ipmi/ipmi_si_intf.c | 148 +++++------------------------
include/linux/ipmi_msgdefs.h | 6 -
2 files changed, 29 insertions(+), 125 deletions(-)
diff -puN drivers/char/ipmi/ipmi_si_intf.c~revert-3 drivers/char/ipmi/ipmi_si_intf.c
--- a/drivers/char/ipmi/ipmi_si_intf.c~revert-3
+++ a/drivers/char/ipmi/ipmi_si_intf.c
@@ -82,6 +82,12 @@
#define SI_SHORT_TIMEOUT_USEC 250 /* .25ms when the SM request a
short timeout */
+/* Bit for BMC global enables. */
+#define IPMI_BMC_RCV_MSG_INTR 0x01
+#define IPMI_BMC_EVT_MSG_INTR 0x02
+#define IPMI_BMC_EVT_MSG_BUFF 0x04
+#define IPMI_BMC_SYS_LOG 0x08
+
enum si_intf_state {
SI_NORMAL,
SI_GETTING_FLAGS,
@@ -214,9 +220,6 @@ struct smi_info {
OEM2_DATA_AVAIL)
unsigned char msg_flags;
- /* Does the BMC have an event buffer? */
- char has_event_buffer;
-
/*
* If set to true, this will request events the next time the
* state machine is idle.
@@ -965,8 +968,7 @@ static void request_events(void *send_in
{
struct smi_info *smi_info = send_info;
- if (atomic_read(&smi_info->stop_operation) ||
- !smi_info->has_event_buffer)
+ if (atomic_read(&smi_info->stop_operation))
return;
atomic_set(&smi_info->req_events, 1);
@@ -2405,38 +2407,13 @@ static struct of_platform_driver ipmi_of
};
#endif /* CONFIG_PPC_OF */
-static int wait_for_msg_done(struct smi_info *smi_info)
-{
- enum si_sm_result smi_result;
-
- smi_result = smi_info->handlers->event(smi_info->si_sm, 0);
- for (;;) {
- if (smi_result == SI_SM_CALL_WITH_DELAY ||
- smi_result == SI_SM_CALL_WITH_TICK_DELAY) {
- schedule_timeout_uninterruptible(1);
- smi_result = smi_info->handlers->event(
- smi_info->si_sm, 100);
- } else if (smi_result == SI_SM_CALL_WITHOUT_DELAY) {
- smi_result = smi_info->handlers->event(
- smi_info->si_sm, 0);
- } else
- break;
- }
- if (smi_result == SI_SM_HOSED)
- /*
- * We couldn't get the state machine to run, so whatever's at
- * the port is probably not an IPMI SMI interface.
- */
- return -ENODEV;
-
- return 0;
-}
static int try_get_dev_id(struct smi_info *smi_info)
{
unsigned char msg[2];
unsigned char *resp;
unsigned long resp_len;
+ enum si_sm_result smi_result;
int rv = 0;
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
@@ -2451,98 +2428,35 @@ static int try_get_dev_id(struct smi_inf
msg[1] = IPMI_GET_DEVICE_ID_CMD;
smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
- rv = wait_for_msg_done(smi_info);
- if (rv)
- goto out;
-
- resp_len = smi_info->handlers->get_result(smi_info->si_sm,
- resp, IPMI_MAX_MSG_LENGTH);
-
- /* Check and record info from the get device id, in case we need it. */
- rv = ipmi_demangle_device_id(resp, resp_len, &smi_info->device_id);
-
- out:
- kfree(resp);
- return rv;
-}
-
-static int try_enable_event_buffer(struct smi_info *smi_info)
-{
- unsigned char msg[3];
- unsigned char *resp;
- unsigned long resp_len;
- int rv = 0;
-
- resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
- if (!resp)
- return -ENOMEM;
-
- msg[0] = IPMI_NETFN_APP_REQUEST << 2;
- msg[1] = IPMI_GET_BMC_GLOBAL_ENABLES_CMD;
- smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
-
- rv = wait_for_msg_done(smi_info);
- if (rv) {
- printk(KERN_WARNING
- "ipmi_si: Error getting response from get global,"
- " enables command, the event buffer is not"
- " enabled.\n");
- goto out;
- }
-
- resp_len = smi_info->handlers->get_result(smi_info->si_sm,
- resp, IPMI_MAX_MSG_LENGTH);
-
- if (resp_len < 4 ||
- resp[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 ||
- resp[1] != IPMI_GET_BMC_GLOBAL_ENABLES_CMD ||
- resp[2] != 0) {
- printk(KERN_WARNING
- "ipmi_si: Invalid return from get global"
- " enables command, cannot enable the event"
- " buffer.\n");
- rv = -EINVAL;
- goto out;
+ smi_result = smi_info->handlers->event(smi_info->si_sm, 0);
+ for (;;) {
+ if (smi_result == SI_SM_CALL_WITH_DELAY ||
+ smi_result == SI_SM_CALL_WITH_TICK_DELAY) {
+ schedule_timeout_uninterruptible(1);
+ smi_result = smi_info->handlers->event(
+ smi_info->si_sm, 100);
+ } else if (smi_result == SI_SM_CALL_WITHOUT_DELAY) {
+ smi_result = smi_info->handlers->event(
+ smi_info->si_sm, 0);
+ } else
+ break;
}
-
- if (resp[3] & IPMI_BMC_EVT_MSG_BUFF)
- /* buffer is already enabled, nothing to do. */
- goto out;
-
- msg[0] = IPMI_NETFN_APP_REQUEST << 2;
- msg[1] = IPMI_SET_BMC_GLOBAL_ENABLES_CMD;
- msg[2] = resp[3] | IPMI_BMC_EVT_MSG_BUFF;
- smi_info->handlers->start_transaction(smi_info->si_sm, msg, 3);
-
- rv = wait_for_msg_done(smi_info);
- if (rv) {
- printk(KERN_WARNING
- "ipmi_si: Error getting response from set global,"
- " enables command, the event buffer is not"
- " enabled.\n");
+ if (smi_result == SI_SM_HOSED) {
+ /*
+ * We couldn't get the state machine to run, so whatever's at
+ * the port is probably not an IPMI SMI interface.
+ */
+ rv = -ENODEV;
goto out;
}
+ /* Otherwise, we got some data. */
resp_len = smi_info->handlers->get_result(smi_info->si_sm,
resp, IPMI_MAX_MSG_LENGTH);
- if (resp_len < 3 ||
- resp[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 ||
- resp[1] != IPMI_SET_BMC_GLOBAL_ENABLES_CMD) {
- printk(KERN_WARNING
- "ipmi_si: Invalid return from get global,"
- "enables command, not enable the event"
- " buffer.\n");
- rv = -EINVAL;
- goto out;
- }
+ /* Check and record info from the get device id, in case we need it. */
+ rv = ipmi_demangle_device_id(resp, resp_len, &smi_info->device_id);
- if (resp[2] != 0)
- /*
- * An error when setting the event buffer bit means
- * that the event buffer is not supported.
- */
- rv = -ENOENT;
out:
kfree(resp);
return rv;
@@ -2933,10 +2847,6 @@ static int try_smi_init(struct smi_info
new_smi->intf_num = smi_num;
smi_num++;
- rv = try_enable_event_buffer(new_smi);
- if (rv == 0)
- new_smi->has_event_buffer = 1;
-
/*
* Start clearing the flags before we enable interrupts or the
* timer to avoid racing with the timer.
diff -puN include/linux/ipmi_msgdefs.h~revert-3 include/linux/ipmi_msgdefs.h
--- a/include/linux/ipmi_msgdefs.h~revert-3
+++ a/include/linux/ipmi_msgdefs.h
@@ -58,12 +58,6 @@
#define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35
#define IPMI_GET_CHANNEL_INFO_CMD 0x42
-/* Bit for BMC global enables. */
-#define IPMI_BMC_RCV_MSG_INTR 0x01
-#define IPMI_BMC_EVT_MSG_INTR 0x02
-#define IPMI_BMC_EVT_MSG_BUFF 0x04
-#define IPMI_BMC_SYS_LOG 0x08
-
#define IPMI_NETFN_STORAGE_REQUEST 0x0a
#define IPMI_NETFN_STORAGE_RESPONSE 0x0b
#define IPMI_ADD_SEL_ENTRY_CMD 0x44
_
[-- Attachment #5: revert-4.patch --]
[-- Type: application/octet-stream, Size: 1149 bytes --]
From: Andrew Morton <akpm@linux-foundation.org>
commit 8b32b5d0dca2f5ab632e8bedcd57fe4c109c13fe
Author: Corey Minyard <minyard@acm.org>
Date: Tue Apr 21 12:24:02 2009 -0700
ipmi: fix platform return check
The wrong return value is being tested when allocating a platform device
in the IPMI SI code. Check the right value.
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/char/ipmi/ipmi_si_intf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/char/ipmi/ipmi_si_intf.c~revert-4 drivers/char/ipmi/ipmi_si_intf.c
--- a/drivers/char/ipmi/ipmi_si_intf.c~revert-4
+++ a/drivers/char/ipmi/ipmi_si_intf.c
@@ -2863,7 +2863,7 @@ static int try_smi_init(struct smi_info
*/
new_smi->pdev = platform_device_alloc("ipmi_si",
new_smi->intf_num);
- if (!new_smi->pdev) {
+ if (rv) {
printk(KERN_ERR
"ipmi_si_intf:"
" Unable to allocate platform device\n");
_
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-17 0:09 ` Andrew Morton
@ 2009-05-18 17:33 ` Ferenc Wagner
2009-05-18 18:40 ` [Openipmi-developer] " Corey Minyard
0 siblings, 1 reply; 11+ messages in thread
From: Ferenc Wagner @ 2009-05-18 17:33 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, openipmi-developer, Corey Minyard, dann frazier
[-- Attachment #1: Type: text/plain, Size: 3355 bytes --]
Andrew Morton <akpm@linux-foundation.org> writes:
> On Tue, 12 May 2009 23:28:59 +0200 Ferenc Wagner <wferi@niif.hu> wrote:
>
>> On a Dell PowerEdge 2650 2.6.30-rc5 can't load the ipmi_si module.
>> 2.6.29 has no such problems:
>>
>> [ 46.292160] IPMI System Interface driver.
>> [ 46.300321] ipmi_si: Trying SMBIOS-specified smic state machine at i/o address 0xecf4, slave address 0x20, irq 0
>> [ 46.408212] ipmi: Found new BMC (man_id: 0x0002a2, prod_id: 0x0000, dev_id: 0x00)
>> [ 46.423454] IPMI smic interface initialized
>>
>> But under 2.6.30-rc5:
>>
>> # modprobe ipmi_si bt_debug=7 smic_debug=7 kcs_debug=7
>>
>> [ 867.851694] IPMI System Interface driver.
>> [ 867.859771] ipmi_si: Trying SMBIOS-specified smic state machine at i/o address 0xecf4, slave address 0x20, irq 0
>> [ 867.880250] start_smic_transaction - 18 01
>> [ 867.880263] smic_event - smic->smic_timeout = 2000000, time = 0
>> ...
>>
>> [ 867.996243] smic_event - smic->smic_timeout = 2000000, time = 0
>> [ 867.996250] smic_event - smic->smic_timeout = 2000000, time = 0
>> [ 867.996256] smic_event - smic->smic_timeout = 2000000, time = 0
>> [...]
>>
>>
>> This goes on through megabytes. The modprobe process didn't terminate
>> for 10 minutes, and there was some output like this (cleaned from
>> smic_events all around the place by hand):
>>
>> INFO: task modprobe:6414 blocked for more than 120 seconds.
>> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
>> modprobe D f6805780 0 6414 4077
>> f48dfe68 00000082 00000000 f6805780
>> f48dfe48 f90271cf c046acc0 f64f6a0c
>> 2002132c f6da1300 f6da14b4 c182acc0
>> 00000002 f64f6a0c 186f5ef2 000000ca
>> f48dfe30 c0123c40 00000000 f64f69e0
>> f48dfe30 00000282 00000001 c032456c
>> Call Trace:
>> [<f90271cf>] ? i_ipmi_request+0x8f5/0x916 [ipmi_msghandler]
>> [<c0123c40>] ? check_preempt_wakeup+0x146/0x180
>> [<c01292c3>] ? try_to_wake_up+0x1f3/0x1fd
>> [<c011c70a>] ? default_spin_lock_flags+0x8/0xe
>> [<c031b81a>] schedule+0x8/0x17
>> [<f9028745>] ipmi_register_smi+0x3ca/0xba1 [ipmi_msghandler]
>> [<c028681c>] ? put_device+0xf/0x11
>> [<c028782a>] ? device_add+0x497/0x516
>> [<c013f2e7>] ? autoremove_wake_function+0x0/0x33
>> [<fc2d939c>] try_smi_init+0x58f/0x726 [ipmi_si]
>> [<fc2dc3e5>] init_ipmi_si+0x3e2/0x748 [ipmi_si]
>> [<c010304f>] do_one_initcall+0x4a/0x115
>> [<fc2dc003>] ? init_ipmi_si+0x0/0x748 [ipmi_si]
>> [<c0142c0b>] ? __blocking_notifier_call_chain+0x40/0x4c
>> [<c014ff97>] sys_init_module+0x87/0x18b
>> [<c0107c94>] sysenter_do_call+0x12/0x28
>>
>
> Well there have only been a handful of changes to ipmi since 2.6.29.
> Could you try a mini-bisection?
>
> Apply revert-1.patch, test
> Apply revert-2.patch, test
> Apply revert-3.patch, test
> Apply revert-4.patch, test
After applying revert-1.patch, modprobe runs OK:
[ 86.968156] IPMI System Interface driver.
[ 86.976276] ipmi_si: Trying SMBIOS-specified smic state machine at i/o address 0xecf4, slave address 0x20, irq 0
[ 87.117630] ipmi: Found new BMC (man_id: 0x0002a2, prod_id: 0x0000, dev_id: 0x00)
[ 87.133078] IPMI smic interface initialized
I guess there's no point in trying the rest.
When loading with debug options, it still produces insane amount of
debug messages continuously (first 671 lines of it attached).
--
Regards,
Feri.
[-- Attachment #2: revert1.log.gz --]
[-- Type: application/octet-stream, Size: 3394 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Openipmi-developer] modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-18 17:33 ` Ferenc Wagner
@ 2009-05-18 18:40 ` Corey Minyard
2009-05-19 6:26 ` Ferenc Wagner
0 siblings, 1 reply; 11+ messages in thread
From: Corey Minyard @ 2009-05-18 18:40 UTC (permalink / raw)
To: Ferenc Wagner; +Cc: Andrew Morton, openipmi-developer, linux-kernel
On Mon, May 18, 2009 at 07:33:23PM +0200, Ferenc Wagner wrote:
> Andrew Morton <akpm@linux-foundation.org> writes:
>
> > Well there have only been a handful of changes to ipmi since 2.6.29.
> > Could you try a mini-bisection?
> >
> > Apply revert-1.patch, test
> > Apply revert-2.patch, test
> > Apply revert-3.patch, test
> > Apply revert-4.patch, test
>
> After applying revert-1.patch, modprobe runs OK:
>
> [ 86.968156] IPMI System Interface driver.
> [ 86.976276] ipmi_si: Trying SMBIOS-specified smic state machine at i/o address 0xecf4, slave address 0x20, irq 0
> [ 87.117630] ipmi: Found new BMC (man_id: 0x0002a2, prod_id: 0x0000, dev_id: 0x00)
> [ 87.133078] IPMI smic interface initialized
>
> I guess there's no point in trying the rest.
I think I see the problem. Can you try the patch at the end of the
email? I can't test it because I don't have an IPMI 1.0 sytem.
Thanks for setting up the mini-bisection, Andrew.
>
> When loading with debug options, it still produces insane amount of
> debug messages continuously (first 671 lines of it attached).
Yes, full debugging generates a ton of output, it logs everything it does
in that case.
Thanks,
-corey
Set the current channel to the number of channels in an IPMI 1.0 system,
as this value is used to tell if the channel information has been
initialized.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index aa83a08..48f4269 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2856,6 +2856,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
/* Assume a single IPMB channel at zero. */
intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB;
intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB;
+ intf->curr_channel = 1;
}
if (rv == 0)
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Openipmi-developer] modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-18 18:40 ` [Openipmi-developer] " Corey Minyard
@ 2009-05-19 6:26 ` Ferenc Wagner
2009-05-19 21:38 ` Corey Minyard
0 siblings, 1 reply; 11+ messages in thread
From: Ferenc Wagner @ 2009-05-19 6:26 UTC (permalink / raw)
To: minyard; +Cc: Andrew Morton, openipmi-developer, linux-kernel
Corey Minyard <minyard@acm.org> writes:
> On Mon, May 18, 2009 at 07:33:23PM +0200, Ferenc Wagner wrote:
>> Andrew Morton <akpm@linux-foundation.org> writes:
>>
>>> Well there have only been a handful of changes to ipmi since 2.6.29.
>>> Could you try a mini-bisection?
>>>
>>> Apply revert-1.patch, test
>>> Apply revert-2.patch, test
>>> Apply revert-3.patch, test
>>> Apply revert-4.patch, test
>>
>> After applying revert-1.patch, modprobe runs OK:
>>
>> [ 86.968156] IPMI System Interface driver.
>> [ 86.976276] ipmi_si: Trying SMBIOS-specified smic state machine at i/o address 0xecf4, slave address 0x20, irq 0
>> [ 87.117630] ipmi: Found new BMC (man_id: 0x0002a2, prod_id: 0x0000, dev_id: 0x00)
>> [ 87.133078] IPMI smic interface initialized
>>
>> I guess there's no point in trying the rest.
>
> I think I see the problem. Can you try the patch at the end of the
> email? I can't test it because I don't have an IPMI 1.0 sytem.
I tried your patch on top of 2.6.30-rc6. Unfortunately it did not
help (nor made /proc/ipmi/ipmi0 appear at least).
>> When loading with debug options, it still produces insane amount of
>> debug messages continuously (first 671 lines of it attached).
>
> Yes, full debugging generates a ton of output, it logs everything it does
> in that case.
My concern is that it does something too often, not letting the CPU
enter deep sleep states, perhaps. Or is that also an artifact of
debugging?
--
Thanks,
Feri.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Openipmi-developer] modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-19 6:26 ` Ferenc Wagner
@ 2009-05-19 21:38 ` Corey Minyard
2009-05-20 16:15 ` Ferenc Wagner
0 siblings, 1 reply; 11+ messages in thread
From: Corey Minyard @ 2009-05-19 21:38 UTC (permalink / raw)
To: Ferenc Wagner
Cc: Andrew Morton, openipmi-developer, linux-kernel, dann frazier
[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]
Ferenc Wagner wrote:
> Corey Minyard <minyard@acm.org> writes:
>
>
Sorry, I've been slow, but I just got back from a week out of the
country and I'm trying to catch up.
>
>
> I tried your patch on top of 2.6.30-rc6. Unfortunately it did not
> help (nor made /proc/ipmi/ipmi0 appear at least).
>
I know what is happening now. Can you try the attached patch? I'm
disabling the requeue and discarding the message when an IPMB message is
received before everything is initialized. If you don't, the code will
not deliver any messages because something is already in the queue.
>
>>> When loading with debug options, it still produces insane amount of
>>> debug messages continuously (first 671 lines of it attached).
>>>
>> Yes, full debugging generates a ton of output, it logs everything it does
>> in that case.
>>
>
> My concern is that it does something too often, not letting the CPU
> enter deep sleep states, perhaps. Or is that also an artifact of
> debugging?
>
No, it's an artifact of a lousy hardware interface. Very few IPMI
interfaces support interrupts, so they have to be polled :(.
-corey
[-- Attachment #2: ipmi-fix-channel_init_with_ipmi_v1_0.patch --]
[-- Type: text/x-diff, Size: 1693 bytes --]
Instead of queuing IPMB messages before channel initialization, just
throw them away. Nobody will be listening for them at this point,
anyway, and they will clog up the queue and nothing will be delivered
if we queue them.
Also set the current channel to the number of channels, as this value
is used to tell if the channel information has been initialized.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index aa83a08..0905079 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2856,6 +2856,7 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
/* Assume a single IPMB channel at zero. */
intf->channels[0].medium = IPMI_CHANNEL_MEDIUM_IPMB;
intf->channels[0].protocol = IPMI_CHANNEL_PROTOCOL_IPMB;
+ intf->curr_channel = IPMI_MAX_CHANNELS;
}
if (rv == 0)
@@ -3648,13 +3649,13 @@ static int handle_new_recv_msg(ipmi_smi_t intf,
}
/*
- ** We need to make sure the channels have been initialized.
- ** The channel_handler routine will set the "curr_channel"
- ** equal to or greater than IPMI_MAX_CHANNELS when all the
- ** channels for this interface have been initialized.
- */
+ * We need to make sure the channels have been initialized.
+ * The channel_handler routine will set the "curr_channel"
+ * equal to or greater than IPMI_MAX_CHANNELS when all the
+ * channels for this interface have been initialized.
+ */
if (intf->curr_channel < IPMI_MAX_CHANNELS) {
- requeue = 1; /* Just put the message back for now */
+ requeue = 0; /* Throw the message away */
goto out;
}
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Openipmi-developer] modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-19 21:38 ` Corey Minyard
@ 2009-05-20 16:15 ` Ferenc Wagner
2009-05-20 16:34 ` Corey Minyard
0 siblings, 1 reply; 11+ messages in thread
From: Ferenc Wagner @ 2009-05-20 16:15 UTC (permalink / raw)
To: Corey Minyard
Cc: Andrew Morton, openipmi-developer, linux-kernel, dann frazier
Corey Minyard <minyard@acm.org> writes:
> I know what is happening now. Can you try the attached patch? I'm
> disabling the requeue and discarding the message when an IPMB message
> is received before everything is initialized. If you don't, the code
> will not deliver any messages because something is already in the
> queue.
Yep, that fixed it, modprobe runs through now!
> Ferenc Wagner wrote:
>
>> My concern is that it does something too often, not letting the CPU
>> enter deep sleep states, perhaps. Or is that also an artifact of
>> debugging?
>
> No, it's an artifact of a lousy hardware interface. Very few IPMI
> interfaces support interrupts, so they have to be polled :(.
I'd say this isn't an artifact but the sad truth itself. Just out of
interest, how often does the driver wake up to check the inteface?
--
Thanks,
Feri.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Openipmi-developer] modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-20 16:15 ` Ferenc Wagner
@ 2009-05-20 16:34 ` Corey Minyard
2009-05-21 9:47 ` Ferenc Wagner
0 siblings, 1 reply; 11+ messages in thread
From: Corey Minyard @ 2009-05-20 16:34 UTC (permalink / raw)
To: Ferenc Wagner; +Cc: Andrew Morton, openipmi-developer, linux-kernel
Ferenc Wagner wrote:
> Corey Minyard <minyard@acm.org> writes:
>
>
>> I know what is happening now. Can you try the attached patch? I'm
>> disabling the requeue and discarding the message when an IPMB message
>> is received before everything is initialized. If you don't, the code
>> will not deliver any messages because something is already in the
>> queue.
>>
>
> Yep, that fixed it, modprobe runs through now!
>
Thanks for testing this.
>
>> Ferenc Wagner wrote:
>>
>>
>>> My concern is that it does something too often, not letting the CPU
>>> enter deep sleep states, perhaps. Or is that also an artifact of
>>> debugging?
>>>
>> No, it's an artifact of a lousy hardware interface. Very few IPMI
>> interfaces support interrupts, so they have to be polled :(.
>>
>
> I'd say this isn't an artifact but the sad truth itself. Just out of
> interest, how often does the driver wake up to check the inteface?
>
I'd have to agree.
When idle, the driver wakes up every 10ms to check for something on the
driver. When a message is in transit, it's every jiffie.
-corey
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Openipmi-developer] modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-20 16:34 ` Corey Minyard
@ 2009-05-21 9:47 ` Ferenc Wagner
2009-05-21 12:37 ` Corey Minyard
2009-05-27 12:10 ` Bela Lubkin
0 siblings, 2 replies; 11+ messages in thread
From: Ferenc Wagner @ 2009-05-21 9:47 UTC (permalink / raw)
To: Corey Minyard; +Cc: Andrew Morton, openipmi-developer, linux-kernel
Corey Minyard <minyard@acm.org> writes:
> Ferenc Wagner wrote:
>
>> Just out of interest, how often does the driver wake up to check
>> the inteface?
>
> When idle, the driver wakes up every 10ms to check for something on
> the driver.
Wow, 100 times per second, that sure sounds gross for piping out SEL
entries! Though it certainly doesn't matter much for our servers, but
hasn't it got the potential to heavily tax laptop batteries? Or is
that why ipmi_si isn't loaded automatically by udev?
--
Thanks,
Feri.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Openipmi-developer] modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-21 9:47 ` Ferenc Wagner
@ 2009-05-21 12:37 ` Corey Minyard
2009-05-27 12:10 ` Bela Lubkin
1 sibling, 0 replies; 11+ messages in thread
From: Corey Minyard @ 2009-05-21 12:37 UTC (permalink / raw)
To: Ferenc Wagner; +Cc: Andrew Morton, openipmi-developer, linux-kernel
Ferenc Wagner wrote:
> Corey Minyard <minyard@acm.org> writes:
>
>
>> Ferenc Wagner wrote:
>>
>>
>>> Just out of interest, how often does the driver wake up to check
>>> the inteface?
>>>
>> When idle, the driver wakes up every 10ms to check for something on
>> the driver.
>>
>
> Wow, 100 times per second, that sure sounds gross for piping out SEL
> entries! Though it certainly doesn't matter much for our servers, but
> hasn't it got the potential to heavily tax laptop batteries? Or is
> that why ipmi_si isn't loaded automatically by udev?
>
IPMI is used for a lot of things beyond just getting SEL entries. I
some cases (probably most) it's excessive, in others it's not.
However, AFAIK IPMI hardware is only available in server systems. I
don't think it's ever been used in a laptop.
-corey
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [Openipmi-developer] modprobe ipmi_si hangs under 2.6.30-rc5
2009-05-21 9:47 ` Ferenc Wagner
2009-05-21 12:37 ` Corey Minyard
@ 2009-05-27 12:10 ` Bela Lubkin
1 sibling, 0 replies; 11+ messages in thread
From: Bela Lubkin @ 2009-05-27 12:10 UTC (permalink / raw)
To: 'Ferenc Wagner', Corey Minyard
Cc: Andrew Morton, openipmi-developer, linux-kernel
The driver only behaves this way on systems where it has to.
If the BMC System Interface (SI) provides an interrupt, the
kernel thread doesn't run. Everything is interrupt driven.
Anyone doing system software for x86 servers should be
harrassing the hardware vendors to get this right...
Interrupts can be used with any of the SIs (BT, KCS, SMIC),
but BT has the dual advantages of doing its transfers all at
once via DMA, and having a well defined interrupt mechanism.
Hardware designers implementing an interrupt for KCS or SMIC
have to guess at a few too many details.
Agitate for BT IPMI SI!
(HP's IPMI causes the least drag of any of the big vendors.
Although they use the same crummy char-by-char KCS SI [SMIC
on older systems], they always provide an IPMI interrupt.
I've heard that some modern Sun models use BT; haven't seen
it in action yet.)
>Bela<
> -----Original Message-----
> From: Ferenc Wagner [mailto:wferi@niif.hu]
> Sent: Thursday, May 21, 2009 2:47 AM
> To: Corey Minyard
> Cc: Andrew Morton; openipmi-developer@lists.sourceforge.net;
> linux-kernel@vger.kernel.org
> Subject: Re: [Openipmi-developer] modprobe ipmi_si hangs
> under 2.6.30-rc5
>
> Corey Minyard <minyard@acm.org> writes:
>
> > Ferenc Wagner wrote:
> >
> >> Just out of interest, how often does the driver wake up to check
> >> the inteface?
> >
> > When idle, the driver wakes up every 10ms to check for something on
> > the driver.
>
> Wow, 100 times per second, that sure sounds gross for piping out SEL
> entries! Though it certainly doesn't matter much for our servers, but
> hasn't it got the potential to heavily tax laptop batteries? Or is
> that why ipmi_si isn't loaded automatically by udev?
> --
> Thanks,
> Feri.
>
> --------------------------------------------------------------
> ----------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity
> professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity,
> Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights
> like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> _______________________________________________
> Openipmi-developer mailing list
> Openipmi-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openipmi-developer
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-05-27 12:10 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-12 21:28 modprobe ipmi_si hangs under 2.6.30-rc5 Ferenc Wagner
2009-05-17 0:09 ` Andrew Morton
2009-05-18 17:33 ` Ferenc Wagner
2009-05-18 18:40 ` [Openipmi-developer] " Corey Minyard
2009-05-19 6:26 ` Ferenc Wagner
2009-05-19 21:38 ` Corey Minyard
2009-05-20 16:15 ` Ferenc Wagner
2009-05-20 16:34 ` Corey Minyard
2009-05-21 9:47 ` Ferenc Wagner
2009-05-21 12:37 ` Corey Minyard
2009-05-27 12:10 ` Bela Lubkin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.