Skip to content

Commit

Permalink
platform/witherspoon: Avoid harmless error message
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
fbarrat authored and stewartsmith committed Nov 19, 2018
1 parent 0fa446c commit 4d28576
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions platforms/astbmc/witherspoon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4d28576

Please sign in to comment.