• Jon Mason's avatar
    vxge: fix crash of VF when unloading PF · c92bf70d
    Jon Mason authored
    Calling pci_disable_sriov when unloading a SR-IOV physical function
    driver from a host when a guest is using a virtual function from that
    device can cause a host crash or VM crash.  The crash is caused by the
    virtual config space no longer being present when PF is removed (due to
    the pci_disable_sriov).  This can be avoided by not calling
    pci_disable_sriov to disable the PCI space when shutting down the PF.
    Each function in the X3100 operates independently and in this case will
    operate properly in the absence of the PF.
    
    Also, added improved logic in the detection of SR-IOV initialization.
    Signed-off-by: default avatarJon Mason <jon.mason@exar.com>
    Signed-off-by: default avatarRam Vepa <ram.vepa@exar.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c92bf70d
vxge-main.c 124 KB