From: Okash Khawaja <okash.khawaja@gmail.com>
To: covici@ccs.covici.com,
"Speakup is a screen review system for Linux."
<speakup@linux-speakup.org>
Subject: Re: speakup-r empty line lockup
Date: Mon, 21 Aug 2017 20:24:32 +0100 [thread overview]
Message-ID: <20170821192432.GA411@sanghar> (raw)
In-Reply-To: <m3shgkevot.wl-covici@ccs.covici.com>
[-- Attachment #1: Type: text/plain, Size: 749 bytes --]
Hi,
On Mon, Aug 21, 2017 at 12:23:46PM -0400, John Covici wrote:
> He rewrote the whole part of the code, adding some new features as
> well, so the bug mysteriously went away.
I still think the root cause is correct, i.e. interrupt being triggered
from its own interrupt handler context. The fix however was too broad.
First one changed the behaviour in all cases. Second one from last night
narrowed the change to just the interrupt context.
If I had right serial synth, I would try the attached patch. This
narrows the fix down even further, so that we avoid calling
speakup_fake_down_arrow() only when we are in context of
keyboard_notifier_call() which is always invoked in interrupt context,
in response to a keyboard event.
Thanks,
Okash
[-- Attachment #2: speakup-r-fix --]
[-- Type: text/plain, Size: 1423 bytes --]
---
drivers/staging/speakup/main.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -1376,6 +1376,8 @@ static void reset_highlight_buffers(stru
static int read_all_key;
+static volatile int in_keyboard_notifier = 0;
+
static void start_read_all_timer(struct vc_data *vc, int command);
enum {
@@ -1408,7 +1410,10 @@ static void read_all_doc(struct vc_data
cursor_track = read_all_mode;
spk_reset_index_count(0);
if (get_sentence_buf(vc, 0) == -1) {
- kbd_fakekey2(vc, RA_DOWN_ARROW);
+ del_timer(&cursor_timer);
+ if (!in_keyboard_notifier)
+ speakup_fake_down_arrow();
+ start_read_all_timer(vc, RA_DOWN_ARROW);
} else {
say_sentence_num(0, 0);
synth_insert_next_index(0);
@@ -2212,8 +2217,10 @@ static int keyboard_notifier_call(struct
int ret = NOTIFY_OK;
static int keycode; /* to hold the current keycode */
+ in_keyboard_notifier = 1;
+
if (vc->vc_mode == KD_GRAPHICS)
- return ret;
+ goto out;
/*
* First, determine whether we are handling a fake keypress on
@@ -2225,7 +2232,7 @@ static int keyboard_notifier_call(struct
*/
if (speakup_fake_key_pressed())
- return ret;
+ goto out;
switch (code) {
case KBD_KEYCODE:
@@ -2266,6 +2273,8 @@ static int keyboard_notifier_call(struct
break;
}
}
+out:
+ in_keyboard_notifier = 0;
return ret;
}
next prev parent reply other threads:[~ UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
Okash Khawaja
` Samuel Thibault
` Chris Brannon
` John Covici
` Okash Khawaja
` John Covici
` Okash Khawaja
` Okash Khawaja
` John Covici
` Okash Khawaja
` Okash Khawaja
` Chris Brannon
` John Covici
` Okash Khawaja
` Okash Khawaja
` John Covici
` Samuel Thibault
` Okash Khawaja
` Kirk Reiser
` Chime Hart
` Janina Sajka
` John Covici
` Samuel Thibault
` John Covici
` Okash Khawaja [this message]
` John Covici
` Okash Khawaja
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=20170821192432.GA411@sanghar \
--to=okash.khawaja@gmail.com \
--cc=covici@ccs.covici.com \
--cc=speakup@linux-speakup.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).