linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Lucas Stach <l.stach@pengutronix.de>
Cc: Richard Zhu <hongxing.zhu@nxp.com>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"andrew.smirnov@gmail.com" <andrew.smirnov@gmail.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [v2] PCI: imx: make msi work without pcieportbus
Date: Thu, 13 Dec 2018 12:34:01 +0000	[thread overview]
Message-ID: <20181213123401.GA26763@red-moon> (raw)
In-Reply-To: <1544695636.3137.27.camel@pengutronix.de>

On Thu, Dec 13, 2018 at 11:07:16AM +0100, Lucas Stach wrote:
> Am Donnerstag, den 13.12.2018, 09:57 +0000 schrieb Richard Zhu:
> > Hi Lucas:
> > 
> > > -----Original Message-----
> > > > > From: Lucas Stach [mailto:l.stach@pengutronix.de]
> > > Sent: 2018年12月13日 17:19
> > > > > > > To: Richard Zhu <hongxing.zhu@nxp.com>; bhelgaas@google.com;
> > > lorenzo.pieralisi@arm.com; andrew.smirnov@gmail.com
> > > > > > > Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > linux-kernel@vger.kernel.org
> > > Subject: Re: [v2] PCI: imx: make msi work without pcieportbus
> > > 
> > > Hi Richard,
> > > 
> > > Am Donnerstag, den 13.12.2018, 08:02 +0000 schrieb Richard Zhu:
> > > > MSI_EN of iMX PCIe RC would be asserted when PCIEPORTBUS driver is
> > > > selected.
> > > > Thus, the MSI works fine on iMX PCIe before.
> > > > Assert it unconditionally when MSI is supported.
> > > > Otherwise, the MSI wouldn't be triggered although the EP is present
> > > > and the MSIs are assigned.
> > > 
> > > Thanks for digging into this issue. This seems like the right way forward.
> > > However, did you test this with devices using legacy IRQs?
> > > I.e. booting with "nomsi" on the kernel command line to see if legacy IRQs still
> > > work if this bit is set, or if we need to avoid setting this when the user
> > > explicitly requests to disable MSIs?
> > > 
> > > Regards,
> > > Lucas
> > > 
> > 
> > [Richard Zhu] Thanks for your review.
> > The Legacy INTx is broken.
> > The MSI_EN bit shouldn't be asserted when the user explicitly requests to disable MSIs.
> 
> Okay, so this patch should be extended with a check for
> pci_msi_enabled() to see if the user explicitly want legacy IRQs.
> 
> > BTW, regarding to Baruch's comments, it seems that all the (IS_ENABLED(CONFIG_PCI_MSI) check in
> >  the dwc host drivers are not required anymore, since the depends on PCI_MSI_IRQ_DOMAIN, right?
> 
> That's correct. This is mostly a historical artifact from the time when
>  we were able to build without MSI support. Those checks could be
> cleaned up now that we depend on the MSI options.

The question is whether we should really depend on PCI_MSI_IRQ_DOMAIN
option, should we ?

Lorenzo

  parent reply	other threads:[~2018-12-13 12:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13  8:02 [v2] PCI: imx: make msi work without pcieportbus Richard Zhu
2018-12-13  8:12 ` Baruch Siach
2018-12-13  8:23   ` Richard Zhu
2018-12-13  8:46     ` Baruch Siach
2018-12-13  9:19 ` Lucas Stach
2018-12-13  9:57   ` Richard Zhu
2018-12-13 10:07     ` Lucas Stach
2018-12-13 10:21       ` Richard Zhu
2018-12-13 12:34       ` Lorenzo Pieralisi [this message]
2018-12-13 12:50         ` Lucas Stach
2018-12-13 14:41 ` Bjorn Helgaas
2018-12-14  2:59   ` Richard Zhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181213123401.GA26763@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=hongxing.zhu@nxp.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).