From: Mario Limonciello <mario.limonciello@amd.com>
To: Mark Hasemeyer <markhas@chromium.org>
Cc: Grzegorz Bernacki <gjb@semihalf.com>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Jan Dabros <jsd@semihalf.com>, Held Felix <Felix.Held@amd.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/3] i2c: designware: Add doorbell support for Mendocino
Date: Wed, 22 Mar 2023 12:12:19 -0500 [thread overview]
Message-ID: <a9993ba0-ddfb-5ed3-c997-e9eea797cfc3@amd.com> (raw)
In-Reply-To: <CANg-bXANgkrF4T4X_VgeVejA2wH3GrUiFORyRC4AZfgYrE+7DQ@mail.gmail.com>
On 3/22/23 12:01, Mark Hasemeyer wrote:
>> +static int psp_send_i2c_req_mendocino(enum psp_i2c_req_type i2c_req_type)
>> +{
>> + int status, ret;
>> +
>> + ret = read_poll_timeout(psp_ring_platform_doorbell, status,
>> + (status != -EBUSY),
>> + PSP_I2C_REQ_RETRY_DELAY_US,
>> + PSP_I2C_REQ_RETRY_CNT * PSP_I2C_REQ_RETRY_DELAY_US,
>> + 0, i2c_req_type);
>> + if (ret)
>> + dev_err(psp_i2c_dev, "Timed out waiting for PSP to %s I2C bus\n",
>> + (i2c_req_type == PSP_I2C_REQ_ACQUIRE) ?
>> + "release" : "acquire");
>> +
>> + return ret ? ret : status;
>> +}
> I think we need the value of the PSP_CMDRESP_STS field returned to the caller
> and its status checked like in psp_send_i2c_req_cezanne. Otherwise the function
> won't continue to poll when the PSP_I2C_REQ_STS_BUS_BUSY bit is set.
In that case it looks like psp_send_check_i2c_req isn't handling this
properly
for Cezanne either in this series. I think psp_send_platform_access_msg
returning -EIO is going to mean that check_i2c_req_sts never gets run.
So either psp_send_platform_access_msg should return 0 for that case
(expecting caller to investigate more closely) or psp_send_check_i2c_req
needs to special case -EIO for more investigation.
I lean upon the latter unless you have a strong opinion.
>
> FYI - there's a test on ChromeOS to stress test I2C bus arbitration:
> https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/tast-tests/src/chromiumos/tast/local/bundles/cros/hwsec/tpm_contest.go
> I can try to run it assuming the ToT kernel runs on skyrim.
I would expect ToT should run fine on Skyrim. I'll adjust as you suggested
if you can please test it.
next prev parent reply other threads:[~2023-03-22 17:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-21 21:28 [PATCH v5 0/3] Use CCP driver to handle PSP I2C arbitration Mario Limonciello
2023-03-21 21:28 ` [PATCH v5 1/3] crypto: ccp: Bump up doorbell debug messages to error Mario Limonciello
2023-03-21 21:28 ` [PATCH v5 2/3] i2c: designware: Use PCI PSP driver for communication Mario Limonciello
2023-03-22 3:26 ` kernel test robot
2023-03-22 9:45 ` Andy Shevchenko
2023-03-22 15:56 ` Mario Limonciello
2023-03-21 21:28 ` [PATCH v5 3/3] i2c: designware: Add doorbell support for Mendocino Mario Limonciello
2023-03-22 17:01 ` Mark Hasemeyer
2023-03-22 17:12 ` Mario Limonciello [this message]
2023-03-22 17:32 ` Mark Hasemeyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a9993ba0-ddfb-5ed3-c997-e9eea797cfc3@amd.com \
--to=mario.limonciello@amd.com \
--cc=Felix.Held@amd.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gjb@semihalf.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markhas@chromium.org \
--cc=mika.westerberg@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox