Solaris x86asy patch


Patch for increasing serial port speed on Solaris x86

This patch to the Solaris x86 asy driver allows selecting speeds 57600 and 115200 by remapping speeds 50 and 75 to these higher values. Solaris x86 2.5[.1] with Sun's patch 103022-02 (included in current Solaris x86 2.5[.1] Driver Updates) does support speeds 57600 and 115200 without my patch, but most programs don't yet know how to ask for these speeds, so the patch is still useful to get round this problem.

The patch is a shell script which patches the standard asy driver for Solaris x86. These higher speeds are probably only achievable with buffered UART chips such as National Semiconductor 16550A and later. These are standard on all current PC motherboards now. These are also standard (although sometimes emulated) on internal modems. You don't need a fast PC for these high rates - I have been running at 57600 on a 486DX33 since Solaris x86 2.1 days.

The Solaris x86 asy driver is in the file /platform/i86pc/kernel/drv/asy (or on Solaris x86 2.1 and 2.4, /kernel/drv/asy). Inside this file is a table of values passed to the chip's clock. The patch rewrites the first two entries for 50 and 75 bits/s to the correct values for 57600 and 115200 bits/s respectively. Therefore, in order to work at 57600, ask for speed 50. Similarly, for 115200, ask for 75.

This shell script does not require any privileges, and is probably best run as a normal user. It leaves the patched asy driver in /tmp/asy. To install the patched version, take a safe copy of the original in, say, /platform/i86pc/kernel/drv/asy.original, and copy in the patched version. This will need to be done by root. You will then need to reboot in order to load the new driver into the kernel.

Note for users of dp-4.0

(dp is a dial on demand kernel-based PPP and SLIP package for Solaris. See http://www.acn.purdue.edu/dp/ for details.)

dp-4.0 also plays games with remapping port speeds. If you look in the source file dpd/makecall.c, you will see that dp-4.0 maps the speed requested in the configuration file (/etc/dp/conf) as follows:

     case 57600:                return B50;
     case 76800:                return B75;
     case 115200:               return B110;

76800 is not available on x86 (at least, not without also changing the 16550's master clock speed, which my patch doesn't do). However, it is 76800 which maps to 75 bits/s, so if you want to run the port at 115200, you should specify 76800 in /etc/dp/conf. If you specify 115200, you will really run the port at 110bits/s!

Note for users of Solaris x86 2.5[.1] Driver Update 7

A fault was introduced into the asy driver in DU7, whereby it does not enable the 16550's FIFO. This makes it less suitable for use at high speeds and this patch cannot be applied to DU7.

Download

Current x86asy version is 1.7: x86asy.sh (shell script, 5375 bytes)

This is believed to work with asy drivers included with all Solaris x86 releases upto 2.6 FCS inclusive (except 2.5[.1] DU7, see above).

Other Resources

http://www.stokely.com - Home of Unix Serial Port & Sysadm Resources


© 1997 Andrew Gabriel. All Rights Reserved. / Last revision 12 May 1998