Patch "firmware: turris-mox-rwtm: Do not complete if there are no waiters" has been added to the 6.10-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

    firmware: turris-mox-rwtm: Do not complete if there are no waiters

to the 6.10-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:
     firmware-turris-mox-rwtm-do-not-complete-if-there-ar.patch
and it can be found in the queue-6.10 subdirectory.

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



commit ab77b2ca8e9d61c7a0bc164ee1362744cc903277
Author: Marek Behún <kabel@xxxxxxxxxx>
Date:   Mon Jul 15 13:59:10 2024 +0200

    firmware: turris-mox-rwtm: Do not complete if there are no waiters
    
    [ Upstream commit 0bafb172b111ab27251af0eb684e7bde9570ce4c ]
    
    Do not complete the "command done" completion if there are no waiters.
    This can happen if a wait_for_completion() timed out or was interrupted.
    
    Fixes: 389711b37493 ("firmware: Add Turris Mox rWTM firmware driver")
    Signed-off-by: Marek Behún <kabel@xxxxxxxxxx>
    Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c
index 31d962cdd6eb2..f1f9160c4195f 100644
--- a/drivers/firmware/turris-mox-rwtm.c
+++ b/drivers/firmware/turris-mox-rwtm.c
@@ -2,7 +2,7 @@
 /*
  * Turris Mox rWTM firmware driver
  *
- * Copyright (C) 2019 Marek Behún <kabel@xxxxxxxxxx>
+ * Copyright (C) 2019, 2024 Marek Behún <kabel@xxxxxxxxxx>
  */
 
 #include <linux/armada-37xx-rwtm-mailbox.h>
@@ -174,6 +174,9 @@ static void mox_rwtm_rx_callback(struct mbox_client *cl, void *data)
 	struct mox_rwtm *rwtm = dev_get_drvdata(cl->dev);
 	struct armada_37xx_rwtm_rx_msg *msg = data;
 
+	if (completion_done(&rwtm->cmd_done))
+		return;
+
 	rwtm->reply = *msg;
 	complete(&rwtm->cmd_done);
 }




[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