Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4418018ioa; Wed, 27 Apr 2022 03:30:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOnuvMMsBwvkm+if9X2oenc3ZzZ31zCMQM1d8dDJ8shGH00j7P2FrBBPA42qV3/xWZ7/Uy X-Received: by 2002:a63:fd07:0:b0:3aa:1cd9:194f with SMTP id d7-20020a63fd07000000b003aa1cd9194fmr23528141pgh.509.1651055441134; Wed, 27 Apr 2022 03:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651055441; cv=none; d=google.com; s=arc-20160816; b=l+RRmLUNmbDxLgzvbmwVEbgnDqC8WNF0L8MQ2w32RKsTYMU2h7vKrWSRnu0PA0gclZ 39rP845RfxZsz116XogNhEDNBzXDza6KITbpq0ojn3Jq58ZCBQOYSdBnkb80HAzgK/nE 6s9JsbWD5trlugGyXtGPROx7cEruZCvaijqoOqSKQULRR5bvWMOTghHZG6MvuLuqSr7u kFLO3qk/aQAWOwtg8DKFvP2J3ufB1PutixsMoT4BmznpnaiJUtc+f+D9gEl1QEX7RCdV wWFMtPP7Bn8EnjRWalzJ6mkXTeW4r3IP8fAxT7ZibEIaRpmjyS/7UkjCAHqcssonrs5L +Duw== 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=WIZ5DUadHf9l5jQ+hJU4lLBSgYud7YU0FxJWRpDLT1jczgORNX2i4Ep4V8KK/y7+Ye /es0BDkjnYghedjBmwxdYUt8jRwot9K4tLuQRmbv0IqWX5eVvY2bDxrbv4m0mv2n/7KC 0bIaCr+RAAUMDh0ThFjFl9m4l9xPtIEmAvU5OtgclLUD4m4rLWibqYB8P2tQU7fsHP7f J4rxAXewwioJKaiu/AGmhLIyoQiarCNKSY0AH5+u/urKQBIIhr29eM5BTwul89tvbJRC rNl2L+zNoAW6OB1JVTcoaRr7BEDpRZhT1IaDdyBUY8lT9zKZZ3+tNL1k3VSAiCgyw2kP o/fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=00a66CrW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s127-20020a637785000000b00383f92e1f96si1070845pgc.79.2022.04.27.03.30.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:30:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=00a66CrW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D30593A3001; Wed, 27 Apr 2022 02:45:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233326AbiDZJfb (ORCPT + 99 others); Tue, 26 Apr 2022 05:35:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347907AbiDZJGW (ORCPT ); Tue, 26 Apr 2022 05:06:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A411B53ED; Tue, 26 Apr 2022 01:47:06 -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 ams.source.kernel.org (Postfix) with ESMTPS id 3F5F9B81CF2; Tue, 26 Apr 2022 08:47:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96359C385A0; Tue, 26 Apr 2022 08:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962824; bh=PppC3vam2C5Yu3j4i8ueQKhK2ayOhbdqrydENy51b+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=00a66CrW9mTS7hyFGDpboFS7ZkCIUys5fAaiYdr6FpQv97gf6WM9u4SabdTV33EVP hgz6stu87vsCOFEr91/NcQO3Lc+h2UOpiE0FKBIzsPOXnINDqzR1gkdExi9vA0gOWq jPraVY6Eh+RFdJFZSkfcumDuWDjpolYbRnUbYSvY= 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.17 062/146] reset: tegra-bpmp: Restore Handle errors in BPMP response Date: Tue, 26 Apr 2022 10:20:57 +0200 Message-Id: <20220426081751.808865437@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081750.051179617@linuxfoundation.org> References: <20220426081750.051179617@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=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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