]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: loongson: Don't access non-existent devices
authorHuacai Chen <chenhuacai@loongson.cn>
Thu, 14 Jul 2022 12:42:13 +0000 (20:42 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 14 Jul 2022 20:29:03 +0000 (15:29 -0500)
commitef6ee84cdcb440cea6db504e767aa9f147161da8
tree7384211529040cf8f4f7810e77402b8d092bbcdf
parentd01d13ebc80a0b71072467df1cc0ec1c28b256ce
PCI: loongson: Don't access non-existent devices

On LS2K/LS7A, config reads to some non-existent devices don't return
0xffffffff (they are hidden devices for debug, and accessing the config
space may cause machine hang). This is a hardware flaw but we can only
avoid it by software now.

Link: https://lore.kernel.org/r/20220714124216.1489304-5-chenhuacai@loongson.cn
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/pci-loongson.c