From: "David E. Box" <david.e.box@linux.intel.com>
To: "Limonciello, Mario" <Mario.Limonciello@amd.com>,
"hdegoede@redhat.com" <hdegoede@redhat.com>,
"markgross@kernel.org" <markgross@kernel.org>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] platform/x86/intel/sdsi: Poll on ready bit for writes
Date: Wed, 20 Apr 2022 10:16:56 -0700 [thread overview]
Message-ID: <3a36e0c1634e7a53aede8a3a71a599905a42a89f.camel@linux.intel.com> (raw)
In-Reply-To: <BL1PR12MB5157EBB51DA629A40BE514EDE2F59@BL1PR12MB5157.namprd12.prod.outlook.com>
On Wed, 2022-04-20 at 16:34 +0000, Limonciello, Mario wrote:
> [AMD Official Use Only]
>
>
>
> > -----Original Message-----
> > From: David E. Box <david.e.box@linux.intel.com>
> > Sent: Wednesday, April 20, 2022 10:56
> > To: hdegoede@redhat.com; david.e.box@linux.intel.com;
> > markgross@kernel.org; platform-driver-x86@vger.kernel.org; linux-
> > kernel@vger.kernel.org
> > Subject: [PATCH 2/3] platform/x86/intel/sdsi: Poll on ready bit for writes
> >
> > Due to change in firmware flow, update mailbox writes to poll on ready bit
> > instead of run_busy bit. This change makes the polling method consistent
> > for both writes and reads, which also uses the ready bit.
>
> Does this need some sort of guard on the behavior based on the firmware
> version you are running on or are these all pre-production still?
Firmware updates would include this change, but a guard isn't necessary. Polling
on run_busy would still work for the current ABI. Since currently mailbox writes
are single packet only, both ready and run_busy update at the same time. But it
would not work for future changes where there will be multi packet writes. In
that case, ready indicates completion of the packet while run_busy indicates
completion of the entire message.
David
>
> > Fixes: 2546c6000430 ("platform/x86: Add Intel Software Defined Silicon
> > driver")
> > Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> > ---
> > drivers/platform/x86/intel/sdsi.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/platform/x86/intel/sdsi.c
> > b/drivers/platform/x86/intel/sdsi.c
> > index 11f211402479..89729fed030c 100644
> > --- a/drivers/platform/x86/intel/sdsi.c
> > +++ b/drivers/platform/x86/intel/sdsi.c
> > @@ -245,8 +245,8 @@ static int sdsi_mbox_cmd_write(struct sdsi_priv *priv,
> > struct sdsi_mbox_info *in
> > FIELD_PREP(CTRL_PACKET_SIZE, info->size);
> > writeq(control, priv->control_addr);
> >
> > - /* Poll on run_busy bit */
> > - ret = readq_poll_timeout(priv->control_addr, control, !(control &
> > CTRL_RUN_BUSY),
> > + /* Poll on ready bit */
> > + ret = readq_poll_timeout(priv->control_addr, control, control &
> > CTRL_READY,
> > MBOX_POLLING_PERIOD_US,
> > MBOX_TIMEOUT_US);
> >
> > if (ret)
> > --
> > 2.25.1
next prev parent reply other threads:[~2022-04-20 17:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 15:56 [PATCH 0/3] platform/x86/intel/sdsi: Fixes for 5.18 David E. Box
2022-04-20 15:56 ` [PATCH 1/3] platform/x86/intel/sdsi: Handle leaky bucket David E. Box
2022-04-20 15:56 ` [PATCH 2/3] platform/x86/intel/sdsi: Poll on ready bit for writes David E. Box
2022-04-20 16:34 ` Limonciello, Mario
2022-04-20 17:16 ` David E. Box [this message]
2022-04-20 15:56 ` [PATCH 3/3] platform/x86/intel/sdsi: Fix bug in multi packet reads David E. Box
2022-04-27 14:34 ` [PATCH 0/3] platform/x86/intel/sdsi: Fixes for 5.18 Hans de Goede
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=3a36e0c1634e7a53aede8a3a71a599905a42a89f.camel@linux.intel.com \
--to=david.e.box@linux.intel.com \
--cc=Mario.Limonciello@amd.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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
all inboxes | Powered by JetHome®