From: EPAXGAMINGtv <dev_epaxgaming@icloud.com>
To: speakup@linux-speakup.org
Cc: w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca,
samuel.thibault@ens-lyon.org, linux-kernel@vger.kernel.org,
EPAXGAMINGtv <dev_epaxgaming@icloud.com>,
EPAXGAMINGtv <sureyjan@gmail.com>
Subject: [PATCH] speakup: flush serial input buffer
Date: Sun, 30 Aug 2026 19:47:07 +0200 [thread overview]
Message-ID: <20260830174707.179984-1-dev_epaxgaming@icloud.com> (raw)
Implement the serial buffer flush operation for the Speakup serial
I/O backend by draining pending characters from the UART receive
buffer.
Signed-off-by: EPAXGAMINGtv <sureyjan@gmail.com>
Signed-off-by: EPAXGAMINGtv <dev_epaxgaming@icloud.com>
---
drivers/accessibility/speakup/serialio.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/accessibility/speakup/serialio.c b/drivers/accessibility/speakup/serialio.c
index 3418ea31d..921303505 100644
--- a/drivers/accessibility/speakup/serialio.c
+++ b/drivers/accessibility/speakup/serialio.c
@@ -277,7 +277,16 @@ static unsigned char spk_serial_in_nowait(struct spk_synth *in_synth)
static void spk_serial_flush_buffer(struct spk_synth *in_synth)
{
- /* TODO: flush the UART 16550 buffer */
+
+ unsigned long flags;
+
+ spin_lock_irqsave(&speakup_info.spinlock,flags);
+
+ while (inb_p(speakup_info.port_tts + UART_LSR) & UART_LSR_DR)
+ inb_p(speakup_info.port_tts + UART_RX);
+
+ spin_unlock_irqrestore(&speakup_info.spinlock,flags);
+
}
static int spk_serial_out(struct spk_synth *in_synth, const char ch)
base-commit: 08dbfad3f5040f5bdb6c529da20d6d4e81fefd72
--
2.55.0
reply other threads:[~2026-08-30 17:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260830174707.179984-1-dev_epaxgaming@icloud.com \
--to=dev_epaxgaming@icloud.com \
--cc=chris@the-brannons.com \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.org \
--cc=sureyjan@gmail.com \
--cc=w.d.hubbs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®