X60/T60: fix return value of mainboard_io_trap_handler()
authorSven Schnelle <svens@stackframe.org>
Sun, 12 Jun 2011 14:55:56 +0000 (16:55 +0200)
committerSven Schnelle <svens@stackframe.org>
Sun, 12 Jun 2011 15:28:10 +0000 (17:28 +0200)
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>
Reviewed-on: http://review.coreboot.org/29
Tested-by: build bot (Jenkins)
src/mainboard/lenovo/t60/mainboard_smi.c
src/mainboard/lenovo/x60/mainboard_smi.c

index 5e0f6a98b009fbd16cb599679c8bd2f3618e7b42..30c2420f9c6c597618ef06ec1b577e2b3fad9ad9 100644 (file)
@@ -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;
 }
 
index 78f7f2a4f62ec4b9e466dc4b90d664b245a3adf5..d13055ee70fd502ab55f0584b320dffd1afd2b85 100644 (file)
@@ -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;
 }