Re: ISDN with BitSurfr

thoth@purplefrog.com
Wed, 23 Oct 1996 14:56:09 EDT

This response is mainly of interest to Linux-heads and contains some
information that is purely speculation based on observed behavior.

dan@wide.net ,in message <9610230856.AA32968@olie.wvitcoe.wvnet.edu>, wrote:

> > of 230Kb makes it a hassle. Also, you have to "trick" the Linux kernel int
>> o
> > doing 230Kb because it doesn't yet know about that speed. That bit is easy
>> ).
>
> Care to share with the group? I'm still waiting to see a setserial come down
> the pipe that supports 16650 native. What did you do to twiddle Linus?

I did nothing to deal with the 16650s. My kernel believes it's a 16550,
and things seem to be OK. What I gleaned from Ted's writings is that the
kernel is failing to take full advantage of the 32-byte output FIFO, but the
throughput should still be excellent and the difference unnoticeable.

Getting a 230Kb DTE is so easy because you have to do almost nothing. The
TC-200-S6 has one jumper (of many) on the card with three settings. I
believe they are:

1.8MHz
3.7MHz
7.4MHz

If you have the jumper on 1.8MHz this corresponds to a normal serial port
crystal speed. Everything is normal. I believe getting a 230Kb DTE at this
setting is impossible.

If you move the jumper to the 3.7MHz clock, you are now able to get 230Kb
DTE, but to do so you have to lie to Linux. In the perfect world, Linux
would somehow figure out that your baud_base (one of the parameters to
setserial) was not 115200, but instead was 230400. However, you currently
have to set this manually. If you do set it manually, then all your
communications programs will behave normally because the kernel has accurate
information to calculate the clock divisors. When you ask for 38400, you get
38400. When you ask for 115200, you get 115200.

You currently can not ask the kernel for 230400, which sucks, but I hope
that future Linux kernel releases and serial communications/control programs
will become 230Kb and 460Kb -aware (nudge, nudge, Ted :)

So, in order to get 230400, you lie to the kernel and tell it the serial
port's baud base is 115200. That way when your communications program asks
for 115200 (begin speculation) the kernel figures it needs a clock divisor of
1. Since the real baud_base of the card is 230400, this sets the DTE speed
to 230400. Similarly, when a communications program asks for 57600, the
linux kernel sets a clock divisor of 2 giving you a DTE of (230400/2=)
115200. If you ask for 38400, it sets a clock divisor of 3 and gives you a
76800 DTE (not that I think anything recognizes that).

So, until Linux has ioctls for the higher speeds and all my favorite
programs (seyon, pppd, setserial, stty) know about them, I have to lie about
the card's baud base (which is easy. The serial port starts up with the
wrong value).

> Which card, and where did you get it? Byte Runners, perhaps?

Exactly.

> Hey Ted, did you ever get the documentation from Startech?

Well, I hope he at least has the hardware now even if he doesn't install it
for a few months. If it has NOT been delivered yet, I need to hassle
ByteRunner.