linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com,
	Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com,
	etienne.carriere@linaro.org, vincent.guittot@linaro.org,
	souvik.chakravarty@arm.com
Subject: Re: [RFC PATCH 02/10] firmware: arm_scmi: Add missing xfer reinit_completion
Date: Mon, 7 Jun 2021 18:42:57 +0100	[thread overview]
Message-ID: <20210607174142.jdirvbasvgl7q4oj@bogus> (raw)
In-Reply-To: <20210606221232.33768-3-cristian.marussi@arm.com>

On Sun, Jun 06, 2021 at 11:12:24PM +0100, Cristian Marussi wrote:
> Reusing timed out xfers in a loop can lead to issue if completion was not
> properly reinitialized.
>
> Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
> ---
>  drivers/firmware/arm_scmi/driver.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> index bee33f9c2032..759ae4a23e74 100644
> --- a/drivers/firmware/arm_scmi/driver.c
> +++ b/drivers/firmware/arm_scmi/driver.c
> @@ -448,6 +448,7 @@ static int do_xfer(const struct scmi_protocol_handle *ph,
>  			      xfer->hdr.poll_completion);
>
>  	xfer->hdr.status = SCMI_SUCCESS;
> +	reinit_completion(&xfer->done);
>

What could happen after xfer_get_init->scmi_xfer_get->reinit_completion
that it needs to be re-initialised again. I don't see any reason for this ?
If there are, please state them explicitly. If this is needed, I would drop
the one in scmi_xfer_get().

--
Regards,
Sudeep

  reply	other threads:[~2021-06-07 17:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06 22:12 [RFC PATCH 00/10] Introduce SCMI transport atomic support Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 01/10] firmware: arm_scmi: Reset properly xfer SCMI status Cristian Marussi
2021-06-07 17:38   ` Sudeep Holla
2021-06-07 18:01     ` Cristian Marussi
2021-06-07 18:27       ` Sudeep Holla
2021-06-08 10:10         ` Cristian Marussi
2021-06-08 11:17           ` Sudeep Holla
2021-06-06 22:12 ` [RFC PATCH 02/10] firmware: arm_scmi: Add missing xfer reinit_completion Cristian Marussi
2021-06-07 17:42   ` Sudeep Holla [this message]
2021-06-07 18:04     ` Cristian Marussi
2021-06-07 18:30       ` Sudeep Holla
2021-06-09 20:51   ` Sudeep Holla
2021-06-06 22:12 ` [RFC PATCH 03/10] firmware: arm_scmi: Add configurable polling mode for transports Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 04/10] firmware: arm_scmi: Add support for atomic transports Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 05/10] include: trace: Add new scmi_xfer_response_wait event Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 06/10] firmware: arm_scmi: Use new trace event scmi_xfer_response_wait Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 07/10] firmware: arm_scmi: Add is_transport_atomic() handle method Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 08/10] clk: scmi: Support atomic enable/disable API Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 09/10] firmware: arm-scmi: Make smc transport use common completions Cristian Marussi
2021-06-06 22:12 ` [RFC PATCH 10/10] firmware: arm-scmi: Make smc transport atomic Cristian Marussi

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=20210607174142.jdirvbasvgl7q4oj@bogus \
    --to=sudeep.holla@arm.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=cristian.marussi@arm.com \
    --cc=etienne.carriere@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=james.quinlan@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=souvik.chakravarty@arm.com \
    --cc=vincent.guittot@linaro.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;
as well as URLs for NNTP newsgroup(s).