You need to sign in or sign up before continuing.
  • Niklas Schnelle's avatar
    s390/pci: tolerate inconsistent handle in recover · 1c8174fd
    Niklas Schnelle authored
    Since commit 8256adda
    
     ("s390/pci: handle FH state mismatch only on
    disable") zpci_disable_device() returns -EINVAL when the platform
    detects an attempt to disable a PCI function that it sees as already
    disabled.
    
    In most situations we want to abort whenever this happens and abort is
    possible since it either means that the device vanished but we haven't
    gotten an availability event yet, or the FH got out of sync which should
    not happen.
    
    Unfortunately there is an inconsistency between the LPAR and z/VM
    hypervisors on whether error events for PCI functions contain an
    an enabled or a general handle. So under z/VM it can happen that our
    most up to date function handle is enabled but trying to disable the
    function results in the aforementioned error.
    
    Since recover is designed to be used to recover functions from the error
    state let's make it robust to this inconsistency by explicitly treating
    it as a successful disable.
    Acked-by: default avatarPierre Morel <pmorel@linux.ibm.com>
    Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    1c8174fd
pci_sysfs.c 6.04 KB