stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sameer Pujar <spujar@nvidia.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	Thierry Reding <treding@nvidia.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Sasha Levin <sashal@kernel.org>,
	thierry.reding@gmail.com, mperttunen@nvidia.com,
	linux-tegra@vger.kernel.org
Subject: [PATCH AUTOSEL 5.4 02/14] reset: tegra-bpmp: Restore Handle errors in BPMP response
Date: Tue, 19 Apr 2022 14:14:31 -0400	[thread overview]
Message-ID: <20220419181444.485959-2-sashal@kernel.org> (raw)
In-Reply-To: <20220419181444.485959-1-sashal@kernel.org>

From: Sameer Pujar <spujar@nvidia.com>

[ Upstream commit d1da1052ffad63aa5181b69f20a6952e31f339c2 ]

This reverts following commit 69125b4b9440 ("reset: tegra-bpmp: Revert
Handle errors in BPMP response").

The Tegra194 HDA reset failure is fixed by commit d278dc9151a0 ("ALSA:
hda/tegra: Fix Tegra194 HDA reset failure"). The temporary revert of
original commit c045ceb5a145 ("reset: tegra-bpmp: Handle errors in BPMP
response") can be removed now.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/1641995806-15245-1-git-send-email-spujar@nvidia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/reset/tegra/reset-bpmp.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/reset/tegra/reset-bpmp.c b/drivers/reset/tegra/reset-bpmp.c
index 24d3395964cc..4c5bba52b105 100644
--- a/drivers/reset/tegra/reset-bpmp.c
+++ b/drivers/reset/tegra/reset-bpmp.c
@@ -20,6 +20,7 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
 	struct tegra_bpmp *bpmp = to_tegra_bpmp(rstc);
 	struct mrq_reset_request request;
 	struct tegra_bpmp_message msg;
+	int err;
 
 	memset(&request, 0, sizeof(request));
 	request.cmd = command;
@@ -30,7 +31,13 @@ static int tegra_bpmp_reset_common(struct reset_controller_dev *rstc,
 	msg.tx.data = &request;
 	msg.tx.size = sizeof(request);
 
-	return tegra_bpmp_transfer(bpmp, &msg);
+	err = tegra_bpmp_transfer(bpmp, &msg);
+	if (err)
+		return err;
+	if (msg.rx.ret)
+		return -EINVAL;
+
+	return 0;
 }
 
 static int tegra_bpmp_reset_module(struct reset_controller_dev *rstc,
-- 
2.35.1


  reply	other threads:[~2022-04-19 18:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 18:14 [PATCH AUTOSEL 5.4 01/14] ARM: vexpress/spc: Avoid negative array index when !SMP Sasha Levin
2022-04-19 18:14 ` Sasha Levin [this message]
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 03/14] platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 04/14] ALSA: usb-audio: Fix undefined behavior due to shift overflowing the constant Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 05/14] vxlan: fix error return code in vxlan_fdb_append Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 06/14] cifs: Check the IOCB_DIRECT flag, not O_DIRECT Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 07/14] mt76: Fix undefined behavior due to shift overflowing the constant Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 08/14] brcmfmac: sdio: " Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 09/14] dpaa_eth: Fix missing of_node_put in dpaa_get_ts_info() Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 10/14] drm/msm/mdp5: check the return of kzalloc() Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 11/14] drm/msm: Stop using iommu_present() Sasha Levin
2022-04-19 18:53   ` Rob Clark
2022-04-23 13:57     ` Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 12/14] net: macb: Restart tx only if queue pointer is lagging Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 13/14] scsi: qedi: Fix failed disconnect handling Sasha Levin
2022-04-19 18:14 ` [PATCH AUTOSEL 5.4 14/14] stat: fix inconsistency between struct stat and struct compat_stat Sasha Levin

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=20220419181444.485959-2-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=p.zabel@pengutronix.de \
    --cc=spujar@nvidia.com \
    --cc=stable@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=treding@nvidia.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;
as well as URLs for NNTP newsgroup(s).