Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4387153ioa; Wed, 27 Apr 2022 02:41:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycY3/oEvBPa960dFrohgkNIj91LWCHs54ZTzfDJ7YGEZpnUysghAGepudmplpOaMT8MSlL X-Received: by 2002:a05:6a00:2347:b0:50d:51c2:429b with SMTP id j7-20020a056a00234700b0050d51c2429bmr9586369pfj.5.1651052490916; Wed, 27 Apr 2022 02:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651052490; cv=none; d=google.com; s=arc-20160816; b=eG2eaieIcvee9MOkMeMmayE7IBQumydmCq1GaFjojqNWceSKEWSSXd/dv53d7RdvZa 4mXQh1zTwNXs9TLnDBXR+4gJ2RMkDlq6bPmo0lPFt7MSArJryuParn5bhMYqfgYZEl2g NTWtbYfdCjm4DC8yyRrv/rPbaAl3DguZjJpIdBIIh8K7bH/EYgy0up0o5cr10uqbgwzX q2PIvqrZSTku0DcHiiRtxX1KCAOJio2ltnn8e/1zmiqDXuKOxC2sMeyeMuGQK4PkE1yM nzkNLSx1geVgZeYR5bX11nC039yXDdVXMEkDv3CJhcBf39cKyFZqAPt+Kz8I8DrnTps9 Z4zw== 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=EdtUZJA3Md+3KgY4RUCR7QgTE/kSA3XSKO/+Z35DxO8=; b=i9amC+MVZBwczZILl2yKmeftxmt8ExI+2BGdksUZ2C6lqqgayU5dd5XAXd0px6ajQa V2WxADdFCvtZ2bTCLmawEyq0scbAsaJ2K0QYvbl9lY8vET/onSKswbpO3wyroKJoPZJp /ynXMJgiSFeLr8YipitDYtqz+2SYd19woEZg27XZl5Jwa8+Ql0vUpuqf/4LhoRvY9MOa Mh01vMSxopDROx4WjtKykMOU56N3ubbe/vXlzxwLmSw6razj0M+v7/7xyiTL/79POiAh uRcEf5qtxM73Lj/zjgozOaQZCNHIafRoe+BxuZAw7gTxnHzJZYNcr5eK0sB372nQS6tr eq2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xs5zBocb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id oj18-20020a17090b4d9200b001c651f909easi5317920pjb.137.2022.04.27.02.41.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:41:30 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Xs5zBocb; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 22C162727E6; Wed, 27 Apr 2022 02:17:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345205AbiDZIhO (ORCPT + 99 others); Tue, 26 Apr 2022 04:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345206AbiDZIeN (ORCPT ); Tue, 26 Apr 2022 04:34:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EFB96FA1F; Tue, 26 Apr 2022 01:26:30 -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 BD12D61841; Tue, 26 Apr 2022 08:26:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDA21C385BD; Tue, 26 Apr 2022 08:26:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650961589; bh=uezcfXl9P+IPn6+18yV+x/ymhvpLGiH3VEU2mLngXFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xs5zBocbkLcmip0zQG/m0Edcxu+0D4A7or/bUo2xhLPmCgQ+3E8La7E1e2LZfJ+1V 0chEO/SzjpS4vYhqSHzcI6YzeRuPILUiIPcMHQiiiqkgsWt2iIpnkU7J6MZUvFsWmq 0NMZEZa/S9isplUobUYL4Tm39yiAVg2SpiVC9PXE= 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 4.19 18/53] reset: tegra-bpmp: Restore Handle errors in BPMP response Date: Tue, 26 Apr 2022 10:20:58 +0200 Message-Id: <20220426081736.185798092@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081735.651926456@linuxfoundation.org> References: <20220426081735.651926456@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 5daf2ee1a396..f9790b60f996 100644 --- a/drivers/reset/tegra/reset-bpmp.c +++ b/drivers/reset/tegra/reset-bpmp.c @@ -23,6 +23,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; @@ -33,7 +34,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