Module Name:    src
Committed By:   mlelstv
Date:           Sun Apr  3 10:32:00 UTC 2016

Modified Files:
        src/sys/arch/x86/x86: ipmi.c

Log Message:
Only fix up IPMI on ProLiant Microserver when address if set.
Don't assume a specific preconfigured address, just clear the lower bits.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x86/x86/ipmi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/ipmi.c
diff -u src/sys/arch/x86/x86/ipmi.c:1.62 src/sys/arch/x86/x86/ipmi.c:1.63
--- src/sys/arch/x86/x86/ipmi.c:1.62	Fri Aug 28 14:06:01 2015
+++ src/sys/arch/x86/x86/ipmi.c	Sun Apr  3 10:32:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.62 2015/08/28 14:06:01 joerg Exp $ */
+/*	$NetBSD: ipmi.c,v 1.63 2016/04/03 10:32:00 mlelstv Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.62 2015/08/28 14:06:01 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.63 2016/04/03 10:32:00 mlelstv Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -939,9 +939,10 @@ ipmi_smbios_probe(struct smbios_ipmi *pi
 
 	platform = pmf_get_platform("system-product");
 	if (platform != NULL &&
-	    strcmp(platform, "ProLiant MicroServer") == 0) {
+	    strcmp(platform, "ProLiant MicroServer") == 0 &&
+	    pipmi->smipmi_base_address != 0) {
                 ia->iaa_if_iospacing = 1;
-                ia->iaa_if_iobase = pipmi->smipmi_base_address - 7;
+                ia->iaa_if_iobase = pipmi->smipmi_base_address & ~0x7;
                 ia->iaa_if_iotype = 'i';
                 return;
         }

Reply via email to