Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11788497pjo; Thu, 2 Jan 2020 14:17:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxtiffMgPPUHcYDS9ZU2tbAWJAlfhteHVrInqs6gnw7IqpZGNNW3qoXUbg/VLROSvLcHhRj X-Received: by 2002:a9d:367:: with SMTP id 94mr89464673otv.329.1578003467524; Thu, 02 Jan 2020 14:17:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003467; cv=none; d=google.com; s=arc-20160816; b=Ni8J5mjd+guoPJw4kk1qeVTd1Eaj7XKAgce+6KZePREZhFBhKC8meZs03Nt7dIwo4s MyPb9KQBftDejX4wMvcpKHJy7MmFvDcNO/MzaAz53Ab0wfNIkRpNXYN9BHILJ2YyvkKs LHTrpUyV9uYYY+UOsjSWmvAISKODEtSi4eiwxvu/HbxX+JNDonUUKRx1UgcwnFFesPbj STmJCisOC137Yr/1iZ6sEJPqcmS4Bv2jg9UdNoVuRBHAzw2d085i8a84kS83Yrf5bZS4 7wrRbGU8krTNqNNNj+f7KNyuq7bKJ+wgig1B6W9D14vsoY1+W75NTPCCQfWlAjQKmP8j tCUg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=woBwHGEJfj7s+XC2rn20AmylRw0HG+jA8DqJXuA/ygk=; b=rUmmb9CxiFaz7GLZ2J+ZpzSHoWxvSOrt96PA0/FdIK5JI4brj0qnMJKR7oLunRrcEH SaHnaJMjZv6cTPuChBBlyhCiyGiAnhmv2P2x0L8iYql1rObE42AACRFCdo/732YB4R34 m8Q6HXvv6ukJdz87zbcz+7oC7CVCOI6iDu6T8peSchIoOno4hFMpTpkT1TXTeD7OqTGu WPCVp66Hqj0DAXxCyEHkxxv+MlrmfJ3y/6BBkwAiJFPdYfjSGGqIHmPgLAo21MNVi99d ZCkmXHj+oWE/Hp95RdlCdgUGfs+dwzWHh/CaFWX6PBG6mHebk34zrvdhhlXkyOqJ3GWj 5NSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IheE8Avi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si29449739otp.111.2020.01.02.14.17.36; Thu, 02 Jan 2020 14:17:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IheE8Avi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728005AbgABWQm (ORCPT + 99 others); Thu, 2 Jan 2020 17:16:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:58738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728282AbgABWQj (ORCPT ); Thu, 2 Jan 2020 17:16:39 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CCD2F21582; Thu, 2 Jan 2020 22:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003399; bh=70aTdiQgJsFIJCW4mqmXNycIive18GHAshoWKj+6q18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IheE8AvifDFTdXJvS7181Au0de7jz4sJ1lUYjpSNPWHsYohsM0iw3joAH8pWeevoX zgOi6lZHluZsCXmXNSXtLwzQWU0Mo6hArkZAy5uPOJsQAQcz7P1k49cEZoOS1ILXrB H48Brb8jwQotYG3lBMj1k+wmOAI8zvPy9xTjU/bU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oleksij Rempel , Daniel Baluta , Richard Zhu , Dong Aisheng , Jassi Brar , Sasha Levin Subject: [PATCH 5.4 119/191] mailbox: imx: Clear the right interrupts at shutdown Date: Thu, 2 Jan 2020 23:06:41 +0100 Message-Id: <20200102215842.592971839@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Baluta [ Upstream commit 5f0af07e89199ac51cdd4f25bc303bdc703f4e9c ] Make sure to only clear enabled interrupts keeping count of the connection type. Suggested-by: Oleksij Rempel Signed-off-by: Daniel Baluta Signed-off-by: Richard Zhu Reviewed-by: Dong Aisheng Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin --- drivers/mailbox/imx-mailbox.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 9f74dee1a58c..d28bbd47ff88 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -217,8 +217,19 @@ static void imx_mu_shutdown(struct mbox_chan *chan) if (cp->type == IMX_MU_TYPE_TXDB) tasklet_kill(&cp->txdb_tasklet); - imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_TIEn(cp->idx) | - IMX_MU_xCR_RIEn(cp->idx) | IMX_MU_xCR_GIEn(cp->idx)); + switch (cp->type) { + case IMX_MU_TYPE_TX: + imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_TIEn(cp->idx)); + break; + case IMX_MU_TYPE_RX: + imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_RIEn(cp->idx)); + break; + case IMX_MU_TYPE_RXDB: + imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_GIEn(cp->idx)); + break; + default: + break; + } free_irq(priv->irq, chan); } -- 2.20.1