misplaced extern declarations (mostly prototypes of interrupt handlers)
that this exposed. The prototypes should be moved back to the driver
sources when the functions are staticalized.
Added idempotency guards to <machine/conf.h>. "ioconf.h" can't be
included when building LKMs so define a wart in bsd.kmod.mk to help
guard against including it.
to <machine/conf.h>. conf.h was mechanically generated by
`grep ^d_ conf.c >conf.h'. This accounts for part of its ugliness. The
prototypes should be moved back to the driver sources when the functions
are staticalized.
Fix the tests for being a console by reverting to the ones that
were used before the the RB_SERIAL changes. RB_SERIAL only needs
to be tested in one place. The initialization of comconsole was
wrong before the RB_SERIAL changes for the COMCONSOLE case. This
may have been the cause of the unnecessary changes.
Start eliminating #includes of <i386/i386/cons.h>. This header is
supposed to be included from <machine> although it should be
completely machine-independent and included from <sys>.
Remove a wrong XXX comment. `comconsole' is used to test for being
a console and even the tests for deciding the default termios state
are necessary (the semi-reentrant i/o routines don't handle ordinary
device i/o).
cy.c:
Sync with sio.c. The console tests are present but always fail.
Use input buffer watermarks of TTYHOG-512 (high) and (high)*7/8
(low) instead of TTYHOG/2 (high) and TTYHOG/5 (low) to agree with
some drivers. 512 is magic and some things depended on TTYHOG/2
>= TTYHOG-512 to work; now they depend on the 512 magic not changing
and TTYHOG-512 being significantly larger than 0. This should be
handled in ttsetwater().
Separate the decision about whether to do input flow control from
doing it. ttyblock() now just starts input flow control (hardware
and/or software) and there is a new function ttyunblock() to stop
it. The decisions are the same except for the watermark changes
and allowing for input expansion for PARMRK.
When flushing input, try harder at first to send a start character
if required, but give up if the first attempt fails.
cy.c, rc.c, sio.c:
Simplify: let ttyinput() handle input flow control if it is not
being bypassed. Use ttyblock() to start flow control otherwise.
rc.c:
Use same input flow control test as elsewhere: test in a more
efficient order and start flow control at >= highwater instead of
at > highwater.
essential when I fix excessive wakeups for output-below-low-water.
In cy.c and sio.c, wake up via the driver start routine to also
eliminate duplicated code involving the clearing of TS_TTSTOP.
Always (except in code to be replaced soon) call driver start
routine directly instead of going through ttstart().
ttwwakeup(). The conditions for doing the wakeup will soon become
more complicated and I don't want them duplicated in all drivers.
It's probably not worth making ttwwakeup() a macro or an inline
function. The cost of the function call is relatively small when
there is a process to wake up. There is usually a process to wake
up for large writes and the system call overhead dwarfs the function
call overhead for small writes.
- use pseudo-dma
- provide the same features and interface as sio
- support multiple boards
- fix bugs.
Some compile-time configuration constants are set to support higher
speeds and Cyclom-16Y's at a 30% relative cost in efficiency.
Cyclom-16Y support is untested.
(a) bring back ttselect, now that we have xxxdevtotty() it isn't dangerous.
(b) remove all of the wrappers that have been replaced by ttselect
(c) fix formatting in syscons.c and definition in syscons.h
(d) add cxdevtotty
NOT DONE:
(e) make pcvt work... it was already broken...when someone fixes pcvt to
link properly, just rename get_pccons to xxxdevtotty and we're done
(b) add a function callback vector to tty drivers that will return a pointer
to a valid tty structure based upon a dev_t
(c) make syscons structures the same size whether or not APM is enabled so
utilities don't crash if NAPM changes (and make the damn kernel compile!)
(d) rewrite /dev/snp ioctl interface so that it is device driver and i386
independant
when ttselect() is improved. This requires using an array of tty structs
and not using ttymalloc().
Fix an off by 1 error. Some caclulations seem to be off by a factor
of NCY. NCY defaults to 16, which gives 256 tty structs occupying
0xd000 bytes. The minor number encoding only allows 16 ttys.
Update the types of timeout functions to 2.0.
adapted to FreeBSD by Heikki Suonsivu <hsu@cs.hut.fi>.
Submitted by: Andrew Werple <andrew@werple.apana.org.au> and
Heikki Suonsivu <hsu@cs.hut.fi>
Obtained from: NetBSD