s390/ap: Fix bind complete udev event sent after each AP bus scan
authorHarald Freudenberger <freude@linux.ibm.com>
Mon, 13 May 2024 09:21:48 +0000 (11:21 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 16 May 2024 08:17:11 +0000 (10:17 +0200)
commit306d6bda8f97432f9cb69b5cbd86afd3a8ca182f
treee9ae1e3fd553fcd5069e05bb380be49911a43ce9
parentd4f9d5a99a3fd1b1c691b7a1a6f8f3f25f4116c9
s390/ap: Fix bind complete udev event sent after each AP bus scan

With the mentioned commit (see the fixes tag) on every AP bus scan an
uevent "AP bus change bindings complete" is emitted.  Furthermore if an AP
device switched from one driver to another, for example by manipulating the
apmask, there was never a "bindings complete" uevent generated.

The "bindings complete" event should be sent once when all AP devices have
been bound to device drivers and again if unbind/bind actions take place
and finally all AP devices are bound again. Therefore implement this.

Fixes: 778412ab915d ("s390/ap: rearm APQNs bindings complete completion")
Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/ap_bus.c