Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1508146ybk; Thu, 21 May 2020 08:30:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwztKZNdSieBeSNfcN/Inurs5I4oiB48xiun10wPz5EDPXtymU7cB4/xireapJD9g3Qh0zB X-Received: by 2002:a17:906:ad4:: with SMTP id z20mr3981339ejf.82.1590075028796; Thu, 21 May 2020 08:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590075028; cv=none; d=google.com; s=arc-20160816; b=FZRpF0oG57MtXqBeKBdqpbgF9v0cJDxnuK1sz5JaZkL03tWKotfFCdE2TEzsZSKAmk oU4iq20toCLH/hNljgla7t5X6m9O08iaucwOPDNennOuMDqVzdlSsHVk/jMPTUa7mi4k JTQ7xVlBLLYYycEoQwE+EmowIT+DQeUXdbv2z/a8WzY1NPFRBbMbUqHiwelGIkTGmD5s fy0/XuyxjzXY95G9BkA6iho1UiPaZ+WyQsm9qd7o4BRPw9VJcSnIS9UDwToDi8JqVMVo 9VJuVivsztgvw1X8E5iyEnRl56CCV7QMuw/ch/8MxNQyDw5wwTFw4+cnNnYJ/aiXYKEb wddw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=y5Tv3IfuUlOIdUZ1/9MSHdhtYfWT9Q6E9yjXbZemGDc=; b=uVaccDKLwR84kux/z38rKMF0ZCG2PPiCmuMiXWYXJPaXw7Duk76rMztVhaskfd/3J+ HCmuv3IGrXgBPacUjFicAuDRQhI/lwU3W5q5mHvmIDIXG6dbSUkTfuZVVwTuq85B0b0k 2E+mUqix1lpmYnbK1lX9zLcJfKfAzQXNIqmoGVXfeClZ/ikymGgT1GSv2r2Zy4R5k/Ou THp51d7djW1rhFx4P8eo57dyk1puP1SJjG98wpGZ7ILx7xyGAYRf94Ev69m7m8QK904I O9F0tkOYiPlDu8gUfzi6rlyZ4sz8Jns/l55LyGi3hfSradbETqwCjIezXShsHZCbd4h6 PoVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ObSOr6Pw; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y20si3550850ejf.224.2020.05.21.08.30.06; Thu, 21 May 2020 08:30:28 -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=@kernel.org header.s=default header.b=ObSOr6Pw; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730522AbgEUP0s (ORCPT + 99 others); Thu, 21 May 2020 11:26:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:34784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729934AbgEUP0r (ORCPT ); Thu, 21 May 2020 11:26:47 -0400 Received: from localhost.localdomain (unknown [157.51.235.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DAC6F207D8; Thu, 21 May 2020 15:26:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590074806; bh=PEoIxyKFD6sWPpb7V0lEgmTiS8JInx32UL12xkf/v14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ObSOr6Pwc3YEGeHJjNIUSD+WACN/v87mZ8a9eF9hPVK2N9bbRRgueg6IWaespdx3K QUYpbytYbfOrfPNUKn2p9L0ofKjygJJzEY3595HdfWHdY3UU2892qCt63ov2lpox6Y 4N+ADrjVfgf6juxlGa4WyI8WkZCPm3GNuW5EBK/w= From: mani@kernel.org To: gregkh@linuxfoundation.org Cc: hemantk@codeaurora.org, jhugo@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH 12/14] bus: mhi: core: Do not process SYS_ERROR if RDDM is supported Date: Thu, 21 May 2020 20:55:38 +0530 Message-Id: <20200521152540.17335-13-mani@kernel.org> X-Mailer: git-send-email 2.26.GIT In-Reply-To: <20200521152540.17335-1-mani@kernel.org> References: <20200521152540.17335-1-mani@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hemant Kumar Devices that support RDDM do not require processing SYS_ERROR as it is deemed redundant. Avoid SYS_ERROR processing if RDDM is supported by the device. Signed-off-by: Hemant Kumar Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam --- drivers/bus/mhi/core/main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c index 7429189840b0..eef145180a55 100644 --- a/drivers/bus/mhi/core/main.c +++ b/drivers/bus/mhi/core/main.c @@ -396,9 +396,9 @@ irqreturn_t mhi_intvec_threaded_handler(int irq_number, void *priv) } write_unlock_irq(&mhi_cntrl->pm_lock); - /* If device in RDDM don't bother processing SYS error */ - if (mhi_cntrl->ee == MHI_EE_RDDM) { - if (mhi_cntrl->ee != ee) { + /* If device supports RDDM don't bother processing SYS error */ + if (mhi_cntrl->rddm_image) { + if (mhi_cntrl->ee == MHI_EE_RDDM && mhi_cntrl->ee != ee) { mhi_cntrl->status_cb(mhi_cntrl, MHI_CB_EE_RDDM); wake_up_all(&mhi_cntrl->state_event); } @@ -734,6 +734,11 @@ int mhi_process_ctrl_ev_ring(struct mhi_controller *mhi_cntrl, { enum mhi_pm_state new_state; + /* skip SYS_ERROR handling if RDDM supported */ + if (mhi_cntrl->ee == MHI_EE_RDDM || + mhi_cntrl->rddm_image) + break; + dev_dbg(dev, "System error detected\n"); write_lock_irq(&mhi_cntrl->pm_lock); new_state = mhi_tryset_pm_state(mhi_cntrl, -- 2.26.GIT