Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4088748pxy; Mon, 26 Apr 2021 18:03:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7s05QWFu1TiA0eCJgTizlGu4qYZdr+bXSVfY3aJptYGmizf/YukuwC1Z+uhY2vVphO9SB X-Received: by 2002:a17:907:f81:: with SMTP id kb1mr8892509ejc.476.1619485392840; Mon, 26 Apr 2021 18:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619485392; cv=none; d=google.com; s=arc-20160816; b=i5TXVBEPU4eO1VUyVSGG2blaQQ+MjQigvFsUXfMp0G/Ggj0wIW3lG37DUB7DIbJzmR iHwerM0czlGUm1oDvCOLRLbhY+mSaUf3CVBJXpWCa5O7iM90c1I5fc2MUDY4d7HjcxC6 jINKr08cn2YghRARfu21Bj+SPBXaPQ8ICXFSeybKaU/svmHlr9eWpeIUkd5bmuF7Vxlu 6PITDk+qbidGnZQjzDgW44VuDHMxGkj4qT20SU6PK/k3hIF/f3zyB45iPx2tJd6bISvQ BMjOgX/e66vqYKPVnY9TIWXcyrEP3WIdbOYC/SvmvEItrAiYlqJDBvksQVypHpOQ15Wy Cp+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=cQE9JilDJOa2KhIhSxMGyaQm0GJIxSgp8uqfU3KSHp4=; b=YJQlrebcbt7mqzBhTuIQcDCvyJkEGiX3thrcX9XaJ3hMYXnUUqHzWPrey5xhvPdzO1 2SY8i/kc/P6ODOfl6B6QpHIWbLD8y0FmBxzEJGygtLEXvoVwEmNI+45aJnHo1hoWCfAJ +MkjJD5z7tYT0J38gyClUGB7m7CLhbbXgdf8JwMkPAl6xh8NC9m3qkk4sCmkyL5LuhkR szJzmyFto7364KGnjqITScpEJRYu5w1Oc/6rsERoEZ2VM4AK8KEgcVs1GKcnwLwrHaxV lhvQzy1nNDIgzdvjOkTVSCJ7XAFrI+kuzKTz/g6hJRO4v6B0EQ24o23g5j1FUCDGkGpU FFNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=ucZWfYfe; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p26si1158304edx.483.2021.04.26.18.02.49; Mon, 26 Apr 2021 18:03:12 -0700 (PDT) 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=@mg.codeaurora.org header.s=smtp header.b=ucZWfYfe; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235538AbhD0BCY (ORCPT + 99 others); Mon, 26 Apr 2021 21:02:24 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:19590 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233919AbhD0BCX (ORCPT ); Mon, 26 Apr 2021 21:02:23 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1619485301; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=cQE9JilDJOa2KhIhSxMGyaQm0GJIxSgp8uqfU3KSHp4=; b=ucZWfYfeld5nvdMcOOkuLfN36/6Zy8B5xseDP/RT0AjjKOxH6d6hJ1lb/pjWcLPvmODshJ1Y XpQZmPu2B1n+dRmF05RZwkCflr0689ALHujeApPyGoUvPrjLRGVkKeo+7pGafrKApku9Rjfg fd3Rd0OcMPIs13Y/wzaeOQHjc1g= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 60876274853c0a2c46625b2d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 27 Apr 2021 01:01:40 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id DFD94C43217; Tue, 27 Apr 2021 01:01:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id CEC9EC433D3; Tue, 27 Apr 2021 01:01:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CEC9EC433D3 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, loic.poulain@linaro.org, Bhaumik Bhatt Subject: [PATCH] bus: mhi: core: Improve debug messages for power on Date: Mon, 26 Apr 2021 18:00:57 -0700 Message-Id: <1619485258-35689-1-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Improve error message to be more descriptive if a failure occurs with an invalid power on execution environment. Also add a debug message to print the execution environment and MHI state before a power on is attempted to get a better view of device states. Signed-off-by: Bhaumik Bhatt --- drivers/bus/mhi/core/pm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c index adf426c..f4a8b9a 100644 --- a/drivers/bus/mhi/core/pm.c +++ b/drivers/bus/mhi/core/pm.c @@ -1076,12 +1076,16 @@ int mhi_async_power_up(struct mhi_controller *mhi_cntrl) /* Confirm that the device is in valid exec env */ if (!MHI_IN_PBL(current_ee) && current_ee != MHI_EE_AMSS) { - dev_err(dev, "Not a valid EE for power on\n"); + dev_err(dev, "%s is not a valid EE for power on\n", + TO_MHI_EXEC_STR(current_ee)); ret = -EIO; goto error_async_power_up; } state = mhi_get_mhi_state(mhi_cntrl); + dev_dbg(dev, "Attempting power on with EE: %s, state: %s\n", + TO_MHI_EXEC_STR(current_ee), TO_MHI_STATE_STR(state)); + if (state == MHI_STATE_SYS_ERR) { mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET); ret = wait_event_timeout(mhi_cntrl->state_event, -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project