* Patch "PCI: thunder-pem: Fix legacy firmware PEM-specific resources" has been added to the 4.10-stable tree
@ 2017-04-09 8:25 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-04-09 8:25 UTC (permalink / raw)
To: tn, bhelgaas, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
PCI: thunder-pem: Fix legacy firmware PEM-specific resources
to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pci-thunder-pem-fix-legacy-firmware-pem-specific-resources.patch
and it can be found in the queue-4.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From feb199ebef488a9f2c3550fb10524f3dac9d8abe Mon Sep 17 00:00:00 2001
From: Tomasz Nowicki <tn@semihalf.com>
Date: Fri, 31 Mar 2017 17:06:44 +0200
Subject: PCI: thunder-pem: Fix legacy firmware PEM-specific resources
From: Tomasz Nowicki <tn@semihalf.com>
commit feb199ebef488a9f2c3550fb10524f3dac9d8abe upstream.
SZ_16M PEM resource size includes PEM-specific register and its children
resources. Reservation of the whole SZ_16M range leads to child device
driver failure when pcieport driver is requesting resources:
pcieport 0004:1f:00.0: can't enable device: BAR 0 [mem 0x87e0c0f00000-0x87e0c0ffffff 64bit] not claimed
So we cannot reserve full 16M here and instead we want to reserve
PEM-specific register only which is SZ_64K.
At the end increase PEM resource to SZ_16M since this is what
thunder_pem_init() call expects for proper initialization.
Fixes: 9abb27c7594a ("PCI: thunder-pem: Add legacy firmware support for Cavium ThunderX host controller")
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/pci/host/pci-thunder-pem.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/pci/host/pci-thunder-pem.c
+++ b/drivers/pci/host/pci-thunder-pem.c
@@ -360,7 +360,6 @@ static void thunder_pem_legacy_fw(struct
index -= node * PEM_MAX_DOM_IN_NODE;
res_pem->start = PEM_RES_BASE | FIELD_PREP(PEM_NODE_MASK, node) |
FIELD_PREP(PEM_INDX_MASK, index);
- res_pem->end = res_pem->start + SZ_16M - 1;
res_pem->flags = IORESOURCE_MEM;
}
@@ -384,8 +383,15 @@ static int thunder_pem_acpi_init(struct
*/
if (ret) {
thunder_pem_legacy_fw(root, res_pem);
- /* Reserve PEM-specific resources and PCI configuration space */
+ /*
+ * Reserve 64K size PEM specific resources. The full 16M range
+ * size is required for thunder_pem_init() call.
+ */
+ res_pem->end = res_pem->start + SZ_64K - 1;
thunder_pem_reserve_range(dev, root->segment, res_pem);
+ res_pem->end = res_pem->start + SZ_16M - 1;
+
+ /* Reserve PCI configuration space as well. */
thunder_pem_reserve_range(dev, root->segment, &cfg->res);
}
Patches currently in stable-queue which might be from tn@semihalf.com are
queue-4.10/pci-thunder-pem-add-legacy-firmware-support-for-cavium-thunderx-host-controller.patch
queue-4.10/pci-thunder-pem-fix-legacy-firmware-pem-specific-resources.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-09 8:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-09 8:25 Patch "PCI: thunder-pem: Fix legacy firmware PEM-specific resources" has been added to the 4.10-stable tree gregkh
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).