Newsgroups: comp.sources.unix From: fas@geminix.in-berlin.de (FAS Support Account) Subject: v27i199: fas-2.12.0 - asynch serial driver for System V, Part02/08 References: <1.759531570.7983@gw.home.vix.com> Sender: unix-sources-moderator@gw.home.vix.com Approved: vixie@gw.home.vix.com Submitted-By: fas@geminix.in-berlin.de (FAS Support Account) Posting-Number: Volume 27, Issue 199 Archive-Name: fas-2.12.0/part02 #!/bin/sh # this is fas212pl0.02 (part 2 of a multipart archive) # do not concatenate these parts, unpack them in order with /bin/sh # file RELEASENOTES continued # if test ! -r _shar_seq_.tmp; then echo 'Please unpack part 1 first!' exit 1 fi (read Scheck if test "$Scheck" != 2; then echo Please unpack part "$Scheck" next! exit 1 else exit 0 fi ) < _shar_seq_.tmp || exit 1 if test ! -f _shar_wnt_.tmp; then echo 'x - still skipping RELEASENOTES' else echo 'x - continuing file RELEASENOTES' sed 's/^X//' << 'SHAR_EOF' >> 'RELEASENOTES' && X Xrelease 2.04 Thu Dec 07, 1989 X XDid some cleanup in the source. X XRemoved the FIFO clear from the ioctl function. We don't want Xto do things there that aren't in the book. X XAn ioctl call that switches off the CLOCAL flag will create Xa SIGHUP signal if the carrier is actually missing at this Xtime. X XEvery device is tested now quite thoroughly during initialization. XIf the test fails the corresponding device keeps unconfigured. X X------------------------------------------------------------ X Xrelease 2.05 Sat Jan 13, 1990 X XThis is the first public release of the FAS driver. X XSpecial thanks to the sysops of my test sites, Axel Fischer X(fischer@utower.UUCP) and Kritt Gierlewsen (kritt@einoed.UUCP). X XFAS is now an independant driver with its own driver name (`fas'), Xmajor device number, link kit directory and other things necessary Xfor a driver. The original asy driver may or may not be linked Xwith the kernel. You only need it if you want to access some Xserial devices via the virtual COM ports of the DOS emulator X(DosMerge or VP/ix) because the FAS driver doesn't have this X(really vendor dependant) feature. X XThe default prefix for tty device node names is `ttyF' now. XThis prevents mix-ups with the device names of the original Xasy driver. X XDropped the SYSV/AT support. I couldn't test the driver Xfor several release generations on uPort SYSV/AT, and because Xthere are not very much systems left with that flavor of UNIX Xit doesn't make sense to try to maintain compatibility with it. XIf someone really wants to use this driver on a 286 he has Xto port it himself. X XImproved the transmitter FIFO fill procedure. Now it will try Xharder to fill the FIFO as much as possible to cut down on Xtransmitter interrupts. X XSoftware input flow control (XON/XOFF) is controlled by the driver now. XIt is bound to the level of the receiver ring buffer (as is hardware Xflow control). As usual, it can be switched on and off by the XIXOFF flag in the termio(7) structure. X XChanged and speeded up the ring buffer -> unix buffer processing. X XFor ISC, the getty lines for the inittab file are installed Xby the makefile now. X XThe conditional compilation of the function `init8250' (for XDosMerge) is now controlled by a define in `fas.h'. The compiler Xswitch `-DMERGE' is not used any more. X XImproved the documentation. X XThe signals used for modem control and hardware flow control are Xfully configurable in the `space.c' file now. Look at `fas.h' for Xpossible macros and combinations. X XThere are some new modes for hardware flow control, for instance XHO_CTS_ON_DSR. This means that CTS is only looked at if DSR is on. XIf DSR is off output is possible regardless of CTS. The underlying Xassumption here is that we can expect proper handshake handling Xonly from devices that are in the ready state (indicated by DSR). XAs a spin-off the problem with the hanging getty on lines with Xturned-off terminals (mentioned in earlier releases) should be Xgone if you use this new mode. X XIf the XCLUDE-Flag is availabe (SYSV 3.2 because of Xenix Xcompatibility) exclusive open of a device is possible. X XThe default size of the input ring buffer is now 5000 bytes. XThis makes streaming input more likely even on loaded systems. X XBug Fixes: X X The task state busy flag wasn't reset in some rare cases. X This could cause processes to become immortal while waiting X for the busy flag. X X Under some special conditions an ioctl call with a TCSETA? X command could corrupt the last character in the transmitter X shift register. This is fixed now. X X More fixing of the busy flag handling was necessary. X Co-ordinating several delayed tasks controlling this flag X is kind of tricky. X X After a TCSETA* ioctl command we disable the transmitter X for 2 sec (measured from the last transmitted character) X if the character format and/or speed has changed. This X gives the receiving side some time to do the same changes. X This is kind of experimental. There may be applications that X suffer from this delay. You may change the #define ADAPT_TIME X in `fas.h' to a smaller value. X X------------------------------------------------------------ X Xrelease 2.06 Fri Mar 16, 1990 X XThis should have been patch #3 for release 2.05, but there are Xso many changes now that I decided to make it a new release. XTherefore, some of the changes are described in the 2.05 release Xnotes above but were never released to the public. X XNew Features: X X There is a transmitter ring buffer now to make the output X less system load dependent. This really speeds things up X because the transmitter FIFO gets filled with more characters X at once. The buffer size depends on the actual baud rate to X prevent long output buffer drains at low speeds. X X There are also bigger input buffers to make FAS more competitive X against "intelligent" cards. X X Lots of speed improvements and many small changes. X XBug Fixes: X X Fixed input/output buffer flush on carrier loss while close X is waiting for the output to drain. X X------------------------------------------------------------ X Xrelease 2.07 Tue Sep 18, 1990 X XThis is a major redesign of the previous release. I put most of the Xtime consuming tasks in one function that is invoked asynchronously Xby timeout calls. Inside this function most of the code runs at Xa lower system priority level (spl5) than the interrupts. That Xmeans that during character processing tty interrupts are allowed. XThis is the main key to operation at 38400 bps on multiple ports Xat the same time which is possible now with this release. X XNew Features: X X FAS supports the VP/ix DOS emulator! X Now you can throw out the vendor's original driver even X if you like to have a serial mouse or modem access in DOS. X Read the paragraph about VP/ix in the README file. X X The Intel i82510 port chip is supported. It has separate X 4-character FIFOs for input and output. Although the X NS16550A is much better this chip is your second choice X if you can't get your hands on the National chips. X Thanks to Christian Seyb (cs@gold.UUCP) for sending me X patches and the necessary documentation for the Intel X chips. X X There is an init sequence in `space.c'. You can put any X number of address-data pairs in a null terminated array X to program your serial card or other hardware before X FAS makes the first access to the ports. AST 4-port cards, X for instance, have an additional port that needs to be X written to with a certain bit pattern to allow shared X interrupts. If you need to read a port to achieve the X setting or resetting of flags as a side effect, this X is possible, too. X X ESIX is officially supported now. X X SCO UNIX is officially supported, too. FAS needs to be X compiled with the command line flag `-DSCO'. The makefile X for SCO takes care of that. Thanks to Walter Mecky X (walter@mecky.systemware.de) and Frank Simon X (terra@sol.north.de) for helping me in making the necessary X changes for SCO UNIX. X X SCO Xenix 386 is also officially supported. FAS needs to be X compiled with the command line flag `-DXENIX'. The makefile X for SCO Xenix takes care of that. Thanks to Andreas X Steinmetzler (andreas@oil.UUCP) for doing the port. X X If you have the RTSFLOW and CTSFLOW termio(7) flags, X hardware handshake can be controlled by them. X Note that enabling handware flow control via the X minor device number overrides these flags. If you X like to use them you need to create tty device nodes X with minor device numbers in which the bit for hardware X handshake is set to 0. Look at the description in the X README file for more details. X Note also that if you choose to use RTSFLOW and CTSFLOW X all your programs that do initial access to tty devices X (getty, uucico, cu, SLIP dialup program etc.) need to know X about these flags or hardware handshake will not be used. X X The `O_EXCL' flag for the open(2) call is honored now. X This allowes exclusive access to an FAS device without X suffering from race conditions which could occure with X the termio(7) XCLUDE flag method. X X The `fas_test_device' function returns a digit now that X indicates at which phase the test exited due to an error. X This error digit is displayed in the boot message. Thanks X to Brian Beattie (beattie@visenix.UUCP) for sending me X the necessary patches. X XBug Fixes: X X Automatic input FIFO flush after unblocking the getty X open by the carrier or the unblock signal. This makes sure X that there is no chance that there are characters in the X FIFO that were received before the open got unblocked. X X The sdevice entry for the AST 4-port card had a wrong X I/O address range (`s_fas-mux4'). This didn't affect FAS X but is checked by the kernel config program. X X The gcc (GNU cc) support was removed because gcc's object X file wants to link in some "helpful" functions that aren't X contained in the kernel. But anyway, FAS is tuned so carefully X and depends on the optimization behaviour of the AT&T X standard C compiler that gcc won't have any advantages. X X I changed the method with which the `fas_test_device' function X waits for certain events. The `delay' function was used X for that purpose but it turned out that with some flavors X of UNIX it is prohibited to use this function during the X xxinit phase of the boot process. Now a simple timeout loop X is used instead. X X Removed the ADAPT_TIME mechanismn introduced in release 2.05. X X The open() call now returns an `EBUSY' error number if the X device is already open and can't be opened in the desired X mode at this time. X X The handling of the RING signal needed fixing. Unlike the other X three modem status lines RING generates an interrupt only at X the trailing edge. X X No SIGHUP signal is sent any more if an ioctl call clears X the CLOCAL termio(7) flag while there is no carrier present. X SIGHUP is only sent if the actual DCD modem line drops. X X The files *-mux4 were renamed to *-ast4 because this type of X card was originally developed by AST (AST 4-port card). X X------------------------------------------------------------ X Xrelease 2.08 Sun Feb 03, 1991 X XNew Features: X X Bell Tech/Intel UNIX 3.2 is supported. X X SCO Xenix 286 is also supported now. Thanks to Nickolay Saukh X (nms@saukh.rd.jvd.su) for providing the patches. X X The Bell Tech HUB-6 card can be used with FAS. Thanks to X Keith Walker (kew@cims2.UUCP) for the patches. X X For AT&T derived flavors of UNIX there is a line automatically X added to the kernel description file that makes the adding X and removing of FAS possible via the `kconfig' program. Thanks X to John Adams (johna@grumpy.boston.ma.us) for this idea. X X There is a mechanismn now that prevents excessive modem status X interrupts caused by crosstalking between wires or by a loose X cable. X X You can disable the FIFOs in a UART by "oring" the macro X `NO_FIFO' to the base port address of this device. This is X useful for mouse devices where you need immediate response X to the mouse movement. X X The meaning of the bit mapped part of the minor device X numbers has changed. Some rather useless functions were X removed in favor of more control over the hardware handshake X modes. Even systems where the SCO RTSFLOW/CTSFLOW termio(7) X flags are not available can now use half duplex hardware X flow control (selected via the minor device number). X X The assignment of RS232C lines to certain FAS functions X is even more flexible now. This allows to connect two X UNIX systems (with FAS) via a null modem cable, running X a getty at both ends. For more details, read the paragraph X about CABLING in the README file. X X A special handling of the NS16550A input FIFO was introduced. X This causes multiple receiver interrupts (on the same IRQ X line) to be synchronized so that only one interrupt is X necessary to process all receiving ports. This reduces the X interrupt handling overhead and therefore results in lower X CPU load for concurrent serial input at high speeds. X X The `fas_event' function processes all scheduled events X for all units with one single call. Previously, every unit X launched its own timeout() call if there was work to X do. This could lead to up to 16 timeouts at the same time, X resulting in some timeout handling overhead. This overhead X is minimized now. X XBug Fixes: X X There were two bugs that could cause a port to lock up, X resulting in an immortal process. X X Almost any kernel sleep is killable now (at least with one or X two `kill -9'). Therefore, there should be no more immortal X processes. Even killing a process that is hanging in a X close-on-exit call is possible. X X The meaning of the RTSFLOW/CTSFLOW termio(7) flags was converted X to what SCO had in mind (half duplex flow control). This is for X compatibility reasons. Full duplex RTS/CTS hardware flow control X is still possible via the minor device number method. Thanks to X Dmitry V. Volodin (dvv@hq.demos.su) for providing me with the X necessary knowledge. X X If a process is already sleeping in a getty open it will only X unblock on DCD low->high. In particular, if in the meantime X the device was open for dialout and DCD is still present if X the getty open takes over again this won't unblock the getty X open any more. X X And there were, as usual, a number of other small bug fixes. X X------------------------------------------------------------ X Xrelease 2.09 Sun Jun 23, 1991 X XNew Features: X X AT&T UNIX 3.2 Version 2.1 is supported. X X Support was added for SysVr4 UNIX 386 (with the tty compatibility X drivers). This was mostly a problem of ANSI-fying certain parts X of the FAS sources. For this operating system, there is no VP/ix X support in FAS. This will change when FAS is converted into a X STREAMS driver. X X Killing a process hanging on an FAS port that had output X flow stopped was usually done by issuing one or two `kill -9' X commands. However, this method could hang the whole UNIX kernel. X Therefore, another method to release hung processes is X introduced in this release. X If you open an FAS device with the O_TRUNC flag, the input X and output buffers of that device get flushed. As a side X effect, if you had previously tried to kill a hung process, X and it continued to hang on an FAS device, you simply have X to open that device with the O_TRUNC flag, and the hung X process is released. All you have to do is to type X echo '\c' > /dev/ttyname X and the device buffers are flushed. X X There is a new array called fas_overrun[], which is of X type `uint', that contains three receiver overrun counters X for NS16450, i82510 and NS16550A UART chips, in that order. X If you have a tool that permits you to look at kernel X variables during runtime, you can determine yourself X whether the problems you may have might be caused by X lost input characters. With every receiver overrun, the X respective counter is incremented by one. X XBug Fixes: X X The problem with the excessive modem status interrupts X is fixed. Well, kind of. It is suppressed, at least. X Crosstalk between the lines in a serial cable wastes X only a minor amount of CPU time now. Therefore, it isn't X necessary any more to shut down a port when this happens. X However, if you use an operating mode (selected by the X minor device number) that assigns certain functions to X the input pins at the RS232C connector (DCD, DSR, CTS and X RI), and these pins toggle because of crosstalk in the cable, X problems may still occure. But at least it won't panic the X kernel any more, nor will it consume lots of CPU time. X X Additionally, in operating modes where FAS doesn't need to X know anything about modem status lines, the modem status X interrupt is actually disabled. For instance, when a minor X device number of 0 + port# is used. On the other hand, X switching the device to DOS mode always _enables_ the X modem status interrupts. X X A problem was fixed when a port was in the canonical (cooked) X mode and FAS still tried to protect the CLIST input buffer X from overflowing. This blocked the connected terminal until X a break signal or a hangup. The input buffer protection X should, of course, only happen in raw mode. X X The TIMEOUT tty state flag isn't used any more by FAS. X Because this flag is used by the line discipline as well, X its usage in FAS could cause problems. X X There was a bug in the handling of one pointer in the X fas_test_device() function. X X In fas_event(), looping for the same port several times until X all events are serviced could cause temporary deadlocks. We X now don't loop any more. If an event occures while in fas_event(), X but the branch responsible for processing was already passed, X this event has to wait until the next call of fas_event() X (usually one or two kernel ticks later). X X The AIOCINFO ioctl() command returned the minor device number. X Now it returns the unit number. X X SIGHUP will be sent only if the port is the controlling terminal X of a process group. X X There was a problem with the initialization macros for the X fas_modem[] and fas_flow[] arrays. Under Xenix 286, some X of these macros expanded to a value of zero because the X size of type int is 16 bits, while it is 32 bits for all X the 386 UNIX flavors. This resulted in dropped bits with X some macros that use the `<<' operator. X X An fasopen() call is checked immediately for permissions now, X even if another process is currently hanging in fasclose(). X The fasopen() call, of course, can be completed only after X the other process has returned from fasclose(). X X------------------------------------------------------------ X Xrelease 2.09 PL1 Sun Sep 22, 1991 X XNew Features: X X There is a new variable called fas_msi_noise. This X is a counter that is incremented each time the modem X status interrupt of a UART had to be disabled due to X excessive logic level transitions on one or more X modem status lines (DCD, DSR, CTS and RING). X This can be used to check whether there is any X crosstalking at high speeds in your serial cables X and should be taken as a hint that you should improve X your cables (shorter and/or shielded ones). Note X that there are also some modems or other devices X that cause this counter to be incremented (slowly, X though). In this case fixing the cabling won't X help. X X FAS now supports a port speed of 57600 bps. By X default, in the array fas_port[] (`space.c') you can X set a flag (`HIGH_SPEED') independently for each port X to have 57600 bps instead of 38400 bps on the respective X port. Due to interrupt latency in the UNIX kernel you X will need a 486 mainboard even with NS16550A chips if X you don't want to risk losing incoming characters. For X terminals connected at this speed, a slower mainboard X will suffice, however. To make this speed work well, X the transmitter buffer size has been increased to 5000 X bytes. X X Another flag (`NO_TEST') can be set in fas_port[] X (`space.c') to disable the testing procedure for X the respective port. This can be used to allow X UART chips (i.e. internal modems) that don't pass X the test but seem to work anyway. Note that if you X do that you're completely on your own if you have X problems with FAS. I won't support you if you use X this flag because using UARTs that need this flag X means calling for trouble. I simply can't diagnose X this kind of hardware problem from the remote. X X The SVR4 `CTSXON' and `RTSXOFF' hardware flow X control flags are supported, although I still X believe that FAS' minor device number based X method for controlling hardware handshake modes X is superiour to any method that is using ioctl() X calls for that purpose. X X Made the UART testing in fas_test_device() even X harder. Now it should detect brain dead chips X more reliable. X XBug Fixes: X X Modified fasopen() to handle mixed (with and w/o X O_NDELAY flag) invocations while there is no X carrier. X X On dialout devices with modem control it was X intended that after carrier drop the first X TCSETA* ioctl() command would switch FAS to X ignore DCD for that port again (as is the X case after the initial fasopen() call). This X breaks certain shells that do a TCSETA* X command before they read from stdin, and therefore X never notice that DCD dropped. They don't get X the SIGHUP either because they are in another X process group at this time (job control !). X Now it is only possible to reset FAS in X the above manner if the CLOCAL flag is set X with the TCSETA* command. Once FAS is X switched to ignore DCD, CLOCAL can be cleared X again. X X If the carrier drops and modem control is X enabled (CLOCAL is off), SIGCONT is sent X before SIGHUP (only where available) to X wake up stopped processes so that they will X notice the hangup signal. X X Several other bug fixes, cleanups and improvements. X X------------------------------------------------------------ X Xrelease 2.10 PL0 Mon Aug 17, 1992 X XNew Features: X X There are no interrupt vectors to be entered in `space.c'. X The only place where int vectors are contained in this X release is the `s_fas' file. The reason for this is that X the interrupt function in FAS now scans all _active_ ports X no matter what int vector they are assigned to. This is X necessary in order to sort the ports by their speed. Scanning X the fastest port(s) first makes receiver character loss less X likely, especially at speeds > 19200 bps. Although this method X has a slight CPU time overhead for only one running port the X real advantage is that when more than one port is running, X and especially when these ports are receiving NS16550A UARTs X where the interrupt frequency optimization is used, the X CPU time requirements for each additional running port are X substantially lower than with previous FAS releases. X X Where available, the Makefile puts the kernel defines from X `/etc/conf/cf.d/defines' into the compiler command line. X X There are now different Makefiles for ISC UNIX 2.x and 3.x. X This has to do with a change in the ISC kernel config kit. X X Under SVR4 the copy of `fas.h' that goes to `/usr/include/sys' X now gets the time stamp of the copy operation so that the X dependency in the Makefile works. X X Either 57600 or 115200 bps can be used instead of 38400 bps. X For 115200 a very fast mother board and a UNIX with a low X interrupt latency is necessary to prevent input character loss. X X There is a flag `LOW_INT_LAT' that can be defined in the X makefile if the UNIX kernel has a low tty interrupt latency. X This saves a lot of CPU time at high speeds because the X receiver FIFO trigger level is set to 8 instead of 4 (default), X and therefore the receiver interrupt frequency is cut in half. X X The flags that can be "ored" into the base port address of X a UART to change its default behaviour are now documented X in the README file. X X Template files for the DigiChannel PC/8 card were added. X X Support for gcc has been added. If NO_ASM is _not_ defined X inline code for the inb() and outb() functions is generated X with the help of the __asm__ feature. However, when __asm__ X is used together with the `volatile' storage class gcc X produces rather poor code. I assume that in this case gcc X can't do some optimizations because they would break the X inline assembler code. And the code gets even worse if X -fstrength-reduce is used (with or without inline assembler X code). Apparently gcc is over-optimizing the code so that X it is in fact slower than without -fstrength-reduce. So X don't use this flag. All tests where done with gcc 1.40. X X There is an interrupt acknowledge sequence in `space.c' now X that is similar to the init sequence but is executed by the X fasintr() function after all pending interrupts on all serial X cards have been processed. This is a replacement for the X fas_int_ack_port and fas_int_ack arrays that are gone because X we don't use interrupt vectors any more inside FAS. X X The receiver and modem status interrupts are disabled now X whenever they aren't needed. If they are disabled this X saves some CPU time in the interrupt function. X X A new termio(7) flag CRTSFL under SCO UNIX 3.2.4 enables full X duplex hardware flow control, but only if neither CTSFLOW nor X RTSFLOW are set. See the termio(7) man page. However, remember X that when you use a minor device number controlled hardware X handshake mode (the prefered method with FAS, even under SCO X UNIX and Xenix) the flags CTSFLOW, RTSFLOW and CRTSFL are X ignored! X X For each port, it can be selected whether the SCO UNIX/Xenix X CTSFLOW/RTSFLOW termio(7) flags enable half duplex hardware X flow control (default, compatible with the sio driver), or if X they enable full duplex hardware flow control (compatible with X many "intelligent" serial cards from third party vendors). X X The RTS_TOG ioctl() command is supported (if available). X X The sources for this release, and also the object file, are X somewhat bigger than the previous release. Besides other X things this is caused by the inlining of some functions. X These functions were called rather frequently and were X small enough for inlining. This saves some function call X overhead. X X There are lots of changes that yield a better use of X register variables, especially in loops. X XBug Fixes: X X The method to flush the output buffers of a port while a X process is hanging in fasclose() has been changed. In X FAS 2.09 the buffers were flushed when the port was opened X with the O_TRUNC flag. This caused some problems with shell X scripts that wanted to write text with X X echo 'foo bar' > /dev/tty X X I changed FAS to use O_APPEND instead. So in order to flush X the output buffers in this release one has to use X X echo '\c' >> /dev/ttyF00 X X if the port `ttyF00' is hanging. X X The kernel `ttyhog' variable is used instead of the default X TTYHOG value from `tty.h'. So FAS notices if this variable is X tuned by the SysAdmin. X X The array `fas_info' has been renamed to `fas_internals' X to prevent a name space collision under SVR4. X X `fas_overrun' and `fas_msi_noise' where declared `static'. X Under some UNIX flavors a static kernel variable isn't X found by programs that are used to look at variables in X the running kernel. This is fixed now. X X The method how to handle concurrent fasopen() calls with X and without O_NDELAY on a device that waits for a carrier X has been changed back to what FAS 2.09.0 did. If there X already is a process waiting for carrier and another process X opens the device with O_NDELAY the waiting process is waked X up and completes its fasopen() call regardless of the state X of the carrier. This is because due to the AT&T kernel design X we can't have both a sleeping and a working process on the X same device. Patch #1 for FAS 2.09 introduced a bug which X caused hung gettys. This error is fixed by going back to X the method used in FAS 2.09.0. X X The problem that caused occasional crashes under SCO UNIX X appears to be fixed. I don't know for sure why this is so. X We'll see. X X When a process is waiting inside fasclose() for the X output buffers to drain and the process receives a X signal that is not ignored the output buffer is X automatically flushed in order to allow fasclose() X to complete before the signal handler is entered. X This has to happen because the open file counter is X decremented even if fasclose() was interrupted. I fact, X fasclose() is expected to complete properly under all X circumstances because the routines calling fasclose() don't X check for signals or errors when fasclose() returns. So after X the signal handler has done its work fasclose() wouldn't X be entered again because the open file counter is already X zero at this time. That means that whatever happens fasclose() X must have done its cleanup for the port before it returns. X X Under SVR4 longjmp() wants a pointer as its parameter. X X The half and full duplex hardware handshake has been X redesigned to be more bullet proof when it comes to X switching from one mode to the other. X X The Logitech mouse problem has been solved. There is X a bug in the generic ttiocom() support function that X FAS needs to circumvent with some additional code. X X The incrementation of the counters in the sysinfo X structure is fixed in that it happens only once for X each interrupt and not once for every port that has X work to do. This better reflects the actual interrupt X load. X X Because a carrier drop is processed asynchronously in X fas_event() it is necessary to at least stop the X character output as soon as the modem status interrupt X is detected. Now only up to 16 characters (one FIFO X load with NS16550A) will be transmitted after carrier X drop. This is in line with the latency of the hardware X output handshake. X X And of course lots of other optimizations and small X fixes. X X------------------------------------------------------------ X Xrelease 2.11 PL0 Mon Oct 11, 1993 X XImprovements: X X Better description of some of the user selectable symbolic X constants in `fas.h' that allow OS dependent conditional X compilation of the sources (file `INSTALLATION'). X X Some cleanup of the README and the INSTALLATION file. X X Most of the text that was previously in the README file was X converted to [NT]ROFF source format and transfered to the new X fas(7) man page. X X There is a file `COPYING' now that contains the FAS copyright. X X Config files for the USENET II serial card have been added. X X All config files for multiport cards have COM1 and COM2 X additionally enabled because it is easier for the user to X disable COM1 and/or COM2 (if they are not needed) than it X is to add the necessary entries to the config files. X X The config files for the DigiChannel PC/8 card have been X renamed to `*-gen8c12'. `gen' stands for generic and means X that these config files can be used for 8-port cards from X different vendors. X X The new file `m_fas' contains a sample entry for the X /etc/conf/cf.d/mdevice file. X X The ORTSFL hardware flow control flag introduced in SCO UNIX X 3.2.4.2 is supported. X X Official GCC support (although not recommended). X X VP/ix support is enabled by default. X X If the file /etc/conf/init.d/fas already exists `make install' X doesn't copy `i_fas' over it so that customized inittab lines in X /etc/conf/init.d/fas are preserved. X X There is an explicit support address: fas@geminix.in-berlin.de X Note, however, that this doesn't mean that you can get X professional full-time support if you mail to this address. X As FAS is a spare time project I will answer mails only as X time permits. X X The outb()/inb() inline assembler optimizations for AT&T X derived OS flavors have been dropped. Instead, there is now X an AWK script that optimizes the `fas.s' file after compilation. X There are other optimizations performed by this script as well. X The makefiles for the OS platforms where this optimization is X applicable contain the necessary awk invocation. X X In the past, short integers were used wherever applicable X because of the somewhat smaller opcode size. However, tests X have shown that under i386/i486 word operations are signifi- X cantly slower than byte or double word operations. So the use X of short integers is avoided now if possible. This has no X effect on i286 which has word size as its native operand size. X X For modem controlled devices, after the first loss of carrier X FAS ignores the carrier state and assumes it is missing until X the last process closes the device. Additionally, in this state X the modem enable output (usually DTR) is held low to prevent X the modem from answering calls. This is a security feature in X that it prevents new dialins if for some reason a process X (shell etc.) hangs on this device. Otherwise, the next user X calling in on this device would get the shell (or whatever X process is hanging) of the user who started it, and therefore X all his permissions. This actually happens from time to time X and is a gaping security hole, especially if the previous user X has root permissions. This protection feature can be disabled X on a per port basis if it breaks any software. X X There is a new, more flexible mechanism for defining non- X standard baud rates like 57600 and 115200 bps. Look at the X fas(7) man page and `space.c' for more informations. X X Flags like `NO_TEST' that were previously "ored" into the X base port address have their own array now (fas_modify [] in X `space.c'). X X There is a `NO_OVERRUN' flag for fas_modify []. It may be set X for devices that have some sort of receiver overrun protection, X for instance certain internal modems that use a 16x50 UART X emulation and have their own receiver buffer. X X The FIFO modes and trigger levels for the NS16550A UART can be X controlled on a per port basis (`space.c'). X X The offset for the various UART registers from the base port X address is variable and can be customized for unusual hardware X designs (`space.c'). X X For SCO UNIX and Xenix users, there is the new fas_vec[] array X in `space.c'. If the interrupt vector numbers of the various X ports are entered into this array, they are displayed by the X FAS boot message. Users of other UNIX flavors can ignore this X array. X X Copying between user and kernel data space is done by copyin() X and copyout() because fubyte() and subyte() are marked obsolete X in the AT&T driver reference manual. X X Made better use of register variables. We can have more than X the usual three register variables in a function if we define X those that aren't used in the entire function inside a block X of statements. So a CPU register can be shared by several X variables. X X Converted several small functions to inline code for faster X execution. X X Merged fas_proc() and fas_cmd() to fasproc(). X X The fasintr() function has been optimized so that it has to X poll less UARTs to make sure that there are no more pending X interrupts. X X The fas_rproc() function feeds the incoming characters X directly into the receiver ring buffer instead of storing X them in a temporary buffer first. So it's faster now. X X A new timeout mechanism in fas_rxfer() optimizes the character X transfer from the receiver ring buffer to the CLIST buffers X in order to reduce processing overhead in the CLIST routines. X X Character transfers between ring buffers and CLIST buffers X in fas_rxfer() and fas_xxfer() are done by copying two or four X characters at a time (using word (i286) or double word (i386+) X accesses) whenever possible. Additionally, for AT&T derived X UNIX flavors this copy operation is implemented as inline X assembler code. X X The function declarations at the beginning of `fas.c' expand X to ANSI C prototypes if an ANSI C compiler is used. X X OS dependent defines have been moved to `fas.h' and are X automatically updated by the makefile. X X The ring buffer size has been increased to 10000 characters in X order to cope with 115200 bps (not for Xenix 286). X X The `inittab' getty lines have a `-t 60' by default to time X out after 60 seconds. This prevents getty from waiting X indefinitely on a dialup modem line. X XBug Fixes: X X The TTYHOG problem on some platforms is fixed. Some UNIX flavors X have a tunable `ttyhog' kernel variable, some don't. The X `TUNABLE_TTYHOG' symbolic constant in `fas.h' can be used X to tell FAS whether your system has this kernel variable or X not. X X FAS initializes all variables and arrays and doesn't rely on X global memory being initialized to zero. To my astonishment X I read that global memory in the kernel isn't guaranteed to X be initialized to zero. I don't know if this is true for all X platforms. So I don't take chances and let FAS do its own X initialization. X X Device driver functions like fasopen(), fasclose() etc. are X defined as having a result type of `int'. That is, they don't X really return a result, but a function defined without an X explicit result type automatically has a result type of `int'. X The respective FAS functions return no result, but to make X ANSI C compilers happy they have to be defined with a result X type of `void' instead of `int' to make it obvious that they X don't have a return value. This dilema results from the kernel X originally being compiled with a K&R C compiler (not ANSI C) X where one gets away with `int' functions returning no result X values. X X Fixed a bug that would prevent the dialin process (getty) X from reopening the device after a dialout process using this X device was interrupted while waiting inside of fasopen() for X the device lock. X X The `RTS_TOG' ioctl() command suspends/resumes the character X output. This is more compatible with the implementations in X the vendor drivers. X X ttiocom() is called at SPLWRK so that the fas_event() function X can't be invoked before fas_param() has been called after X ttiocom(). This makes sure that there are no discrepancies X between the tty structure (set by ttiocom()) and the X fas_internals structure (set by fas_param()) when line X discipline functions are called from fas_event(). X X SCO UNIX uses the same SPL assignment as SCO Xenix (SPL5 and X SPL7). Previously, FAS under SCO UNIX used the original AT&T X assignment (SPL6 and SPLTTY). This incompatibility should be X the reason for all the problems that only occured under SCO X UNIX (crashes, hung ports etc.). Thanks to Mark Lyda X (mark@startech.com) for pointing this out. X X There is an incompatibility between SCO UNIX/Xenix and the X rest of the world in that SCO UNIX/Xenix passes a pointer X to `struct termss' with the `AIOCSETSS' ioctl() command while X on the other platforms a copy of this structure is passed X as the argument itself. Thanks to Robert Lipe X (robertl@amsg.arnet.com) for this information. X X fas_test_device() uses the highest possible baud rate on X the respective port (derived from the assigned fas_baud[] table X in `space.c') for the test run. In previous releases the highest X overall baud rate was used on all ports, even if a port would X never actually run at this speed. X X The MCR/MSR test routine in fas_test_device() copes with slow X MCR/MSR registers as it isn't really necessary for FAS' X operation that these registers are particularly fast. It's X only necessary that all eight modem status bits change state X at the same time (clocked operation). X X Fixed a bug that could stall the receiver CLIST queue under VP/ix. X X Switching from an operating mode that has modem status interrupts X disabled to a mode that enables modem status interrupts caused X a DTR drop if the DCD status was low before the modem status X interrupts were disabled. X X If the O_NDELAY flag is set when fasclose() is called (last close), X FAS doesn't wait until the output buffers have drained. Instead, X it flushes the output buffers so that it can complete fasclose() X without delay. X X File `fas.h' is unconditionally copied to the system include X directory when `make install' is executed (except for SCO Xenix). X So it is installed at the same time as `space.c', which happens X to be the only file outside of the FAS source directory that uses X `fas.h'. This change makes the installation of `fas.h' more bullet X proof in cases where there is already another version of FAS X installed. X X When a dialout process opens a logical dialout device while a X dialin process waits for the carrier on the corresponding logical X dialin device, the physical device is now closed internally before X reopening it for the dialout process. X X fas_close_device() doesn't disable the FIFO mode in the UART X anymore as this is unnecessary. X X The termio(7) XCLUDE flag was tested against the wrong variable. X Under SCO UNIX this had the effect that when CRTSFL/ORTSFL was X set, successive opens failed with EBUSY for users != root. X X The gcc inline assembler instructions `inb' and `outb' have been X changed from the Intel to the AT&T syntax for SCO UNIX. This is X because gcc uses the AT&T assembler by default. X X Gcc's automatic register allocation does a poor job on the FAS X sources. Therefore, we force gcc to use registers for certain X variables. X X------------------------------------------------------------ X Xrelease 2.12 PL0 Wed Jan 12, 1994 X XImprovements: X X In previous releases RTS was dropped immediately when the device X was closed while DTR was cleared 500 ms later. Also, when the X device was closed and the HUPCL flag was _not_ set, DTR was left X untouched but RTS was dropped. This can cause problems with pointer X devices like mice that get their power supply from the DTR and RTS X lines of the serial port. Therefore, RTS is dropped now together X with DTR after the 500 ms delay or is also left untouched if HUPCL X was not set. X X The fasinit() function checks now whether a port can trigger an X interrupt, that is, whether the interrupt (IRQ) lines in both your X hardware and the config files are set up properly. The exceptions X from this are SCO UNIX and Xenix because these OS flavors don't X allow interrupts during the init phase. X X The fas_vec[] array in `space.c' is compiled in only under SCO UNIX X and Xenix as other UNIX flavors don't use it. X X In previous FAS versions, the transmitter and receiver ring buffers X were part of the `fas_internals' structure and were therefore X allocated statically at compile time. With increasing buffer sizes X (because of increasing baud rates) FAS eventually became a real memory X hog. Beginning with this release, however, FAS allocates the ring X buffer memory dynamically and for each port independently, its size X depending on the highest baud rate the respective port can run at. X Memory is allocated with the first open of the port device and is X freed when the last process closes the device. Therefore, unused ports X consume almost no memory. Note, however, that a port having a getty on X it qualifies as open and therefore has already allocated the ring X buffer memory. Note also that under SCO Xenix 286 the memory is still X allocated statically at compile time. This is because the i286 memory X model with its segmentation would make it too complicated to implement X dynamic memory allocation under this OS. X X GCC versions older than 2.4.5 tend to break FAS, so don't use them. X The file `INSTALLATION' has been updated accordingly. X X The fas(7) man page has been updated. SHAR_EOF echo 'File RELEASENOTES is complete' && true || echo 'restore of RELEASENOTES failed' rm -f _shar_wnt_.tmp fi # ============= config-ast4c12 ============== if test -f 'config-ast4c12' -a X"$1" != X"-c"; then echo 'x - skipping config-ast4c12 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting config-ast4c12 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'config-ast4c12' && X* its character device number 4 Xcharacter(4) X X* its name Xprefix = fas X X* The interrupt vectors handled by this controller Xintvec = 5,4,3 X X* its mask level Xintpri = SPLTTY X X* the functions it supports Xfunctions = init, open, close, read, write, ioctl, tty SHAR_EOF true || echo 'restore of config-ast4c12 failed' rm -f _shar_wnt_.tmp fi # ============= config-ast8c12 ============== if test -f 'config-ast8c12' -a X"$1" != X"-c"; then echo 'x - skipping config-ast8c12 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting config-ast8c12 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'config-ast8c12' && X* its character device number 4 Xcharacter(4) X X* its name Xprefix = fas X X* The interrupt vectors handled by this controller Xintvec = 5,9,4,3 X X* its mask level Xintpri = SPLTTY X X* the functions it supports Xfunctions = init, open, close, read, write, ioctl, tty SHAR_EOF true || echo 'restore of config-ast8c12 failed' rm -f _shar_wnt_.tmp fi # ============= config-c123 ============== if test -f 'config-c123' -a X"$1" != X"-c"; then echo 'x - skipping config-c123 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting config-c123 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'config-c123' && X* its character device number 4 Xcharacter(4) X X* its name Xprefix = fas X X* The interrupt vectors handled by this controller Xintvec = 4,3,5 X X* its mask level Xintpri = SPLTTY X X* the functions it supports Xfunctions = init, open, close, read, write, ioctl, tty SHAR_EOF true || echo 'restore of config-c123 failed' rm -f _shar_wnt_.tmp fi # ============= config-gen8c12 ============== if test -f 'config-gen8c12' -a X"$1" != X"-c"; then echo 'x - skipping config-gen8c12 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting config-gen8c12 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'config-gen8c12' && X* its character device number 4 Xcharacter(4) X X* its name Xprefix = fas X X* The interrupt vectors handled by this controller Xintvec = 5,4,3 X X* its mask level Xintpri = SPLTTY X X* the functions it supports Xfunctions = init, open, close, read, write, ioctl, tty SHAR_EOF true || echo 'restore of config-gen8c12 failed' rm -f _shar_wnt_.tmp fi # ============= config-hub6c12 ============== if test -f 'config-hub6c12' -a X"$1" != X"-c"; then echo 'x - skipping config-hub6c12 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting config-hub6c12 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'config-hub6c12' && X* its character device number 4 Xcharacter(4) X X* its name Xprefix = fas X X* The interrupt vectors handled by this controller Xintvec = 5,4,3 X X* its mask level Xintpri = SPLTTY X X* the functions it supports Xfunctions = init, open, close, read, write, ioctl, tty SHAR_EOF true || echo 'restore of config-hub6c12 failed' rm -f _shar_wnt_.tmp fi # ============= config-use4c12 ============== if test -f 'config-use4c12' -a X"$1" != X"-c"; then echo 'x - skipping config-use4c12 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting config-use4c12 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'config-use4c12' && X* its character device number 4 Xcharacter(4) X X* its name Xprefix = fas X X* The interrupt vectors handled by this controller Xintvec = 15,4,3 X X* its mask level Xintpri = SPLTTY X X* the functions it supports Xfunctions = init, open, close, read, write, ioctl, tty SHAR_EOF true || echo 'restore of config-use4c12 failed' rm -f _shar_wnt_.tmp fi # ============= fas.7 ============== if test -f 'fas.7' -a X"$1" != X"-c"; then echo 'x - skipping fas.7 (File already exists)' rm -f _shar_wnt_.tmp else > _shar_wnt_.tmp echo 'x - extracting fas.7 (Text)' sed 's/^X//' << 'SHAR_EOF' > 'fas.7' && X.\" @(#)fas.7 X.TH FAS 7 "Release 2.12.0" X.SH "NAME" Xfas \- asynchronous serial character device driver X.SH "DESCRIPTION" X\fIFAS\fP, which is an acronym for X\fIF\fPinal \fIA\fPsync \fIS\fPolution, Xis a "dumb"\-port character device driver for 286/386 based XUNIX systems that adds several features that are Xoften not provided by vendors drivers. X.LP XIt supports X.nf X.IP "" 3 X\- the \fINS16450\fP and \fIum82450\fP UART chips. X\- the \fINS16550A\fP and \fIi82510\fP UART chips in FIFO mode. X\- up to 115200 bps with \fINS16550A\fP. X\- built\-in modem line sharing for dialin and dialout. X\- modem control on both dialin and dialout devices. X\- full and half duplex hardware flow control. X\- concurrent hardware and software (XON/XOFF) flow control. X\- shared interrupts. X\- multiplexed UART registers (\fIHUB\-6\fP card etc.). X\- any mix of up to 16 UARTs. X\- any I/O address, any IRQ. X\- \fIVP/ix\fP, the ISC DOS emulator. X.fi X.LP X\fIFAS\fP was successfully tested under the Xfollowing operating systems: X.nf X.IP "" 3 XISC UNIX 2.0.2 and later XSCO UNIX 3.2.2 and later XSCO XENIX 286 2.3.2 and later XSCO XENIX 386 2.3.2 and later XMicroport SVR3.0 XESIX SVR3.2 Rev. C & D XBell Tech/Intel SVR3.2 XAT&T SVR3.2 V 2.1 XSVR4.0 (with tty compatibility drivers) X.fi X.LP XThis driver should work with most of the XUNIX SVR[34].x flavors currently available. XYou can have both this and the original vendor driver Xin the same kernel (if you really like to, but I Xwouldn't know why). XEach driver controls its own separate set of serial ports. XThe only restriction here is that each interrupt vector must Xnot be used by more than one of the drivers. XThe kernel config program will complain otherwise. X.SH "WHICH SERIAL CARDS ARE SUPPORTED ?" X\fIFAS\fP supports and has been tested on many Xasync serial "dumb"\-port cards. XIt can handle most combinations of shared interrupts. XThe current version can be used with \fINS16450\fP, X\fINS16550A\fP, \fIum82450\fP and \fIi82510\fP UARTs X(a UART is a chip that converts data between the Xcomputer's internal representation and the serial Xone\-bit\-at\-a\-time format). X\fI8250\fP chips are not supported due to various Xbugs and speed problems in these parts. XThey have no place in any 286/386 or other Xhigh performance system. XReplace them with one of the supported chips. XThey are pin\-to\-pin compatible. X.IP "IMPORTANT:" 11 XDon't use \fINS16550\fP (without the trailing \fBA\fP) Xor any chips from a second source manufacturer! XThey have a reputation of being buggy and might Xnot work with \fIFAS\fP. XSome aren't even recognized by the FIFO auto\-detect Xcode in \fIFAS\fP. XThe quality of the second source chips might have Ximproved lately but there is no way to know for sure. XTherefore, even if they are cheaper, don't buy them. X.LP XTake a look at the \fIspace\-*\fP files for details Xon how to set up for various devices. XSample config files are provided for the following Xcards: X.nf X.IP "" 3 X\fI*\-ast4c12\fP \fIAST\fP 4\-port card plus COM1 and COM2 X\fI*\-ast8c12\fP Two \fIAST\fP 4\-port cards plus COM1 and COM2 X\fI*\-c123\fP COM1, COM2 and COM3 X\fI*\-gen8c12\fP Generic 8\-port card plus COM1 and COM2 (you can X use these files for the \fIDigiChannel PC/8\fP, X \fIAPT HSS08\fP, \fIHostess\fP, \fIBoca\fP and \fIArnet\fP 8\-port cards) X\fI*\-hub6c12\fP \fIBell Tech HUB\-6\fP card plus COM1 and COM2 X\fI*\-use4c12\fP \fIUSENET II\fP 4\-port card plus COM1 and COM2 X.fi X.LP XInternal modems are also supported. XSome of them, however, use a UART emulation instead of a Xgenuine UART chip. XThese types of internal modems usually don't pass the UART Xtest at boot time. XTherefore, you may want to set the \fBNO_TEST\fP flag in the X\fIfas_modify\fP[] array (\fIspace.c\fP) to skip the UART test. XOn the other hand, most of the internal modems with a UART Xemulation have a receiver overrun protection so that characters Xcan't be lost at high baud rates. XFor these modems, it is advisable to set the \fBNO_OVERRUN\fP Xflag in the \fIfas_modify\fP[] array (\fIspace.c\fP). XIf an internal modem with overrun protection emulates Xan \fINS16550A\fP UART, you should additionally use the X\fBFIFO_TRIGGER_14\fP symbol in the \fIfas_fifo_ctl\fP[] Xarray (\fIspace.c\fP). XThis sets the receiver FIFO size to the highest possible trigger Xlevel in order to reduce the interrupt frequency. XPlease refer to the sections \fBMODIFYING A PORT'S DEFAULT BEHAVIOUR\fP Xand \fBUART FIFO CONTROL\fP for further details. X.LP XThere are serial cards on the market that emulate an X\fINS16550A\fP UART and have receiver overrun protection due to Xan additional character buffer. XThey look like an ordinary COM port from the software side but Xhave their own CPU, RAM, ROM etc. on\-board. XThe special considerations for internal modems pointed out Xabove apply to these serial cards as well. XOne example is the \fIQueueCOM\-115\fP card for which you Xshould set the \fBNO_TEST\fP and \fBNO_OVERRUN\fP flags and Xuse the \fBFIFO_TRIGGER_14\fP symbol. X.SH "BOOT TIME STATUS MESSAGE" XAt boot time you will see a status message on Xthe screen with symbols that show the init Xstate of each port. XThe symbols are as follows: X.nf X.IP "" 3 X\fB\-\fP not defined in the \fIfas_port\fP[] array X\fB!\fP configuration error (check \fIspace.c\fP and \fIfas.h\fP) X\fB?\fP can't initialize port X\fB#\fP can't detect interrupt X\fB1\fP\-\fB9\fP error during UART test phase indicated by number X\fB*\fP port is initialized (\fINS16450\fP) X\fB+\fP port is initialized and has FIFOs forced off X\fBf\fP port is initialized and has FIFOs (\fIi82510\fP) X\fBF\fP port is initialized and has FIFOs (\fINS16550A\fP) X.fi X.LP XThis is convenient to check whether you have entered Xthe proper port base addresses in \fIspace.c\fP X(symbol \fB?\fP). XIt also shows you whether you have selected the right Xinterrupt (IRQ) lines in both your hardware and the Xconfig files (symbol \fB#\fP). XNote that the interrupt check isn't available under XSCO UNIX and Xenix. X.SH "SHARED INTERRUPTS" XMany multi\-port cards have jumpers or dip switches Xthat let you assign more than one port to the same Xinterrupt (IRQ) line. XThis alone is \fBno\fP guaranty that they really Xsupport shared interrupts! XThese cards may be designed for the DOS world Xwhere you may want two or more serial ports but Xdon't need to run them concurrently, that is, Xno more than one of those ports assigned to the Xsame IRQ line is allowed to be in use at a time. XFor DOS this is sufficient as DOS is no Xmultitasking operating system. XFor UNIX this won't work because in the worst case Xall serial ports may be in use at the same time. X.LP XThe basic problem is that the PC (and AT) I/O bus Xcan't handle shared interrupts itself. XThis is due to a brain\-dead hardware design. XTherefore, there must be some special logic on Xthe serial card to provide shared interrupts. XAnd those cards are quite rare (and usually Xmore expensive). X.LP XTherefore, you have the choice to give every Xport on the card its own IRQ line or to buy a Xmulti\-port card that really has shared interrupts. XBut in the latter case you better ask your vendor Xtwice to make sure that it has this functionality Xbecause from the card's manuals it often isn't Xobvious which type of card it is. XOne well\-known shared interrupts card is the X\fIAST\fP 4\-port card. XThere are many compatible clones available Xthat are usually much cheaper than the original. XYou can even buy \fIAST\fP compatible 8\-port cards Xwhere two \fIAST\fP 4\-port blocks are on the Xsame board. X.SH "DIALIN/DIALOUT ON THE SAME PORT" XThis driver supports shared line usage by having Xtwo logical devices sharing one physical device. XEach logical device has its own name. X.LP XFor example, for the first port the names are \fBttyF00\fP X(minor device \fB0\fP) and \fBttyFM00\fP (minor device \fB192\fP). XThe \fBttyF00\fP device is used for \fIcu\fP, \fIkermit\fP, X\fIuucico\fP and other programs that want to dial out. XIt ignores the modem signals and therefore doesn't care about Xwhether the modem provides the carrier detect signal or not. XThe \fBttyFM00\fP device, on the other hand, is strictly for dialin Xprocesses, usually \fIgetty\fP. X.LP XWhen \fIgetty\fP opens \fBttyFM00\fP the driver blocks Xthe \fIopen\fP(2|S) call until the modem asserts the carrier detect Xsignal and then lets the open complete. XIf \fIcu\fP opens \fBttyF00\fP while \fIgetty\fP is waiting for its own Xopen to complete the device is given to \fIcu\fP and the X\fIgetty\fP open must wait for \fIcu\fP to finish and will then Xwait for the carrier, again. X.LP XIf \fIcu\fP tries to open the \fBttyF00\fP device while \fIgetty\fP Xhas \fBttyFM00\fP open \fIcu\fP will get an EBUSY error. XIf \fIgetty\fP tries to open \fBttyFM00\fP while \fIcu\fP has \fBttyF00\fP Xopen the \fIgetty\fP open will just block and wait for \fIcu\fP Xto close the device and will then wait for the carrier. X.LP XSo in short, you should put up a \fIgetty\fP on \fBttyFM00\fP Xwith a `\-t\ 60' and use \fBttyF00\fP for \fIcu\fP, \fIuucico\fP Xand other dialout programs. X.IP "Note:" 6 XIn the description above the \fBreal\fP \fIgetty\fP is meant. XWith \fIFAS\fP you don't need hacks like \fIuugetty\fP to dial in Xand out on the same port. X.SH "OPERATING MODES AND MINOR DEVICE NUMBERS" XIn the example in the previous section \fBttyF00\fP had a Xminor device number of \fB0\fP and \fBttyFM00\fP one of \fB192\fP. XBut there are several other possible minor Xdevice numbers for each port. X.LP XThe higher four bits of the 8\-bit minor device number Xcontrol the operating mode of the device. XA physical device can't be opened with two or more Xdifferent minor device numbers at the same time. X.LP XMinor device numbers are built according to the following Xdescription: X.RS 3 X.IP "Bitmap:" 10 X.I m m f f x x x x X.LP X.I m m Xare the mode bits as follows: X.IP "0 0" 6 XThis is a dialout device. XThe carrier signal is totally ignored. XWith carrier high\->low \fBno\fP SIGHUP signal is generated. XThe device does \fBnot\fP block on open if there is no carrier. X.IP "0 1" 6 XThis is a dialout device. XAfter an initial open, the actual carrier is ignored and Xis assumed to be present. XHowever, as soon as there is a low\->high carrier transition, Xthis device switches to carrier controlled behaviour until Xthe last process has closed the device. XThis includes sending a SIGHUP signal on carrier loss. X.IP "" 6 XNote that after a carrier loss an \fIioctl\fP(2|S) call with a TCSETA* Xcommand that sets and again clears the CLOCAL flag resets Xthe device to ignore the actual carrier again and to assume Xthat it is present until the next carrier low\->high. XThen the device switches to the carrier controlled mode, again. XWithout this command sequence the device would ignore the Xactual carrier and assume that it is missing after the first Xcarrier loss. X.IP "" 6 XAdditionally, after the carrier loss, as long as the carrier Xis ignored and assumed to be missing, the modem enable output Xis held low to prevent the modem from answering calls. XThe device does \fBnot\fP block on open if there is no carrier. X.IP "1 0" 6 XThis is a dialin device. XIt is carrier controlled and blocks on open if Xthere is no carrier. X.IP "" 6 XNote that after a carrier loss an \fIioctl\fP(2|S) call with a TCSETA* Xcommand that sets and again clears the CLOCAL flag Xreactivates the device if there is a carrier present at Xthis time. XWithout this command sequence the device would Xignore the actual carrier and assume that it is missing Xafter the first carrier loss. X.IP "" 6 XAdditionally, after the carrier loss, as long as the carrier Xis ignored and assumed to be missing, the modem enable Xoutput is held low to prevent the modem from answering calls. X.IP "1 1" 6 XThis is a dialin device. XSame as mode `1\ 0', but a parallel non\-blocking dialout Xopen is possible while waiting for carrier. X.LP X.I "f f" Xare the hardware flow control bits as follows: X.IP "0 0" 6 XThe RTSFLOW, CTSFLOW, CRTSFL and ORTSFL \fItermio\fP(M) flags X(if available) enable half duplex (for output direction, only) Xor full duplex (for input and output direction) hardware Xflow control according to SCO's specifications. XIf these flags are not available no hardware flow control Xis used by this device. X.IP "0 1" 6 XThe device uses full duplex hardware flow control (for Xinput and output direction). X.IP "1 0" 6 XThe device uses half duplex hardware flow control (for Xoutput direction, only). X.IP "1 1" 6 XSame as mode `1\ 0', but additionally the output buffer Xstate is signaled to the connected device. X.LP XRefer to the \fIspace.c\fP and \fIfas.h\fP files to determine Xwhich port signals are actually used for modem and Xhardware flow control. X.TP 6 X.I x x x x XThis is the physical device number. X\fIFAS\fP supports up to 16 ports. XIf you need more, you should use an "intelligent" serial Xcard because more than 16 devices will eat up too much XCPU time with this "dumb"\-port approach. X.IP "" 6 XIn a configuration with \fIn\fP UARTs the valid device Xnumber range would be 0 to \fIn\fP\-1. XThe device number is an index into the \fIfas_port\fP[] Xetc. arrays in \fIspace.c\fP. SHAR_EOF true || echo 'restore of fas.7 failed' fi echo 'End of part 2' echo 'File fas.7 is continued in part 3' echo 3 > _shar_seq_.tmp exit 0