]> git.baikalelectronics.ru Git - kernel.git/commit
arch/sh: pci: don't use disabled resources
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 4 Dec 2017 15:09:02 +0000 (16:09 +0100)
committerRich Felker <dalias@libc.org>
Thu, 12 Apr 2018 23:47:54 +0000 (19:47 -0400)
commit3aeb93a014058eb889cbb12c1f61f59666b9a081
tree0ce3c82f13dfb9b281a927878c75f0cf89b77a56
parentce88313069c36eef80f21fd7403f16620ecd21a2
arch/sh: pci: don't use disabled resources

In pcibios_scanbus(), we provide to the PCI core the usable MEM and IO
regions using pci_add_resource_offset(). We travel through all
resources available in the "struct pci_channel".

Also, in register_pci_controller(), we travel through all resources to
request them, making sure they don't conflict with already requested
resources.

However, some resources may be disabled, in which case they should not
be requested nor provided to the PCI core.

In the current situation, none of the resources are disabled. However,
follow-up patches in this series will make some resources disabled,
making this preliminary change necessary.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Rich Felker <dalias@libc.org>
arch/sh/drivers/pci/pci.c