Patchwork New patch to review: 3f222f9 X60/T60: fix return value of mainboard_io_trap_handler()

login
register
about
Submitter gerrit@coreboot.org
Date 2011-06-12 14:56:58
Message ID <E1QVm5y-0005vF-DI@ra.coresystems.de>
Download mbox | patch
Permalink /patch/3119/
State New, archived
Headers show

Comments

gerrit@coreboot.org - 2011-06-12 14:56:58
Sven Schnelle (svens@stackframe.org) just uploaded a new patch set to gerrit, which you can find at
http://review.coreboot.org/29

-gerrit

Patch

commit 3f222f9c71578a54e057e25feb2f3f65c9f5b58f
Author: Sven Schnelle <svens@stackframe.org>
Date:   Sun Jun 12 16:55:56 2011 +0200

    X60/T60: fix return value of mainboard_io_trap_handler()
    
    The handler should return 1 if it handled the request. The current
    code returns 0, which causes 'Unknown function' logs.
    
    Change-Id: Ic296819a5f8c6f1f97b7d47148182226684882a0
    Signed-off-by: Sven Schnelle <svens@stackframe.org>

diff --git a/src/mainboard/lenovo/t60/mainboard_smi.c b/src/mainboard/lenovo/t60/mainboard_smi.c
index 5e0f6a9..30c2420 100644
--- a/src/mainboard/lenovo/t60/mainboard_smi.c
+++ b/src/mainboard/lenovo/t60/mainboard_smi.c
@@ -68,11 +68,11 @@  int mainboard_io_trap_handler(int smif)
 		break;
 
 	default:
-		return 1;
+		return 0;
 	}
 
-	/* On success, the IO Trap Handler returns 0
-	 * On failure, the IO Trap Handler returns a value != 0 */
-	return 0;
+	/* On success, the IO Trap Handler returns 1
+	 * On failure, the IO Trap Handler returns a value != 1 */
+	return 1;
 }
 
diff --git a/src/mainboard/lenovo/x60/mainboard_smi.c b/src/mainboard/lenovo/x60/mainboard_smi.c
index 78f7f2a..d13055e 100644
--- a/src/mainboard/lenovo/x60/mainboard_smi.c
+++ b/src/mainboard/lenovo/x60/mainboard_smi.c
@@ -68,10 +68,10 @@  int mainboard_io_trap_handler(int smif)
 		break;
 
 	default:
-		return 1;
+		return 0;
 	}
 
-	/* On success, the IO Trap Handler returns 0
-	 * On failure, the IO Trap Handler returns a value != 0 */
-	return 0;
+	/* On success, the IO Trap Handler returns 1
+	 * On failure, the IO Trap Handler returns a value != 1 */
+	return 1;
 }