• Hariprasad Shenai's avatar
    cxgb4: Use FW interface to get BAR0 value · 0abfd152
    Hariprasad Shenai authored
    Use the firmware interface to get the BAR0 value since we really don't want
    to use the PCI-E Configuration Space Backdoor access which is owned by the
    firmware.
    
    Set up PCI-E Memory Window registers using the true values programmed into
    BAR registers.  When the PF4 "Master Function" is exported to a Virtual
    Machine, the values returned by pci_resource_start() will be for the
    synthetic PCI-E Configuration Space and not the real addresses. But we need
    to program the PCI-E Memory Window address decoders with the real addresses
    that we're going to be using in order to have accesses through the Memory
    Windows work.
    
    Based on origninal work by Casey Leedom <leedom@chelsio.com>
    Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
    Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0abfd152
cxgb4_main.c 176 KB