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 14:36:25 +0200 (MET DST)
Cc: linux-mips@linux-mips.org
In-reply-to: <20030923121410.GW13578@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:

> Well, the code suggests so. But thinking about it again, it should
> probably read (untested):
> 
> 
> --- linux-orig/drivers/tc/zs.c        Tue Aug 12 04:11:58 2003
> +++ linux/drivers/tc/zs.c     Tue Sep 23 14:09:34 2003
> @@ -456,7 +456,7 @@ static _INLINE_ void receive_chars(struc
>  
>               if (info->hook && info->hook->rx_char) {
>                       (*info->hook->rx_char)(ch, flag);
> -                     return;
> +                     continue;
>               }
>  
>               if (tty->flip.count >= TTY_FLIPBUF_SIZE) {

 That might make some sense performance-wise, but it still doesn't make a
big difference -- continuing with the loop will let following pending
codes from the keyboard to be fetched immediately, while returning defers
that to the next SCC interrupt.

 Actually, I'm not that keen on making revolutionary changes to
drivers/tc/zs, just fixing bugs (of course, this might be one).  The
driver should be rewritten to become a front-end to
drivers/net/wan/z85230.c (the path seems unfortunate).  Then more
interesting stuff, like DMA and synchronous operation, will become
available. 

  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>