[PATCH 7/7] Input: gscps2 - drop busy-wait and manual interrupt pump on transmit

From: Dmitry Torokhov

Date: Sun Aug 30 2026 - 16:56:34 EST


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@xxxxxxxxxx
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
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;
}


--
2.55.0.897.gb25b4bd76c-goog