No way to flush rx buffer in serial driver?

No way to flush rx buffer in serial driver?

Post by Grant Edwar » Wed, 25 Jun 2003 03:27:56



I've been looking at serial driver code (2.4.18), and low level
drivers provide a way to flush the tx buffer by calling

         tty->driver.flush_buffer(tty);    // from tty_ioctl.c

but there does not seem to be a corresponding call to flush the
rx buffer.  Why not?

TCOFLUSH flushes both line-discipline and low-level driver
buffers, but TCIFLUSH only flushes line-discipline buffers.
This seems wrong...

--
Grant Edwards                   grante             Yow!  Wait... is this a FUN
                                  at               THING or the END of LIFE in
                               visi.com            Petticoat Junction??

 
 
 

1. Serial buffer flushing problems under 1.0

Hi. I have been having problems getting SLIP to work. I have tried DIP 3.3.7
and dslip 2.01, both of which have problems.

The problem with dip is that it just doesn't send any characters. If I
go to TERM mode and type stuff, nothing is transmitted. (I have a HP
protocol analyser on the line to check that) I can receive OK, but not
transmit. When I quit dip, the stuff I typed gets transmitted.

With dslip, similar problem. My expect script doesn't send the text until
it quits, which means that it doesn't see the response to what it sent.

If I run seyon or kermit, neither of these have problems.

Any clues??

                                                - Ben Kelley

--
"Help! My cat's dirty!"
"Yes, I know, why don't you ... My, what a red volume control you have on your
pencil sharpener there!"

... We apologise for the above lapse in sensability. Sensible .sig follows ...


Ph +61 (0)2 258 2382 - Ring 2 and a half times for...Sorry, sorry. No really!

2. dialup ppp server and dial on demand

3. 3c905 100Mbps: RX-ERR RX-DRP RX-OVR?

4. Looking for Conference/New York/Aug

5. doing buffered RPC via clnt_call: how to do a buffer flush?

6. Lib problems

7. inn - news setup

8. serial driver open/flush question

9. Changing Serial Nos using 'brand'

10. Rx buffer problem

11. how to get per-socket stats on udp rx buffer overflow?