lkml.org 
[lkml]   [2004]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch] Re: psmouse.c, throwing 3 bytes away
    On Sat, Feb 07, 2004 at 09:11:42AM +0000, Murilo Pontes wrote:
    > Problem still occurs :-(

    And here is a fix. Damn stupid mistake I made.

    --
    Vojtech Pavlik
    SuSE Labs, SuSE CR
    You can pull this changeset from:
    bk://kernel.bkbits.net/vojtech/input

    ===================================================================
    ChangeSet@1.1587, 2004-02-09 01:47:16+01:00, vojtech@suse.cz
    input: Fix "psmouse: Lost sync" problem. It was really losing sync.


    i8042.c | 6 ++++--
    1 files changed, 4 insertions(+), 2 deletions(-)
    ===================================================================
    diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
    --- a/drivers/input/serio/i8042.c Mon Feb 9 01:47:46 2004
    +++ b/drivers/input/serio/i8042.c Mon Feb 9 01:47:46 2004
    @@ -379,9 +379,12 @@
    unsigned int dfl;
    int ret;

    + mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
    +
    spin_lock_irqsave(&i8042_lock, flags);
    str = i8042_read_status();
    - data = i8042_read_data();
    + if (str & I8042_STR_OBF)
    + data = i8042_read_data();
    spin_unlock_irqrestore(&i8042_lock, flags);

    if (~str & I8042_STR_OBF) {
    @@ -432,7 +435,6 @@
    irq_ret:
    ret = 1;
    out:
    - mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
    return IRQ_RETVAL(ret);
    }
    \
     
     \ /
      Last update: 2005-03-22 14:00    [from the cache]
    ©2003-2011 Jasper Spaans