Skip to content

Commit 4d28576

Browse files
fbarratstewartsmith
authored andcommitted
platform/witherspoon: Avoid harmless error message
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@linux.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
1 parent 0fa446c commit 4d28576

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

platforms/astbmc/witherspoon.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,13 @@ static void witherspoon_npu2_device_detect(struct npu2 *npu)
271271
prlog(PR_DEBUG, "PLAT: Chip %d GPU#1 slot present\n", chip->id);
272272
}
273273

274+
/*
275+
* The following I2C ops generate errors if no device is
276+
* present on any SXM2 slot. Since it's useless, let's skip it
277+
*/
278+
if (!gpu0_present && !gpu1_present)
279+
return;
280+
274281
/* Set pins to input */
275282
state = 0xff;
276283
rc = i2c_request_send(i2c_port_id,

0 commit comments

Comments
 (0)