Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1169135imm; Tue, 2 Oct 2018 04:02:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV60HnjUQP7asscaUQ8InbyI5K3pHYVNE5gDJyyIR/J+BhYAfWhmh6RHlYqjGRravxTS72m9c X-Received: by 2002:a63:745e:: with SMTP id e30-v6mr14071596pgn.446.1538478178399; Tue, 02 Oct 2018 04:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538478178; cv=none; d=google.com; s=arc-20160816; b=w4U+81LxsKioGNaqQtHSEY5xHU3OgBTw8fz6+vEQH8+5Nm3BppxedWi4FIhVI2MP/N Hmjii5ph3cb9ltjEMwk09w8v6H/ppvA/9Z0+dWN5gf/1Ltg+9H7e/7242dNMsioCtkkQ b5uwWON5IOOrrdqOV+Vr1kCEHUM2n2YNCq6wuQVE/0W28hqUenPmFgZdM5YF4t+aXjRu g8Mrg3wTBDu6V02/CNIVb+S+DbhPgCGpzPkbCWfkEOgBwAewR3UMKWx94qpPMBwn9Jwv 5Dj8oHORfHbJ79bDX0dMGN9IJk+YQ1jZfnvtRSZlzIarTMK/BMzAWuZ7gBZBfEEPcpH8 +fzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=s8u11v716zqClh5NV3HnbzrnHxHT6aI2Jfy4q4dYzTk=; b=bXVxcDQZSAiujOBHPIUFsa5L03vavNACgLDXwDXWd6nGjxtYLtbhRph5J9hII0xesR Ob54HH3Z8K7Cna2uqT7DqEZTU7MEuiK1V3SZB+RJSfm1fI6BxbsMutfNhXX4WZ1pLkwp xgnZb+JfHPUxWEdde2w/Yd+MjH6Mi2YxFalodX1WmLDGNQY5ULVbGQpLR9s2qMvGBn0H 9KDUlXOSm+h+ldUF9PAnc4y3RsF5RQrdQr7U9acn4hXH7UC56XiPKYsl0vd4EvdWsRxN z6YXLpOhJ2qUEmYFxxDtIbZSgDN8eBXAkoacDv3gAHeCj8TeUpzYY7JqFupXYeSp7hMu FH/w== ARC-Authentication-Results: i=1; mx.google.com; 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 t6-v6si14549968pga.635.2018.10.02.04.02.42; Tue, 02 Oct 2018 04:02:58 -0700 (PDT) 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; 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 S1727411AbeJBRoC (ORCPT + 99 others); Tue, 2 Oct 2018 13:44:02 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:34488 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726244AbeJBRoC (ORCPT ); Tue, 2 Oct 2018 13:44:02 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0366E7A9; Tue, 2 Oct 2018 04:01:20 -0700 (PDT) Received: from e107981-ln.cambridge.arm.com (e107981-ln.Emea.Arm.com [10.4.13.117]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3E5543F5B7; Tue, 2 Oct 2018 04:01:17 -0700 (PDT) Date: Tue, 2 Oct 2018 12:01:14 +0100 From: Lorenzo Pieralisi To: honghui.zhang@mediatek.com Cc: bhelgaas@google.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ryder.lee@mediatek.com, ulf.hansson@linaro.org, marc.zyngier@arm.com, matthias.bgg@gmail.com, devicetree@vger.kernel.org, yingjoe.chen@mediatek.com, eddie.huang@mediatek.com, youlin.pei@mediatek.com, yt.shen@mediatek.com, sean.wang@mediatek.com Subject: Re: [PATCH v5 6/9] PCI: mediatek: Enable msi after clock enabled Message-ID: <20181002110114.GB27736@e107981-ln.cambridge.arm.com> References: <1538129080-8206-1-git-send-email-honghui.zhang@mediatek.com> <1538129080-8206-7-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1538129080-8206-7-git-send-email-honghui.zhang@mediatek.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 28, 2018 at 06:04:37PM +0800, honghui.zhang@mediatek.com wrote: > From: Honghui Zhang > > The clocks was not enabled when enable MSI. This patch fix this > issue by calling mtk_pcie_enable_msi in mtk_pcie_startup_port_v2 > since the clock was all enabled at that time. > > Signed-off-by: Honghui Zhang > --- > drivers/pci/controller/pcie-mediatek.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) If this is a fix, and I think it is, I would appreciate a Fixes: tag so that we can actully pinpoint the faulty commit. Thanks, Lorenzo > diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c > index d150be1..be38b38 100644 > --- a/drivers/pci/controller/pcie-mediatek.c > +++ b/drivers/pci/controller/pcie-mediatek.c > @@ -572,8 +572,6 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port, > ret = mtk_pcie_allocate_msi_domains(port); > if (ret) > return ret; > - > - mtk_pcie_enable_msi(port); > } > > return 0; > @@ -694,6 +692,9 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port) > val &= ~INTX_MASK; > writel(val, port->base + PCIE_INT_MASK); > > + if (IS_ENABLED(CONFIG_PCI_MSI)) > + mtk_pcie_enable_msi(port); > + > /* Set AHB to PCIe translation windows */ > size = mem->end - mem->start; > val = lower_32_bits(mem->start) | AHB2PCIE_SIZE(fls(size)); > -- > 2.6.4 >