Hardware manual
12. Speed (Flow Rate)
By "speed" we really mean the "data flow rate" but almost everybody incorrectly calls it speed. The speed is
measured in bits/sec (or baud). Speed is set using the "stty" command or by a program which uses the serial
port. See Stty
12.1 Very High Speeds
Speeds over 115.2kbps
The top speed of 115.2k has been standard since the mid 1990's. But by the year 2000, most new serial ports
supported higher speeds of 230.4k and 460.8k. Some also support 921.6k. Unfortunately Linux seldom uses
these speeds due to lack of drivers. Thus such ports behave just like 115.2k ports unless the higher speeds are
enabled by special software. To get these speeds you need to compile the kernel with special patches or use
modules until support is built into the kernel's serial driver.
Unfortunately serial port manufacturers never got together on a standard way to support high speeds, so the
serial driver needs to support a variety of hardware. Once high speed is enabled, a standard way to choose it is
to set baud_base to the highest speed with setserial (unless the serial driver does this for you). The software
will then use a divisor of 1 to set the highest speed. All this will hopefully be supported by the Linux kernel
sometime in 2003.
A driver for the w83627hf chip (used on many motherboards such as the Tyan S2460) is at
https://www.muru.com/linux/w83627hf/
A non-standard way that some manufacturers have implemented high speed is to use a very large number for
the divisor to get the high speed. This number isn't really a divisor at all since it doesn't divide anything. It's
just serves as a code number to tell the hardware what speed to use. In such cases you need to compile the
kernel with special patches.
One patch to support this second type of high-speed hardware is called shsmod (Super High Speed Mode).
There are both Windows and Linux versions of this patch. See http://www.devdrv.com/shsmod/. There is also
a module for the VIA VT82C686 chip http://www.kati.fi/viahss/. Using it may result in buffer overflow.
For internal modems, only a minority of them advertise that they support speeds of over 115.2k for their
built-in serial ports. Does shsmod support these ??
How speed is set in hardware: the divisor and baud_base
Speed is set by having the serial port's clock change frequency. But this change happens not by actually
changing the frequency of the oscillator driving the clock but by "dividing" the clock's frequency. For
example, to divide by two, just ignore every other clock tick. This cuts the speed in half. Dividing by 3 makes
the clock run at 1/3 frequency, etc. So to slow the clock down (meaning set speed), we just send the clock a
divisor. It's sent by the serial driver to a register in the port. Thus speed is set by a divisor.
If the clock runs at a top speed of 115,000 bps (common), then here are the divisors for various speeds
(assuming a maximum speed of 115,200): 1 (115.2k), 2 (57.6k), 3 (38.4k), 6 (19.2k), 12 (9.6k), 24 (4.8k), 48
(2.4k), 96 (1.2k), etc. The serial driver sets the speed in the hardware by sending the hardware only a "divisor"
Serial HOWTO
11.7 Connect the serial port to a fast network: ser2net 52