From: Vojtech Pavlik <vojtech@suse.cz>
To: Peter Berg Larsen <pebl@math.ku.dk>
Cc: "Gunter Königsmann" <gunter.koenigsmann@gmx.de>,
linux-kernel@vger.kernel.org,
"Dmitry Torokhov" <dtor_core@ameritech.net>
Subject: Re: Synaptics Touchpad workaround for strange behavior after Sync loss (With Patch).
Date: Mon, 19 Jan 2004 23:25:55 +0100 [thread overview]
Message-ID: <20040119222555.GA589@ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.40.0401111326480.16947-100000@shannon.math.ku.dk>
On Sun, Jan 11, 2004 at 01:46:41PM +0100, Peter Berg Larsen wrote:
>
> On Sun, 11 Jan 2004, Vojtech Pavlik wrote:
>
> > > I dont have a machine with active multiplexing so the the patch is
> > > untested. It warns when the mouse is removed, and tries to recover
> > > if multiplexing is disabled.
> >
> > It's nice, but er definitely shouldn't call i8042_enable_mux() from the
> > interrupt handler, because i8042_command() waits for characters arriving
> > in the interrupt handler, so we could get into rather nasty recursions.
>
> Are you sure? The i8042_command does spin_lock_irqsave(&i8042_lock,
> flags), i8042_wait_read, i8042_read_data and unlock. It seems a good place
> for me as the 8042s buffer is just flush by the interrupt. Well except for
> the fact it is in the interrupt handler :)
You're right, it's quite safe, but still not very nice, since the lock
fortunately isn't held at the time we would call i8042_command. However,
since i8042_command doesn't disable interrupts globally (only locally),
an interrupt generated by the controller when it acks our command still
can happen on a second CPU. It'll spin on the lock, though.
> I cannot see a simple/fast solution: All data read in the interrupt must
> be processed otherwise kbd data might be lost. I dont want
> I8042_BUFFER_SIZE calls to serio_rescan/reconnect, as serio is not smart
> enought to only do it once.
Check my current version at bk://kernel.bkbits.net/vojtech/input, there
isn't I8042_BUFFER_SIZE cycle in the interrupt routine anymore.
> The mux port number(s) must be remembered if
> serio is called after the loop. I dont like any further calls to
> i8042_flush as it troughs away both kbd and aux data.
>
> hmm, I actually want the handler to look something like:
>
> if (str & I8042_STR_MUXERR)
> i8042_handle_aux_data
> else
> i8042_handle_kbd_data
>
> That way i8042_flush can call handle_*_data depending on what to flush.
--
Vojtech Pavlik
SuSE Labs, SuSE CR
next prev parent reply other threads:[~2004-01-19 22:26 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-09 10:17 Synaptics Touchpad workaround for strange behavior after Sync loss (With Patch) Gunter Königsmann
2004-01-09 10:58 ` Vojtech Pavlik
2004-01-10 22:50 ` Peter Berg Larsen
2004-01-11 2:39 ` Peter Berg Larsen
2004-01-11 3:33 ` Dmitry Torokhov
2004-01-11 8:37 ` Gunter Königsmann
2004-01-11 12:52 ` Peter Berg Larsen
2004-01-11 14:22 ` Vojtech Pavlik
2004-01-11 15:34 ` Dmitry Torokhov
2004-01-11 15:06 ` Gunter Königsmann
2004-01-11 8:10 ` Vojtech Pavlik
2004-01-11 12:46 ` Peter Berg Larsen
2004-01-11 14:21 ` Vojtech Pavlik
2004-01-19 22:25 ` Vojtech Pavlik [this message]
2004-01-10 8:44 ` Dmitry Torokhov
2004-01-10 8:45 ` [PATCH 1/2] Synaptics rate switching Dmitry Torokhov
2004-01-10 8:46 ` [PATCH 2/2] Psmouse log and discard timed out bytes Dmitry Torokhov
2004-01-10 13:05 ` Gunter Königsmann
2004-01-10 13:23 ` Gunter Königsmann
2004-01-11 4:57 ` [PATCH 3/2] Psmouse log and discard timed out bytes - addition Dmitry Torokhov
2004-01-11 8:11 ` Gunter Königsmann
2004-01-10 9:56 ` [PATCH 1/2] Synaptics rate switching Vojtech Pavlik
2004-01-10 22:05 ` Gunter Königsmann
2004-01-10 23:37 ` Vojtech Pavlik
2004-01-11 2:20 ` Dmitry Torokhov
2004-01-11 8:00 ` Gunter Königsmann
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=20040119222555.GA589@ucw.cz \
--to=vojtech@suse.cz \
--cc=dtor_core@ameritech.net \
--cc=gunter.koenigsmann@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pebl@math.ku.dk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.