Re: serial drivers

Gael Gence (
4 Aug 1997 19:50:15 -0500

On Mon, 4 Aug 1997, Richard Masoner wrote:

> Gael Gence <> wrote:
> GG> I know that when the driver read an UART register,
> GG> it is cleared. An ioctl returns the LSR status
> GG> (if 0, we are transmitting) but that's all.
> GG> I've modified the
> GG> get_lsr_status function to return the value of lsr instead
> GG> of 1 || 0... But i never see that we are receiving data...
> (...)
> An ioctl to get current LSR status almost certainly won't be handled
> during interrupt context. In fact, I don't see the point of getting
> the current LSR status outside of an interrupt routine, which makes me
> think that I'm misunderstanding Gael's scenario.

No, you don't. This is my fault. My mail was not clear at all ;-)
In fact, I don't want to modify anything in the driver, and I really
understand now why my question is "stupidiously stupid".

I try again.

I'm wondering about a way (any way, even a trick) to know if the serial
port has received something. I'd like to write a program able to report
port state in "real time". I'm using TIOCSERGETLSR to see if data is
sent -> how can i know if data is received ? I was talking about LSR
because get_lsr_status is the last thing i've tried.

> I do get that haunting feeling now that I may have misunderstood Gael's
> question, but I've already typed all this in :-) so I'm sending it.

Thanks for your effort. I appreciate the details. Very clear.


* Gael Gence / Symbolink *
* Computer Support & Unix Software Development *
* Tel: +32-2/216.35.69, e-mail: *