Searched hist:"07940 c369a6bf940ec4a00eeb76bf51daa4f3973" (Results 1 – 3 of 3) sorted by relevance
/linux/drivers/pci/controller/dwc/ |
H A D | pci-dra7xx.c | diff 07940c369a6bf940ec4a00eeb76bf51daa4f3973 Fri Oct 09 09:55:05 CEST 2020 Jisheng Zhang <Jisheng.Zhang@synaptics.com> PCI: dwc: Fix MSI page leakage in suspend/resume
Currently, dw_pcie_msi_init() allocates and maps page for msi, then program the PCIE_MSI_ADDR_LO and PCIE_MSI_ADDR_HI. The Root Complex may lose power during suspend-to-RAM, so when we resume, we want to redo the latter but not the former. If designware based driver (for example, pcie-tegra194.c) calls dw_pcie_msi_init() in resume path, the msi page will be leaked.
As pointed out by Rob and Ard, there's no need to allocate a page for the MSI address, we could use an address in the driver data.
To avoid map the MSI msg again during resume, we move the map MSI msg from dw_pcie_msi_init() to dw_pcie_host_init().
Suggested-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201009155505.5a580ef5@xhacker.debian Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Rob Herring <robh@kernel.org>
|
H A D | pcie-designware.h | diff 07940c369a6bf940ec4a00eeb76bf51daa4f3973 Fri Oct 09 09:55:05 CEST 2020 Jisheng Zhang <Jisheng.Zhang@synaptics.com> PCI: dwc: Fix MSI page leakage in suspend/resume
Currently, dw_pcie_msi_init() allocates and maps page for msi, then program the PCIE_MSI_ADDR_LO and PCIE_MSI_ADDR_HI. The Root Complex may lose power during suspend-to-RAM, so when we resume, we want to redo the latter but not the former. If designware based driver (for example, pcie-tegra194.c) calls dw_pcie_msi_init() in resume path, the msi page will be leaked.
As pointed out by Rob and Ard, there's no need to allocate a page for the MSI address, we could use an address in the driver data.
To avoid map the MSI msg again during resume, we move the map MSI msg from dw_pcie_msi_init() to dw_pcie_host_init().
Suggested-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201009155505.5a580ef5@xhacker.debian Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Rob Herring <robh@kernel.org>
|
H A D | pcie-designware-host.c | diff 07940c369a6bf940ec4a00eeb76bf51daa4f3973 Fri Oct 09 09:55:05 CEST 2020 Jisheng Zhang <Jisheng.Zhang@synaptics.com> PCI: dwc: Fix MSI page leakage in suspend/resume
Currently, dw_pcie_msi_init() allocates and maps page for msi, then program the PCIE_MSI_ADDR_LO and PCIE_MSI_ADDR_HI. The Root Complex may lose power during suspend-to-RAM, so when we resume, we want to redo the latter but not the former. If designware based driver (for example, pcie-tegra194.c) calls dw_pcie_msi_init() in resume path, the msi page will be leaked.
As pointed out by Rob and Ard, there's no need to allocate a page for the MSI address, we could use an address in the driver data.
To avoid map the MSI msg again during resume, we move the map MSI msg from dw_pcie_msi_init() to dw_pcie_host_init().
Suggested-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201009155505.5a580ef5@xhacker.debian Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Rob Herring <robh@kernel.org>
|