• Pali Rohár's avatar
    PCI: aardvark: Fix reporting Slot capabilities on emulated bridge · bcdb6fd4
    Pali Rohár authored
    Slot capabilities are currently not reported because emulated bridge does
    not report the PCI_EXP_FLAGS_SLOT flag.
    
    Set PCI_EXP_FLAGS_SLOT to let the kernel know that PCI_EXP_SLT* registers
    are supported.
    
    Move setting of PCI_EXP_SLTCTL register from "dynamic" pcie_conf_read
    function to static buffer as it is only statically filled the
    PCI_EXP_SLTSTA_PDS flag and dynamic read callback is not needed for this
    register.
    
    Set Presence State Bit to 1 since there is no support for unplugging the
    card and there is currently no platform able to detect presence of a card -
    in such a case the bit needs to be set to 1.
    
    Finally correctly set Physical Slot Number to 1 since there is only one
    port and zero value is reserved for ports within the same silicon as Root
    Port which is not our case for Aardvark HW.
    
    Link: https://lore.kernel.org/r/20220524132827.8837-3-kabel@kernel.orgSigned-off-by: default avatarPali Rohár <pali@kernel.org>
    Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    bcdb6fd4
pci-aardvark.c 58.7 KB