u-boot/drivers
Pali Rohár 2348e72d6d dm: pci: Fix handling of errors when scanning device
Some PCIe controller's read_config() method support indicating error
directly via return value, but some cannot distinguish all-ones (or
all-zeros) read response from an error.

The current code in pci_bind_bus_devices() interprets all-ones /
all-zeros in PCI_VENDOR_ID register as "nothing connected", and
continues the cycle, but an error returned via return value breaks the
cycle.

This is wrong for the PCIe controllers which return this error via
return value.

Handle all errors when reading PCI_VENDOR_ID the same way.

This fixes enumeration of PCI devices for example when there is a PCI
bridge connected behind another PCI bridge and not all ports are
connected to a device, and the controller (for example Aardvark)
translates the UR error (Unsupported Request) as -EOPNOTSUPP.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-09-25 09:46:15 -06:00
..
adc dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
ata pci: Fix mismerge with v2021.10-rc4 2021-09-16 11:46:44 -04:00
axi dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
bios_emulator pci: Drop DM_PCI check from bios_emul 2021-08-05 19:46:35 -04:00
block Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
bootcount bootcount: add a new driver with syscon as backend 2021-08-22 11:04:52 +02:00
bus bus: ti-sysc: change in a normal driver 2021-03-22 19:23:27 +13:00
button dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
cache cache: add sifive composable cache driver 2021-09-07 10:34:29 +08:00
clk clk: Rename clk_get_by_driver_info() 2021-09-25 09:46:15 -06:00
core treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
cpu sandbox: correct cpu nodes 2021-09-25 09:46:15 -06:00
crypto Prepare v2021.10-rc4 2021-09-16 10:29:40 -04:00
ddr nxp: Migrate a number of DDR related symbols to Kconfig 2021-08-31 17:46:37 -04:00
demo common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
dfu Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
dma Makefile: Move drivers/dma/ into drivers/Makefile 2021-09-04 12:26:02 -04:00
fastboot Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
firmware treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
fpga arm: socfpga: Move Stratix10 and Agilex to use TARGET_SOCFPGA_SOC64 2021-03-08 10:59:10 +08:00
gpio dm: gpio: Add of-platdata support 2021-09-25 09:46:15 -06:00
hwspinlock dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
i2c treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
input i8042: Do not abuse CONFIG namespace 2021-08-30 14:13:28 -04:00
led dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
mailbox dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
memory memory: stm32-fmc2: migrate trace to dev and log macro 2021-01-13 09:52:58 +01:00
misc irq: Tidy up of-platdata irq support 2021-09-25 09:46:15 -06:00
mmc clk: Rename clk_get_by_driver_info() 2021-09-25 09:46:15 -06:00
mtd Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
mux dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
net net: remove unused CONFIG_DRIVER_AT91EMAC_* 2021-09-21 10:08:24 +03:00
nvme dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
pch treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
pci dm: pci: Fix handling of errors when scanning device 2021-09-25 09:46:15 -06:00
pci_endpoint dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
phy Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
pinctrl treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
power treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
pwm dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
qe global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
ram clk: Rename clk_get_by_driver_info() 2021-09-25 09:46:15 -06:00
reboot-mode Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
remoteproc remoteproc: pru: Add support for various PRU cores on K3 AM65x SoCs 2021-07-15 17:56:04 +05:30
reset reset: zynqmp: Add reset controller for ZynqMP SoC 2021-08-06 09:32:03 +02:00
rng Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
rtc treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
scsi sata: Rename SATA_SUPPORT to SATA 2021-09-04 12:26:02 -04:00
serial treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
smem dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
soc soc: xilinx: versal: Add soc_xilinx_versal driver 2021-08-26 08:08:11 +02:00
sound dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
spi clk: Rename clk_get_by_driver_info() 2021-09-25 09:46:15 -06:00
spmi dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
sysinfo sysinfo: rcar3: Add Renesas R-Car Gen3 sysinfo driver 2021-07-20 23:33:54 +02:00
sysreset treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
tee tee: optee: sync cache on pre-reloc OP-TEE invocation 2021-07-23 07:13:25 -04:00
thermal dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
timer treewide: Try to avoid the preprocessor with OF_REAL 2021-09-25 09:46:15 -06:00
tpm treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
ufs dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
usb Remove #include <version.h> from files which do not need it 2021-09-17 12:10:44 -04:00
video treewide: fdt: Move fdt_get_config_... to ofnode_conf_read... 2021-09-25 09:46:15 -06:00
virtio pci: Drop DM_PCI 2021-09-13 18:23:13 -04:00
w1 Kconfig: Remove all default n/no options 2021-08-31 17:47:49 -04:00
w1-eeprom dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
watchdog watchdog: add gpio watchdog driver 2021-08-31 12:04:03 +02:00
xen dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
Kconfig reboot-mode: add support for reboot mode control 2021-07-23 10:16:39 -04:00
Makefile net: Move network rules to drivers/net 2021-09-04 12:51:47 -04:00