Commit Graph

2058 Commits

Author SHA1 Message Date
Peter Wemm bb65956af3 Next round of cleanups. Some more debugging hooks added, si_softc definition
moved to the driver proper, so that <machine/si.h> can be #included by user
programs without needing to include stuff from /sys/i386/isa..
Various (now) redundant features removed, eg: the locks on IXANY and HWFLOW
as these are now done with the "initial" and "lock" termios devices.
Note that it still (for reasons unknown) appears to be masking data to
7-bit with ppp - hence the cleanup to support the debugging via 'sicontrol'
1995-08-13 15:18:05 +00:00
Bruce Evans 6097a1e94f Disable fifos in sioclose(). Closes PR 576. 1995-08-13 07:49:35 +00:00
Andreas Schulz b192d8d90b Correct a little typo in LINT. trouble is -> trouble if. 1995-08-12 13:40:42 +00:00
Joerg Wunsch 7fe369dc9c Document two specials of the `lpt' driver: the port address can be
specified as `?', and the irq and vector clauses may be omitted,
forcing the port into polled mode.
1995-08-11 17:18:42 +00:00
Peter Wemm f64003830d Remove a deliberate #warning.. It's not polite, because I listed the the
driver in i386/conf/LINT...
Reviewed by:
Submitted by:
Obtained from:
1995-08-10 08:48:34 +00:00
Peter Wemm 1d0be877a4 Drat! I forgot to add this part of the Specialix Driver..
This is the firmware that is downnloaded onto the host card during boot.
Obtained from:Specialix International, via Andy Rutter <andy@acronym.co.uk>
1995-08-10 08:10:57 +00:00
Peter Wemm b77990be3e Bring in my long-overdue version of the Specialix driver.
This was originally ported to BSDI by Andy Rutter <andy@acronym.co.uk>.
At the end of the day, this code has very little in common with Andy's
version, or the Specialix SYSV version.  Essentially it has been gradually
and almost completely rewritten, with LOTS of advice and inspiration from
Bruce Evans.  There are a couple of missing bits still, but they are minor.

The user-mode "sicontrol" program is in sad shape and will come in soon.
Transparent printing died a timely death.. Maybe later..

Jeremy Rolls @ Specialix (Development directory) has confirmed this is OK
to distribute, and Andy personally sent me his version that I started from.

Although this driver stood up to a nasty stress-test in this form, I am not
confident that there are no nasty bugs lurking.

People are welcome to try it, but dont go out and buy one just yet.. :-)
And *DONT* use it on a mission-critical machine... This is ALPHA QUALITY!
1995-08-09 13:13:47 +00:00
Peter Wemm ffe1908145 Add hook for EISA probe for Specialix EISA card.
Reviewed by:
Submitted by:
Obtained from:
1995-08-09 13:00:25 +00:00
Peter Wemm c48237107d Add Specialix driver to LINT
Reviewed by:
Submitted by:
Obtained from:
1995-08-09 12:58:50 +00:00
John Dyson a4353b3b5e Fixed my usage of "asm" instead of "__asm" and "volatile" instead
of "__volatile".  Note also that the original mods that were submitted
by me were as a result of a discussion between various FreeBSD contributors.

