public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Andrew Morton <akpm@osdl.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Minor IPMI driver updates
Date: Wed, 19 Jan 2005 13:36:07 -0600	[thread overview]
Message-ID: <41EEB6A7.9010809@acm.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 110 bytes --]

The following patch fixes some minor problems with the IPMI driver.  
Relative to 2.6.11-rc1

Thanks,

-Corey

[-- Attachment #2: ipmi_fixes_2.6.11-rc3.diff --]
[-- Type: text/plain, Size: 2539 bytes --]


This patch fixes counting of unhandled messages.  Messages that were
handled internally by the driver (to the NULL user) were miscounted
as unhanlded responses.  This counts them properly.

This patch also fixes the DMI 16-byte setting, which was set as a
16-bit setting.

It also uses the right value to initilize the address memory when
using a memory-based interface.

Signed-off-by: Corey Minyard <minyard@acm.org>

Index: linux-2.6.11-rc1/drivers/char/ipmi/ipmi_msghandler.c
===================================================================
--- linux-2.6.11-rc1.orig/drivers/char/ipmi/ipmi_msghandler.c	2005-01-19 09:54:15.000000000 -0600
+++ linux-2.6.11-rc1/drivers/char/ipmi/ipmi_msghandler.c	2005-01-19 09:58:35.000000000 -0600
@@ -2301,12 +2301,17 @@
 
 	if (!found) {
 		/* Special handling for NULL users. */
-		if (!recv_msg->user && intf->null_user_handler)
+		if (!recv_msg->user && intf->null_user_handler){
 			intf->null_user_handler(intf, msg);
-		/* The user for the message went away, so give up. */
-		spin_lock_irqsave(&intf->counter_lock, flags);
-		intf->unhandled_local_responses++;
-		spin_unlock_irqrestore(&intf->counter_lock, flags);
+			spin_lock_irqsave(&intf->counter_lock, flags);
+			intf->handled_local_responses++;
+			spin_unlock_irqrestore(&intf->counter_lock, flags);
+		}else{
+			/* The user for the message went away, so give up. */
+			spin_lock_irqsave(&intf->counter_lock, flags);
+			intf->unhandled_local_responses++;
+			spin_unlock_irqrestore(&intf->counter_lock, flags);
+		}
 		ipmi_free_recv_msg(recv_msg);
 	} else {
 		struct ipmi_system_interface_addr *smi_addr;
Index: linux-2.6.11-rc1/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
--- linux-2.6.11-rc1.orig/drivers/char/ipmi/ipmi_si_intf.c	2005-01-19 09:54:15.000000000 -0600
+++ linux-2.6.11-rc1/drivers/char/ipmi/ipmi_si_intf.c	2005-01-19 09:58:46.000000000 -0600
@@ -1299,7 +1299,7 @@
 	memset(info, 0, sizeof(*info));
 
 	info->io_setup = mem_setup;
-	info->io.info = (void *) addrs[intf_num];
+	info->io.info = &addrs[intf_num];
 	info->io.addr = NULL;
 	info->io.regspacing = regspacings[intf_num];
 	if (!info->io.regspacing)
@@ -1587,8 +1587,9 @@
 	case 0x01: /* 32-bit boundaries */
 		ipmi_data->offset = 4;
 		break;
-	case 0x02: /* 16-bit boundaries */
-		ipmi_data->offset = 2;
+	case 0x02: /* 16-byte boundaries */
+		ipmi_data->offset = 16;
+		break;
 	default:
 		printk("ipmi_si: Unknown SMBIOS IPMI Base Addr"
 		       " Modifier: 0x%x\n", reg_spacing);

                 reply	other threads:[~2005-01-19 19:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=41EEB6A7.9010809@acm.org \
    --to=minyard@acm.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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