On Wed, Aug 5, 2015 at 6:14 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
It only can avoid warning with bridge, and still have warning on
devices under the bridge.
also would have problem on transparent bridges, like
BRIDGE_A ---- BRIDGE_AA----DEVICE_AA
|
\-- BRIDGE_AB ---DEVICE_AB
if only BRIDGE_A and BRIDGE_AA are transparent, and BRIDGE_AB is not.
and if pci_bridge_supports_io() return false for BRIDGE_A.
We will have all three bridges have PCI_BUS_FLAGS_SUPPORTS_IO cleared.
so all will not been sized and will not get assigned io port resource.
later DEVICE_AA could root bus io port as parent, and get io resource assigned.
but DEVICE_AB will not get assigned.
so we should get rid of pci_bridge_supports_io(), and just check root
resource IO port.
I would suggest this version instead:
Subject: [PATCH] PCI: Only try to assign io port only if root bus support that