Submitted by:	peter@haywire.dialix.com (Peter Wemm)
1995-08-09 02:39:32 +00:00
John Dyson 302cf5869a Fixed a problem that malloc(..,..,M_NOWAIT) was being called without checking
for return values.  It just so happens that in the cases where it is likely
to fail, it is okay to change the M_NOWAIT to M_WAITOK -- and all will
be well.  This problem was manfest as a panic very regularly on a 4MB
system right after bootup.
1995-08-08 05:14:40 +00:00
John Dyson 8966b85c8f Make the spl oriented inline functions less likely to allow
potentially volatile memory to be kept in registers during
the "call" (inline expansion.)  Do the same for pmap_update.
1995-08-08 04:50:52 +00:00
Peter Wemm 958c15a053 Grab next major (68) for the Specialix SI/XIO driver which is due to
come in RSN.  As Jordan said "First in, first served.."
1995-08-05 21:33:04 +00:00
Justin T. Gibbs c83d01159a Update the SCB controll byte bit definitions to match new SCB_DISCENB bit.
Remove "#ifdef NOT_YET"s since the features they pertain too are committed
now.
1995-08-05 17:32:55 +00:00
Andrey A. Chernov f49f5fa852 Allow any speed from 0..76800
Reviewed by:
Submitted by:
Obtained from:
1995-08-02 10:17:35 +00:00
Jordan K. Hubbard d660e3ae8d Sync to author's Version 1.3.
Submitted by:	james
1995-08-01 07:07:42 +00:00
Jordan K. Hubbard a2048b9c26 Sync to reality for the Gravis Ultrasound MAX card. 1995-08-01 07:05:16 +00:00
Jordan K. Hubbard 8f5171930e Reserve space for Jim Lowe's impending Matrox Meteor card driver.
Submitted by:	james
1995-07-31 22:06:55 +00:00
Bruce Evans 7922019b1c Eliminate the use of TS_TIMEOUT and ttstrt(). These are for handling
tab delays etc.  pcvt was using them to recover from a (rarely lost)
race.  Use a little more locking to avoid the race.
1995-07-31 21:35:17 +00:00
Bruce Evans 1856afe955 Sleep on a better address to wait for output to drain out of the
hardware.  Set the sleep-on flag for the address so there is more
than a small chance that the sleep address is actually used (this
used to work by timing out).  Don't bother clearing the sleep-on
flag after a timeout here or elsewhere since leaving it set just
generates a few null calls to wakeup().
1995-07-31 21:10:36 +00:00
Bruce Evans 9fa18570a2 Obtained from: partly from ancient patches of mine via 1.1.5
Introduce TS_CONNECTED and TS_ZOMBIE states.  TS_CONNECTED is set
while a connection is established.  It is set while (TS_CARR_ON or
CLOCAL is set) and TS_ZOMBIE is clear.  TS_ZOMBIE is set for on to
off transitions of TS_CARR_ON that occur when CLOCAL is clear and
is cleared for off to on transitions of CLOCAL.  I/o can only occur
while TS_CONNECTED is set.  TS_ZOMBIE prevents further i/o.

Split the input-event sleep address TSA_CARR_ON(tp) into TSA_CARR_ON(tp)
and TSA_HUP_OR_INPUT(tp).  The former address is now used only for
off to on carrier transitions and equivalent CLOCAL transitions.
The latter is used for all input events, all carrier transitions
and certain CLOCAL transitions.  There are some harmless extra
wakeups for rare connection- related events.  Previously there were
too many extra wakeups for non-rare input events.

Drivers now call l_modem() instead of setting TS_CARR_ON directly
to handle even the initial off to on transition of carrier.  They
should always have done this.  l_modem() now handles TS_CONNECTED
and TS_ZOMBIE as well as TS_CARR_ON.

gnu/isdn/iitty.c:
Set TS_CONNECTED for first open ourself to go with bogusly setting
CLOCAL.

i386/isa/syscons.c, i386/isa/pcvt/pcvt_drv.c:
We fake carrier, so don't also fake CLOCAL.

kern/tty.c:
Testing TS_CONNECTED instead of TS_CARR_ON fixes TIOCCONS forgetting to
test CLOCAL.  TS_ISOPEN was tested instead, but that broke when we disabled
the clearing of TS_ISOPEN for certain transitions of CLOCAL.

Testing TS_CONNECTED fixes ttyselect() returning false success for output
to devices in state !TS_CARR_ON && !CLOCAL.

Optimize the other selwakeup() call (this is not related to the other
changes).

kern/tty_pty.c:
ptcopen() can be declared in traditional C now that dev_t isn't short.
1995-07-31 21:02:00 +00:00
Bruce Evans f3b37f91c1 Improve input flow control.
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.
1995-07-31 18:29:51 +00:00
Peter Dufault c8bb1269a8 Return the correct number of I/O ports as part of the probe so that the
conflict resolution works.
1995-07-31 09:38:21 +00:00
Justin T. Gibbs 185363acb2 Long overdue, more complete, reset code. These changes implement a
BUS DEVICE RESET followed by BUS RESET failure recovery strategy including
the necesary renegotiation of sync/wide transfers after recovery completes.

Clean up debugging code to make it more finely selectable.  Reset code
debugging is enabled for now so I can get more feedback on how this
code behaves in real life.
1995-07-31 08:25:36 +00:00
David Greenman a705fd3e48 Fix a bug in my disabled version of trap_pfault()...curpcb may be NULL even
when curproc isn't. This condition occurs at system startup and perhaps
at other times.
1995-07-30 17:49:24 +00:00
Bruce Evans d49c99ba9c Fix enough of the recently introduced brokenness for LINT to compile.
The U6850* changes in sound_config.h are probably wrong.

