Linux PCI subsystem development
 help / color / mirror / Atom feed
From: "Jianjun Wang (王建军)" <Jianjun.Wang@mediatek.com>
To: "helgaas@kernel.org" <helgaas@kernel.org>
Cc: "linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Jieyy Yang (杨洁)" <Jieyy.Yang@mediatek.com>,
	"Chuanjia Liu (柳传嘉)" <Chuanjia.Liu@mediatek.com>,
	"Jian Yang (杨戬)" <Jian.Yang@mediatek.com>,
	"Qizhong Cheng (程啟忠)" <Qizhong.Cheng@mediatek.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"kw@linux.com" <kw@linux.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"bhelgaas@google.com" <bhelgaas@google.com>,
	"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>,
	"Jianguo Zhang (张建国)" <Jianguo.Zhang@mediatek.com>,
	"Ryder Lee" <Ryder.Lee@mediatek.com>
Subject: Re: [PATCH 1/2] PCI: mediatek: Allocate MSI address with dmam_alloc_coherent
Date: Thu, 7 Dec 2023 08:18:56 +0000	[thread overview]
Message-ID: <5d289553a49274c92ce12eb63735cea2f1bf8bf1.camel@mediatek.com> (raw)
In-Reply-To: <20231206170747.GA718062@bhelgaas>

Hi Bjorn,

On Wed, 2023-12-06 at 11:07 -0600, Bjorn Helgaas wrote:
>  On Wed, Dec 06, 2023 at 04:37:52PM +0800, Jianjun Wang wrote:
> > Use 'dmam_alloc_coherent' to allocate the MSI address, instead of
> using
> > 'virt_to_phys'.
> 
> s/'dmam_alloc_coherent'/dmam_alloc_coherent()/
> s/'virt_to_phys'/virt_to_phys()/
> 
> In subject also.
> 
> > @@ -732,8 +740,11 @@ 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);
> > +if (IS_ENABLED(CONFIG_PCI_MSI)) {
> > +err = mtk_pcie_enable_msi(port);
> > +if (err)
> > +return err;
> 
> Is failure to enable MSI a fatal issue?  It looks like this will make
> the host controller completely unusable if we can't set up MSI, even
> if downstream PCI devices could use INTx and get along without MSI.

This shouldn't be a fatal issue, we can still use INTx, I'll fix them
in the next version, thanks for your review.

Thanks.
> 
> Bjorn

  reply	other threads:[~2023-12-07  8:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06  8:37 [PATCH 0/2] PCI: mediatek: Allocate MSI address with dmam_alloc_coherent Jianjun Wang
2023-12-06  8:37 ` [PATCH 1/2] " Jianjun Wang
2023-12-06 17:07   ` Bjorn Helgaas
2023-12-07  8:18     ` Jianjun Wang (王建军) [this message]
2023-12-06  8:37 ` [PATCH 2/2] PCI: mediatek-gen3: " Jianjun Wang

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=5d289553a49274c92ce12eb63735cea2f1bf8bf1.camel@mediatek.com \
    --to=jianjun.wang@mediatek.com \
    --cc=Chuanjia.Liu@mediatek.com \
    --cc=Jian.Yang@mediatek.com \
    --cc=Jianguo.Zhang@mediatek.com \
    --cc=Jieyy.Yang@mediatek.com \
    --cc=Qizhong.Cheng@mediatek.com \
    --cc=Ryder.Lee@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh@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