lkml.org 
[lkml]   [2023]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH -next 2/2] i2c: designware: Add support for new SoCs in AMDPSP driver
Date
-	/* Status field in command-response buffer is updated by PSP */
- status = READ_ONCE(req->hdr.status);
+ if (req) {
+ /* Status field in command-response buffer is updated by PSP */
+ status = READ_ONCE(req->hdr.status);
+ } else {
+ status = psp_smn_read(PSP_MBOX_CMD_OFFSET, &status);
+ status &= ~PSP_MBOX_FIELDS_READY;
+ }

The value of the mbox cmd register is getting clobbered by the return value
from psp_smn_read. This can cause bus arbitration to fail as the driver will
think it can grab the bus when it's actually in use by the PSP.

\
 
 \ /
  Last update: 2023-03-27 01:06    [W:0.367 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site