Recent commits lost:
- include paths.
- copyrights.
- cvs Ids.
- infamous whitespace changes.
- other cosmetic changes.
1995-07-29 14:20:54 +00:00
Paul Richards 73f0203186 The lemac driver didn't pass transmitted packets to bpf. Now it does.
Reviewed by:
Submitted by:
Obtained from:
1995-07-29 13:00:17 +00:00
Bruce Evans 28f8db1403 Eliminate sloppy common-style declarations. There should be none left for
the LINT configuation.
1995-07-29 11:44:31 +00:00
Bruce Evans 772ec2b7a9 Removed the poorly named unused bogus common variable `total'. It was
obsoleted by the VM_METER sysctl a long time ago.
1995-07-29 10:47:05 +00:00
Bruce Evans 611c22c117 Don't let IXOFF or ECHONL stop the setting of TS_CAN_BYPASS_L_RINT. IXOFF
is handled at a low level, and ECHONL only applies if ICANON is set,
although tty.c sometimes bogusly applies it when ICANON isn't set.
1995-07-29 08:33:13 +00:00
Bruce Evans 4ce7d32178 Always wake up writers after clearing TS_BUSY. This will soon be
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().
1995-07-29 04:05:57 +00:00
Jordan K. Hubbard 8000cec155 This file got left out for some reason - merge it in with the rest of
the VOXWARE 3.05 stuff.
Submitted by:	Amancio Hasty and Jim Lowe
Obtained from: Hannu Savolainen
1995-07-28 23:37:32 +00:00
Jordan K. Hubbard 8bdcfa2a8b Merge in changes for VOXWARE 3.05
Submitted by:	Amancio Hasty and Jim Lowe
1995-07-28 22:30:53 +00:00
Jordan K. Hubbard 550eed9cb5 Support for voxware 3.05.
Submitted by:	Amancio Hasty and Jim Lowe
1995-07-28 22:25:52 +00:00
Jordan K. Hubbard ae28ee13b4 Update the sound driver to VOXWARE 3.05 with one GUS patch from
Amancio.  There is some SoundSource support here that is primitive and
probably doesn't work, but I'll let the two submitters let me know
how my integration of that was since I don't have this card to test.
I've only tested this on my GUS MAX since it's all I have.

This all probably needs to be re-done anyway since we're widely variant
from the original VOXWARE source in the current layout.
Submitted by:	Amancio Hasty and Jim Lowe
Obtained from:  Hannu Savolainen
1995-07-28 21:40:49 +00:00
David Greenman c5bb0d718c Fixed bug where a bogus packet length could cause a panic if the length
was less than sizeof(struct ed_ring).
1995-07-28 12:15:16 +00:00
David Greenman 6b837e5dda Fixed bug I introduced with the memory-size code rewrite that broke
floppy DMA buffers...use avail_start not "first". Removed duplicate
(and wrong) declaration of phys_avail[].

Submitted by:	Bruce Evans, but fixed differently by me.
1995-07-28 11:21:06 +00:00
Bruce Evans 3e3de3f369 Change bogus `extern inline' to `static inline'.
This finishes making the kernel compile without -O.

The "optimized" asm version of the function being inlined
(translate_bytes()) uses slow instructions.  On a 486, assuming
everything is in the cache (unlikely), it is 21/15 times slower
than the dumb C version and 21/3 times slower than the best
possible bytewise method.
1995-07-25 23:03:22 +00:00
Bruce Evans 1c85ed9abd Change memcmp() to bcmp(). memcmp() isn't declared or implemented
for the kernel, but gcc provides an inline version of it if the
kernel is compiled with -O.
1995-07-25 22:18:56 +00:00
Bruce Evans 8089a0432e Fix bogus constraint "i" that only worked with -O. The cases where it
didn't work are somewhat bogusly optimized away before the constraint
is checked.  We still expect constants passed to inline functions to
remain constant, but if the compiler ever decides that they aren't
constant then it will just generate slightly slower code instead of
an error.
1995-07-25 21:28:47 +00:00
Bruce Evans e150a6d25b Restore the the fix in revision 1.23 that was blown away by a later commit:
remove unused variable `u_char bt_scratch_buf[256];'.
1995-07-25 16:06:06 +00:00
Bruce Evans 3ba7df0ba7 First step of fixing the remaining sloppy common-style declarations.
Declare `cheat' as static.  It was bogusly shared between the aha1742 and
ultrastor drivers.

