Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3153321pxb; Mon, 9 Nov 2020 04:11:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzaa/ZXCDMdGHPvS/IUw33yYCeuEm/CyYAIKtN2kDpXDoObGc2WkITnhs2+x6PfyDhOEra3 X-Received: by 2002:a50:a6d0:: with SMTP id f16mr14563759edc.135.1604923890165; Mon, 09 Nov 2020 04:11:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604923890; cv=none; d=google.com; s=arc-20160816; b=m/9ymg9kxsXfl245VaK5ofyK89L7T9/iCYiERje7stuibsKW8Qv3o6zgEoYQtP2YIf Ie6VQVj9NMKAPs16A4L0cJPnkAWWLWRhZ0mvJgD+nPHvz1qNan/ixuFeYJLFK2KRT2Yd lLBtwleTJZk6W4A6ZWkHxFztKt4a4B7pVXja+bYrjFXde9NhV7HOdXsGLnVipEPl8lsD Sl0ot27X5DdO2o7rGFmM+wsRFE1XQ3X2TJ/sZY9WVGHWz96/x+zWkBAeEQV32+++dtgi SwBK8VbJ3ICfBML27ousS3GtOw0hkDRSCBVjmCDj32kemGzuq0jARQF/NJmeYUZeTs2d aNWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sYZlhxozQgEvlS+NNVIJ/aB7eGsfKrhfyl/qVNIo11E=; b=EGG/BDoGV90rwrBxI+Sn2AJokpNIOva8aUCPv6/BpgzKr+cQZnbdVOj8SbKRAoUyeA Abrwims1gjNcVHDSeyMK+AlvmySdllRsRqjDJ6YM+Kfb4lzeKVaAvA1+/9SDiOFGVRq1 n2+IFdmo/P5jT65WJ+NYoR4AO5Yn4nFwGd0zl7SPFM7uSg77Osw8oMo6MJq8XD97FNjv +qdS0DFSoFwX2viQWejpjFeyN2dVxQ1BjPrgdGsJssheayAlq8W5AsrK0OA8TQK9LW8z zf6lujB0z3A1OOthvq9f4+znfPAZIOfVZS3lVzWzky0jayh8+aXUIwRJHKIFZ2fAf3if HRrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z8cwZptV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw10si6733928edb.135.2020.11.09.04.11.06; Mon, 09 Nov 2020 04:11:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z8cwZptV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729672AbgKIMIe (ORCPT + 99 others); Mon, 9 Nov 2020 07:08:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729651AbgKIMId (ORCPT ); Mon, 9 Nov 2020 07:08:33 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29993C0613CF for ; Mon, 9 Nov 2020 04:08:32 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id c20so7981493pfr.8 for ; Mon, 09 Nov 2020 04:08:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sYZlhxozQgEvlS+NNVIJ/aB7eGsfKrhfyl/qVNIo11E=; b=z8cwZptV/a7LEfyiMbIZrV6S/mtNo0uR8gM9D4quJp5aa+TxpTW24tFfuZ4ALf8uE4 34zdgtpxrr65iQMUFNbS5VZumGtDjAnCWxNlgf9lDxTpLSxkaYGq9qndpHkj4CgyI2tp enSPNx+QQ6+2bfd2xhsKAoUuNxZaXgYHtdwmSl2GXI5MiHUO0gFZKBuqE5C7MW1RjQ9k b2DojHZcDSpGeYsirwQqvWLtGInlzELYvbzjHGEoa1z0yb7LadUzkWLh/HZDtfwcjs1U +rKKSMYBRmSrnHaPlmZK0Lrh9zKp2vZktzk1OQ74Hq1TuX0faF0ADRJOuMCMAfUAsgfc 8xng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sYZlhxozQgEvlS+NNVIJ/aB7eGsfKrhfyl/qVNIo11E=; b=OdRA5/ijdxUy99hpkJyG9JsYzMLvj5rlqZEFvFIC+O6hrfcmmAJQVRaYa7eMYMZgIU bLwXaKQGL9p4q0DGYR9Ip6ushhzcEWa0hYOZoHUkcfoTydLIUcaICZ8Ge2dJPsZaMGJT TMyMd5RDVR9fheT0Y5S5fBlOQjLvxEUfZvC7Hg0ueM+y/8/AZ2qRQ2C72ZT9avlQITog n3b/zwYUE3CQqzBmvJz5V3YQ3LnFdjhrfVuZI7xR3WEx3mGDqshg2a3iU+nGAMHPL0Lx XaKj+mR1xGiTydTtig3Wm1tCjsPx1J74hzF5fI8AFGFG9RTTZubvPSU9E2z71DQ03DV+ iWrQ== X-Gm-Message-State: AOAM5310BD/h8zLcoqI2XV1xHVKuqPVN9oFWOoaYqNkHusk1n2nQOVuC zDsdeDogfTbPYPNn5x/NXLLS X-Received: by 2002:a17:90a:8b08:: with SMTP id y8mr12438935pjn.5.1604923711702; Mon, 09 Nov 2020 04:08:31 -0800 (PST) Received: from work ([103.59.133.81]) by smtp.gmail.com with ESMTPSA id a24sm11377928pfl.174.2020.11.09.04.08.29 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Nov 2020 04:08:30 -0800 (PST) Date: Mon, 9 Nov 2020 17:38:25 +0530 From: Manivannan Sadhasivam To: Bhaumik Bhatt Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/6] bus: mhi: core: Skip RDDM download for unknown execution environment Message-ID: <20201109120825.GJ24289@work> References: <1604684690-31065-1-git-send-email-bbhatt@codeaurora.org> <1604684690-31065-7-git-send-email-bbhatt@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1604684690-31065-7-git-send-email-bbhatt@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 06, 2020 at 09:44:50AM -0800, Bhaumik Bhatt wrote: > If MHI is unable to determine the execution environment during > the panic path, host must skip the RDDM download. This can happen > if the BHI offset read or the BHI_EXECENV register read fails > indicating that the underlying transport is unresponsive. Hence, > there is no need to trigger an RDDM using SYSERR or request an > SOC reset. > > Suggested-by: Hemant Kumar > Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Thanks, Mani > --- > drivers/bus/mhi/core/boot.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/bus/mhi/core/boot.c b/drivers/bus/mhi/core/boot.c > index 16244cc..6f0cfb9 100644 > --- a/drivers/bus/mhi/core/boot.c > +++ b/drivers/bus/mhi/core/boot.c > @@ -92,6 +92,9 @@ static int __mhi_download_rddm_in_panic(struct mhi_controller *mhi_cntrl) > * image download completion. > */ > ee = mhi_get_exec_env(mhi_cntrl); > + if (ee == MHI_EE_MAX) > + goto error_exit_rddm; > + > if (ee != MHI_EE_RDDM) { > dev_dbg(dev, "Trigger device into RDDM mode using SYS ERR\n"); > mhi_set_mhi_state(mhi_cntrl, MHI_STATE_SYS_ERR); > @@ -139,10 +142,12 @@ static int __mhi_download_rddm_in_panic(struct mhi_controller *mhi_cntrl) > ee = mhi_get_exec_env(mhi_cntrl); > ret = mhi_read_reg(mhi_cntrl, base, BHIE_RXVECSTATUS_OFFS, &rx_status); > > - dev_err(dev, "Did not complete RDDM transfer\n"); > - dev_err(dev, "Current EE: %s\n", TO_MHI_EXEC_STR(ee)); > dev_err(dev, "RXVEC_STATUS: 0x%x\n", rx_status); > > +error_exit_rddm: > + dev_err(dev, "RDDM transfer failed. Current EE: %s\n", > + TO_MHI_EXEC_STR(ee)); > + > return -EIO; > } > > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >