Re: serial.c (half duplex support)

David Woodhouse (David.Woodhouse@mvhi.com)
Wed, 27 Oct 1999 15:07:47 +0100


R.E.Wolff@BitWizard.nl said:
> I've talked to David about Profibus. (Was that a year ago David?)

Yes, I suppose it must be. That's quite frightening.

> One of the things I didn't know back then is that Linux allways lets
> the tx buffer drain completely, and then refills it to the top. This
> means that if the TX buffer empty interrupt isn't serviced within one
> character time (The transmitter shift register is shifting out one
> last character when the FIFO is empty...), there is a gap. Those gaps
> may be interpreted as an "end of packet" indication. That is
> unacceptable.

Definitely. IIRC, there's not a lot we can do about this - at least with a
16550a, you can't get it to interrupt any earlier. We just have to make sure
that we service the interrupt PDQ.

I think I calculated that this shouldn't be too much of a problem - we can't
run at more than 19200 baud (I don't think we can set a divisor for 93750) so
we have 11/19200 = ~573 microseconds to respond.

> Linux often turns off interrrupts for "too long". Especially when
> there are IDE disks near the machine....

Don't do that then. Seriously, if you're using IDE disks in a machine you're
trying to do this kind of thing on, then I don't want to know you.

> Ted, I suspect that -=* generating *=- the 33 bit-times of idle time
> is much more important than measuring it.

Definitely. The strict checking on the receive side is only for purposes of
attaining certification. We can get it to work happily without that. We just
need to ensure that we wait for 33 bit times before sending, and that we don't
have gaps in the packets we send.

I'm handwaving at this point - I'm not ready to specify exactly what I want,
I'm just pointing out my requirements as the subject happened to come up.

I'm fairly sure can get software Profibus to work without really having to play
silly buggers with the existing line discipline interface.

Once I get to that stage, I'll have a far clearer idea of exactly what I want
to change in order to get certification, and I'll get back to it. Or just
decide that I don't actually want to get certification for it anyway.

---- ---- ----
David Woodhouse David.Woodhouse@mvhi.com Office: (+44) 1223 810302
Project Leader, Process Information Systems Mobile: (+44) 7976 658355
Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK.
finger dwmw2@ferret.lmh.ox.ac.uk for PGP key.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/