* [PATCH AUTOSEL 4.19 3/6] PCI: Make quirk using inw() depend on HAS_IOPORT
[not found] <20230909002424.3578867-1-sashal@kernel.org>
@ 2023-09-09 0:24 ` Sasha Levin
2023-09-09 0:24 ` [PATCH AUTOSEL 4.19 4/6] PCI: dwc: Provide deinit callback for i.MX Sasha Levin
1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2023-09-09 0:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Niklas Schnelle, Arnd Bergmann, Bjorn Helgaas, Sasha Levin,
linux-pci
From: Niklas Schnelle <schnelle@linux.ibm.com>
[ Upstream commit f768c75d61582b011962f9dcb9ff8eafb8da0383 ]
In the future inw() and friends will not be compiled on architectures
without I/O port support.
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Link: https://lore.kernel.org/r/20230703135255.2202721-2-schnelle@linux.ibm.com
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/quirks.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index fa9d6c8f1cf89..07c6b68c763fd 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -272,6 +272,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_1, quirk_isa_d
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_dma_hangs);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs);
+#ifdef CONFIG_HAS_IOPORT
/*
* Intel NM10 "TigerPoint" LPC PM1a_STS.BM_STS must be clear
* for some HT machines to use C4 w/o hanging.
@@ -291,6 +292,7 @@ static void quirk_tigerpoint_bm_sts(struct pci_dev *dev)
}
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGP_LPC, quirk_tigerpoint_bm_sts);
+#endif
/* Chipsets where PCI->PCI transfers vanish or hang */
static void quirk_nopcipci(struct pci_dev *dev)
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH AUTOSEL 4.19 4/6] PCI: dwc: Provide deinit callback for i.MX
[not found] <20230909002424.3578867-1-sashal@kernel.org>
2023-09-09 0:24 ` [PATCH AUTOSEL 4.19 3/6] PCI: Make quirk using inw() depend on HAS_IOPORT Sasha Levin
@ 2023-09-09 0:24 ` Sasha Levin
2023-09-11 9:56 ` Pavel Machek
1 sibling, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2023-09-09 0:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Mark Brown, Fabio Estevam, Lorenzo Pieralisi, Richard Zhu,
Manivannan Sadhasivam, Sasha Levin, l.stach, kw, bhelgaas,
shawnguo, linux-pci, linux-arm-kernel
From: Mark Brown <broonie@kernel.org>
[ Upstream commit fc8b24c28bec19fc0621d108b9ee81ddfdedb25a ]
The i.MX integration for the DesignWare PCI controller has a _host_exit()
operation which undoes everything that the _host_init() operation does but
does not wire this up as the host_deinit callback for the core, or call it
in any path other than suspend. This means that if we ever unwind the
initial probe of the device, for example because it fails, the regulator
core complains that the regulators for the device were left enabled:
imx6q-pcie 33800000.pcie: iATU: unroll T, 4 ob, 4 ib, align 64K, limit 16G
imx6q-pcie 33800000.pcie: Phy link never came up
imx6q-pcie 33800000.pcie: Phy link never came up
imx6q-pcie: probe of 33800000.pcie failed with error -110
------------[ cut here ]------------
WARNING: CPU: 2 PID: 46 at drivers/regulator/core.c:2396 _regulator_put+0x110/0x128
Wire up the callback so that the core can clean up after itself.
Link: https://lore.kernel.org/r/20230731-pci-imx-regulator-cleanup-v2-1-fc8fa5c9893d@kernel.org
Tested-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/pci/controller/dwc/pci-imx6.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 3b2ceb5667289..c949d11f95507 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -642,6 +642,7 @@ static int imx6_pcie_host_init(struct pcie_port *pp)
static const struct dw_pcie_host_ops imx6_pcie_host_ops = {
.host_init = imx6_pcie_host_init,
+ .host_deinit = imx6_pcie_host_exit,
};
static int imx6_add_pcie_port(struct imx6_pcie *imx6_pcie,
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH AUTOSEL 4.19 4/6] PCI: dwc: Provide deinit callback for i.MX
2023-09-09 0:24 ` [PATCH AUTOSEL 4.19 4/6] PCI: dwc: Provide deinit callback for i.MX Sasha Levin
@ 2023-09-11 9:56 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2023-09-11 9:56 UTC (permalink / raw)
To: Sasha Levin
Cc: linux-kernel, stable, Mark Brown, Fabio Estevam,
Lorenzo Pieralisi, Richard Zhu, Manivannan Sadhasivam, l.stach,
kw, bhelgaas, shawnguo, linux-pci, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 793 bytes --]
Hi!
> From: Mark Brown <broonie@kernel.org>
>
> [ Upstream commit fc8b24c28bec19fc0621d108b9ee81ddfdedb25a ]
>
> The i.MX integration for the DesignWare PCI controller has a _host_exit()
> operation which undoes everything that the _host_init() operation does but
> does not wire this up as the host_deinit callback for the core, or call it
> in any path other than suspend. This means that if we ever unwind the
> initial probe of the device, for example because it fails, the regulator
> core complains that the regulators for the device were left enabled:
This is somehow not queued for 5.10. Mistake?
BR,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-11 21:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230909002424.3578867-1-sashal@kernel.org>
2023-09-09 0:24 ` [PATCH AUTOSEL 4.19 3/6] PCI: Make quirk using inw() depend on HAS_IOPORT Sasha Levin
2023-09-09 0:24 ` [PATCH AUTOSEL 4.19 4/6] PCI: dwc: Provide deinit callback for i.MX Sasha Levin
2023-09-11 9:56 ` Pavel Machek
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).