From Ache:
authorAndrey Chernov <ache@FreeBSD.org>
Mon, 30 May 1994 03:13:36 +0000 (03:13 +0000)
committerAndrey Chernov <ache@FreeBSD.org>
Mon, 30 May 1994 03:13:36 +0000 (03:13 +0000)
commit8a86c29ccc56a8b1f878d3b17d0759a8fd868c97
tree04985e4427d68fb09c7deaf7c1b89fa2bb4ac963
parent40852daea683a7f8805833445a7d21aac8f8568a
From Ache:
Better kernel printout for multiport cards

From Bde:
o Get decls of tk_nin, etc. from "dkstat.h" (a stupid place).
o Mallocate sio structs as well as tty structs.
o FAKE_DCD() is now handled by setting CLOCAL in the initial
  and lock states.
o Removed ifdefs for COM_BIDIR.  It is now standard.  Callin
  devices now act identically (except for bug fixes) to the
  old standard devices if the callout devices are not used.
o New magic minors for initial and lock devices.  Better macros
  to handle magic minors.  "ls -l /dev" should show something
  like this:
crw-------   1 uucp     wheel     28,  0 May 26 01:18 /dev/ttyd0
crw-------   1 uucp     wheel     28,  1 May 21 11:25 /dev/ttyd1
crw-r--r--   1 root     wheel     28, 32 May 15 19:36 /dev/ttyid0
crw-r--r--   1 root     wheel     28, 33 May 15 19:36 /dev/ttyid1
crw-r--r--   1 root     wheel     28, 64 May 15 19:36 /dev/ttyld0
crw-r--r--   1 root     wheel     28, 65 May 15 19:36 /dev/ttyld1
crw-------   1 uucp     wheel     28,128 May 26 14:48 /dev/cua00
crw-------   1 uucp     wheel     28,129 May 26 18:57 /dev/cua01
crw-r--r--   1 root     wheel     28,160 May 15 18:58 /dev/cuai00
crw-r--r--   1 root     wheel     28,161 May 15 19:35 /dev/cuai01
crw-r--r--   1 root     wheel     28,192 May 15 18:56 /dev/cual00
crw-r--r--   1 root     wheel     28,193 May 15 19:35 /dev/cual01
  The initial and lock devices are controlled using commands like
  this:
stty </dev/ttyid0 57600        crtscts
stty </dev/ttyld0 57600 clocal crtscts
stty </dev/cuai00 57600        crtscts
stty </dev/cual00 57600        crtscts
  Here the port speed is changed from the default of 9600
  to 57600 and locked (any nonzero speed works as a lock).
  clocal defaults to off and is locked off for the callin
  device to avoid certain security holes.  crtscts is changed
  from the default of off to on and locked on (flag bits are
  locked by setting the same bits in the lock port).  It is
  only necessary to set the initial state for buggy programs
  that don't set it for themself.  It is dangerous to set
  lock bits if the device cannot support them (e.g., locking
  crtscts on for a mouse port will probably hang the X server).
  However, it may be necessary to set lock bits for buggy
  programs that clear nonstandard bits.
o Removed FIFO_TRIGGER.  The fifo trigger level is now set
  automatically.  It is always set to 1 for slow mouses.  It
  is set to 14 for the very first open but drops back to 8
  for first opens and to as low as 1 if overruns occur.  I
  haven't been able to load my system enough to get it to
  drop below 8.  Changes to the levels are logged.  Please
  report if the level ever drops below 8.
o The fifo disable flag still works to disable the fifo
  completely.  Please don't use it.
o Removed ifdefs for 1.1R interrupt handling.
o Removed ifdefs for non-mallocation of tty structs.
o Use timeout instead of sleep to hold down DTR for long
  enough.  Fixed races.  Now opens have to sleep while
  DTR is being held down.
o Urgent input character now depends on the line discipline.
  Previously it only worked for SLIP.  Now it might work
  for PPP to reduce latency by half a tick.
o Attempted to fix initialization of interrupts for 4ports
  (flag bit 0x1 means 4port-compatible, not multiport).  The
  master interrupt control register and ~OUT2 (badly aka
  MCR_IENABLE) have to be initialized before probing for
  interrupts.
o Rewrote sioopen() to simplify it and avoid races.  Too
  many changes to list.  Essentially, an open either succeeds
  immediately or sleeps until it can succeed immediately.
  After every sleep, all the conditions required for success
  are checked again by restarting the open from near the top.
o Callout ports are implemented using trapdoor carrier again.
  You can program their initial state to set CLOCAL if you
  want.
o Use new sleep address macros.  Better names for sleep addresses.
o Removed bidir ioctls.  There are enough important races to
  worry about.
o Special treatment for ioctls to new initial and lock state
  devices.  These devices only support ioctls, not read, write
  or select.  Separate devices work better than would selector
  bits like CIGNORE because ordinary stty(1) works on them, and
  it is impossible to open a callin/callout device while the
  device going in the other direction is active.
o The DTR wait time as seen by ioctls it is now always in
  hundredths of a second (independent of hz).
o Removed TB_*() macros.  There is no point to only using them
  in sio.
o Use ttwwakeup() to handle write-wakeups consistently.
sys/i386/isa/sio.c