public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org, Li Shaohua <shaohua.li@intel.com>,
	Rocky Craig <rocky.craig@hp.com>
Subject: [PATCH] ipmi-remove-invalid-acpi-register-spacing-check
Date: Mon, 28 Nov 2005 18:03:04 -0600	[thread overview]
Message-ID: <20051129000304.GA2192@i2.minyard.local> (raw)

At the 2.6.12 timeframe ipmi_si_intf.c was patched to provide
default register spacings in try_init_acpi() if the register
spacing was set to zero, similar to code in other routines.
Unfortunately, another patch was simultaneously added that
exits early from try_init_acpi() if the register spacings
are set to zero, circumventing the new defaults.  This patch
removes the early exit code and some incorrect comments that
aren't present in other common code snippets.

Without this fix, several systems will not work correctly.

Signed-off-by: Rocky Craig <rocky.craig@hp.com>
Signed-off-by: Corey Minyard <minyard@acm.org>

Index: linux-2.6.15-rc2/drivers/char/ipmi/ipmi_si_intf.c
===================================================================
--- linux-2.6.15-rc2.orig/drivers/char/ipmi/ipmi_si_intf.c
+++ linux-2.6.15-rc2/drivers/char/ipmi/ipmi_si_intf.c
@@ -1580,11 +1580,6 @@ static int try_init_acpi(int intf_num, s
 	if (! is_new_interface(-1, addr_space, spmi->addr.address))
 		return -ENODEV;
 
-	if (! spmi->addr.register_bit_width) {
-		acpi_failure = 1;
-		return -ENODEV;
-	}
-
 	/* Figure out the interface type. */
 	switch (spmi->InterfaceType)
 	{
@@ -1634,9 +1629,6 @@ static int try_init_acpi(int intf_num, s
 		regspacings[intf_num] = spmi->addr.register_bit_width / 8;
 		info->io.regspacing = spmi->addr.register_bit_width / 8;
 	} else {
-		/* Some broken systems get this wrong and set the value
-		 * to zero.  Assume it is the default spacing.  If that
-		 * is wrong, too bad, the vendor should fix the tables. */
 		regspacings[intf_num] = DEFAULT_REGSPACING;
 		info->io.regspacing = DEFAULT_REGSPACING;
 	}

                 reply	other threads:[~2005-11-29  0:03 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=20051129000304.GA2192@i2.minyard.local \
    --to=minyard@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rocky.craig@hp.com \
    --cc=shaohua.li@intel.com \
    --cc=torvalds@osdl.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