Patch "Input: serio - define serio_pause_rx guard to pause and resume serio ports" has been added to the 6.12-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

    Input: serio - define serio_pause_rx guard to pause and resume serio ports

to the 6.12-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:
     input-serio-define-serio_pause_rx-guard-to-pause-and.patch
and it can be found in the queue-6.12 subdirectory.

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



commit 2f136558ce088ef2add684278ff88677a63f5829
Author: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Date:   Wed Sep 4 21:17:06 2024 -0700

    Input: serio - define serio_pause_rx guard to pause and resume serio ports
    
    [ Upstream commit 0e45a09a1da0872786885c505467aab8fb29b5b4 ]
    
    serio_pause_rx() and serio_continue_rx() are usually used together to
    temporarily stop receiving interrupts/data for a given serio port.
    Define "serio_pause_rx" guard for this so that the port is always
    resumed once critical section is over.
    
    Example:
    
            scoped_guard(serio_pause_rx, elo->serio) {
                    elo->expected_packet = toupper(packet[0]);
                    init_completion(&elo->cmd_done);
            }
    
    Link: https://lore.kernel.org/r/20240905041732.2034348-2-dmitry.torokhov@xxxxxxxxx
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
    Stable-dep-of: 08bd5b7c9a24 ("Input: synaptics - fix crash when enabling pass-through port")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/linux/serio.h b/include/linux/serio.h
index bf2191f253509..69a47674af653 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -6,6 +6,7 @@
 #define _SERIO_H
 
 
+#include <linux/cleanup.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <linux/list.h>
@@ -161,4 +162,6 @@ static inline void serio_continue_rx(struct serio *serio)
 	spin_unlock_irq(&serio->lock);
 }
 
+DEFINE_GUARD(serio_pause_rx, struct serio *, serio_pause_rx(_T), serio_continue_rx(_T))
+
 #endif




[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