From: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: <tn@semihalf.com>, <David.Daney@cavium.com>,
<bhelgaas@google.com>, <linux-pci@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: ACPI: Fix ThunderX PEM initialization
Date: Tue, 31 Jan 2017 02:28:30 -0800 [thread overview]
Message-ID: <20170131102830.GA13854@localhost.localdomain> (raw)
In-Reply-To: <20170130211236.GW20550@bhelgaas-glaptop.roam.corp.google.com>
Hi Bjorn,
On Mon, Jan 30, 2017 at 03:12:37PM -0600, Bjorn Helgaas wrote:
> Hi Vadim,
>
> On Mon, Jan 30, 2017 at 08:25:52AM -0800, Vadim Lomovtsev wrote:
> > This patch is to address PEM initialization issue
> > which causes network issues.
> >
> > It is necessary to search for _HID:PNP0A08 while requesting
> > PEM resources via ACPI instead of "THRX0002".
> >
> > Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
> > ---
> > drivers/pci/host/pci-thunder-pem.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/host/pci-thunder-pem.c b/drivers/pci/host/pci-thunder-pem.c
> > index af722eb..aec30b8 100644
> > --- a/drivers/pci/host/pci-thunder-pem.c
> > +++ b/drivers/pci/host/pci-thunder-pem.c
> > @@ -331,7 +331,7 @@ static int thunder_pem_acpi_init(struct pci_config_window *cfg)
> > if (!res_pem)
> > return -ENOMEM;
> >
> > - ret = acpi_get_rc_resources(dev, "THRX0002", root->segment, res_pem);
> > + ret = acpi_get_rc_resources(dev, "PNP0A08", root->segment, res_pem);
>
> This doesn't smell right: PNP0A08 is the generic ACPI ID. There's no
> guarantee that if we find a PNP0A08 device, it is a ThunderX device.
>
> I think the only way to call thunder_pem_acpi_init() is via an MCFG
> quirk that mentions thunder_pem_ecam_ops, which means we only call it
> if we find an MCFG with "CAVIUM" "THUNDERX" OEM and table IDs, so it's
> probably safe in that sense.
Agree, it is not the best solution.
We will implement such approach and send for review.
>
> But it's an abuse of the ACPI _HID model. If you match a device using
> PNP0A08, all you can assume about it is that it uses the generic
> PNP0A08 programming model, and I don't think that includes "the first
> memory resource in _CRS contains ECAM space and MSI-X tables."
>
> I expect this is a teething issue because you have firmware in the
> field that uses PNP0A08 and it's not feasible to update it. If that's
> the case, the changelog should have details about it and we should
> have a comment in the code, because I don't think this is the model we
> want to end up with in future releases.
It could become so. However, for now I didn't get any reports on that,
(may be I miss something) except some internal emailings.
At my testing HW I was able to see some issues related to acpi-PEM stuff.
Thanks for feed-back, we will prepare another patch or patchset
implementing approach you've highlighted.
> > if (ret) {
> > dev_err(dev, "can't get rc base address\n");
> > return ret;
> > --
> > 2.4.11
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Vadim.Lomovtsev@caviumnetworks.com (Vadim Lomovtsev)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PCI: ACPI: Fix ThunderX PEM initialization
Date: Tue, 31 Jan 2017 02:28:30 -0800 [thread overview]
Message-ID: <20170131102830.GA13854@localhost.localdomain> (raw)
In-Reply-To: <20170130211236.GW20550@bhelgaas-glaptop.roam.corp.google.com>
Hi Bjorn,
On Mon, Jan 30, 2017 at 03:12:37PM -0600, Bjorn Helgaas wrote:
> Hi Vadim,
>
> On Mon, Jan 30, 2017 at 08:25:52AM -0800, Vadim Lomovtsev wrote:
> > This patch is to address PEM initialization issue
> > which causes network issues.
> >
> > It is necessary to search for _HID:PNP0A08 while requesting
> > PEM resources via ACPI instead of "THRX0002".
> >
> > Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
> > ---
> > drivers/pci/host/pci-thunder-pem.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/host/pci-thunder-pem.c b/drivers/pci/host/pci-thunder-pem.c
> > index af722eb..aec30b8 100644
> > --- a/drivers/pci/host/pci-thunder-pem.c
> > +++ b/drivers/pci/host/pci-thunder-pem.c
> > @@ -331,7 +331,7 @@ static int thunder_pem_acpi_init(struct pci_config_window *cfg)
> > if (!res_pem)
> > return -ENOMEM;
> >
> > - ret = acpi_get_rc_resources(dev, "THRX0002", root->segment, res_pem);
> > + ret = acpi_get_rc_resources(dev, "PNP0A08", root->segment, res_pem);
>
> This doesn't smell right: PNP0A08 is the generic ACPI ID. There's no
> guarantee that if we find a PNP0A08 device, it is a ThunderX device.
>
> I think the only way to call thunder_pem_acpi_init() is via an MCFG
> quirk that mentions thunder_pem_ecam_ops, which means we only call it
> if we find an MCFG with "CAVIUM" "THUNDERX" OEM and table IDs, so it's
> probably safe in that sense.
Agree, it is not the best solution.
We will implement such approach and send for review.
>
> But it's an abuse of the ACPI _HID model. If you match a device using
> PNP0A08, all you can assume about it is that it uses the generic
> PNP0A08 programming model, and I don't think that includes "the first
> memory resource in _CRS contains ECAM space and MSI-X tables."
>
> I expect this is a teething issue because you have firmware in the
> field that uses PNP0A08 and it's not feasible to update it. If that's
> the case, the changelog should have details about it and we should
> have a comment in the code, because I don't think this is the model we
> want to end up with in future releases.
It could become so. However, for now I didn't get any reports on that,
(may be I miss something) except some internal emailings.
At my testing HW I was able to see some issues related to acpi-PEM stuff.
Thanks for feed-back, we will prepare another patch or patchset
implementing approach you've highlighted.
> > if (ret) {
> > dev_err(dev, "can't get rc base address\n");
> > return ret;
> > --
> > 2.4.11
> >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2017-01-31 10:28 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-30 16:25 [PATCH] PCI: ACPI: Fix ThunderX PEM initialization Vadim Lomovtsev
2017-01-30 16:25 ` Vadim Lomovtsev
2017-01-30 16:25 ` Vadim Lomovtsev
2017-01-30 17:39 ` David Daney
2017-01-30 17:39 ` David Daney
2017-01-30 17:39 ` David Daney
2017-01-30 21:12 ` Bjorn Helgaas
2017-01-30 21:12 ` Bjorn Helgaas
2017-01-30 21:12 ` Bjorn Helgaas
2017-01-31 10:28 ` Vadim Lomovtsev [this message]
2017-01-31 10:28 ` Vadim Lomovtsev
2017-01-31 14:25 ` Bjorn Helgaas
2017-01-31 14:25 ` Bjorn Helgaas
2017-01-31 14:25 ` Bjorn Helgaas
2017-01-31 14:57 ` Vadim Lomovtsev
2017-01-31 14:57 ` Vadim Lomovtsev
2017-01-31 14:57 ` Vadim Lomovtsev
2017-01-31 20:31 ` Bjorn Helgaas
2017-01-31 20:31 ` Bjorn Helgaas
2017-02-01 12:53 ` Vadim Lomovtsev
2017-02-01 12:53 ` Vadim Lomovtsev
2017-02-01 15:18 ` Bjorn Helgaas
2017-02-01 15:18 ` Bjorn Helgaas
2017-02-01 15:18 ` Bjorn Helgaas
2017-02-01 15:34 ` Vadim Lomovtsev
2017-02-01 15:34 ` Vadim Lomovtsev
2017-02-01 15:34 ` Vadim Lomovtsev
2017-03-15 11:14 ` Jon Masters
2017-03-15 11:14 ` Jon Masters
2017-03-15 11:14 ` Jon Masters
2017-03-15 11:33 ` Vadim Lomovtsev
2017-03-15 11:33 ` Vadim Lomovtsev
2017-03-15 11:33 ` Vadim Lomovtsev
2017-03-16 14:32 ` Jon Masters
2017-03-16 14:32 ` Jon Masters
2017-03-16 16:25 ` David Daney
2017-03-16 16:25 ` David Daney
2017-03-21 11:38 ` Jon Masters
2017-03-21 11:38 ` Jon Masters
2017-03-21 13:47 ` Bjorn Helgaas
2017-03-21 13:47 ` Bjorn Helgaas
2017-03-21 13:47 ` Bjorn Helgaas
2017-03-21 14:17 ` Tomasz Nowicki
2017-03-21 14:17 ` Tomasz Nowicki
2017-03-21 14:56 ` David Daney
2017-03-21 14:56 ` David Daney
2017-03-21 14:56 ` David Daney
2017-03-22 14:28 ` Jon Masters
2017-03-22 14:28 ` Jon Masters
2017-03-22 14:48 ` Bjorn Helgaas
2017-03-22 14:48 ` Bjorn Helgaas
2017-03-22 14:48 ` Bjorn Helgaas
2017-03-22 16:25 ` Jon Masters
2017-03-22 16:25 ` Jon Masters
2017-03-22 16:34 ` Bjorn Helgaas
2017-03-22 16:34 ` Bjorn Helgaas
2017-03-22 16:34 ` Bjorn Helgaas
2017-03-23 22:14 ` Bjorn Helgaas
2017-03-23 22:14 ` Bjorn Helgaas
2017-03-23 22:14 ` Bjorn Helgaas
2017-03-23 22:16 ` Jon Masters
2017-03-23 22:16 ` Jon Masters
2017-03-21 17:45 ` Bjorn Helgaas
2017-03-21 17:45 ` Bjorn Helgaas
2017-03-21 17:45 ` Bjorn Helgaas
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=20170131102830.GA13854@localhost.localdomain \
--to=vadim.lomovtsev@caviumnetworks.com \
--cc=David.Daney@cavium.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=tn@semihalf.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.