]> git.baikalelectronics.ru Git - kernel.git/commit
s390/pci: handle FH state mismatch only on disable
authorNiklas Schnelle <schnelle@linux.ibm.com>
Thu, 22 Jul 2021 10:38:29 +0000 (12:38 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 25 Aug 2021 09:03:33 +0000 (11:03 +0200)
commit7e06dc1fd5e78f2b3afe5ce3ad86297c0456c59d
tree23eb83f03fec082e6c0be56eba714ef277006dc8
parenta39111ead4ba21eed54f0f8c0d4bbed8d86925b0
s390/pci: handle FH state mismatch only on disable

Instead of always treating CLP_RC_SETPCIFN_ALRDY as success and blindly
updating the function handle restrict this special handling to the
disable case by moving it into zpci_disable_device() and still treating
it as an error while also updating the function handle such that
a subsequent zpci_disable_device() succeeds or the caller can ignore the
error when aborting is not an option such as for zPCI event 0x304.
Also print this occurrence to the log such that an admin can tell why
a disable operation returned an error.

A mismatch between the state of the underlying device and our view of it
can naturally happen when the device suddenly enters the error state but
we haven't gotten the error notification yet, it must not happen on
enable though.

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/pci.h
arch/s390/pci/pci.c
arch/s390/pci/pci_clp.c