Commit Graph

1050 Commits

Author SHA1 Message Date
Poul-Henning Kamp
0f6873dbcc move variables inside the #ifdef. 1995-11-20 12:12:02 +00:00
Bruce Evans
27413a9eef Moved bogusly placed #endif that hid some prototypes. 1995-11-18 09:37:42 +00:00
Bruce Evans
6eeed24248 Updated comments. The comments about the unused addresses get broken
almost every time someone uses an address.  This file is probably not
the right place to keep track of the unused addresses (or used
addresses :->).

Fixed comments on #endif's to match code.

Added defines for ASC and GSC sizes.  This file is not the right place
to keep track of scanner addresses, but while there here and we
pretend to keep track of unused addresses, the sizes need to be here
too.

Sorted IO_*SIZE defines.
1995-11-18 09:29:39 +00:00
Bruce Evans
47b4b8b88e Fixed the types of the apm hook functions.
Completed function declarations.

Added prototypes.

Partially fixed the path to cons.h.
1995-11-18 08:58:14 +00:00
Bruce Evans
58bfbb4b1a Fixed the types of the apm hook functions.
Completed function declarations.

Added prototypes.
1995-11-18 08:39:28 +00:00
Bruce Evans
980dc8bb6e Fixed the type of a timeout function.
Added prototypes.
1995-11-18 08:35:49 +00:00
Bruce Evans
caa8e73783 Fixed staticization - use `static' in function headers, not just in
prototypes.
1995-11-18 08:29:04 +00:00
Bruce Evans
6b88228fc4 Fixed a bogus include path.
Removed a bogus include.

Added prototypes.
1995-11-18 08:21:15 +00:00
Bruce Evans
c5d1682b14 Staticized an inline function. All inlines in kernel headers should be
static.  The function shouldn't be here anyway.  It is driver dependent,
while `ic' files are supposed to only depend on the IC.
1995-11-18 08:12:30 +00:00
Bruce Evans
27513ca73b Fixed (nonexistent) initialization of bp->b_pblkno. disksort() for
floppies must have been random in 2.x since we reintroduced sorting
on b_pblkno on 1995/03/18.  Drivers still initialize b_cylin/b_resid
although this is no longer used.

Removed unused, wrong function fdsize().  (Returning 0 means that the
device exists and has size 0, not that the device doesn't exist.
swaponvp() allows for size 0 by stupidly calling the d_psize function
twice if the size isn't 0.  setdumpdev() doesn't allow for it.)

Continued removing /* ARGSUSED */ from drivers.
1995-11-18 07:48:11 +00:00
Bruce Evans
0f5c6b7d97 Fixed the type of a timeout function.
Removed related bogus casts of function pointers.
Removed a bogus include.
1995-11-18 07:07:04 +00:00
Bruce Evans
eabc9678bc Included <sys/conf.h>. It used to be included as a side effect of
including <sys/devconf.h>.
1995-11-16 09:56:02 +00:00
David Greenman
f13d0e7dbf Correct the bogus probe for 8216/8416 cards...it was broken.
Submitted by:	Steve Piette <steve@simon.chi.il.US>
1995-11-15 07:45:56 +00:00
Poul-Henning Kamp
920e8dc220 Fiddle with <machine/isa_device.h> 1995-11-14 20:49:24 +00:00
Poul-Henning Kamp
2a02fd2542 Staticize various private parts. 1995-11-14 09:58:47 +00:00
Poul-Henning Kamp
cc028d77d6 Make a lot of private stuff static 1995-11-14 09:53:17 +00:00
Bruce Evans
b3e24f9ce9 Changed the first (name) arg of MOD_DEV(), MOD_EXEC() and MOD_MISC()
from a string to an identifier so that it can be used to generate
declarations and strings.  It's much easier to stringize an identifier
than to identifize a string.  A uniform naming scheme must be used
for the automatically generated things to apply.  This is a feature.

Used the module identifer to generate prototypes for the module load,
unload and stat functions.  Removed the few prototypes for these that
already existed.

Used the module identifier to generate a unique struct tag in MOD_DEV().
This should probably be done for all the MOD_*() macros.

Moved the trailing semicolon from the MOD_*() macro definitions to the
macro invocations that didn't already (bogusly) have it.

Staticized the module load and unload functions.

Added function return types for the module load, unload and stat functions.

lkm/ibcs2/ibcs2.c:
Included <sys/sysproto.h> to get everything prototyped.
Cleaned up #includes.

lkm/ibcs2/ipfw.c:
Cleaned up #includes.

lkm/linux/linux.c:
The module name had to change from "linux_emulator" to "linux_mod" to
be automatically generated.
Cleaned up #includes.

