]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: mvebu: Propagate errors when updating PCI_IO_BASE and PCI_MEM_BASE registers
authorPali Rohár <pali@kernel.org>
Thu, 25 Nov 2021 12:45:58 +0000 (13:45 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 4 Jan 2022 14:58:55 +0000 (14:58 +0000)
commitfb252289e6c4678c5db5fce6aed4c9de440789d6
tree43a874a5c704e8051bf5cf257086f6ea38254296
parentefbbc18cabe699fa42dc51ef9759bfef90add090
PCI: mvebu: Propagate errors when updating PCI_IO_BASE and PCI_MEM_BASE registers

Properly propagate failure from mvebu_pcie_add_windows() function back to
the caller mvebu_pci_bridge_emul_base_conf_write() and correctly updates
PCI_IO_BASE, PCI_MEM_BASE and PCI_IO_BASE_UPPER16 registers on error.
On error set base value higher than limit value which indicates that
address range is disabled. When IO is unsupported then let IO registers
zeroed as required by PCIe base specification.

Link: https://lore.kernel.org/r/20211125124605.25915-9-pali@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/pci-mvebu.c