Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3967956ioa; Tue, 26 Apr 2022 13:39:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRN1MuXR4Hbgp+pvKYec2hzB1Nhhytdv9DS1utNeHRRNqHnbF2ICSmELreupxsMhCUrSN8 X-Received: by 2002:a17:906:5641:b0:6da:8691:3fcc with SMTP id v1-20020a170906564100b006da86913fccmr22466140ejr.50.1651005576511; Tue, 26 Apr 2022 13:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651005576; cv=none; d=google.com; s=arc-20160816; b=UH8aabe/zBtS8otfG6lC3596qKA6b8m276hStIHmJK8rsQxxaKdJTQP7VcNAsbMpDg Qa+lIVBX8D2AeInLMwPzVy1bMalPPf0iQiXhTIL0jMpkgZBE4QiiGodV8JX92wlvHw9d RP9Ohdb7ny3bPICrAo7RYAq7+WflbDeTu0fb6x8uKN4YrYllmp8b49vj8aAPSiuLwL4Y TGLeVJE1eHDvJ2UEV+E3f60k3/KZPtBp6gu+i+9VHRZjpCfjYQPZggvS2eUfFzkKb+KV sVV2tKTsCyDGrjU1WPcP2+CJdNcEj5sa1eOI5cN6SVhgMvVlqF8X2lhl70eXSYXQyrIA 4nTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BBHLWWY0+uNOc6vyJM2/+JXR5ROl+LviGkb5I2kUgTY=; b=PY8qWLvV9dycI/IGd3v12ouyppAhZGScxsK/TzF5pjmom9scH3+HAecIXGDOkNDQkR lN5tSk/UxBRtkOjhiJdO4EH1YxN3WEuC1G8hZ8VrpGYkLCRZZICHVSAcvQTs2mCCMPK0 M2bi6r63iys9eMqFh8Rz6beXYw+kDzc6UoGIijEC7erlTFP0jJ597NYpjJA4Rs3g9ZN7 VR+/HJEpbcnI8QVcFlRvJwzacGfbQVbMp99u3L6Xg6RyUTzLkKzS95S2eJ1XCWFCqnWy lF39lZxHb6pg6Uo6tt3LcsUn/u9J+aWOMmLQOedS82a+s2MZ3TiV5hGgTHypfNL4QRyV 2geg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AWQSArJu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn19-20020a1709070d1300b006e8c309996esi22155028ejc.551.2022.04.26.13.39.13; Tue, 26 Apr 2022 13:39:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AWQSArJu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347168AbiDZJKJ (ORCPT + 99 others); Tue, 26 Apr 2022 05:10:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346672AbiDZIuP (ORCPT ); Tue, 26 Apr 2022 04:50:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ADA116FAC0; Tue, 26 Apr 2022 01:38:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 18F5960C5D; Tue, 26 Apr 2022 08:38:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2126FC385A0; Tue, 26 Apr 2022 08:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962315; bh=PppC3vam2C5Yu3j4i8ueQKhK2ayOhbdqrydENy51b+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AWQSArJuUC+LR9udJloKwU+6zNCZ/0Pf9/dqXnV0Sxh3gluzc+6apWG94EFlHimXL /On8s+/MIPxMnQkIr8wjEY140aJF0G1cRch8lPqsPjQH/YhwspoNrG1x88nGNxp5k3 TK/sqTwn49MTD/8HapumlagEQZZB/QGZ0tuOakBg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sameer Pujar , Jon Hunter , Thierry Reding , Philipp Zabel , Sasha Levin Subject: [PATCH 5.15 055/124] reset: tegra-bpmp: Restore Handle errors in BPMP response Date: Tue, 26 Apr 2022 10:20:56 +0200 Message-Id: <20220426081748.865821423@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sameer Pujar [ 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 Tested-by: Jon Hunter Reviewed-by: Jon Hunter Acked-by: Thierry Reding Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/1641995806-15245-1-git-send-email-spujar@nvidia.com Signed-off-by: Sasha Levin --- 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