Even static variables should have unique names so that they can be
debugged, but fixing them can wait.
1995-07-25 15:53:11 +00:00
Bruce Evans 9c0dc173cc Change `install' to `${INSTALL}' so that default install flags can be
specified in the top level Makefiles.
1995-07-25 00:37:58 +00:00
Bruce Evans 5542b158d8 Fix clean rule to remove remove everything that isn't created by config
except .depend and `version'.
1995-07-22 23:55:41 +00:00
Bruce Evans d348ccec2e Fix clean rule for aic7xxx_asm. 1995-07-22 23:53:30 +00:00
Joerg Wunsch f6027d9b3d this avaids the "lineoverflow" which you'll always get at 80 column
displays at bootup

Reviewed by:
Submitted by:	graichen@omega.physik.fu-berlin.de (Thomas Graichen)
Obtained from:
1995-07-22 22:32:49 +00:00
Bruce Evans abe8bea470 Obtained from: partly from ancient patches of mine via 1.1.5
Give names to the magic tty i/o sleep addresses and use them.  This makes
it easier to remember what the addresses are for and to keep them unique.
1995-07-22 16:45:22 +00:00
Bruce Evans 3ec9b35e8a Remove vat_audio driver support here too.
Clean up formatting for reserved and Talisman driver entries.

Fix d_select entry for unused driver.
1995-07-22 13:56:06 +00:00
Bruce Evans a16721a13a Move the inline code for waking up writers to a new function
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.
1995-07-22 01:30:45 +00:00
Bruce Evans 2ce42987d3 Obtained from: partly from ancient patches of mine via 1.1.5
Move static termioschars() from a couple of drivers to tty.c.  Now there
is only one copy of ttydefchars[].
1995-07-21 22:52:01 +00:00
Bruce Evans 0d1de831ea Obtained from: partly from an ancient patch of mine via 1.1.5
Temporarily nuke TS_WOPEN.  It was only used for the obscure MDMBUF
flow control option in the kernel and for informational purposes
in `pstat -t'.  The latter worked properly only for ptys.  In
general there may be multiple processes sleeping in open() and
multiple processes that successfully opened the tty by opening it
in O_NONBLOCK mode or during a window when CLOCAL was set.  tty.c
doesn't have enough information to maintain the flag but always
cleared it in ttyopen().

