From daae2ab46e0cb612f50ca1d86cf50e5962461ae5 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Sun, 30 Aug 2026 13:52:52 -0700 Subject: [PATCH] Input: gscps2 - drop busy-wait and manual interrupt pump on transmit In gscps2_writeb_output(), after writing data to GSC_XMTDATA, the driver explicitly executed mdelay(6) and manually called gscps2_interrupt() as a polling mechanism to accelerate command responses (such as keyboard ACK or LED updates). On PA-RISC, the PS/2 controller asserts a level interrupt to the system ASIC whenever received data arrives in hardware, and the input/serio subsystem handles command responses asynchronously via completions. Busy-waiting for 6 ms on every transmitted byte introduces significant unnecessary latency during multi-byte command sequences and complicates interrupt handler locking. Remove mdelay(6) and the manual invocation of gscps2_interrupt() from gscps2_writeb_output(), relying on normal hardware interrupt delivery. Reported-by: sashiko-bot@kernel.org Assisted-by: LLM Link: https://patch.msgid.link/20260830-gscps2-v1-7-c733d4cae7f9@gmail.com Acked-by: Helge Deller Tested-by: Helge Deller Signed-off-by: Dmitry Torokhov --- drivers/input/serio/gscps2.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 2afd53a163ff..985539f1d088 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c @@ -356,13 +356,6 @@ static inline int gscps2_writeb_output(struct gscps2port *ps2port, u8 data) scoped_guard(spinlock_irqsave, &ps2port->lock) writeb(data, addr + GSC_XMTDATA); - /* this is ugly, but due to timing of the port it seems to be necessary. */ - mdelay(6); - - /* make sure any received data is returned as fast as possible */ - /* this is important e.g. when we set the LEDs on the keyboard */ - gscps2_interrupt(0, NULL); - return 1; }