linux-mips
[Top] [All Lists]

Re: [PATCH] Fix character loss in drivers/tc/zs.c

To: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Subject: Re: [PATCH] Fix character loss in drivers/tc/zs.c
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Tue, 23 Sep 2003 13:31:43 +0200 (MET DST)
Cc: linux-mips@linux-mips.org
In-reply-to: <20030923084005.GU13578@rembrandt.csv.ica.uni-stuttgart.de>
Organization: Technical University of Gdansk
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
On Tue, 23 Sep 2003, Thiemo Seufer wrote:

> >  Can you please elaborate?  tty is expected to be NULL if info->hook is
> > not, so the code after the change should not differ effectively -- only a
> > useless check is added at the end.  Am I missing anything?
> 
> AFAICS the
> 
>         while ((read_zsreg(info->zs_channel, R0) & Rx_CH_AV) != 0) {
> 
> loops over the FIFO contents and 'return' discards the remaining
> part. The patch made a visible difference for me with some noisy
> debug printk()'s in the kernel.

 Hmm, a coincidence?  Without your patch the execution goes as follows:

receive_chars()
{
        ...
        (*info->hook->rx_char)(ch, flag);
        return;
}

And after the change it is as follows:

receive_chars()
{
        ...
        (*info->hook->rx_char)(ch, flag);
        if (tty)
                tty_flip_buffer_push(tty);
        return;
}

and tty is NULL.  And I fail to see how it can it make any difference for
printk() output -- the code in question is only ever executed for input
from an LK201-type keyboard.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


<Prev in Thread] Current Thread [Next in Thread>