Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 1622

kernel-2.6.18-238.el5.src.rpm

From: peterm@redhat.com <peterm@redhat.com>
Date: Fri, 17 Apr 2009 12:09:36 -0400
Subject: [ipmi] hold ATTN until upper layer is ready
Message-id: 200904171609.n3HG9aqI013424@dhcp-100-18-167.bos.redhat.com
O-Subject: [Patch RHEL 5.4][Part 2/4]IPMI: Hold ATTN until upper layer is ready
Bugzilla: 475536
RH-Acked-by: Brian Maly <bmaly@redhat.com>
RH-Acked-by: Prarit Bhargava <prarit@redhat.com>

Hello,

This second patch verifies that the upper layer is ready to process a
message from the BMC as requested by the SMS_ATN bit.

commit 4ea18425436e7c72716b7f8d314775f399821195

Kernels were built in brew, all archs.
Task info: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1757755

Testing:  IBM and HP are testing the kernels.  Still waiting on test
results.

This resolves:

Bug 475536 -  [LTC 5.4 FEAT] OpenIPMI driver update [201263]

Regards,

Peter

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 506fc70..5a8b3e4 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -721,9 +721,11 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
 		si_sm_result = smi_info->handlers->event(smi_info->si_sm, 0);
 	}
 
-	/* We prefer handling attn over new messages. */
-	if (si_sm_result == SI_SM_ATTN)
-	{
+	/*
+	 * We prefer handling attn over new messages.  But don't do
+	 * this if there is not yet an upper layer to handle anything.
+	 */
+	if (likely(smi_info->intf) && si_sm_result == SI_SM_ATTN) {
 		unsigned char msg[2];
 
 		spin_lock(&smi_info->count_lock);