From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEBF2C5DF9D for ; Thu, 29 Oct 2020 00:21:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 918E820780 for ; Thu, 29 Oct 2020 00:21:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="fBZNMVGf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390797AbgJ2AV3 (ORCPT ); Wed, 28 Oct 2020 20:21:29 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:44765 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727315AbgJ2AV1 (ORCPT ); Wed, 28 Oct 2020 20:21:27 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4CM5hY1c5jz9sTf; Thu, 29 Oct 2020 11:21:17 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1603930883; bh=1H+0lWYSxaRNRPccmOFzTYzYgErk8Jx3rJ+1kAphuRA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=fBZNMVGf2DpDigzvlO5EFKrSfhcHEKaclKWRSpd0rMT3nijHNgh+K7YZaMcJgG+I1 Sqp0aSWWEEdsZy58/OpXsqjKdLh1Go0930GvCaNP/rPdkcm6jj8VLu+RtZAYju7Lwv 1OyJzCDTJEPo7fb3YVK+7vVSD947EigxRUEp47FaWl3boTdjoiwTlcbdL3lqCGS/Ir HjS3q0q57c4NP98/lAG95E/PIIhVcbnSgznNbTvydd0ukv+wu90vIX/fgrejZmKL/x fFgnf7BJJuzQ19szmCiiqO1GyzQ9nRbhKLLimDSXto/YVs3qcf351XsGaZm3WEkFCR 8YPZdn5UhcwWA== From: Michael Ellerman To: Rob Herring , Lorenzo Pieralisi Cc: Kunihiko Hayashi , Neil Armstrong , linux-pci@vger.kernel.org, Binghui Wang , Bjorn Andersson , linux-tegra@vger.kernel.org, Thierry Reding , linux-arm-kernel@axis.com, Thomas Petazzoni , Jonathan Chocron , Shawn Guo , Jonathan Hunter , Fabio Estevam , Jerome Brunet , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Minghuan Lian , Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , Kishon Vijay Abraham I , Kukjin Kim , NXP Linux Team , Xiaowei Song , Richard Zhu , Martin Blumenstingl , linux-arm-msm@vger.kernel.org, Sascha Hauer , Yue Wang , Murali Karicheri , Bjorn Helgaas , linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, Mingkai Hu , Roy Zang , Masahiro Yamada , Jingoo Han , Andy Gross , Stanimir Varbanov , Pengutronix Kernel Team , Gustavo Pimentel , linuxppc-dev@lists.ozlabs.org, Lucas Stach Subject: Re: [PATCH 01/13] PCI: dwc/imx6: Drop setting PCI_MSI_FLAGS_ENABLE In-Reply-To: <20201028204646.356535-2-robh@kernel.org> References: <20201028204646.356535-1-robh@kernel.org> <20201028204646.356535-2-robh@kernel.org> Date: Thu, 29 Oct 2020 11:21:16 +1100 Message-ID: <87h7qdx4oz.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Rob Herring writes: > No other host driver sets the PCI_MSI_FLAGS_ENABLE bit, so it must not > be necessary. If it is, a comment is needed. Yeah, but git blame directly points to: 75cb8d20c112 ("PCI: imx: Enable MSI from downstream components") Which has a pretty long explanation. The relevant bit probably being: ... on i.MX6, the MSI Enable bit controls delivery of MSI interrupts from components below the Root Port. So it seems a little rash to just remove the code. cheers > Cc: Richard Zhu > Cc: Lucas Stach > Cc: Lorenzo Pieralisi > Cc: Bjorn Helgaas > Cc: Shawn Guo > Cc: Sascha Hauer > Cc: Pengutronix Kernel Team > Cc: Fabio Estevam > Cc: NXP Linux Team > Signed-off-by: Rob Herring > --- > drivers/pci/controller/dwc/pci-imx6.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index 5cf1ef12fb9b..7dd137d62dca 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -1002,7 +1002,6 @@ static int imx6_pcie_probe(struct platform_device *pdev) > struct resource *dbi_base; > struct device_node *node = dev->of_node; > int ret; > - u16 val; > > imx6_pcie = devm_kzalloc(dev, sizeof(*imx6_pcie), GFP_KERNEL); > if (!imx6_pcie) > @@ -1167,13 +1166,6 @@ static int imx6_pcie_probe(struct platform_device *pdev) > if (ret < 0) > return ret; > > - if (pci_msi_enabled()) { > - u8 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_MSI); > - val = dw_pcie_readw_dbi(pci, offset + PCI_MSI_FLAGS); > - val |= PCI_MSI_FLAGS_ENABLE; > - dw_pcie_writew_dbi(pci, offset + PCI_MSI_FLAGS, val); > - } > - > return 0; > } > > -- > 2.25.1