TS_WOPEN should be restored someday just so that `pstat -t' can
display it (MDMBUF is already fixed).  Fixing it requires counting
of processes sleeping in open() in too many serial drivers.
1995-07-21 16:30:59 +00:00
Paul Traina cfb5972713 Remove vat_audio driver support 1995-07-20 16:31:22 +00:00
David Greenman e9857eee2b Rewrote memory sizing code to generally deal with holes in extended memory.
This code change should allow certain Compaq machines with a 128K hole
at 16MB to work.
1995-07-19 06:37:12 +00:00
Justin T. Gibbs eb62827d8a Specify the controller bus in the scsi_link structure to allow hardwired
buses on multi-bus controllers.  Currently only affects the 274xT controllers.

Reviewed by: Peter Dufault(dufault@hda.com), Rod Grimes(rgrimes@FreeBSD.org)
1995-07-17 23:35:16 +00:00
Justin T. Gibbs 4fbaf9a7c0 Add examples for wiring down scbuses to drivers as well as specifying
controller buses for multi-bus controllers.
1995-07-17 23:32:53 +00:00
David Greenman 6263a19a10 Added crdselect definition for !NCRD case. 1995-07-16 14:34:57 +00:00
Peter Wemm 1174c7d121 This fixes a compiler warning, and a cosmetic problem with the linux
emul code when compiling with "options KTRACE".
ktrsyscall() was expecting an array of integers, this was passing the
address of a structure containing an array of integers..
The cosmetic problem was that it was calling the "enter syscall"
trace hook twice - this looks like a cut/paste error/typo.
1995-07-16 14:10:55 +00:00
Poul-Henning Kamp 8a7580c3fe Reviewed by: phk
Submitted by:	Andrew McRae <andrew@mega.com.au>

Some initial commits from the pcmcia stuff, to make life easier for the
testers.

We will use the name "pccard" since that is really the buzzword at present.
1995-07-16 10:45:06 +00:00
Poul-Henning Kamp 7a2dada545 Make the bootinfo structure visible from sysctl.
This can be used in libdisk to guess a better bios-geometry.
1995-07-16 10:33:38 +00:00
Joerg Wunsch 446cee6e6d Include ``options POWERFAIL_NMI'' for owners of older (non-apm)
notebooks where a powerfail condition (external power drop; battery
state low) is signalled by an NMI.  Makes it beep instead of panicing.

Reviewed by:	davidg
1995-07-16 10:31:26 +00:00
Bruce Evans 97e156674d Don't include <sys/tty.h> in drivers that aren't tty drivers or in general
files that don't depend on the internals of <sys/tty.h>
1995-07-16 10:13:08 +00:00
Bruce Evans 1be9be9647 Fix compiler warnings (systm.h wasn't included). 1995-07-16 10:07:40 +00:00
Bruce Evans 567e21c2c0 Add tw. 1995-07-16 08:55:04 +00:00
David Greenman 9e951f36f1 Truncate the fault address to a page boundry when calling vm_fault(). The
last change to fix the fault-twice bug with page tables wasn't quite
complete.
1995-07-16 05:39:22 +00:00
David Greenman 4a67eb7121 Fixed bug that caused page tables to be faulted twice instead of once.
Submitted by:	John Dyson
1995-07-14 09:25:51 +00:00
Jordan K. Hubbard 2c3c9fc440 The following patch for v1.8 (2.0.5R) of seagate.c allows it to work with
Future Domain TMC-885 controllers. These beasts were just different enough in
a number of perverse ways to be recognised but not work with the seagate
stuff. I also whacked in blind transfers for DATAIN and DATAOUT phases - this
more than doubles my throughput. If you're dubious about that, comment out the
definition of SEA_BLINDTRANSFER. Anyway if you're running an ST01 or TMC-950
controller, please give this a go, I'd like to see if anything's broken for
those beasts.

Submitted by:	Stephen Hocking <sysseh@devetir.qld.gov.au>
1995-07-13 15:01:38 +00:00
David Greenman 24a1cce34f NOTE: libkvm, w, ps, 'top', and any other utility which depends on struct
proc or any VM system structure will have to be rebuilt!!!

Much needed overhaul of the VM system. Included in this first round of
changes:

1) Improved pager interfaces: init, alloc, dealloc, getpages, putpages,
   haspage, and sync operations are supported. The haspage interface now
   provides information about clusterability. All pager routines now take
   struct vm_object's instead of "pagers".

2) Improved data structures. In the previous paradigm, there is constant
   confusion caused by pagers being both a data structure ("allocate a
   pager") and a collection of routines. The idea of a pager structure has
   escentially been eliminated. Objects now have types, and this type is
   used to index the appropriate pager. In most cases, items in the pager
   structure were duplicated in the object data structure and thus were
   unnecessary. In the few cases that remained, a un_pager structure union
   was created in the object to contain these items.

3) Because of the cleanup of #1 & #2, a lot of unnecessary layering can now
   be removed. For instance, vm_object_enter(), vm_object_lookup(),
   vm_object_remove(), and the associated object hash list were some of the
   things that were removed.

4) simple_lock's removed. Discussion with several people reveals that the
   SMP locking primitives used in the VM system aren't likely the mechanism
   that we'll be adopting. Even if it were, the locking that was in the code
   was very inadequate and would have to be mostly re-done anyway. The
   locking in a uni-processor kernel was a no-op but went a long way toward
   making the code difficult to read and debug.

5) Places that attempted to kludge-up the fact that we don't have kernel
   thread support have been fixed to reflect the reality that we are really
   dealing with processes, not threads. The VM system didn't have complete
   thread support, so the comments and mis-named routines were just wrong.
   We now use tsleep and wakeup directly in the lock routines, for instance.

6) Where appropriate, the pagers have been improved, especially in the
   pager_alloc routines. Most of the pager_allocs have been rewritten and
   are now faster and easier to maintain.

7) The pagedaemon pageout clustering algorithm has been rewritten and
   now tries harder to output an even number of pages before and after
   the requested page. This is sort of the reverse of the ideal pagein
   algorithm and should provide better overall performance.

8) Unnecessary (incorrect) casts to caddr_t in calls to tsleep & wakeup
   have been removed. Some other unnecessary casts have also been removed.

9) Some almost useless debugging code removed.

10) Terminology of shadow objects vs. backing objects straightened out.
    The fact that the vm_object data structure escentially had this
    backwards really confused things. The use of "shadow" and "backing
    object" throughout the code is now internally consistent and correct
    in the Mach terminology.

11) Several minor bug fixes, including one in the vm daemon that caused
    0 RSS objects to not get purged as intended.

12) A "default pager" has now been created which cleans up the transition
    of objects to the "swap" type. The previous checks throughout the code
    for swp->pg_data != NULL were really ugly. This change also provides
    the rudiments for future backing of "anonymous" memory by something
    other than the swap pager (via the vnode pager, for example), and it
    allows the decision about which of these pagers to use to be made
    dynamically (although will need some additional decision code to do
    this, of course).

13) (dyson) MAP_COPY has been deprecated and the corresponding "copy
    object" code has been removed. MAP_COPY was undocumented and non-
    standard. It was furthermore broken in several ways which caused its
    behavior to degrade to MAP_PRIVATE. Binaries that use MAP_COPY will
    continue to work correctly, but via the slightly different semantics
    of MAP_PRIVATE.

14) (dyson) Sharing maps have been removed. It's marginal usefulness in a
    threads design can be worked around in other ways. Both #12 and #13
    were done to simplify the code and improve readability and maintain-
    ability. (As were most all of these changes)

TODO:

1) Rewrite most of the vnode pager to use VOP_GETPAGES/PUTPAGES. Doing
   this will reduce the vnode pager to a mere fraction of its current size.

2) Rewrite vm_fault and the swap/vnode pagers to use the clustering
   information provided by the new haspage pager interface. This will
   substantially reduce the overhead by eliminating a large number of
   VOP_BMAP() calls. The VOP_BMAP() filesystem interface should be
   improved to provide both a "behind" and "ahead" indication of
   contiguousness.

3) Implement the extended features of pager_haspage in swap_pager_haspage().
   It currently just says 0 pages ahead/behind.

4) Re-implement the swap device (swstrategy) in a more elegant way, perhaps
   via a much more general mechanism that could also be used for disk
   striping of regular filesystems.

5) Do something to improve the architecture of vm_object_collapse(). The
   fact that it makes calls into the swap pager and knows too much about
   how the swap pager operates really bothers me. It also doesn't allow
   for collapsing of non-swap pager objects ("unnamed" objects backed by
   other pagers).
1995-07-13 08:48:48 +00:00
Bruce Evans d800e06858 Fix races in scstart(). q_to_b() wasn't called at spltty(), so there
were two races:
- q_to_b() might unexpectedly return 0 (e.g, after a keyboard signal
  flushes the output queue and isn't echoed).  ansi_put() interprets
  0 bytes as 4GB...
- more output (e.g. for echoes) might arrive afer q_to_b() returns 0.
  Then scstart() returns presumably and the new output might not be
  handled for a long time.

Remove unused function scxint().

Fix prototypes (foo() isn't a prototype).
1995-07-11 18:34:30 +00:00
Bruce Evans f2fb20ef41 Speed up the inner loop of ansi_put() by a few percent.
syscons' output is now only about 4-5 times slower than I want.
It loses a factor of 2 for scrolling output by unnecessarily copying
the screen buffer, a factor of 4/3 for dumb OPOST processing, and
a factor of 3/2 for clist processing.
1995-07-11 17:59:22 +00:00
Bruce Evans 7fbcd76bb5 Enable pcvt in LINT and don't generate a compile time error if syscons
and pcvt are both configured when LINT is defined.  There will be a
link time error instead.  This is to test building of pcvt more often.
1995-07-11 17:20:20 +00:00
Jordan K. Hubbard 15c761840a Release summary: (detailed descriptions in Edit History in matcd.c)
Adds support for non-Sound Blaster host adapters, including those
distributed by Reveal, Lasermate, IBM, Media Vision, Crystal and others.
The driver automatically senses the correct adapter type and you can
have both in the system at the same time.
(This change should eliminate a few complaints.)

Corrected bit-masking problem that prevented use on SB Vibra-16 boards.

Declared some internal data and functions static that should have been
that way all along.

Documentation changes reflect the new hardware support and change the
appearance version to 2.0.5 (was 2.1).    Nice and tidy.   :-)


Beta testers have verified functionality on SB16, Vibra-16, Media Vision
and Reveal adapters.   -Wall still shows no warnings.

                                        Frank Durda IV
                                        uhclem%nemesis@fw.ast.com
Submitted by:	Frank Durda IV <uhclem%nemesis@fw.ast.com>
1995-07-11 03:03:47 +00:00
Andreas Schulz f8e365a0e0 Correct a typo in a comment. 1995-07-08 22:09:11 +00:00
Bruce Evans 42854d0eac Multiplex the soft tty interrupt some more to support the cy driver.
This should be configured better, perhaps by providing a software
interrupt and mask bit to go with every hardware interrupt.
1995-07-05 14:35:34 +00:00
Bruce Evans aa96081f8b Fix error logging:
- get the timeout countdown right
- report everything before turning timeouts off.
1995-07-05 14:30:07 +00:00
Bruce Evans 94ec1fba9a Rewrite:
- 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.
1995-07-05 12:15:52 +00:00
David Greenman 9f77221854 Protected entire epioctl routine with splimp(). In this case, it is better
form to do this than it is relying on individual subroutines (the logic
in epioctl is itself very minimal). Ideally, unnecessary splimp()'s should
now be removed if they exist; I'll leave this for a later date (a complete
code review of the driver needs to be done). Fixes a bug I noticed that
would show up when ifconfig'ing the interface down.
1995-07-05 07:21:34 +00:00
Justin T. Gibbs 0698f32885 Dan Eischen's serial eeprom code. 1995-07-04 21:16:12 +00:00
Justin T. Gibbs 6b172e59a6 First pass cleanup of this driver. This pass does not include the sequencer
optimizations I have been working on yet, but does bring in some bug fixes
and performance improvments that were easy to regression test:

Setup the data fifo threshold and bus off timing correctly for 27/284x cards.
Users of these adapters with fast periferals (greater than 5MB/s) will notice
a big performance difference. (Sometimes as large as going from 3.7->8.3MB/s).

Fix handling of the active target flags.  Some of the outbs where missing
the base offset in the abort code.  The abort code still needs lots of work.

Support 3940 controllers, but only with 16 SCBs for now.  Eventually I'll
add support for all 255, but I need to find a tester for the code first since
we have to enable the cards external SRAM to do this.

Add Dan Eischen's serial eeprom reading facilities.  This allows the 2940
adapters to pull additional information left over from SCSI-Select right out
out of the configuration seeprom.

If the BIOS is disabled on 274x controllers, reset all target parameters
to there defaults since you can't rely on what is stored in scratch ram.

Report motherboard controllers as such.

Stick the first SG address and count into the SCB data and count areas for
all transfers in preparation of a later sequencer optimization.

Keep track of which targets can are allowed to have the disconnection
priveledge since this will be handled by the kernel driver in the future.

If a target issues a message reject in response to a tagged message,
disable tagged queuing for that target.  Some seagates say they can do
tagged queuing, but lie, and its a shame to have to disable tagged queuing
on all devices just because you have one that can't cope.
1995-07-04 21:14:45 +00:00
Justin T. Gibbs 62f23575fc Add entry for i386/scsi/93cx6.c, the file that handles serial eeprom
routines for the aic7xxx driver.  If and when other drivers start
to access similar serial eeproms, this file should probably be moved.
1995-07-04 21:00:53 +00:00
Stefan Eßer d2a2d5ec41 The PCI config mechanism 1 test failed for the Intel Aries.
Make it less strict ...

Submitted by:	NIIMI Satoshi <sa2c@and.or.jp>
1995-06-30 16:11:42 +00:00
Andrey A. Chernov 5575abefeb Fight with hanging modems continued:
return EIO after t_timeout expired instead infinite looping in "siotx"
in comparam, consuming CPU time.
1995-06-28 17:58:14 +00:00
Stefan Eßer 0847c06d2e PCI configuration mechanism now determined by a method, that doesn't
fail on new hardware (Compaq Prolinea and Compaq Prosignea), and that
doesn't erroneously identify old mech. 2 chip sets as using mech. 1.
(See section 3.6.4.1.1 of the PCI bus specs rev. 2.0)
1995-06-28 15:54:57 +00:00
David Greenman 338cd8f6be Killed redundant vnode_pager_umount() call. This is already done at
FS unmount time.
1995-06-28 04:46:11 +00:00
David Greenman 53b5ed936e Make path to kernel absolute if it is passed in relative. This fixes
a related bug in some of the new 'foo'boot bootstrap code that has been
added over the past months. This change makes it no longer necessary
for the bootstrap to fix up the path (i.e. it can be removed).
1995-06-28 04:42:25 +00:00
Bruce Evans 943c18018b Fix standards conformance bugs in <signal.h>:
include/signal.h:
There was massive namespace pollution from including <sys/types.h>.
POSIX functions were declared even when _ANSI_SOURCE is defined.

sys.sys/signal.h:
NSIG was declared even if _ANSI_SOURCE or _POSIX_SOURCE is defined.
sig_atomic_t wasn't declared if _POSIX_SOURCE is defined.
Declare a typedef for signal handling functions and use it to
unobfuscate declarations and to avoid half-baked function types
that cause unwanted compiler warnings at certain warning levels.
Fix confusing comment about SA_RESTART.

sys/i386/include/signal.h:
This has to be included to get the declaration of sig_atomic_t even
when _ANSI_SOURCE is defined, so be more careful about polluting
the ANSI namespace.

Uniformize idempotency ifdefs.
1995-06-28 02:14:13 +00:00
Bruce Evans e9c2b07f51 Define macros _BSD_OFF_T_ and _BSD_PID_T_ suitable for use instead
of the typedefs off_t and pid_t when use of the latter would cause
namespace pollution.  These macros are used like _BSD_VA_LIST_ and
aren't #undef'ed when the corresponding typedef is declared.
off_t is very machine-dependent and should never have been decided
in <sys/types.h> (its declaration is compiler-dependent).  pid_t
isn't very machine-dependent, but this might change.  `long' is
a wasteful type for it if longs are longer than ints.

