home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume27 / fas-2.11.0 / part02 < prev    next >
Text File  |  1993-10-12  |  61KB  |  1,528 lines

  1. Newsgroups: comp.sources.unix
  2. From: fas@geminix.in-berlin.de (FAS Support Account)
  3. Subject: v27i068: FAS-2.11.0 - asynch serial driver for System V, Part02/08
  4. References: <1.750471074.20539@gw.home.vix.com>
  5. Sender: unix-sources-moderator@gw.home.vix.com
  6. Approved: vixie@gw.home.vix.com
  7.  
  8. Submitted-By: fas@geminix.in-berlin.de (FAS Support Account)
  9. Posting-Number: Volume 27, Issue 68
  10. Archive-Name: fas-2.11.0/part02
  11.  
  12. #!/bin/sh
  13. # this is fas211pl0.02 (part 2 of a multipart archive)
  14. # do not concatenate these parts, unpack them in order with /bin/sh
  15. # file RELEASENOTES continued
  16. #
  17. if test ! -r _shar_seq_.tmp; then
  18.     echo 'Please unpack part 1 first!'
  19.     exit 1
  20. fi
  21. (read Scheck
  22.  if test "$Scheck" != 2; then
  23.     echo Please unpack part "$Scheck" next!
  24.     exit 1
  25.  else
  26.     exit 0
  27.  fi
  28. ) < _shar_seq_.tmp || exit 1
  29. if test ! -f _shar_wnt_.tmp; then
  30.     echo 'x - still skipping RELEASENOTES'
  31. else
  32. echo 'x - continuing file RELEASENOTES'
  33. sed 's/^X//' << 'SHAR_EOF' >> 'RELEASENOTES' &&
  34. X
  35. XDid some cleanup in the source.
  36. X
  37. XRemoved the FIFO clear from the ioctl function. We don't want
  38. Xto do things there that aren't in the book.
  39. X
  40. XAn ioctl call that switches off the CLOCAL flag will create
  41. Xa SIGHUP signal if the carrier is actually missing at this
  42. Xtime.
  43. X
  44. XEvery device is tested now quite thoroughly during initialization.
  45. XIf the test fails the corresponding device keeps unconfigured.
  46. X
  47. X------------------------------------------------------------
  48. X    
  49. Xrelease 2.05 Sat Jan 13, 1990
  50. X
  51. XThis is the first public release of the FAS driver.
  52. X
  53. XSpecial thanks to the sysops of my test sites, Axel Fischer
  54. X(fischer@utower.UUCP) and Kritt Gierlewsen (kritt@einoed.UUCP).
  55. X
  56. XFAS is now an independant driver with its own driver name (`fas'),
  57. Xmajor device number, link kit directory and other things necessary
  58. Xfor a driver. The original asy driver may or may not be linked
  59. Xwith the kernel. You only need it if you want to access some
  60. Xserial devices via the virtual COM ports of the DOS emulator
  61. X(DosMerge or VP/ix) because the FAS driver doesn't have this
  62. X(really vendor dependant) feature.
  63. X
  64. XThe default prefix for tty device node names is `ttyF' now.
  65. XThis prevents mix-ups with the device names of the original
  66. Xasy driver.
  67. X
  68. XDropped the SYSV/AT support. I couldn't test the driver
  69. Xfor several release generations on uPort SYSV/AT, and because
  70. Xthere are not very much systems left with that flavor of UNIX
  71. Xit doesn't make sense to try to maintain compatibility with it.
  72. XIf someone really wants to use this driver on a 286 he has
  73. Xto port it himself.
  74. X
  75. XImproved the transmitter FIFO fill procedure. Now it will try
  76. Xharder to fill the FIFO as much as possible to cut down on
  77. Xtransmitter interrupts.
  78. X
  79. XSoftware input flow control (XON/XOFF) is controlled by the driver now.
  80. XIt is bound to the level of the receiver ring buffer (as is hardware
  81. Xflow control). As usual, it can be switched on and off by the
  82. XIXOFF flag in the termio(7) structure.
  83. X
  84. XChanged and speeded up the ring buffer -> unix buffer processing.
  85. X
  86. XFor ISC, the getty lines for the inittab file are installed
  87. Xby the makefile now.
  88. X
  89. XThe conditional compilation of the function `init8250' (for
  90. XDosMerge) is now controlled by a define in `fas.h'. The compiler
  91. Xswitch `-DMERGE' is not used any more.
  92. X
  93. XImproved the documentation.
  94. X
  95. XThe signals used for modem control and hardware flow control are
  96. Xfully configurable in the `space.c' file now. Look at `fas.h' for
  97. Xpossible macros and combinations.
  98. X
  99. XThere are some new modes for hardware flow control, for instance
  100. XHO_CTS_ON_DSR. This means that CTS is only looked at if DSR is on.
  101. XIf DSR is off output is possible regardless of CTS. The underlying
  102. Xassumption here is that we can expect proper handshake handling
  103. Xonly from devices that are in the ready state (indicated by DSR).
  104. XAs a spin-off the problem with the hanging getty on lines with
  105. Xturned-off terminals (mentioned in earlier releases) should be
  106. Xgone if you use this new mode.
  107. X
  108. XIf the XCLUDE-Flag is availabe (SYSV 3.2 because of Xenix
  109. Xcompatibility) exclusive open of a device is possible.
  110. X
  111. XThe default size of the input ring buffer is now 5000 bytes.
  112. XThis makes streaming input more likely even on loaded systems.
  113. X
  114. XBug Fixes:
  115. X
  116. X    The task state busy flag wasn't reset in some rare cases.
  117. X    This could cause processes to become immortal while waiting
  118. X    for the busy flag.
  119. X
  120. X    Under some special conditions an ioctl call with a TCSETA?
  121. X    command could corrupt the last character in the transmitter
  122. X    shift register. This is fixed now.
  123. X
  124. X    More fixing of the busy flag handling was necessary.
  125. X    Co-ordinating several delayed tasks controlling this flag
  126. X    is kind of tricky.
  127. X
  128. X    After a TCSETA* ioctl command we disable the transmitter
  129. X    for 2 sec (measured from the last transmitted character)
  130. X    if the character format and/or speed has changed. This
  131. X    gives the receiving side some time to do the same changes.
  132. X    This is kind of experimental. There may be applications that
  133. X    suffer from this delay. You may change the #define ADAPT_TIME
  134. X    in `fas.h' to a smaller value.
  135. X
  136. X------------------------------------------------------------
  137. X    
  138. Xrelease 2.06 Fri Mar 16, 1990
  139. X
  140. XThis should have been patch #3 for release 2.05, but there are
  141. Xso many changes now that I decided to make it a new release.
  142. XTherefore, some of the changes are described in the 2.05 release
  143. Xnotes above but were never released to the public.
  144. X
  145. XNew Features:
  146. X
  147. X    There is a transmitter ring buffer now to make the output
  148. X    less system load dependent. This really speeds things up
  149. X    because the transmitter FIFO gets filled with more characters
  150. X    at once. The buffer size depends on the actual baud rate to
  151. X    prevent long output buffer drains at low speeds.
  152. X
  153. X    There are also bigger input buffers to make FAS more competitive
  154. X    against "intelligent" cards.
  155. X
  156. X    Lots of speed improvements and many small changes.
  157. X
  158. XBug Fixes:
  159. X
  160. X    Fixed input/output buffer flush on carrier loss while close
  161. X    is waiting for the output to drain.
  162. X
  163. X------------------------------------------------------------
  164. X    
  165. Xrelease 2.07 Tue Sep 18, 1990
  166. X
  167. XThis is a major redesign of the previous release. I put most of the
  168. Xtime consuming tasks in one function that is invoked asynchronously
  169. Xby timeout calls. Inside this function most of the code runs at
  170. Xa lower system priority level (spl5) than the interrupts. That
  171. Xmeans that during character processing tty interrupts are allowed.
  172. XThis is the main key to operation at 38400 bps on multiple ports
  173. Xat the same time which is possible now with this release.
  174. X
  175. XNew Features:
  176. X
  177. X    FAS supports the VP/ix DOS emulator!
  178. X    Now you can throw out the vendor's original driver even
  179. X    if you like to have a serial mouse or modem access in DOS.
  180. X    Read the paragraph about VP/ix in the README file.
  181. X
  182. X    The Intel i82510 port chip is supported. It has separate
  183. X    4-character FIFOs for input and output. Although the
  184. X    NS16550A is much better this chip is your second choice
  185. X    if you can't get your hands on the National chips.
  186. X    Thanks to Christian Seyb (cs@gold.UUCP) for sending me
  187. X    patches and the necessary documentation for the Intel
  188. X    chips.
  189. X
  190. X    There is an init sequence in `space.c'. You can put any
  191. X    number of address-data pairs in a null terminated array
  192. X    to program your serial card or other hardware before
  193. X    FAS makes the first access to the ports. AST 4-port cards,
  194. X    for instance, have an additional port that needs to be
  195. X    written to with a certain bit pattern to allow shared
  196. X    interrupts. If you need to read a port to achieve the
  197. X    setting or resetting of flags as a side effect, this
  198. X    is possible, too.
  199. X
  200. X    ESIX is officially supported now.
  201. X
  202. X    SCO UNIX is officially supported, too. FAS needs to be
  203. X    compiled with the command line flag `-DSCO'. The makefile
  204. X    for SCO takes care of that. Thanks to Walter Mecky
  205. X    (walter@mecky.systemware.de) and Frank Simon
  206. X    (terra@sol.north.de) for helping me in making the necessary
  207. X    changes for SCO UNIX.
  208. X
  209. X    SCO Xenix 386 is also officially supported. FAS needs to be
  210. X    compiled with the command line flag `-DXENIX'. The makefile
  211. X    for SCO Xenix takes care of that. Thanks to Andreas
  212. X    Steinmetzler (andreas@oil.UUCP) for doing the port.
  213. X
  214. X    If you have the RTSFLOW and CTSFLOW termio(7) flags,
  215. X    hardware handshake can be controlled by them.
  216. X    Note that enabling handware flow control via the
  217. X    minor device number overrides these flags. If you
  218. X    like to use them you need to create tty device nodes
  219. X    with minor device numbers in which the bit for hardware
  220. X    handshake is set to 0. Look at the description in the
  221. X    README file for more details.
  222. X    Note also that if you choose to use RTSFLOW and CTSFLOW
  223. X    all your programs that do initial access to tty devices
  224. X    (getty, uucico, cu, SLIP dialup program etc.) need to know
  225. X    about these flags or hardware handshake will not be used.
  226. X
  227. X    The `O_EXCL' flag for the open(2) call is honored now.
  228. X    This allowes exclusive access to an FAS device without
  229. X    suffering from race conditions which could occure with
  230. X    the termio(7) XCLUDE flag method.
  231. X
  232. X    The `fas_test_device' function returns a digit now that
  233. X    indicates at which phase the test exited due to an error.
  234. X    This error digit is displayed in the boot message. Thanks
  235. X    to Brian Beattie (beattie@visenix.UUCP) for sending me
  236. X    the necessary patches.
  237. X
  238. XBug Fixes:
  239. X
  240. X    Automatic input FIFO flush after unblocking the getty
  241. X    open by the carrier or the unblock signal. This makes sure
  242. X    that there is no chance that there are characters in the
  243. X    FIFO that were received before the open got unblocked.
  244. X
  245. X    The sdevice entry for the AST 4-port card had a wrong
  246. X    I/O address range (`s_fas-mux4'). This didn't affect FAS
  247. X    but is checked by the kernel config program.
  248. X
  249. X    The gcc (GNU cc) support was removed because gcc's object
  250. X    file wants to link in some "helpful" functions that aren't
  251. X    contained in the kernel. But anyway, FAS is tuned so carefully
  252. X    and depends on the optimization behaviour of the AT&T
  253. X    standard C compiler that gcc won't have any advantages.
  254. X
  255. X    I changed the method with which the `fas_test_device' function
  256. X    waits for certain events. The `delay' function was used
  257. X    for that purpose but it turned out that with some flavors
  258. X    of UNIX it is prohibited to use this function during the
  259. X    xxinit phase of the boot process. Now a simple timeout loop
  260. X    is used instead.
  261. X
  262. X    Removed the ADAPT_TIME mechanismn introduced in release 2.05.
  263. X
  264. X    The open() call now returns an `EBUSY' error number if the
  265. X    device is already open and can't be opened in the desired
  266. X    mode at this time.
  267. X
  268. X    The handling of the RING signal needed fixing. Unlike the other
  269. X    three modem status lines RING generates an interrupt only at
  270. X    the trailing edge.
  271. X
  272. X    No SIGHUP signal is sent any more if an ioctl call clears
  273. X    the CLOCAL termio(7) flag while there is no carrier present.
  274. X    SIGHUP is only sent if the actual DCD modem line drops.
  275. X
  276. X    The files *-mux4 were renamed to *-ast4 because this type of
  277. X    card was originally developed by AST (AST 4-port card).
  278. X
  279. X------------------------------------------------------------
  280. X    
  281. Xrelease 2.08 Sun Feb 03, 1991
  282. X
  283. XNew Features:
  284. X
  285. X    Bell Tech/Intel UNIX 3.2 is supported.
  286. X
  287. X    SCO Xenix 286 is also supported now. Thanks to Nickolay Saukh
  288. X    (nms@saukh.rd.jvd.su) for providing the patches.
  289. X
  290. X    The Bell Tech HUB-6 card can be used with FAS. Thanks to
  291. X    Keith Walker (kew@cims2.UUCP) for the patches.
  292. X
  293. X    For AT&T derived flavors of UNIX there is a line automatically
  294. X    added to the kernel description file that makes the adding
  295. X    and removing of FAS possible via the `kconfig' program. Thanks
  296. X    to John Adams (johna@grumpy.boston.ma.us) for this idea.
  297. X
  298. X    There is a mechanismn now that prevents excessive modem status
  299. X    interrupts caused by crosstalking between wires or by a loose
  300. X    cable.
  301. X
  302. X    You can disable the FIFOs in a UART by "oring" the macro
  303. X    `NO_FIFO' to the base port address of this device. This is
  304. X    useful for mouse devices where you need immediate response
  305. X    to the mouse movement.
  306. X
  307. X    The meaning of the bit mapped part of the minor device
  308. X    numbers has changed. Some rather useless functions were
  309. X    removed in favor of more control over the hardware handshake
  310. X    modes. Even systems where the SCO RTSFLOW/CTSFLOW termio(7)
  311. X    flags are not available can now use half duplex hardware
  312. X    flow control (selected via the minor device number).
  313. X
  314. X    The assignment of RS232C lines to certain FAS functions
  315. X    is even more flexible now. This allows to connect two
  316. X    UNIX systems (with FAS) via a null modem cable, running
  317. X    a getty at both ends. For more details, read the paragraph
  318. X    about CABLING in the README file.
  319. X
  320. X    A special handling of the NS16550A input FIFO was introduced.
  321. X    This causes multiple receiver interrupts (on the same IRQ
  322. X    line) to be synchronized so that only one interrupt is
  323. X    necessary to process all receiving ports. This reduces the
  324. X    interrupt handling overhead and therefore results in lower
  325. X    CPU load for concurrent serial input at high speeds.
  326. X
  327. X    The `fas_event' function processes all scheduled events
  328. X    for all units with one single call. Previously, every unit
  329. X    launched its own timeout() call if there was work to
  330. X    do. This could lead to up to 16 timeouts at the same time,
  331. X    resulting in some timeout handling overhead. This overhead
  332. X    is minimized now.
  333. X
  334. XBug Fixes:
  335. X
  336. X    There were two bugs that could cause a port to lock up,
  337. X    resulting in an immortal process.
  338. X
  339. X    Almost any kernel sleep is killable now (at least with one or
  340. X    two `kill -9'). Therefore, there should be no more immortal
  341. X    processes. Even killing a process that is hanging in a
  342. X    close-on-exit call is possible.
  343. X
  344. X    The meaning of the RTSFLOW/CTSFLOW termio(7) flags was converted
  345. X    to what SCO had in mind (half duplex flow control). This is for
  346. X    compatibility reasons. Full duplex RTS/CTS hardware flow control
  347. X    is still possible via the minor device number method. Thanks to
  348. X    Dmitry V. Volodin (dvv@hq.demos.su) for providing me with the
  349. X    necessary knowledge.
  350. X
  351. X    If a process is already sleeping in a getty open it will only
  352. X    unblock on DCD low->high. In particular, if in the meantime
  353. X    the device was open for dialout and DCD is still present if
  354. X    the getty open takes over again this won't unblock the getty
  355. X    open any more.
  356. X
  357. X    And there were, as usual, a number of other small bug fixes.
  358. X
  359. X------------------------------------------------------------
  360. X    
  361. Xrelease 2.09 Sun Jun 23, 1991
  362. X
  363. XNew Features:
  364. X
  365. X    AT&T UNIX 3.2 Version 2.1 is supported.
  366. X
  367. X    Support was added for SysVr4 UNIX 386 (with the tty compatibility
  368. X    drivers). This was mostly a problem of ANSI-fying certain parts
  369. X    of the FAS sources. For this operating system, there is no VP/ix
  370. X    support in FAS. This will change when FAS is converted into a
  371. X    STREAMS driver.
  372. X
  373. X    Killing a process hanging on an FAS port that had output
  374. X    flow stopped was usually done by issuing one or two `kill -9'
  375. X    commands. However, this method could hang the whole UNIX kernel.
  376. X    Therefore, another method to release hung processes is
  377. X    introduced in this release.
  378. X    If you open an FAS device with the O_TRUNC flag, the input
  379. X    and output buffers of that device get flushed. As a side
  380. X    effect, if you had previously tried to kill a hung process,
  381. X    and it continued to hang on an FAS device, you simply have
  382. X    to open that device with the O_TRUNC flag, and the hung
  383. X    process is released. All you have to do is to type
  384. X    echo '\c' > /dev/ttyname
  385. X    and the device buffers are flushed.
  386. X
  387. X    There is a new array called fas_overrun[], which is of
  388. X    type `uint', that contains three receiver overrun counters
  389. X    for NS16450, i82510 and NS16550A UART chips, in that order.
  390. X    If you have a tool that permits you to look at kernel
  391. X    variables during runtime, you can determine yourself
  392. X    whether the problems you may have might be caused by
  393. X    lost input characters. With every receiver overrun, the
  394. X    respective counter is incremented by one.
  395. X
  396. XBug Fixes:
  397. X
  398. X    The problem with the excessive modem status interrupts
  399. X    is fixed. Well, kind of. It is suppressed, at least.
  400. X    Crosstalk between the lines in a serial cable wastes
  401. X    only a minor amount of CPU time now. Therefore, it isn't
  402. X    necessary any more to shut down a port when this happens.
  403. X    However, if you use an operating mode (selected by the
  404. X    minor device number) that assigns certain functions to
  405. X    the input pins at the RS232C connector (DCD, DSR, CTS and
  406. X    RI), and these pins toggle because of crosstalk in the cable,
  407. X    problems may still occure. But at least it won't panic the
  408. X    kernel any more, nor will it consume lots of CPU time.
  409. X
  410. X    Additionally, in operating modes where FAS doesn't need to
  411. X    know anything about modem status lines, the modem status
  412. X    interrupt is actually disabled. For instance, when a minor
  413. X    device number of 0 + port# is used. On the other hand,
  414. X    switching the device to DOS mode always _enables_ the
  415. X    modem status interrupts.
  416. X
  417. X    A problem was fixed when a port was in the canonical (cooked)
  418. X    mode and FAS still tried to protect the CLIST input buffer
  419. X    from overflowing. This blocked the connected terminal until
  420. X    a break signal or a hangup. The input buffer protection
  421. X    should, of course, only happen in raw mode.
  422. X
  423. X    The TIMEOUT tty state flag isn't used any more by FAS.
  424. X    Because this flag is used by the line discipline as well,
  425. X    its usage in FAS could cause problems.
  426. X
  427. X    There was a bug in the handling of one pointer in the
  428. X    fas_test_device() function.
  429. X
  430. X    In fas_event(), looping for the same port several times until
  431. X    all events are serviced could cause temporary deadlocks. We
  432. X    now don't loop any more. If an event occures while in fas_event(),
  433. X    but the branch responsible for processing was already passed,
  434. X    this event has to wait until the next call of fas_event()
  435. X    (usually one or two kernel ticks later).
  436. X
  437. X    The AIOCINFO ioctl() command returned the minor device number.
  438. X    Now it returns the unit number.
  439. X
  440. X    SIGHUP will be sent only if the port is the controlling terminal
  441. X    of a process group.
  442. X
  443. X    There was a problem with the initialization macros for the
  444. X    fas_modem[] and fas_flow[] arrays. Under Xenix 286, some
  445. X    of these macros expanded to a value of zero because the
  446. X    size of type int is 16 bits, while it is 32 bits for all
  447. X    the 386 UNIX flavors. This resulted in dropped bits with
  448. X    some macros that use the `<<' operator.
  449. X
  450. X    An fasopen() call is checked immediately for permissions now,
  451. X    even if another process is currently hanging in fasclose().
  452. X    The fasopen() call, of course, can be completed only after
  453. X    the other process has returned from fasclose().
  454. X
  455. X------------------------------------------------------------
  456. X    
  457. Xrelease 2.09 PL1 Sun Sep 22, 1991
  458. X
  459. XNew Features:
  460. X
  461. X    There is a new variable called fas_msi_noise. This
  462. X    is a counter that is incremented each time the modem
  463. X    status interrupt of a UART had to be disabled due to
  464. X    excessive logic level transitions on one or more
  465. X    modem status lines (DCD, DSR, CTS and RING).
  466. X    This can be used to check whether there is any
  467. X    crosstalking at high speeds in your serial cables
  468. X    and should be taken as a hint that you should improve
  469. X    your cables (shorter and/or shielded ones). Note
  470. X    that there are also some modems or other devices
  471. X    that cause this counter to be incremented (slowly,
  472. X    though). In this case fixing the cabling won't
  473. X    help.
  474. X
  475. X    FAS now supports a port speed of 57600 bps. By
  476. X    default, in the array fas_port[] (`space.c') you can
  477. X    set a flag (`HIGH_SPEED') independently for each port
  478. X    to have 57600 bps instead of 38400 bps on the respective
  479. X    port. Due to interrupt latency in the UNIX kernel you
  480. X    will need a 486 mainboard even with NS16550A chips if
  481. X    you don't want to risk losing incoming characters. For
  482. X    terminals connected at this speed, a slower mainboard
  483. X    will suffice, however. To make this speed work well,
  484. X    the transmitter buffer size has been increased to 5000
  485. X    bytes.
  486. X
  487. X    Another flag (`NO_TEST') can be set in fas_port[]
  488. X    (`space.c') to disable the testing procedure for
  489. X    the respective port. This can be used to allow
  490. X    UART chips (i.e. internal modems) that don't pass
  491. X    the test but seem to work anyway. Note that if you
  492. X    do that you're completely on your own if you have
  493. X    problems with FAS. I won't support you if you use
  494. X    this flag because using UARTs that need this flag
  495. X    means calling for trouble. I simply can't diagnose
  496. X    this kind of hardware problem from the remote.
  497. X
  498. X    The SVR4 `CTSXON' and `RTSXOFF' hardware flow
  499. X    control flags are supported, although I still
  500. X    believe that FAS' minor device number based
  501. X    method for controlling hardware handshake modes
  502. X    is superiour to any method that is using ioctl()
  503. X    calls for that purpose.
  504. X
  505. X    Made the UART testing in fas_test_device() even
  506. X    harder. Now it should detect brain dead chips
  507. X    more reliable.
  508. X
  509. XBug Fixes:
  510. X
  511. X    Modified fasopen() to handle mixed (with and w/o
  512. X    O_NDELAY flag) invocations while there is no
  513. X    carrier.
  514. X
  515. X    On dialout devices with modem control it was
  516. X    intended that after carrier drop the first
  517. X    TCSETA* ioctl() command would switch FAS to
  518. X    ignore DCD for that port again (as is the
  519. X    case after the initial fasopen() call). This
  520. X    breaks certain shells that do a TCSETA*
  521. X    command before they read from stdin, and therefore
  522. X    never notice that DCD dropped. They don't get
  523. X    the SIGHUP either because they are in another
  524. X    process group at this time (job control !).
  525. X    Now it is only possible to reset FAS in
  526. X    the above manner if the CLOCAL flag is set
  527. X    with the TCSETA* command. Once FAS is
  528. X    switched to ignore DCD, CLOCAL can be cleared
  529. X    again.
  530. X
  531. X    If the carrier drops and modem control is
  532. X    enabled (CLOCAL is off), SIGCONT is sent
  533. X    before SIGHUP (only where available) to
  534. X    wake up stopped processes so that they will
  535. X    notice the hangup signal.
  536. X
  537. X    Several other bug fixes, cleanups and improvements.
  538. X
  539. X------------------------------------------------------------
  540. X    
  541. Xrelease 2.10 PL0 Mon Aug 17, 1992
  542. X
  543. XNew Features:
  544. X
  545. X    There are no interrupt vectors to be entered in `space.c'.
  546. X    The only place where int vectors are contained in this
  547. X    release is the `s_fas' file. The reason for this is that
  548. X    the interrupt function in FAS now scans all _active_ ports
  549. X    no matter what int vector they are assigned to. This is
  550. X    necessary in order to sort the ports by their speed. Scanning
  551. X    the fastest port(s) first makes receiver character loss less
  552. X    likely, especially at speeds > 19200 bps. Although this method
  553. X    has a slight CPU time overhead for only one running port the
  554. X    real advantage is that when more than one port is running,
  555. X    and especially when these ports are receiving NS16550A UARTs
  556. X    where the interrupt frequency optimization is used, the
  557. X    CPU time requirements for each additional running port are
  558. X    substantially lower than with previous FAS releases.
  559. X
  560. X    Where available, the Makefile puts the kernel defines from
  561. X    `/etc/conf/cf.d/defines' into the compiler command line.
  562. X
  563. X    There are now different Makefiles for ISC UNIX 2.x and 3.x.
  564. X    This has to do with a change in the ISC kernel config kit.
  565. X
  566. X    Under SVR4 the copy of `fas.h' that goes to `/usr/include/sys'
  567. X    now gets the time stamp of the copy operation so that the
  568. X    dependency in the Makefile works.
  569. X
  570. X    Either 57600 or 115200 bps can be used instead of 38400 bps.
  571. X    For 115200 a very fast mother board and a UNIX with a low
  572. X    interrupt latency is necessary to prevent input character loss.
  573. X
  574. X    There is a flag `LOW_INT_LAT' that can be defined in the
  575. X    makefile if the UNIX kernel has a low tty interrupt latency.
  576. X    This saves a lot of CPU time at high speeds because the
  577. X    receiver FIFO trigger level is set to 8 instead of 4 (default),
  578. X    and therefore the receiver interrupt frequency is cut in half.
  579. X
  580. X    The flags that can be "ored" into the base port address of
  581. X    a UART to change its default behaviour are now documented
  582. X    in the README file.
  583. X
  584. X    Template files for the DigiChannel PC/8 card were added.
  585. X
  586. X    Support for gcc has been added. If NO_ASM is _not_ defined
  587. X    inline code for the inb() and outb() functions is generated
  588. X    with the help of the __asm__ feature. However, when __asm__
  589. X    is used together with the `volatile' storage class gcc
  590. X    produces rather poor code. I assume that in this case gcc
  591. X    can't do some optimizations because they would break the
  592. X    inline assembler code. And the code gets even worse if
  593. X    -fstrength-reduce is used (with or without inline assembler
  594. X    code). Apparently gcc is over-optimizing the code so that
  595. X    it is in fact slower than without -fstrength-reduce. So
  596. X    don't use this flag. All tests where done with gcc 1.40.
  597. X
  598. X    There is an interrupt acknowledge sequence in `space.c' now
  599. X    that is similar to the init sequence but is executed by the
  600. X    fasintr() function after all pending interrupts on all serial
  601. X    cards have been processed. This is a replacement for the
  602. X    fas_int_ack_port and fas_int_ack arrays that are gone because
  603. X    we don't use interrupt vectors any more inside FAS.
  604. X
  605. X    The receiver and modem status interrupts are disabled now
  606. X    whenever they aren't needed. If they are disabled this
  607. X    saves some CPU time in the interrupt function.
  608. X
  609. X    A new termio(7) flag CRTSFL under SCO UNIX 3.2.4 enables full
  610. X    duplex hardware flow control, but only if neither CTSFLOW nor
  611. X    RTSFLOW are set. See the termio(7) man page. However, remember
  612. X    that when you use a minor device number controlled hardware
  613. X    handshake mode (the prefered method with FAS, even under SCO
  614. X    UNIX and Xenix) the flags CTSFLOW, RTSFLOW and CRTSFL are
  615. X    ignored!
  616. X
  617. X    For each port, it can be selected whether the SCO UNIX/Xenix
  618. X    CTSFLOW/RTSFLOW termio(7) flags enable half duplex hardware
  619. X    flow control (default, compatible with the sio driver), or if
  620. X    they enable full duplex hardware flow control (compatible with
  621. X    many "intelligent" serial cards from third party vendors).
  622. X
  623. X    The RTS_TOG ioctl() command is supported (if available).
  624. X
  625. X    The sources for this release, and also the object file, are
  626. X    somewhat bigger than the previous release. Besides other
  627. X    things this is caused by the inlining of some functions.
  628. X    These functions were called rather frequently and were
  629. X    small enough for inlining. This saves some function call
  630. X    overhead.
  631. X
  632. X    There are lots of changes that yield a better use of
  633. X    register variables, especially in loops.
  634. X
  635. XBug Fixes:
  636. X
  637. X    The method to flush the output buffers of a port while a
  638. X    process is hanging in fasclose() has been changed. In
  639. X    FAS 2.09 the buffers were flushed when the port was opened
  640. X    with the O_TRUNC flag. This caused some problems with shell
  641. X    scripts that wanted to write text with
  642. X
  643. X        echo 'foo bar' > /dev/tty
  644. X
  645. X    I changed FAS to use O_APPEND instead. So in order to flush
  646. X    the output buffers in this release one has to use
  647. X
  648. X        echo '\c' >> /dev/ttyF00
  649. X
  650. X    if the port `ttyF00' is hanging.
  651. X
  652. X    The kernel `ttyhog' variable is used instead of the default
  653. X    TTYHOG value from `tty.h'. So FAS notices if this variable is
  654. X    tuned by the SysAdmin.
  655. X
  656. X    The array `fas_info' has been renamed to `fas_internals'
  657. X    to prevent a name space collision under SVR4.
  658. X
  659. X    `fas_overrun' and `fas_msi_noise' where declared `static'.
  660. X    Under some UNIX flavors a static kernel variable isn't
  661. X    found by programs that are used to look at variables in
  662. X    the running kernel. This is fixed now.
  663. X
  664. X    The method how to handle concurrent fasopen() calls with
  665. X    and without O_NDELAY on a device that waits for a carrier
  666. X    has been changed back to what FAS 2.09.0 did. If there
  667. X    already is a process waiting for carrier and another process
  668. X    opens the device with O_NDELAY the waiting process is waked
  669. X    up and completes its fasopen() call regardless of the state
  670. X    of the carrier. This is because due to the AT&T kernel design
  671. X    we can't have both a sleeping and a working process on the
  672. X    same device. Patch #1 for FAS 2.09 introduced a bug which
  673. X    caused hung gettys. This error is fixed by going back to
  674. X    the method used in FAS 2.09.0.
  675. X
  676. X    The problem that caused occasional crashes under SCO UNIX
  677. X    appears to be fixed. I don't know for sure why this is so.
  678. X    We'll see.
  679. X
  680. X    When a process is waiting inside fasclose() for the
  681. X    output buffers to drain and the process receives a
  682. X    signal that is not ignored the output buffer is
  683. X    automatically flushed in order to allow fasclose()
  684. X    to complete before the signal handler is entered.
  685. X    This has to happen because the open file counter is
  686. X    decremented even if fasclose() was interrupted. I fact,
  687. X    fasclose() is expected to complete properly under all
  688. X    circumstances because the routines calling fasclose() don't
  689. X    check for signals or errors when fasclose() returns. So after
  690. X    the signal handler has done its work fasclose() wouldn't
  691. X    be entered again because the open file counter is already
  692. X    zero at this time. That means that whatever happens fasclose()
  693. X    must have done its cleanup for the port before it returns.
  694. X
  695. X    Under SVR4 longjmp() wants a pointer as its parameter.
  696. X
  697. X    The half and full duplex hardware handshake has been
  698. X    redesigned to be more bullet proof when it comes to
  699. X    switching from one mode to the other.
  700. X
  701. X    The Logitech mouse problem has been solved. There is
  702. X    a bug in the generic ttiocom() support function that
  703. X    FAS needs to circumvent with some additional code.
  704. X
  705. X    The incrementation of the counters in the sysinfo
  706. X    structure is fixed in that it happens only once for
  707. X    each interrupt and not once for every port that has
  708. X    work to do. This better reflects the actual interrupt
  709. X    load.
  710. X
  711. X    Because a carrier drop is processed asynchronously in
  712. X    fas_event() it is necessary to at least stop the
  713. X    character output as soon as the modem status interrupt
  714. X    is detected. Now only up to 16 characters (one FIFO
  715. X    load with NS16550A) will be transmitted after carrier
  716. X    drop. This is in line with the latency of the hardware
  717. X    output handshake.
  718. X
  719. X    And of course lots of other optimizations and small
  720. X    fixes.
  721. X
  722. X------------------------------------------------------------
  723. X    
  724. Xrelease 2.11 PL0 Mon Oct 11, 1993
  725. X
  726. XImprovements:
  727. X
  728. X    Better description of some of the user selectable symbolic
  729. X    constants in `fas.h' that allow OS dependent conditional
  730. X    compilation of the sources (file `INSTALLATION').
  731. X
  732. X    Some cleanup of the README and the INSTALLATION file.
  733. X
  734. X    Most of the text that was previously in the README file was
  735. X    converted to [NT]ROFF source format and transfered to the new
  736. X    fas(7) man page.
  737. X
  738. X    There is a file `COPYING' now that contains the FAS copyright.
  739. X
  740. X    Config files for the USENET II serial card have been added.
  741. X
  742. X    All config files for multiport cards have COM1 and COM2
  743. X    additionally enabled because it is easier for the user to
  744. X    disable COM1 and/or COM2 (if they are not needed) than it
  745. X    is to add the necessary entries to the config files.
  746. X
  747. X    The config files for the DigiChannel PC/8 card have been
  748. X    renamed to `*-gen8c12'. `gen' stands for generic and means
  749. X    that these config files can be used for 8-port cards from
  750. X    different vendors.
  751. X
  752. X    The new file `m_fas' contains a sample entry for the
  753. X    /etc/conf/cf.d/mdevice file.
  754. X
  755. X    The ORTSFL hardware flow control flag introduced in SCO UNIX
  756. X    3.2.4.2 is supported.
  757. X
  758. X    Official GCC support (although not recommended).
  759. X
  760. X    VP/ix support is enabled by default.
  761. X
  762. X    If the file /etc/conf/init.d/fas already exists `make install'
  763. X    doesn't copy `i_fas' over it so that customized inittab lines in
  764. X    /etc/conf/init.d/fas are preserved.
  765. X
  766. X    There is an explicit support address: fas@geminix.in-berlin.de
  767. X    Note, however, that this doesn't mean that you can get
  768. X    professional full-time support if you mail to this address.
  769. X    As FAS is a spare time project I will answer mails only as
  770. X    time permits.
  771. X
  772. X    The outb()/inb() inline assembler optimizations for AT&T
  773. X    derived OS flavors have been dropped. Instead, there is now
  774. X    an AWK script that optimizes the `fas.s' file after compilation.
  775. X    There are other optimizations performed by this script as well.
  776. X    The makefiles for the OS platforms where this optimization is
  777. X    applicable contain the necessary awk invocation.
  778. X
  779. X    In the past, short integers were used wherever applicable
  780. X    because of the somewhat smaller opcode size. However, tests
  781. X    have shown that under i386/i486 word operations are signifi-
  782. X    cantly slower than byte or double word operations. So the use
  783. X    of short integers is avoided now if possible. This has no
  784. X    effect on i286 which has word size as its native operand size.
  785. X
  786. X    For modem controlled devices, after the first loss of carrier
  787. X    FAS ignores the carrier state and assumes it is missing until
  788. X    the last process closes the device. Additionally, in this state
  789. X    the modem enable output (usually DTR) is held low to prevent
  790. X    the modem from answering calls. This is a security feature in
  791. X    that it prevents new dialins if for some reason a process
  792. X    (shell etc.) hangs on this device. Otherwise, the next user
  793. X    calling in on this device would get the shell (or whatever
  794. X    process is hanging) of the user who started it, and therefore
  795. X    all his permissions. This actually happens from time to time
  796. X    and is a gaping security hole, especially if the previous user
  797. X    has root permissions. This protection feature can be disabled
  798. X    on a per port basis if it breaks any software.
  799. X
  800. X    There is a new, more flexible mechanism for defining non-
  801. X    standard baud rates like 57600 and 115200 bps. Look at the
  802. X    fas(7) man page and `space.c' for more informations.
  803. X
  804. X    Flags like `NO_TEST' that were previously "ored" into the
  805. X    base port address have their own array now (fas_modify [] in
  806. X    `space.c').
  807. X
  808. X    There is a `NO_OVERRUN' flag for fas_modify []. It may be set
  809. X    for devices that have some sort of receiver overrun protection,
  810. X    for instance certain internal modems that use a 16x50 UART
  811. X    emulation and have their own receiver buffer.
  812. X
  813. X    The FIFO modes and trigger levels for the NS16550A UART can be
  814. X    controlled on a per port basis (`space.c').
  815. X
  816. X    The offset for the various UART registers from the base port
  817. X    address is variable and can be customized for unusual hardware
  818. X    designs (`space.c').
  819. X
  820. X    For SCO UNIX and Xenix users, there is the new fas_vec[] array
  821. X    in `space.c'. If the interrupt vector numbers of the various
  822. X    ports are entered into this array, they are displayed by the
  823. X    FAS boot message. Users of other UNIX flavors can ignore this
  824. X    array.
  825. X
  826. X    Copying between user and kernel data space is done by copyin()
  827. X    and copyout() because fubyte() and subyte() are marked obsolete
  828. X    in the AT&T driver reference manual.
  829. X
  830. X    Made better use of register variables. We can have more than
  831. X    the usual three register variables in a function if we define
  832. X    those that aren't used in the entire function inside a block
  833. X    of statements. So a CPU register can be shared by several
  834. X    variables.
  835. X
  836. X    Converted several small functions to inline code for faster
  837. X    execution.
  838. X
  839. X    Merged fas_proc() and fas_cmd() to fasproc().
  840. X
  841. X    The fasintr() function has been optimized so that it has to
  842. X    poll less UARTs to make sure that there are no more pending
  843. X    interrupts.
  844. X
  845. X    The fas_rproc() function feeds the incoming characters
  846. X    directly into the receiver ring buffer instead of storing
  847. X    them in a temporary buffer first. So it's faster now.
  848. X
  849. X    A new timeout mechanism in fas_rxfer() optimizes the character
  850. X    transfer from the receiver ring buffer to the CLIST buffers
  851. X    in order to reduce processing overhead in the CLIST routines.
  852. X
  853. X    Character transfers between ring buffers and CLIST buffers
  854. X    in fas_rxfer() and fas_xxfer() are done by copying two or four
  855. X    characters at a time (using word (i286) or double word (i386+)
  856. X    accesses) whenever possible. Additionally, for AT&T derived
  857. X    UNIX flavors this copy operation is implemented as inline
  858. X    assembler code.
  859. X
  860. X    The function declarations at the beginning of `fas.c' expand
  861. X    to ANSI C prototypes if an ANSI C compiler is used.
  862. X
  863. X    OS dependent defines have been moved to `fas.h' and are
  864. X    automatically updated by the makefile.
  865. X
  866. X    The ring buffer size has been increased to 10000 characters in
  867. X    order to cope with 115200 bps (not for Xenix 286).
  868. X
  869. X    The `inittab' getty lines have a `-t 60' by default to time
  870. X    out after 60 seconds. This prevents getty from waiting
  871. X    indefinitely on a dialup modem line.
  872. X
  873. XBug Fixes:
  874. X
  875. X    The TTYHOG problem on some platforms is fixed. Some UNIX flavors
  876. X    have a tunable `ttyhog' kernel variable, some don't. The
  877. X    `TUNABLE_TTYHOG' symbolic constant in `fas.h' can be used
  878. X    to tell FAS whether your system has this kernel variable or
  879. X    not.
  880. X
  881. X    FAS initializes all variables and arrays and doesn't rely on
  882. X    global memory being initialized to zero. To my astonishment
  883. X    I read that global memory in the kernel isn't guaranteed to
  884. X    be initialized to zero. I don't know if this is true for all
  885. X    platforms. So I don't take chances and let FAS do its own
  886. X    initialization.
  887. X
  888. X    Device driver functions like fasopen(), fasclose() etc. are
  889. X    defined as having a result type of `int'. That is, they don't
  890. X    really return a result, but a function defined without an
  891. X    explicit result type automatically has a result type of `int'.
  892. X    The respective FAS functions return no result, but to make
  893. X    ANSI C compilers happy they have to be defined with a result
  894. X    type of `void' instead of `int' to make it obvious that they
  895. X    don't have a return value. This dilema results from the kernel
  896. X    originally being compiled with a K&R C compiler (not ANSI C)
  897. X    where one gets away with `int' functions returning no result
  898. X    values.
  899. X
  900. X    Fixed a bug that would prevent the dialin process (getty)
  901. X    from reopening the device after a dialout process using this
  902. X    device was interrupted while waiting inside of fasopen() for
  903. X    the device lock.
  904. X
  905. X    The `RTS_TOG' ioctl() command suspends/resumes the character
  906. X    output. This is more compatible with the implementations in
  907. X    the vendor drivers.
  908. X
  909. X    ttiocom() is called at SPLWRK so that the fas_event() function
  910. X    can't be invoked before fas_param() has been called after
  911. X    ttiocom(). This makes sure that there are no discrepancies
  912. X    between the tty structure (set by ttiocom()) and the
  913. X    fas_internals structure (set by fas_param()) when line
  914. X    discipline functions are called from fas_event().
  915. X
  916. X    SCO UNIX uses the same SPL assignment as SCO Xenix (SPL5 and
  917. X    SPL7). Previously, FAS under SCO UNIX used the original AT&T
  918. X    assignment (SPL6 and SPLTTY). This incompatibility should be
  919. X    the reason for all the problems that only occured under SCO
  920. X    UNIX (crashes, hung ports etc.). Thanks to Mark Lyda
  921. X    (mark@startech.com) for pointing this out.
  922. X
  923. X    There is an incompatibility between SCO UNIX/Xenix and the
  924. X    rest of the world in that SCO UNIX/Xenix passes a pointer
  925. X    to `struct termss' with the `AIOCSETSS' ioctl() command while
  926. X    on the other platforms a copy of this structure is passed
  927. X    as the argument itself. Thanks to Robert Lipe
  928. X    (robertl@amsg.arnet.com) for this information.
  929. X
  930. X    fas_test_device() uses the highest possible baud rate on
  931. X    the respective port (derived from the assigned fas_baud[] table
  932. X    in `space.c') for the test run. In previous releases the highest
  933. X    overall baud rate was used on all ports, even if a port would
  934. X    never actually run at this speed.
  935. X
  936. X    The MCR/MSR test routine in fas_test_device() copes with slow
  937. X    MCR/MSR registers as it isn't really necessary for FAS'
  938. X    operation that these registers are particularly fast. It's
  939. X    only necessary that all eight modem status bits change state
  940. X    at the same time (clocked operation).
  941. X
  942. X    Fixed a bug that could stall the receiver CLIST queue under VP/ix.
  943. X
  944. X    Switching from an operating mode that has modem status interrupts
  945. X    disabled to a mode that enables modem status interrupts caused
  946. X    a DTR drop if the DCD status was low before the modem status
  947. X    interrupts were disabled.
  948. X
  949. X    If the O_NDELAY flag is set when fasclose() is called (last close),
  950. X    FAS doesn't wait until the output buffers have drained. Instead,
  951. X    it flushes the output buffers so that it can complete fasclose()
  952. X    without delay.
  953. X
  954. X    File `fas.h' is unconditionally copied to the system include
  955. X    directory when `make install' is executed (except for SCO Xenix).
  956. X    So it is installed at the same time as `space.c', which happens
  957. X    to be the only file outside of the FAS source directory that uses
  958. X    `fas.h'. This change makes the installation of `fas.h' more bullet
  959. X    proof in cases where there is already another version of FAS
  960. X    installed.
  961. X
  962. X    When a dialout process opens a logical dialout device while a
  963. X    dialin process waits for the carrier on the corresponding logical
  964. X    dialin device, the physical device is now closed internally before
  965. X    reopening it for the dialout process.
  966. X
  967. X    fas_close_device() doesn't disable the FIFO mode in the UART
  968. X    anymore as this is unnecessary.
  969. X
  970. X    The termio(7) XCLUDE flag was tested against the wrong variable.
  971. X    Under SCO UNIX this had the effect that when CRTSFL/ORTSFL was
  972. X    set, successive opens failed with EBUSY for users != root.
  973. X
  974. X    The gcc inline assembler instructions `inb' and `outb' have been
  975. X    changed from the Intel to the AT&T syntax for SCO UNIX. This is
  976. X    because gcc uses the AT&T assembler by default.
  977. X
  978. X    Gcc's automatic register allocation does a poor job on the FAS
  979. X    sources. Therefore, we force gcc to use registers for certain
  980. X    variables.
  981. SHAR_EOF
  982. echo 'File RELEASENOTES is complete' &&
  983. true || echo 'restore of RELEASENOTES failed'
  984. rm -f _shar_wnt_.tmp
  985. fi
  986. # ============= config-ast4c12 ==============
  987. if test -f 'config-ast4c12' -a X"$1" != X"-c"; then
  988.     echo 'x - skipping config-ast4c12 (File already exists)'
  989.     rm -f _shar_wnt_.tmp
  990. else
  991. > _shar_wnt_.tmp
  992. echo 'x - extracting config-ast4c12 (Text)'
  993. sed 's/^X//' << 'SHAR_EOF' > 'config-ast4c12' &&
  994. X* its character device number 4
  995. Xcharacter(4)
  996. X
  997. X* its name
  998. Xprefix = fas
  999. X
  1000. X* The interrupt vectors handled by this controller
  1001. Xintvec = 5,4,3
  1002. X
  1003. X* its mask level
  1004. Xintpri = SPLTTY
  1005. X
  1006. X* the functions it supports
  1007. Xfunctions = init, open, close, read, write, ioctl, tty
  1008. SHAR_EOF
  1009. true || echo 'restore of config-ast4c12 failed'
  1010. rm -f _shar_wnt_.tmp
  1011. fi
  1012. # ============= config-ast8c12 ==============
  1013. if test -f 'config-ast8c12' -a X"$1" != X"-c"; then
  1014.     echo 'x - skipping config-ast8c12 (File already exists)'
  1015.     rm -f _shar_wnt_.tmp
  1016. else
  1017. > _shar_wnt_.tmp
  1018. echo 'x - extracting config-ast8c12 (Text)'
  1019. sed 's/^X//' << 'SHAR_EOF' > 'config-ast8c12' &&
  1020. X* its character device number 4
  1021. Xcharacter(4)
  1022. X
  1023. X* its name
  1024. Xprefix = fas
  1025. X
  1026. X* The interrupt vectors handled by this controller
  1027. Xintvec = 5,9,4,3
  1028. X
  1029. X* its mask level
  1030. Xintpri = SPLTTY
  1031. X
  1032. X* the functions it supports
  1033. Xfunctions = init, open, close, read, write, ioctl, tty
  1034. SHAR_EOF
  1035. true || echo 'restore of config-ast8c12 failed'
  1036. rm -f _shar_wnt_.tmp
  1037. fi
  1038. # ============= config-c123 ==============
  1039. if test -f 'config-c123' -a X"$1" != X"-c"; then
  1040.     echo 'x - skipping config-c123 (File already exists)'
  1041.     rm -f _shar_wnt_.tmp
  1042. else
  1043. > _shar_wnt_.tmp
  1044. echo 'x - extracting config-c123 (Text)'
  1045. sed 's/^X//' << 'SHAR_EOF' > 'config-c123' &&
  1046. X* its character device number 4
  1047. Xcharacter(4)
  1048. X
  1049. X* its name
  1050. Xprefix = fas
  1051. X
  1052. X* The interrupt vectors handled by this controller
  1053. Xintvec = 4,3,5
  1054. X
  1055. X* its mask level
  1056. Xintpri = SPLTTY
  1057. X
  1058. X* the functions it supports
  1059. Xfunctions = init, open, close, read, write, ioctl, tty
  1060. SHAR_EOF
  1061. true || echo 'restore of config-c123 failed'
  1062. rm -f _shar_wnt_.tmp
  1063. fi
  1064. # ============= config-gen8c12 ==============
  1065. if test -f 'config-gen8c12' -a X"$1" != X"-c"; then
  1066.     echo 'x - skipping config-gen8c12 (File already exists)'
  1067.     rm -f _shar_wnt_.tmp
  1068. else
  1069. > _shar_wnt_.tmp
  1070. echo 'x - extracting config-gen8c12 (Text)'
  1071. sed 's/^X//' << 'SHAR_EOF' > 'config-gen8c12' &&
  1072. X* its character device number 4
  1073. Xcharacter(4)
  1074. X
  1075. X* its name
  1076. Xprefix = fas
  1077. X
  1078. X* The interrupt vectors handled by this controller
  1079. Xintvec = 5,4,3
  1080. X
  1081. X* its mask level
  1082. Xintpri = SPLTTY
  1083. X
  1084. X* the functions it supports
  1085. Xfunctions = init, open, close, read, write, ioctl, tty
  1086. SHAR_EOF
  1087. true || echo 'restore of config-gen8c12 failed'
  1088. rm -f _shar_wnt_.tmp
  1089. fi
  1090. # ============= config-hub6c12 ==============
  1091. if test -f 'config-hub6c12' -a X"$1" != X"-c"; then
  1092.     echo 'x - skipping config-hub6c12 (File already exists)'
  1093.     rm -f _shar_wnt_.tmp
  1094. else
  1095. > _shar_wnt_.tmp
  1096. echo 'x - extracting config-hub6c12 (Text)'
  1097. sed 's/^X//' << 'SHAR_EOF' > 'config-hub6c12' &&
  1098. X* its character device number 4
  1099. Xcharacter(4)
  1100. X
  1101. X* its name
  1102. Xprefix = fas
  1103. X
  1104. X* The interrupt vectors handled by this controller
  1105. Xintvec = 5,4,3
  1106. X
  1107. X* its mask level
  1108. Xintpri = SPLTTY
  1109. X
  1110. X* the functions it supports
  1111. Xfunctions = init, open, close, read, write, ioctl, tty
  1112. SHAR_EOF
  1113. true || echo 'restore of config-hub6c12 failed'
  1114. rm -f _shar_wnt_.tmp
  1115. fi
  1116. # ============= config-use4c12 ==============
  1117. if test -f 'config-use4c12' -a X"$1" != X"-c"; then
  1118.     echo 'x - skipping config-use4c12 (File already exists)'
  1119.     rm -f _shar_wnt_.tmp
  1120. else
  1121. > _shar_wnt_.tmp
  1122. echo 'x - extracting config-use4c12 (Text)'
  1123. sed 's/^X//' << 'SHAR_EOF' > 'config-use4c12' &&
  1124. X* its character device number 4
  1125. Xcharacter(4)
  1126. X
  1127. X* its name
  1128. Xprefix = fas
  1129. X
  1130. X* The interrupt vectors handled by this controller
  1131. Xintvec = 15,4,3
  1132. X
  1133. X* its mask level
  1134. Xintpri = SPLTTY
  1135. X
  1136. X* the functions it supports
  1137. Xfunctions = init, open, close, read, write, ioctl, tty
  1138. SHAR_EOF
  1139. true || echo 'restore of config-use4c12 failed'
  1140. rm -f _shar_wnt_.tmp
  1141. fi
  1142. # ============= fas.7 ==============
  1143. if test -f 'fas.7' -a X"$1" != X"-c"; then
  1144.     echo 'x - skipping fas.7 (File already exists)'
  1145.     rm -f _shar_wnt_.tmp
  1146. else
  1147. > _shar_wnt_.tmp
  1148. echo 'x - extracting fas.7 (Text)'
  1149. sed 's/^X//' << 'SHAR_EOF' > 'fas.7' &&
  1150. X.\" @(#)fas.7
  1151. X.TH FAS 7 "Release 2.11.0"
  1152. X.SH "NAME"
  1153. Xfas \- asynchronous serial character device driver
  1154. X.SH "DESCRIPTION"
  1155. X\fIFAS\fP, which is an acronym for
  1156. X\fIF\fPinal \fIA\fPsync \fIS\fPolution,
  1157. Xis a "dumb"\-port character device driver for 286/386 based
  1158. XUNIX systems that adds several features that are
  1159. Xoften not provided by vendors drivers.
  1160. X.LP
  1161. XIt supports
  1162. X.nf
  1163. X.IP "" 3
  1164. X\-  the \fINS16450\fP and \fIum82450\fP UART chips.
  1165. X\-  the \fINS16550A\fP and \fIi82510\fP UART chips in FIFO mode.
  1166. X\-  up to 115200 bps with \fINS16550A\fP.
  1167. X\-  built\-in modem line sharing for dialin and dialout.
  1168. X\-  modem control on both dialin and dialout devices.
  1169. X\-  full and half duplex hardware flow control.
  1170. X\-  concurrent hardware and software (XON/XOFF) flow control.
  1171. X\-  shared interrupts.
  1172. X\-  multiplexed UART registers (\fIHUB\-6\fP card etc.).
  1173. X\-  any mix of up to 16 UARTs.
  1174. X\-  any I/O address, any IRQ.
  1175. X\-  \fIVP/ix\fP, the ISC DOS emulator.
  1176. X.fi
  1177. X.LP
  1178. X\fIFAS\fP was successfully tested under the
  1179. Xfollowing operating systems:
  1180. X.nf
  1181. X.IP "" 3
  1182. XISC UNIX 2.0.2 and later
  1183. XSCO UNIX 3.2.2 and later
  1184. XSCO XENIX 286 2.3.2 and later
  1185. XSCO XENIX 386 2.3.2 and later
  1186. XMicroport SVR3.0
  1187. XESIX SVR3.2 Rev. C & D
  1188. XBell Tech/Intel SVR3.2
  1189. XAT&T SVR3.2 V 2.1
  1190. XSVR4.0 (with tty compatibility drivers)
  1191. X.fi
  1192. X.LP
  1193. XThis driver should work with most of the
  1194. XUNIX SVR[34].x flavors currently available.
  1195. XYou can have both this and the original vendor driver
  1196. Xin the same kernel (if you really like to, but I
  1197. Xwouldn't know why).
  1198. XEach driver controls its own separate set of serial ports.
  1199. XThe only restriction here is that each interrupt vector must
  1200. Xnot be used by more than one of the drivers.
  1201. XThe kernel config program will complain otherwise.
  1202. X.SH "WHICH SERIAL CARDS ARE SUPPORTED ?"
  1203. X\fIFAS\fP supports and has been tested on many
  1204. Xasync serial "dumb"\-port cards.
  1205. XIt can handle most combinations of shared interrupts.
  1206. XThe current version can be used with \fINS16450\fP,
  1207. X\fINS16550A\fP, \fIum82450\fP and \fIi82510\fP UARTs.
  1208. X\fI8250\fP chips are not supported due to various
  1209. Xbugs and speed problems in these parts.
  1210. XThey have no place in any 286/386 or other
  1211. Xhigh performance system.
  1212. XReplace them with one of the supported chips.
  1213. XThey are pin\-to\-pin compatible.
  1214. X.IP "IMPORTANT:" 11
  1215. XDon't use \fINS16550\fP (without the trailing \fBA\fP)
  1216. Xor any chips from a second source manufacturer!
  1217. XThey have a reputation of being buggy and might
  1218. Xnot work with \fIFAS\fP.
  1219. XSome aren't even recognized by the FIFO auto\-detect
  1220. Xcode in \fIFAS\fP.
  1221. XThe quality of the second source chips might have
  1222. Ximproved lately but there is no way to know for sure.
  1223. XTherefore, even if they are cheaper, don't buy them.
  1224. X.LP
  1225. XTake a look at the \fIspace\-*\fP files for details
  1226. Xon how to set up for various devices.
  1227. XSample config files are provided for the following
  1228. Xcards:
  1229. X.nf
  1230. X.IP "" 3
  1231. X\fI*\-ast4c12\fP   \fIAST\fP 4\-port card plus COM1 and COM2
  1232. X\fI*\-ast8c12\fP   Two \fIAST\fP 4\-port cards plus COM1 and COM2
  1233. X\fI*\-c123\fP      COM1, COM2 and COM3
  1234. X\fI*\-gen8c12\fP   Generic 8\-port card plus COM1 and COM2 (you can
  1235. X            use these files for the \fIDigiChannel PC/8\fP,
  1236. X            \fIAPT HSS08\fP, \fIHostess\fP, \fIBoca\fP and \fIArnet\fP 8\-port cards)
  1237. X\fI*\-hub6c12\fP   \fIBell Tech HUB\-6\fP card plus COM1 and COM2
  1238. X\fI*\-use4c12\fP   \fIUSENET II\fP 4\-port card plus COM1 and COM2
  1239. X.fi
  1240. X.LP
  1241. XInternal modems are also supported.
  1242. XSome of them, however, use a UART emulation instead of a
  1243. Xgenuine UART chip.
  1244. XThese types of internal modems usually don't pass the UART
  1245. Xtest at boot time.
  1246. XTherefore, you may want to set the \fBNO_TEST\fP flag in the
  1247. X\fIfas_modify\fP[] array (\fIspace.c\fP) to skip the UART test.
  1248. XOn the other hand, most of the internal modems with a UART
  1249. Xemulation have a receiver overrun protection so that characters
  1250. Xcan't be lost at high baud rates.
  1251. XFor these modems, it is advisable to set the \fBNO_OVERRUN\fP
  1252. Xflag in the \fIfas_modify\fP[] array (\fIspace.c\fP).
  1253. XIf an internal modem with overrun protection emulates
  1254. Xan \fINS16550A\fP UART, you should additionally use the
  1255. X\fBFIFO_TRIGGER_14\fP symbol in the \fIfas_fifo_ctl\fP[]
  1256. Xarray (\fIspace.c\fP).
  1257. XThis sets the receiver FIFO size to the highest possible trigger
  1258. Xlevel in order to reduce the interrupt frequency.
  1259. XPlease refer to the sections \fBMODIFYING A PORT'S DEFAULT BEHAVIOUR\fP
  1260. Xand \fBUART FIFO CONTROL\fP for further details.
  1261. X.LP
  1262. XThere are serial cards on the market that emulate an
  1263. X\fINS16550A\fP UART and have receiver overrun protection due to
  1264. Xan additional character buffer.
  1265. XThey look like an ordinary COM port from the software side but
  1266. Xhave their own CPU, RAM, ROM etc. on\-board.
  1267. XThe special considerations for internal modems pointed out
  1268. Xabove apply to these serial cards as well.
  1269. XOne example is the \fIQueueCOM\-115\fP card for which you
  1270. Xshould set the \fBNO_TEST\fP and \fBNO_OVERRUN\fP flags and
  1271. Xuse the \fBFIFO_TRIGGER_14\fP symbol.
  1272. X.SH "BOOT TIME STATUS MESSAGE"
  1273. XAt boot time you will see a status message on
  1274. Xthe screen with symbols that show the init
  1275. Xstate of each port.
  1276. XThe symbols are as follows:
  1277. X.nf
  1278. X.IP "" 3
  1279. X\fB\-\fP     not defined in the \fIfas_port\fP[] array
  1280. X\fB?\fP     can't initialize port
  1281. X\fB1\fP\-\fB9\fP   error during UART test phase indicated by number
  1282. X\fB!\fP     configuration error (check \fIspace.c\fP and \fIfas.h\fP)
  1283. X\fB*\fP     port is initialized (\fINS16450\fP)
  1284. X\fB+\fP     port is initialized and has FIFOs forced off
  1285. X\fBf\fP     port is initialized and has FIFOs (\fIi82510\fP)
  1286. X\fBF\fP     port is initialized and has FIFOs (\fINS16550A\fP)
  1287. X.fi
  1288. X.LP
  1289. XThis is convenient to check whether you have entered the
  1290. Xproper port base addresses in \fIspace.c\fP.
  1291. X.SH "SHARED INTERRUPTS"
  1292. XMany multi\-port cards have jumpers or dip switches
  1293. Xthat let you assign more than one port to the same
  1294. Xinterrupt (IRQ) line.
  1295. XThis alone is \fBno\fP guaranty that they really
  1296. Xsupport shared interrupts!
  1297. XThese cards may be designed for the DOS world
  1298. Xwhere you may want two or more serial ports but
  1299. Xdon't need to run them concurrently, that is,
  1300. Xno more than one of those ports assigned to the
  1301. Xsame IRQ line is allowed to be in use at a time.
  1302. XFor DOS this is sufficient as DOS is no
  1303. Xmultitasking operating system.
  1304. XFor UNIX this won't work because in the worst case
  1305. Xall serial ports may be in use at the same time.
  1306. X.LP
  1307. XThe basic problem is that the PC (and AT) I/O bus
  1308. Xcan't handle shared interrupts itself.
  1309. XThis is due to a brain\-dead hardware design.
  1310. XTherefore, there must be some special logic on
  1311. Xthe serial card to provide shared interrupts.
  1312. XAnd those cards are quite rare (and usually
  1313. Xmore expensive).
  1314. X.LP
  1315. XTherefore, you have the choice to give every
  1316. Xport on the card its own IRQ line or to buy a
  1317. Xmulti\-port card that really has shared interrupts.
  1318. XBut in the latter case you better ask your vendor
  1319. Xtwice to make sure that it has this functionality
  1320. Xbecause from the card's manuals it often isn't
  1321. Xobvious which type of card it is.
  1322. XOne well\-known shared interrupts card is the
  1323. X\fIAST\fP 4\-port card.
  1324. XThere are many compatible clones available
  1325. Xthat are usually much cheaper than the original.
  1326. XYou can even buy \fIAST\fP compatible 8\-port cards
  1327. Xwhere two \fIAST\fP 4\-port blocks are on the
  1328. Xsame board.
  1329. X.SH "DIALIN/DIALOUT ON THE SAME PORT"
  1330. XThis driver supports shared line usage by having
  1331. Xtwo logical devices sharing one physical device.
  1332. XEach logical device has its own name.
  1333. X.LP
  1334. XFor example, for the first port the names are \fBttyF00\fP
  1335. X(minor device \fB0\fP) and \fBttyFM00\fP (minor device \fB192\fP).
  1336. XThe \fBttyF00\fP device is used for \fIcu\fP, \fIkermit\fP,
  1337. X\fIuucico\fP and other programs that want to dial out.
  1338. XIt ignores the modem signals and therefore doesn't care about
  1339. Xwhether the modem provides the carrier detect signal or not.
  1340. XThe \fBttyFM00\fP device, on the other hand, is strictly for dialin
  1341. Xprocesses, usually \fIgetty\fP.
  1342. X.LP
  1343. XWhen \fIgetty\fP opens \fBttyFM00\fP the driver blocks
  1344. Xthe \fIopen\fP(2|S) call until the modem asserts the carrier detect
  1345. Xsignal and then lets the open complete.
  1346. XIf \fIcu\fP opens \fBttyF00\fP while \fIgetty\fP is waiting for its own
  1347. Xopen to complete the device is given to \fIcu\fP and the
  1348. X\fIgetty\fP open must wait for \fIcu\fP to finish and will then
  1349. Xwait for the carrier, again.
  1350. X.LP
  1351. XIf \fIcu\fP tries to open the \fBttyF00\fP device while \fIgetty\fP
  1352. Xhas \fBttyFM00\fP open \fIcu\fP will get an EBUSY error.
  1353. XIf \fIgetty\fP tries to open \fBttyFM00\fP while \fIcu\fP has \fBttyF00\fP
  1354. Xopen the \fIgetty\fP open will just block and wait for \fIcu\fP
  1355. Xto close the device and will then wait for the carrier.
  1356. X.LP
  1357. XSo in short, you should put up a \fIgetty\fP on \fBttyFM00\fP
  1358. Xwith a `\-t\ 60' and use \fBttyF00\fP for \fIcu\fP, \fIuucico\fP
  1359. Xand other dialout programs.
  1360. X.IP "Note:" 6
  1361. XIn the description above the \fBreal\fP \fIgetty\fP is meant.
  1362. XWith \fIFAS\fP you don't need hacks like \fIuugetty\fP to dial in
  1363. Xand out on the same port.
  1364. X.SH "OPERATING MODES AND MINOR DEVICE NUMBERS"
  1365. XIn the example in the previous section \fBttyF00\fP had a
  1366. Xminor device number of \fB0\fP and \fBttyFM00\fP one of \fB192\fP.
  1367. XBut there are several other possible minor
  1368. Xdevice numbers for each port.
  1369. X.LP
  1370. XThe higher four bits of the 8\-bit minor device number
  1371. Xcontrol the operating mode of the device.
  1372. XA physical device can't be opened with two or more
  1373. Xdifferent minor device numbers at the same time.
  1374. X.LP
  1375. XMinor device numbers are built according to the following
  1376. Xdescription:
  1377. X.RS 3
  1378. X.IP "Bitmap:" 10
  1379. X.I m m f f x x x x
  1380. X.LP
  1381. X.I m m
  1382. Xare the mode bits as follows:
  1383. X.IP "0 0" 6
  1384. XThis is a dialout device.
  1385. XThe carrier signal is totally ignored.
  1386. XWith carrier high\->low \fBno\fP SIGHUP signal is generated.
  1387. XThe device does \fBnot\fP block on open if there is no carrier.
  1388. X.IP "0 1" 6
  1389. XThis is a dialout device.
  1390. XAfter an initial open, the actual carrier is ignored and
  1391. Xis assumed to be present.
  1392. XHowever, as soon as there is a low\->high carrier transition,
  1393. Xthis device switches to carrier controlled behaviour until
  1394. Xthe last process has closed the device.
  1395. XThis includes sending a SIGHUP signal on carrier loss.
  1396. X.IP "" 6
  1397. XNote that after a carrier loss an \fIioctl\fP(2|S) call with a TCSETA*
  1398. Xcommand that sets and again clears the CLOCAL flag resets
  1399. Xthe device to ignore the actual carrier again and to assume
  1400. Xthat it is present until the next carrier low\->high.
  1401. XThen the device switches to the carrier controlled mode, again.
  1402. XWithout this command sequence the device would ignore the
  1403. Xactual carrier and assume that it is missing after the first
  1404. Xcarrier loss.
  1405. X.IP "" 6
  1406. XAdditionally, after the carrier loss, as long as the carrier
  1407. Xis ignored and assumed to be missing, the modem enable output
  1408. Xis held low to prevent the modem from answering calls.
  1409. XThe device does \fBnot\fP block on open if there is no carrier.
  1410. X.IP "1 0" 6
  1411. XThis is a dialin device.
  1412. XIt is carrier controlled and blocks on open if
  1413. Xthere is no carrier.
  1414. X.IP "" 6
  1415. XNote that after a carrier loss an \fIioctl\fP(2|S) call with a TCSETA*
  1416. Xcommand that sets and again clears the CLOCAL flag
  1417. Xreactivates the device if there is a carrier present at
  1418. Xthis time.
  1419. XWithout this command sequence the device would
  1420. Xignore the actual carrier and assume that it is missing
  1421. Xafter the first carrier loss.
  1422. X.IP "" 6
  1423. XAdditionally, after the carrier loss, as long as the carrier
  1424. Xis ignored and assumed to be missing, the modem enable
  1425. Xoutput is held low to prevent the modem from answering calls.
  1426. X.IP "1 1" 6
  1427. XThis is a dialin device.
  1428. XSame as mode `1\ 0', but a parallel non\-blocking dialout
  1429. Xopen is possible while waiting for carrier.
  1430. X.LP
  1431. X.I "f f"
  1432. Xare the hardware flow control bits as follows:
  1433. X.IP "0 0" 6
  1434. XThe RTSFLOW, CTSFLOW, CRTSFL and ORTSFL \fItermio\fP(M) flags
  1435. X(if available) enable half duplex (for output direction, only)
  1436. Xor full duplex (for input and output direction) hardware
  1437. Xflow control according to SCO's specifications.
  1438. XIf these flags are not available no hardware flow control
  1439. Xis used by this device.
  1440. X.IP "0 1" 6
  1441. XThe device uses full duplex hardware flow control (for
  1442. Xinput and output direction).
  1443. X.IP "1 0" 6
  1444. XThe device uses half duplex hardware flow control (for
  1445. Xoutput direction, only).
  1446. X.IP "1 1" 6
  1447. XSame as mode `1\ 0', but additionally the output buffer
  1448. Xstate is signaled to the connected device.
  1449. X.LP
  1450. XRefer to the \fIspace.c\fP and \fIfas.h\fP files to determine
  1451. Xwhich port signals are actually used for modem and
  1452. Xhardware flow control.
  1453. X.TP 6
  1454. X.I x x x x
  1455. XThis is the physical device number.
  1456. X\fIFAS\fP supports up to 16 ports.
  1457. XIf you need more, you should use an "intelligent" serial
  1458. Xcard because more than 16 devices will eat up too much
  1459. XCPU time with this "dumb"\-port approach.
  1460. X.IP "" 6
  1461. XIn a configuration with \fIn\fP UARTs the valid device
  1462. Xnumber range would be 0 to \fIn\fP\-1.
  1463. XThe device number is an index into the \fIfas_port\fP[]
  1464. Xetc. arrays in \fIspace.c\fP.
  1465. XTrying to open an unconfigured and therefore invalid device
  1466. Xgives an ENXIO error.
  1467. X.RE
  1468. X.IP "Note:" 6
  1469. XIf a device is carrier controlled, this implies the generation
  1470. Xof a SIGHUP signal with every carrier high\->low.
  1471. XThis is of course only true if the CLOCAL flag is \fBnot\fP set.
  1472. X.IP "" 6
  1473. XOn my own system I prefer a minor device number of \fB0101xxxx\fP
  1474. X(\fB80\fP + device #) for the non\-blocking tty nodes and \fB1101xxxx\fP
  1475. X(\fB208\fP + device #) for the blocking tty nodes.
  1476. XThis gives me the SIGHUP signal on carrier loss and full duplex
  1477. Xhardware flow control on both logical devices.
  1478. XDialout while a dialin open is waiting for the carrier is also
  1479. Xpossible with this setup.
  1480. XThese numbers are the defaults in the \fIn_fas\-*\fP sample files.
  1481. X.SH "HARDWARE FLOW CONTROL"
  1482. X\fIFAS\fP supports both full and half duplex hardware flow control,
  1483. Xusing the RS232C \fBRTS\fP/\fBCTS\fP control lines (by default).
  1484. X.LP
  1485. XFull duplex flow control is a method to control character flow in
  1486. Xboth input and output directions while in half duplex flow control
  1487. Xmode only the output direction is controlled.
  1488. X.LP
  1489. XYou can select between full and half duplex flow control
  1490. Xvia the minor device number of the device.
  1491. XIn full duplex mode the \fBRTS\fP line controls the input
  1492. Xdirection and the \fBCTS\fP line is responsible for the
  1493. Xoutput direction.
  1494. XIn half duplex mode \fBRTS\fP tells the connected device
  1495. Xwhether there is data in the output buffer (optional),
  1496. Xand the \fBCTS\fP line has the same function as in
  1497. Xfull duplex mode.
  1498. X.SS "Full duplex mode"
  1499. XAs long as the \fIFAS\fP input buffer hasn't reached a certain
  1500. Xthreshold the \fBRTS\fP line is set high to signal the connected
  1501. Xdevice that it may send characters.
  1502. XIf the input buffer level rises beyond this threshold \fBRTS\fP
  1503. Xwill go low and the device is supposed to stop sending characters.
  1504. XAs soon as there is sufficient space in the input buffer \fBRTS\fP
  1505. Xwill go high again and the character flow may continue.
  1506. X.LP
  1507. XThe \fBCTS\fP line works the other way round.
  1508. XIf the connected device sets \fBCTS\fP to high the \fIFAS\fP
  1509. Xcharacter output is enabled.
  1510. XIf \fBCTS\fP is low, the output is stopped.
  1511. XThere is a special feature for the \fBCTS\fP part of the handshake.
  1512. X\fBCTS\fP is only looked at if the \fBDSR\fP line is high.
  1513. XIf \fBDSR\fP is low or not connected, hardware output handshake
  1514. Xis disabled, that is, \fIFAS\fP sends characters regardless
  1515. Xof the state of \fBCTS\fP.
  1516. X.LP
  1517. XThis has two advantages.
  1518. XAt first, if you switch off a serial device connected to an
  1519. X\fIFAS\fP port with hardware flow control \fBCTS\fP will go low
  1520. Xand therefore the output gets blocked.
  1521. SHAR_EOF
  1522. true || echo 'restore of fas.7 failed'
  1523. fi
  1524. echo 'End of  part 2'
  1525. echo 'File fas.7 is continued in part 3'
  1526. echo 3 > _shar_seq_.tmp
  1527. exit 0
  1528.