[Skiboot] [PATCH 1/2] platform/witherspoon: Avoid harmless error message

Frederic Barrat fbarrat at linux.ibm.com
Thu Nov 15 04:02:48 AEDT 2018


The I2C read to find out if a device on the GPU slot is an opencapi
adapter or nvidia card is reporting an "arbitration loss" error if no
device is connected on the GPU slot. That I2C read is actually useless
if we already know there's no device connected, so let's skip it. It
will avoid logging an harmless error.

Signed-off-by: Frederic Barrat <fbarrat at linux.ibm.com>
---
 platforms/astbmc/witherspoon.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c
index f45f739f..772a7199 100644
--- a/platforms/astbmc/witherspoon.c
+++ b/platforms/astbmc/witherspoon.c
@@ -271,6 +271,13 @@ static void witherspoon_npu2_device_detect(struct npu2 *npu)
 		prlog(PR_DEBUG, "PLAT: Chip %d GPU#1 slot present\n", chip->id);
 	}
 
+	/*
+	 * The following I2C ops generate errors if no device is
+	 * present on any SXM2 slot. Since it's useless, let's skip it
+	 */
+	if (!gpu0_present && !gpu1_present)
+		return;
+
 	/* Set pins to input */
 	state = 0xff;
 	rc = i2c_request_send(i2c_port_id,
-- 
2.17.1



More information about the Skiboot mailing list