s390/pci: handle stale deconfiguration events
authorNiklas Schnelle <schnelle@linux.ibm.com>
Fri, 9 Apr 2021 11:51:46 +0000 (13:51 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 30 Apr 2021 15:17:00 +0000 (17:17 +0200)
commit0d9cf5d8c5d0bfa144236b5f2aeff02124940c56
tree60acd6abe828acfc1db38b6d76190d2912751ba7
parenta7f82c3641245055412b2b4f859ae55fd29fdffe
s390/pci: handle stale deconfiguration events

The PCIs event with PEC 0x0303 or 0x0304 are a request to deconfigure
a PCI function, respectively an indication that it was already
deconfigured by the platform. If such an event is queued during boot it
may happen that the platform has already adjusted the configuration flag
of the relevant function in the CLP List PCI Functions result. In this
case we might not have configured the PCI function at all and should
thus ignore the event. Note that no locking is necessary as event
handling only starts after we have fully initialized the zPCI subsystem
and scanned all PCI devices listed in the CLP result.

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Acked-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/pci/pci_event.c