Move the definition of _BSD_VA_LIST_ away from the comment that
suggests that it is #undefed when va_list is declared.
1995-06-28 01:39:26 +00:00
Bruce Evans 4ebf8117df Partially fix `sysctl machdep.console_device'. The fix will be complete
when syscons stops mapping the console to minor MAXCONS.  There is
usually no corresponding device in /dev, and the correct device has
minor 0.

cons.c:
Initialize cn_tty properly, so that CPU_CONSDEV can work.
Comment about too many variants of the console tty pointer.

machdep.c:
Return device NODEV and not error EFAULT when there is no console device.
1995-06-26 07:39:52 +00:00
Joerg Wunsch 85cd1fc590 The BT scsi driver has recently had a message changed - it could be
clearer.  The "informational message" almost looks like an instruction to
the user to change settings on the card....

It's cosmetic, but...

Submitted by:	peter@haywire.dialix.com
1995-06-25 17:45:05 +00:00
Søren Schmidt c21dee177f First incarnation of our Linux emulator or rather compatibility code.
This first shot only incorporaties so much functionality that DOOM
can run (the X version), signal handling is VERY weak, so is many
other things. But it meets my milestone number one (you guessed it
- running DOOM).

Uses /compat/linux as prefix for loading shared libs, so it won't
conflict with our own libs.

Kernel must be compiled with "options COMPAT_LINUX" for this to work.
1995-06-25 17:32:43 +00:00
Joerg Wunsch 0f72d204e6 Reset defaults in case of boot() is looping several times (e.g. the
user has entered a bogus kernel name in the first place).

Also fix the broken #ifdef FORCE_COMCONSOLE, it has been disabled by
accident.  (NB: the keyboard probe remains disabled however.)

Few cosmetic fixes (declare functions to be void instead of int),
while i've been at this.

Pointed out by: wosch@cs.tu-berlin.de (Wolfram Schneider), for the init bug
1995-06-25 14:02:57 +00:00
Joerg Wunsch 973d025839 Add a `reset' command to UserConfig. Our documentation does
explicitly advise the users to reset the machine in case they have
done bogus things (to prevent `dset' from merging the changes into
/kernel), and it's also useful for machines with serial consoles that
are physically in another place.
1995-06-25 13:57:55 +00:00
Bruce Evans 33dc7e1b84 Reduce timeout frequency from `hz' to 0 if no ports are open or to 1 if
no ports are active, provided there are no polled ports and no
`LOSESOUTINTS' ports.  Do a little more in the interrupt handler instead.
This is a little less efficient if there are are many active ports but
a little more efficient otherwise.  Polled ports are ones with no irq
specified (as before).  `LOSESOUTINTS' ports are ones with 0x08 set in
their config flags.  Unless this flag is set, it will now take up to one
second to recover from lost output interrupts, if any.  Some 8250s and
16450s lose output interrupts.

Improve output buffering: copy the clist buffer to 2 linear buffers if
necessary and possible instead of to 1.  Handle an arbitrary queue of
buffers in the interrupt handler.  Check for waking up sleepers after
copying characters out of the clist buffer instead of before.

Delay translation of TIOCM_DTR to MCR_DTR etc. so that the top level
routines are more machine independent.

Fix bogus device register in unused code.
1995-06-25 04:51:01 +00:00
Andrey A. Chernov 525cb41eb5 1) Enable boot from root partition which end > cyl 1023, it isn't criminal
2) Produce hard error when Bread attempts to read cyl >1023
Reviewed by: bde
1995-06-23 01:42:42 +00:00
Doug Rabson 975c53c7b0 Add an option to the psm driver to skip the parts of the probe which break
some laptops with PS/2 mice.

