linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Ferenc Wagner <wferi@niif.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	openipmi-developer@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, dann frazier <dannf@hp.com>
Subject: Re: [Openipmi-developer] modprobe ipmi_si hangs under 2.6.30-rc5
Date: Tue, 19 May 2009 16:38:13 -0500	[thread overview]
Message-ID: <4A1326C5.4010308@acm.org> (raw)
In-Reply-To: <87iqjxzjz4.fsf@tac.ki.iif.hu>

[-- 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;
 		}
 

  reply	other threads:[~2009-05-19 21:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1326C5.4010308@acm.org \
    --to=minyard@acm.org \
    --cc=akpm@linux-foundation.org \
    --cc=dannf@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=wferi@niif.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).