All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: sudeep.holla@arm.com, cristian.marussi@arm.com
Subject: [PATCH 2/4] firmware: arm_scmi: Clear channel on reception of unexpected responses
Date: Mon, 20 Apr 2020 16:23:13 +0100	[thread overview]
Message-ID: <20200420152315.21008-3-cristian.marussi@arm.com> (raw)
In-Reply-To: <20200420152315.21008-1-cristian.marussi@arm.com>

When an unexpected response message is received we currently warn the user
and bail-out: ensure to also free the channel by invoking the transport
independent operation .clear_channel()

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 90c7a0bb62ef..31c6a89a6edd 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -242,6 +242,7 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo,
 	/* Are we even expecting this? */
 	if (!test_bit(xfer_id, minfo->xfer_alloc_table)) {
 		dev_err(dev, "message for %d is not expected!\n", xfer_id);
+		info->desc->ops->clear_channel(cinfo);
 		return;
 	}
 
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Cristian Marussi <cristian.marussi@arm.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: cristian.marussi@arm.com, sudeep.holla@arm.com
Subject: [PATCH 2/4] firmware: arm_scmi: Clear channel on reception of unexpected responses
Date: Mon, 20 Apr 2020 16:23:13 +0100	[thread overview]
Message-ID: <20200420152315.21008-3-cristian.marussi@arm.com> (raw)
In-Reply-To: <20200420152315.21008-1-cristian.marussi@arm.com>

When an unexpected response message is received we currently warn the user
and bail-out: ensure to also free the channel by invoking the transport
independent operation .clear_channel()

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 90c7a0bb62ef..31c6a89a6edd 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -242,6 +242,7 @@ static void scmi_handle_response(struct scmi_chan_info *cinfo,
 	/* Are we even expecting this? */
 	if (!test_bit(xfer_id, minfo->xfer_alloc_table)) {
 		dev_err(dev, "message for %d is not expected!\n", xfer_id);
+		info->desc->ops->clear_channel(cinfo);
 		return;
 	}
 
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-04-20 15:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 15:23 [PATCH 0/4] SCMI various fixes to Response handling code Cristian Marussi
2020-04-20 15:23 ` Cristian Marussi
2020-04-20 15:23 ` [PATCH 1/4] firmware: arm_scmi: Rename .clear_notification() transport_ops Cristian Marussi
2020-04-20 15:23   ` Cristian Marussi
2020-04-20 15:23 ` Cristian Marussi [this message]
2020-04-20 15:23   ` [PATCH 2/4] firmware: arm_scmi: Clear channel on reception of unexpected responses Cristian Marussi
2020-04-20 15:23 ` [PATCH 3/4] firmware: arm_scmi: Clear channel for delayed responses Cristian Marussi
2020-04-20 15:23   ` Cristian Marussi
2020-04-20 15:23 ` [PATCH 4/4] firmware: arm_scmi: Fix handling of unexpected " Cristian Marussi
2020-04-20 15:23   ` Cristian Marussi
2020-04-20 16:46 ` [PATCH 0/4] SCMI various fixes to Response handling code Sudeep Holla
2020-04-20 16:46   ` Sudeep Holla

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=20200420152315.21008-3-cristian.marussi@arm.com \
    --to=cristian.marussi@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.