Submitted by:	nsayer@quack.kfu.com
1995-06-22 10:56:56 +00:00
David Greenman 108b7c8091 Use ifr_mtu for the mtu value rather than ifr_metric. 1995-06-22 07:03:20 +00:00
David Greenman 381e6190c0 Change interface type...IFT_SLIP -> IFT_PARA. 1995-06-21 10:23:23 +00:00
Atsushi Murai 4112bc7874 1. Supporting fast sync value displayin latest firmware.
2. Use restrict round-robin scheme rather than a  agresive one if
   firmware has a this capability.
1995-06-19 13:02:09 +00:00
Andrey A. Chernov ae39e7ee16 Next version, many bugs fixed 1995-06-14 19:37:02 +00:00
Bruce Evans 6f5014b462 Convert to ANSI C: change #endif THING to #endif /* THING */.
Fix one such THING in code to match comment.
Sort IO_GSC* into numeric order and update comments about the gaps.
Sort common SCSI addresses into alphabetical order.
Remove bogus comments about com ports having i/o size 4.
Uniformize whitespace.
Uniformize case in hex digits.

This file is very incomplete.  In particular, it doesn't mention any
network cards.  This doesn't matter much for the base addresses, but
it means that the comments about which addresses are free are mostly
bogus.  The i/o sizes are unreliable because of split address ranges
for many devices (VGA, wd).  The i/o sizes are incomplete.  In
particular, there are no sizes for SCSI controllers.  The bt driver
still returns a truth value instead of a size.
1995-06-14 07:38:31 +00:00
Bruce Evans 5dce8a63fc Don't convert \n to \r\n in pccnputc(). This is the responsibility of
cnputc().
1995-06-14 05:16:12 +00:00