[PATCH] IPMI: fix for handling bad IPMI DMI data
authorCorey Minyard <minyard@acm.org>
Sun, 1 May 2005 15:59:10 +0000 (08:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 1 May 2005 15:59:10 +0000 (08:59 -0700)
Ignore the bottom bit of the base address from the DMI data.  It is
supposed to be set to 1 if it is I/O space.  Few systems do this, but this
enables the ones that do set it to work properly.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/ipmi/ipmi_si_intf.c

index 44a7f13c788b5930fbaee14fe0bad68d7dd19c38..3522723eb6b8e11e305be522973a07343c978308 100644 (file)
@@ -1623,7 +1623,13 @@ static int decode_dmi(dmi_header_t *dm, int intf_num)
                }
        } else {
                /* Old DMI spec. */
-               ipmi_data->base_addr = base_addr;
+               /* Note that technically, the lower bit of the base
+                * address should be 1 if the address is I/O and 0 if
+                * the address is in memory.  So many systems get that
+                * wrong (and all that I have seen are I/O) so we just
+                * ignore that bit and assume I/O.  Systems that use
+                * memory should use the newer spec, anyway. */
+               ipmi_data->base_addr = base_addr & 0xfffe;
                ipmi_data->addr_space = IPMI_IO_ADDR_SPACE;
                ipmi_data->offset = 1;
        }