lkm/syscons/*/*_saver.c:
Completed delcarations of function pointers.

sys/i386/isa/atapi.c:
The module name had to change from "atapi" to "atapi_mod" to be
automatically generated.

sys/i386/isa/wcd.c:
Used the fixed MOD_DEV().  This module has two devices and expanded the
macro in the source instead of fixing it.
The module names had to change from "wcd" and "rwcd" to "wcd_mod" and
"rwcd_mod" to be automatically generated.

sys/pccard/pcic.c:
The module name had to change from "pcic" to "pcic_mod" to be
automatically generated.
1995-11-14 07:35:57 +00:00
Bruce Evans
e7b632b588 Replaced nosys() by lkm_nullcmd(). 1995-11-13 08:52:08 +00:00
Mark Murray
a07ffb0cda Add /dev/random hooks to the key input routines for pcvt. This allows
the scancodes on a PCVT machine to be used as stochastic input as well
as SysCons..
Reviewed by:	Joerg Wunsch
1995-11-12 17:02:45 +00:00
Peter Wemm
5d0bad8280 Sync the public source with what I'm currently running.
Most of this is cleaning up, but there are some functional changes,
doc/comment improvements, error checking, gcc -Wall cleanups.  Input buffer
flushing is enabled now, although I'm still not quite certain it's right.
1995-11-09 21:53:48 +00:00
Bruce Evans
fec5f38c65 Nuked some more bogus devswitch macros. The wcd lkm was broken. 1995-11-09 09:17:49 +00:00
Justin T. Gibbs
67e1bd423c Remove old eisaconf cruft from the eisa files. The old eisaconf kludged
in here to do some conflict detection.  The new code doesn't do conflict
detection yet, but it will be implemented in another way.

aic7770.c moved to i386/eisa
1995-11-05 04:45:16 +00:00
Bruce Evans
4ff3de8e80 Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the
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.
1995-11-04 17:08:13 +00:00
Mark Murray
96441a8c38 Remove the #ifdev DEVRANDOM's, as promised.
/dev/random is now a part of the kernel! you will need to make
the device in /dev: sh MAKEDEV random
and take a look at some test code in src/tools/test/random.
1995-11-04 16:00:56 +00:00
Bruce Evans
fff87b3946 Always declare vga_move_charset(). It doesn't depend on option XSERVER. 1995-11-04 14:00:00 +00:00
Bruce Evans
4fda91c705 Moved prototypes for devswitch functions from conf.c and driver sources
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.
1995-11-04 13:25:33 +00:00
Bruce Evans
f55ad351e1 Moved a nested extern declaration to a less bogus place to hide a warning. 1995-11-04 10:54:53 +00:00
Peter Wemm
7dbdd057a4 We no longer need the spltty() == splimp() hack if PPP is configured into
the kernel.  ppp_tty.c goes to some lengths to minimise the inter-layer
calling (including a soft ISR).  ppp_tty.c takes care of the soft masking
that was needed still.

(I've discovered that bugs in this area show up within an hour if the
masking was not correct.. :-}  This combination has proven stable on
specialix serial ports, although there was some concern about the softtty
parts of sio/cy and netisr colliding - but Bruce has fixed that now)
1995-10-31 21:03:57 +00:00
Poul-Henning Kamp
c227cb3456 Cleanup, make things static. 1995-10-31 18:41:49 +00:00
Poul-Henning Kamp
dc9deb292c Get pccard stuff into LINT.
rename i386/isa/pcic.c to .../pcicx.c
this file will go away when the if_ze and if_zp dies.
1995-10-31 18:28:55 +00:00
Bruce Evans
0ebb7bd2ad Made wcstart() non-static again. It is called from atapi.c. The
modularization of the wd/wcd/atapi driver is ugly.

Include cons.h from a less bogus place.

Removed an ARGSUSED.  Unused args are normal for devswitch functions
and lint was informed about them for about 5 functions out of 1000.
Lint should be informed about them, if at all, in some other way.
1995-10-29 17:34:17 +00:00
Bruce Evans
dfd56037f0 Made wcdattach() non-static again. It is called from atapi.c. The
modularization of the wd/wcd/atapi driver is ugly.

Added prototypes.
1995-10-29 16:10:06 +00:00
Paul Traina
ca4bbe6461 Close out kern/46.
Remove confusing backwards compatibility code that allowed driver to be
used in pre-4.4 releases.  The 3COM card's use -link2 to switch tranceivers.
(no functional changes here)
1995-10-28 22:46:26 +00:00
Peter Wemm
690b4d96b8 Repair the wcd and atapi code a little, so that it compiles and loads
as an LKM.
I dont have one of these beasts, so I cannot guarantee that I've not
broken it (more).
It does compile with ATAPI_STATIC, and as a LKM.
1995-10-28 17:45:04 +00:00
Mark Murray
1bb2d3142b Theodore Ts'po's random number gernerator for Linux, ported by me.
This code will only be included in your kernel if you have
'options DEVRANDOM', but that will fall away in a couple of days.
Obtained from: Theodore Ts'o, Linux
1995-10-28 16:58:05 +00:00
Poul-Henning Kamp
4ccc87c594 Remove unused functions and variables, make things static, and other cleanups. 1995-10-28 15:39:31 +00:00
Poul-Henning Kamp
3a34a5c3b8 Sorry, the last commit screwed up for me, this is the right one (I hope!)
Please refer to the previous commit message about sysctl variables.
1995-10-28 13:07:28 +00:00
Julian Elischer
cc6a66f20e Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by:	Mike Mitchell, supervisor@alb.asctmd.com

This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..

Mikes been using it for a year or so
but on 2.0

more changes and stuff will be merged in from other developers now that this is in.

Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
1995-10-26 20:31:59 +00:00
Jordan K. Hubbard
d6393cdba3 Bring in version 1(26) - considerably less memory usage (and may bring us
down to 4MB bootability again).
Submitted by:	Frank Durda IV <uhclem@fw.ast.com>
1995-10-25 16:41:22 +00:00
Bruce Evans
f668386c04 sio.c:
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.
1995-10-22 15:38:08 +00:00
Bruce Evans
f9dd61a448 Only allow `sensitive' devices for displays in find_display(). This is
a quick fix for syscons deciding not to become the console because it
thinks another tty device has priority.
1995-10-22 15:07:43 +00:00
Peter Wemm
494850b8d1 Remove bogus #include <sys/device.h>, and the bogus instances of
"struct device" and the bogus unit number mentioned in the error message.
Some other minor cleanups, all trivial.
1995-10-21 09:10:49 +00:00
Poul-Henning Kamp
b59d7f4673 A mixed bag of changes, relating to getting the state in "lsdev" right,
and pccard support to work sensibly.  Better by far, but still not good.
1995-10-21 00:55:36 +00:00
Stefan Eßer
2e80ea0536 Make CONF1_ENABLE_MSK1 even less restriktive: Ignore slot ID ... 1995-10-17 23:30:11 +00:00
Stefan Eßer
0e2f699b9e At least the ASUS Triton motherboards don't disable the PCI bus configuration
accesses after the BIOS bus scan. The previous revision made the assumption,
that every PCI motherboard did ...

Change the test on the initial value of the CONF1_ADDR_PORT register in a way
that makes the probe succeed on triton based motherboards, without breaking
the EISA motherboard that has some non-PCI register at the same address.
1995-10-17 15:23:14 +00:00
Stefan Eßer
287911bd50 Go back to separate tests for configuration mechanism 1 and mechanism 2.
Require the state of the configuration enable bits to be OFF assuming
that the BIOS left them that way, as it should anyway to avoid bad things
to happen.

The tests themselves are copied from the previous release, with the
exception of CONF1_ENABLE_MSK1 having the LSB set. This bit should be
read back as '0', since only DWORD addresses are legal.
1995-10-15 23:43:08 +00:00
David Greenman
9b3e7ec49d Latest fixes from Serge:
I tried to solve the problem of IDE probing compatibility in this version.
When compiled without an ATAPI option, the wd driver is
fully backward compatible with 2.0.5.  With ATAPI option,
the wdprobe becomes strictly weaker.  That is, if wdprobe works
without ATAPI option, it will always work with it too.

Another problem was with the CD-ROM drive attached as a slave
in the IDE bus, where there is no master.  All IDE CD-ROM
drives are shipped in slave configuration, and most users
just plug them in, never thinking about jumpers.
It works fine with ms-dos and ms-windows, and this
version of the driver supports it as well.

The eject op can now load disks.  Just repeat it twice,
and the disk will be ejected and then loaded back.

The disc cannot be ejected if it is mounted.

Submitted by:	Serge Vakulenko, <vak@cronyx.ru>
1995-10-14 15:41:10 +00:00
Bruce Evans
f2b0c6b282 Don't allow i/o operations for non-root users. 1995-10-14 07:09:58 +00:00
Bruce Evans
21e00296ec Don't allow i/o operations for non-root users.
Add prototypes.
1995-10-14 07:08:09 +00:00
Bruce Evans
278b94817a Don't allow mmapping the page after last video page.
Obtained from:	syscons.c (bug obtained from original pccons.c)
1995-10-14 05:54:47 +00:00