Patch "s390/ap: Fix bind complete udev event sent after each AP bus scan" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    s390/ap: Fix bind complete udev event sent after each AP bus scan

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     s390-ap-fix-bind-complete-udev-event-sent-after-each.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f0ef2d0187a78bab94876e96d1936ee335a28d5c
Author: Harald Freudenberger <freude@xxxxxxxxxxxxx>
Date:   Mon May 13 11:21:48 2024 +0200

    s390/ap: Fix bind complete udev event sent after each AP bus scan
    
    [ Upstream commit 306d6bda8f97432f9cb69b5cbd86afd3a8ca182f ]
    
    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@xxxxxxxxxxxxx>
    Signed-off-by: Harald Freudenberger <freude@xxxxxxxxxxxxx>
    Reviewed-by: Holger Dengler <dengler@xxxxxxxxxxxxx>
    Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index cce0bafd4c926..f13837907bd5e 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -767,9 +767,9 @@ static void ap_check_bindings_complete(void)
 		if (bound == apqns) {
 			if (!completion_done(&ap_apqn_bindings_complete)) {
 				complete_all(&ap_apqn_bindings_complete);
+				ap_send_bindings_complete_uevent();
 				pr_debug("%s all apqn bindings complete\n", __func__);
 			}
-			ap_send_bindings_complete_uevent();
 		}
 	}
 }
@@ -929,6 +929,12 @@ static int ap_device_probe(struct device *dev)
 			goto out;
 	}
 
+	/*
+	 * Rearm the bindings complete completion to trigger
+	 * bindings complete when all devices are bound again
+	 */
+	reinit_completion(&ap_apqn_bindings_complete);
+
 	/* Add queue/card to list of active queues/cards */
 	spin_lock_bh(&ap_queues_lock);
 	if (is_queue_dev(dev))




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux