Commit Graph

1265 Commits

Author SHA1 Message Date
Peter Wemm
15a76dc428 Another shot at getting working si DEVFS entries.. Apparently, it didn't
understand %02d in it's format string...
1995-12-16 14:03:02 +00:00
Bruce Evans
6ea3e9d839 Completed function declarations and/or added prototypes and/or added
#includes to get prototypes.

pci now uses a different interrupt handler type for interrupts that it
dispatches and the isa interrupt handler type for the interrupts that
it handles.
1995-12-16 00:27:59 +00:00
David Greenman
51cdbfcdaf Changed arg type for pio functions.
Cast a few things appropriately to shut up the compiler.
1995-12-15 07:31:40 +00:00
Bruce Evans
0dfe10a65c Completed function declarations and/or added prototypes and/or added
#includes to get prototypes.
1995-12-15 00:54:32 +00:00
Bruce Evans
bfd8f1484e Removed unused #includes. 1995-12-15 00:40:38 +00:00
Bruce Evans
28cc517d85 Removed duplicated #includes of <sys/conf.h> 1995-12-15 00:29:31 +00:00
Bruce Evans
44faa2919b Completed function declarations and added prototypes. Sorted prototypes. 1995-12-15 00:11:27 +00:00
Bruce Evans
d14122ea44 Fixed staticization of DDB functions. 1995-12-14 23:01:51 +00:00
Bruce Evans
d1022821ae Removed my devsw access functions [un]register_cdev() and
getmajorbyname() which were a better (sigh) temporary interface to
the going-away devswitches.

Note that SYSINIT()s to initialize the devswitches would be fatal
in syscons.c and pcvt_drv.c (and are bogus elsewhere) because they
get called independently of whether the device is attached; thus
devices that share a major clobber each other's devswitch entries
until the last one wins.

conf.c:
Removed stale #includes and comments.
1995-12-14 22:03:12 +00:00
Peter Wemm
73852f5e36 Update the skeleton DEVFS code to match reality a little closer.. :-) 1995-12-14 14:29:10 +00:00
Peter Wemm
60f17fcd9f Change the generic "btintr" function's name to "bt_intr" - the same as
all the other bt_XXX() functions in i386/scsi/bt*.

This the important effect of forcing a link error if the user is
still using the old "vector btintr" which is dangerously wrong
after Justin's updates to the driver.

The correct isa vector line for the bt driver is "vector bt_isa_intr".
Justin mentioned this in the commit message and updated LINT and
GENERIC.  This change is to enforce that.. :-)
1995-12-14 14:19:19 +00:00
Poul-Henning Kamp
85f689485d Staticize. 1995-12-13 10:36:03 +00:00
Poul-Henning Kamp
c08c8adcf5 Remove MACH_KERNEL, ORIGINAL, and ZP_DEBUG,
I should have done this before it was imported.
1995-12-13 10:35:36 +00:00
Justin T. Gibbs
09c30e3a1e Isa/VL probe portion of the Buslogic SCSI driver. 1995-12-12 08:50:54 +00:00
Poul-Henning Kamp
94e20eb776 Staticize 1995-12-11 09:26:18 +00:00
John Dyson
983d613468 Undo a change that should not have been committed with the 1Tb enhancements. 1995-12-11 05:02:52 +00:00
John Dyson
a316d390bd Changes to support 1Tb filesizes. Pages are now named by an
(object,index) pair instead of (object,offset) pair.
1995-12-11 04:58:34 +00:00
Bruce Evans
cb8cad01f8 Unstaticized cx_cdevsw (it is used in if_cx.c).
Added a prototype.
1995-12-10 21:08:11 +00:00
Bruce Evans
81ab2caf0a Replaced nxreset by noreset (if the reset function gets called, then the
device must be configured.  It's hard to tell whether a reset function
should be noreset or nullreset since reset functions are never called.
Most drivers use nullreset but noreset has the advantage of complaining
if somehow gets called).
1995-12-10 20:54:38 +00:00
Bruce Evans
26ec204be0 Replaced nxmmap by nommap (if the mmap function gets called, then the
device must be configured).
1995-12-10 20:34:53 +00:00
Bruce Evans
690999827d Replaced scdsize by generic nopsize. 1995-12-10 20:10:23 +00:00
Bruce Evans
4439655d52 Replaced nxdump by nodump (if the dump function gets called, then the
device must be configured, so ENXIO is a bogus errno).

Replaced zerosize by nopsize.  zerosize was a temporary alias.
1995-12-10 19:53:42 +00:00
Bruce Evans
f332b8a1d5 Replaced nxdump by nodump (if the dump function gets called, then the
device must be configured, so ENXIO is a bogus errno).

Replaced zerosize by nopsize.  zerosize was a temporary alias.
1995-12-10 19:44:58 +00:00
Bruce Evans
c73feca0b7 Removed new alias d_size_t for d_psize_t.
Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and
d_devtotty_t.

Sorted declarations of switch functions into switch order.

Removed duplicated comments and declarations of nonexistent switch
functions.
1995-12-10 15:55:34 +00:00
Poul-Henning Kamp
6f4e0beb7e Staticize and cleanup. 1995-12-10 13:40:44 +00:00
Poul-Henning Kamp
3b0b66ee0e Staticize and cleanup.
Ohh, forgot this bit:
(covers sio.c too) recognize the 16650 too.
1995-12-10 13:40:33 +00:00
Bruce Evans
81c5b5f59a Moved vm includes out of centralized headers again. 1995-12-10 02:53:07 +00:00
Julian Elischer
4d92e19833 clean a few DEVFS things..
fix a bug where you couldn't place devices in the root directory
of devfs

remove deprecated routines

On my machine devfs now shows:
julian@erf.tfs.com:
julian@erf.tfs.com: ls -RF
bpf0            mem             ptypb           spkr            ttyp8
bpf1            null            ptypc           stderr          ttyp9
bpf2            pcaudio         ptypd           stdin           ttypa
bpf3            pcaudioctl      ptype           stdout          ttypb
console         pt              ptypf           tty             ttypc
cuaa0           ptyp0           random          ttyd0           ttypd
cuaia0          ptyp1           rsd0            ttyid0          ttype
cuala0          ptyp2           rsd1            ttyld0          ttypf
fd/             ptyp3           rvn             ttyp0           tun0
fd0.1440        ptyp4           rworm           ttyp1           urandom
fd1.1200        ptyp5           scsi/           ttyp2           vn
io              ptyp6           sd0             ttyp3           zero
kmem            ptyp7           sd1             ttyp4
lkm             ptyp8           snp0            ttyp5
log             ptyp9           snp1            ttyp6
lpt0            ptypa           snp2            ttyp7

./fd:
0       15      21      28      34      40      47      53      6       9
1       16      22      29      35      41      48      54      60
10      17      23      3       36      42      49      55      61
11      18      24      30      37      43      5       56      62
12      19      25      31      38      44      50      57      63
13      2       26      32      39      45      51      58      7
14      20      27      33      4       46      52      59      8

./scsi:
sctarg  ssc
julian@erf.tfs.com:

which is all devices really there except for disk slices/partitions..
(if I don't have it it's not there, which has GOT to be an improvement..)

no DEVFS fixes from device maintainers yet?
1995-12-09 09:11:25 +00:00
Poul-Henning Kamp
d2f265fab8 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00
Julian Elischer
87f6c6625d Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
David Greenman
efeaf95a41 Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
Peter Wemm
cde694287a Implement detection of whether or not bounce-buffering is required
for the particular card in use.  At the moment, I've set it to any of
the bt445S VLB cards (not the bt445C which apparently work) and the
bt5xx series (isa cards).  The 742 and PCI cards should not need it. :-)

It may be useful to have something like this:
#ifndef BOUNCE_BUFFERS
  if (bounce_buffers_required && more_than_16MB_ram)
    panic("this card requires bounce buffers for more than 16MB ram!")
#endif
1995-12-07 09:13:48 +00:00
Bruce Evans
0310c19f5d Replaced #includes of <sys/user.h> by less gross headers, usually
<sys/vm.h>.  Many device drivers need only the definition of vtophys()
from vm.

Added nearby #includes of <sys/conf.h> where appropriate.
1995-12-06 23:52:35 +00:00
Bruce Evans
86a1c05db0 Removed unnecessary #includes of <sys/user.h>. Some of these were just
to get the definitions of TRUE and FALSE which happen to be defined in
a deeply nested include.

Added nearby #includes of <sys/conf.h> where appropriate.
1995-12-06 23:44:23 +00:00
David Greenman
21864bc400 Updated my copyright.
Fixed two cases of "=" that should have been "==" in card type comparison.
Simplified expression that checks for interface up/down.
Moved ed_ring_copy to before its first use so that it's inlined as intended.
Change mbuf allocation policy so that a received packet is stored in just
an mbuf header (no cluster) if it will fit in one.
1995-12-05 13:01:33 +00:00
David Greenman
4a5f1499b0 all:
Removed ifnet.if_init and ifnet.if_reset as they are generally unused.
Change the parameter passed to if_watchdog to be a ifnet * rather than
a unit number. All of this is an attempt to move toward not needing an
array of softc pointers (which is usually static in size) to point to
the driver softc.

if_ed.c:
Changed some of the argument passing to some functions to make a little
more sense.

if_ep.c, if_vx.c:
Killed completely bogus use of if_timer. It was being set in such a way
that the interface was being reset once per second (blech!).
1995-12-05 02:01:59 +00:00
Peter Wemm
80308cade5 aargh! I tested JREMOD, only to discover that the "good oil" part of
it for si.c was accidently inside some #ifdef DEBUG code....
1995-12-04 17:33:45 +00:00
Poul-Henning Kamp
dd05856fd3 I don't know what I messed up in 1.40, but the crynwr mode didn't make it.
Here it is then, I hope.
1995-12-02 20:33:40 +00:00
Julian Elischer
124b8f8150 A quick fix for a problem that will go away in a few days anyway.. 1995-12-01 23:09:20 +00:00
Julian Elischer
1eeac5367e remove typo 1995-12-01 01:38:49 +00:00
Julian Elischer
de1676f933 A pair of really tiny patches that not only allow it all to compile
but also IT ACTUALLY WORKS!
FreeBSD with options  JREMOD now runs with no entries in the devsw tables
prior to the devices puting their own entries there..

Thanks to bde and terry for thoughts and comments.
next stop 'Real' devfs support in devices.
1995-11-30 05:59:09 +00:00
Andrey A. Chernov
662f3a95dd Fix my color/attr separation patch.
Swap foreground/background logic to allow DIM REVERSE
1995-11-30 03:29:31 +00:00
Garrett Wollman
9350db19e7 Fix Pentium CPU rate diagnosis:
- Don't print out meaningless iCOMP numbers, those are for droids.
	- Use a shorter wait to determine clock rate to avoid deficiencies
	  in DELAY().
	- Use a fixed-point representation with 8 bits of fraction to store
	  the rate and rationalize the variable name.  It would be
	  possible to use even more fraction if it turns out to be
	  worthwhile (I rather doubt it).

The question of source code arrangement remains unaddressed.
1995-11-29 19:57:22 +00:00
Bruce Evans
56cb20cd72 Removed builtin list of port addresses. The address for sio3
conflicted with S3 graphics cards.  Now users should put sio[2-3]
in the config file if the hardware exisst, even if the probe is
certain to fail due to an interrupt conflict.  Otherwise, ports
sharing the interrupt may fail the probe if the system is warm
booted while sio[2-3] are active (perhaps under another OS).  The
same problem for nonstandard ports is now handled better than
before.
1995-11-29 15:00:07 +00:00
Julian Elischer
7198bf4725 If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
Julian Elischer
53ac6efbd8 OK, that's it..
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..

Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.

some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.

BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...

If you want to add a new device in conf.c
please  make sure I know
so I can keep it up to date too..

as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
1995-11-29 10:49:16 +00:00
Poul-Henning Kamp
3924871a1d staticize. 1995-11-29 10:26:51 +00:00
Poul-Henning Kamp
ad46e209d2 Add crynwr mode to the lp# interface.
Reviewed by:	pst, phk
Submitted by:	tim@sarc.city.ac.uk
1995-11-29 10:17:03 +00:00
Jordan K. Hubbard
d01b66804a A batch of Jim Lowe's patches:
o Add signed/unsigned functionality to the matrox meteor device driver.
	o Apply a few fixes to the sound driver.
	o Add a ``SPIGOT_UNSECURE'' compile time definition so, if one defines
	  SPIGOT_UNSECURE in their conf file, then they can use the spigot w/o
	  root.  There is a warning that this allows users access to the IO
	  page which is probably not secure.
Submitted by:	james
1995-11-29 01:07:59 +00:00
Julian Elischer
376c314995 the second set of changes in a move towards getting devices to be
totally dynamic. (the first was about 7 weeeks ago)

this is only the devices in i386/isa
I'll do more tomorrow.
they're completely masked by #ifdef JREMOD at this stage...
the eventual aim is that every driver will do a SYSINIT
at startup BEFORE the probes, which will effectively
link it into the devsw tables etc.

If I'd thought about it more I'd have put that in in this set (damn)
The ioconf lines generated by config will also end up in the
device's own scope as well, so ioconf.c will eventually be gutted
the SYSINIT call to the driver will include a phase where the
driver links it's ioconf line into a chain of such. when this phase is done
then the user can modify them with the boot: -c
config menu if he wants, just like now..
config will put the config lines out in the .h file
(e.g. in aha.h will be the addresses for the aha driver to look.)
as I said this is a very small first step..
the aim of THIS set of edits is to not have to edit conf.c at all when
adding a new device.. the tabe will be a simple skeleton..

when this is done, it will allow other changes to be made,
all teh time still having a fully working kernel tree,
but the logical outcome is the complete REMOVAL of the devsw tables.

By the end of this, linked in drivers will be exactly the same as
run-time loaded drivers, except they JUST HAPPEN to already be linked
and present at startup..
the SYSINIT calls will be the equivalent of the "init" call
made to a newly loaded driver in every respect.

For this edit,
each of the files has the following code inserted into it:

obviously, tailored to suit..
----------------------somewhere at the top:
#ifdef JREMOD
#include <sys/conf.h>
#define CDEV_MAJOR 13
#define BDEV_MAJOR 4
static void 	sd_devsw_install();
#endif /*JREMOD */
---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT
#ifdef JREMOD
        sd_devsw_install();
#endif /*JREMOD*/
-----------------------at the bottom:
#ifdef JREMOD
struct bdevsw sd_bdevsw =
	{ sdopen,	sdclose,	sdstrategy,	sdioctl,	/*4*/
	  sddump,	sdsize,		0 };

struct cdevsw sd_cdevsw =
	{ sdopen,	sdclose,	rawread,	rawwrite,	/*13*/
	  sdioctl,	nostop,		nullreset,	nodevtotty,/* sd */
	  seltrue,	nommap,		sdstrategy };

static sd_devsw_installed = 0;

static void 	sd_devsw_install()
{
	dev_t descript;
	if( ! sd_devsw_installed ) {
		descript = makedev(CDEV_MAJOR,0);
		cdevsw_add(&descript,&sd_cdevsw,NULL);
#if defined(BDEV_MAJOR)
		descript = makedev(BDEV_MAJOR,0);
		bdevsw_add(&descript,&sd_bdevsw,NULL);
#endif /*BDEV_MAJOR*/
		sd_devsw_installed = 1;
	}
}
#endif /* JREMOD */
1995-11-28 09:43:45 +00:00
Julian Elischer
7146c13e43 the second set of changes in a move towards getting devices to be
totally dynamic.

this is only the devices in i386/isa
I'll do more tomorrow.
they're completely masked by #ifdef JREMOD at this stage...
the eventual aim is that every driver will do a SYSINIT
at startup BEFORE the probes, which will effectively
link it into the devsw tables etc.

If I'd thought about it more I'd have put that in in this set (damn)
The ioconf lines generated by config will also end up in the
device's own scope as well, so ioconf.c will eventually be gutted
the SYSINIT call to the driver will include a phase where the
driver links it's ioconf line into a chain of such. when this phase is done
then the user can modify them with the boot: -c
config menu if he wants, just like now..
config will put the config lines out in the .h file
(e.g. in aha.h will be the addresses for the aha driver to look.)
as I said this is a very small first step..
the aim of THIS set of edits is to not have to edit conf.c at all when
adding a new device.. the tabe will be a simple skeleton..

when this is done, it will allow other changes to be made,
all teh time still having a fully working kernel tree,
but the logical outcome is the complete REMOVAL of the devsw tables.

By the end of this, linked in drivers will be exactly the same as
run-time loaded drivers, except they JUST HAPPEN to already be linked
and present at startup..
the SYSINIT calls will be the equivalent of the "init" call
made to a newly loaded driver in every respect.

For this edit,
each of the files has the following code inserted into it:

obviously, tailored to suit..
----------------------somewhere at the top:
#ifdef JREMOD
#include <sys/conf.h>
#define CDEV_MAJOR 13
#define BDEV_MAJOR 4
static void 	sd_devsw_install();
#endif /*JREMOD */
---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT
#ifdef JREMOD
        sd_devsw_install();
#endif /*JREMOD*/
-----------------------at the bottom:
#ifdef JREMOD
struct bdevsw sd_bdevsw =
	{ sdopen,	sdclose,	sdstrategy,	sdioctl,	/*4*/
	  sddump,	sdsize,		0 };

struct cdevsw sd_cdevsw =
	{ sdopen,	sdclose,	rawread,	rawwrite,	/*13*/
	  sdioctl,	nostop,		nullreset,	nodevtotty,/* sd */
	  seltrue,	nommap,		sdstrategy };

static sd_devsw_installed = 0;

static void 	sd_devsw_install()
{
	dev_t descript;
	if( ! sd_devsw_installed ) {
		descript = makedev(CDEV_MAJOR,0);
		cdevsw_add(&descript,&sd_cdevsw,NULL);
#if defined(BDEV_MAJOR)
		descript = makedev(BDEV_MAJOR,0);
		bdevsw_add(&descript,&sd_bdevsw,NULL);
#endif /*BDEV_MAJOR*/
		sd_devsw_installed = 1;
	}
}
#endif /* JREMOD */
1995-11-28 09:42:06 +00:00
Bruce Evans
43cbfcb357 Removed all #includes of the unused file <sys/device.h>. 1995-11-28 07:29:59 +00:00
Peter Wemm
070fc2ce12 Mainly cosmetic cleanups... It now uses more consistant message reporting
on the console, and no longer uses "SLXOS" which I suspect may be a
trademark... (I'm not sure, but this is not really a SLXOS driver anyway)
1995-11-28 02:07:36 +00:00
Andrey A. Chernov
00265e7d4d Separate colors & attributes as Terry points
Reviewed by: soren
1995-11-28 00:17:32 +00:00
Bruce Evans
84478e7f42 Fixed setting of speed B0 - don't output a bogus divisor of 0 and a
random prescaler, just hang up.  This may fix hangup problems with
mgetty.
1995-11-26 17:13:23 +00:00
Bruce Evans
fec104de77 Completed function declarations and/or added prototypes. 1995-11-24 15:15:30 +00:00
Bruce Evans
b8a89c9ada Added bogusly placed extern prototypes for functions that should probably
be static.
1995-11-24 15:08:07 +00:00
Bruce Evans
d818a9cc1f Fixed a comment. 1995-11-24 14:56:00 +00:00
John Dyson
dc4a0cee58 Update the wd.c driver to use the new TAILQ scheme for device
buffer queue.  Also, create a new subroutine 'tqdisksort' that
is an improved version of the original disksort that also uses
TAILQs.
1995-11-23 07:24:41 +00:00
Bruce Evans
512fef80a9 Completed function declarations and/or added prototypes. 1995-11-21 12:55:26 +00:00
Bruce Evans
6ad175be4d Restored static variable `nsio_tty' which is used only by pstat(8). Made
it `const' to inhibit compiler warnings.

Added #include of <pccard/driver.h> to get prototypes.  <pccard/slot.h>
is still necessary for its side effect of exporting non-slot things.
1995-11-21 09:15:04 +00:00
Peter Wemm
cc9fce5ad7 This driver supports the Arnet SYNC/570i ISA cards that is based on the
HD64570 chip. Both the 2 and 4 port cards is supported and auto detected.

Line speeds of up to 2Mbps is possible. At this speed about 85% of the
bandwidth is usable with 486DX processors.

The standard FreeBSD sppp code is used for the link level layer. The
default protocol used is PPP. The Cisco HDLC protocol can be used by
adding "link2" to the ifconfig line in /etc/sysconfig or where ever
ifconfig is run.

At the moment only the V.35 and X.21 interfaces is supported. The others
may need tweaks to the clock selection code.

Submitted by: John Hay <jhay@mikom.csir.co.za>
1995-11-21 02:32:04 +00:00
Bruce Evans
bf7141134e Quick fix for stat_imask and intr_mask[8] not having the RTC interrupt
bit set.  I broke stat_imask in Dec 1994 and update_intr_masks() has
copied the breakage to intr_mask[8] since Mar 1995.  This can cause
the RTC to stop interrupting in rare cases (under loads heavy enough
for a new RTC interrupt to occur at a critical time just before Xintr8
finishes handling the previous one) and may have caused worse problems.
1995-11-20 13:24:18 +00:00
Poul-Henning Kamp
4b2af45f4b Mega commit for sysctl.
Convert the remaining sysctl stuff to the new way of doing things.
the devconf stuff is the reason for the large number of files.
Cleaned up some compiler warnings while I were there.
1995-11-20 12:42:39 +00:00
Poul-Henning Kamp
bf6a29da66 Fix compiler warnings. 1995-11-20 12:13:32 +00:00
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
Garrett Wollman
233b60cec4 Say goodbye to IFF_NOTRAILERS. Support for trailers was officially
dropped for 4.4, but for some reason this flag lived on.  (Until
today, that is.)
1995-10-13 19:48:06 +00:00
Garrett Wollman
e2d4b1f051 Reduce jitter of Pentium microtime() implementation by letting the counter
free-run and doing a subtract in microtime() rather than resetting the
counter to zero at every clock tick.  In combination with the changes to
kern_clock.c, this should eliminate all the immediately obvious sources
of systematic jitter in timekeeping on Pentium machines.
1995-10-12 20:39:49 +00:00
David Greenman
e669eb2d6f Fix probe to work properly with the Cyclades cyclom-16Ye. 1995-10-11 02:41:13 +00:00
Poul-Henning Kamp
14a288e58b PCCARD support. 1995-10-10 09:52:55 +00:00
Bruce Evans
744500cdd9 Fix benign type mismatches in devswitch functions.
Add prototypes.
Clean up includes.
1995-10-10 08:03:26 +00:00
Bruce Evans
e2bcd47d12 Remove bogus includes that became fatal after the previous (intended to
be cosmetic?) commit.
1995-10-10 05:41:39 +00:00
Stefan Eßer
c7483249e7 Fix bad typo: CONF1_ENABLE_RES1 was written CONF1_ENABLE_CHK1 ... 1995-10-09 21:56:24 +00:00
Joerg Wunsch
86a727d96d BIOS manufacturers don't seem to have a unique idea about 2.88 MB
floppy drive types in the CMOS; add 0x50 as an alias for 2.88 MB.
1995-10-09 15:00:39 +00:00
David Greenman
c79867680a Include <sys/systm.h> 1995-10-09 05:54:32 +00:00
Bruce Evans
c402cd1545 Restore my changes from revisions 1.8, 1.9 and 1.10. They were blown away
be the previous commit.  It didn't even compile.
1995-10-07 20:07:18 +00:00
David Greenman
edeea08413 1) Fixed irq logic so that it uses the kernel configured irq if it doesn't
match the board setting.
2) Fixed the warning message to properly print the irq mismatch (as opposed
   to the bit encoded value).
3) Add irq autodetection if the kernel has "?" or no irq specified.
4) Add missing splimp protection in ixioctl().
1995-10-05 03:01:13 +00:00
Jordan K. Hubbard
9e8433e6e0 This upgrades the driver for Cronyx-Sigma multiplexor boards
from version 1.2 to version 1.9.
Submitted by:	Serge Vakulenko, <vak@cronyx.ru>
1995-10-04 22:24:16 +00:00
Joerg Wunsch
16b04b6ae7 Hide the "input/output timeout" messages behind the bootverbose case.
This message has been confusing innocent ft users.

It should go into 2.1 as well, it's a very simple fix.
1995-10-04 07:01:23 +00:00
Peter Dufault
5dde8b2750 Support the 1542CP by recognizing the new ID. Try to make future
1542 revs work by assuming the next few sequential ID codes are
new Adaptec boards and enabling them after printing a warning.

Conditionalize the informational boot messages with "if (bootverbose)".
1995-10-01 15:09:51 +00:00
David Greenman
90b8a1a5c7 Make ATAPI support completely optional - if ATAPI isn't defined, the
original code/algorithm is used completely (with one bugfix). This makes
it "safe" to bring these changes into -stable.
1995-09-30 15:19:44 +00:00
Jordan K. Hubbard
5f614f1df9 Bring IDE CDROM support up to latest version (1.8a?) from Serge.
Submitted by:	vak@cronyx.ru
1995-09-30 00:11:19 +00:00
Bruce Evans
abc260cb3f Fix FAT_CURSOR to give scanlines 0-15 instead of (the current start)-15. 1995-09-28 18:43:40 +00:00
Jordan K. Hubbard
0134f4737b o Support for CDIOCPREVENT and CDIOCALLOW ioctls that xcdplayer
were making and were no-brainers.  However, the xcdplayer
    eject button didn't work because xcdplayer gave up and didn't bother
    to try the EJECT ioctl anyway when CDIOCALLOW was not available.
    This all works now.

o   A change so that xcdplayer gets TOC entry data for the lead-out area
    on the disc.  Xcdplayer can now play the last track on a CD, which
    it would not do in earlier versions (but no one reported).
    Cdplayer gets the TOC data differently and it works in old and new
    versions.

o   Eliminated a race condition that caused the driver to sleep forever
    on very slow and heavily loaded systems on rare occasions when
    the system was doing lots of audio-related ioctls to the drive.

o   Fixed a problem where a locked drive could be unlocked by accessing
    one of the non-locking devs.  Door locking now follows the documented
    rules.

o   Made all wait channel strings unique to matcd.

Submitted by: Frank Durda IV <uhclem%nemesis@fw.ast.com>
1995-09-28 13:15:49 +00:00
Poul-Henning Kamp
2b76bec4e6 if_ze.c was derived from if_ed.c about 42 (!) versions ago. It is now
scheduled for demolition.  This is a first step: get rid of if_zereg.h,
by adding the five extra definitions to if_edreg.h.
Also add some definitions which will become needed when if_ze.c gets
replaced entirely by pccard and if_ed.c.  (this is a 2.1.0 candidate)
1995-09-26 08:57:47 +00:00
Garrett Wollman
e508a00419 Add BPF and IP multicast capabilities to the tun' and lp' network
interfaces.

Submitted by:	Bill Fenner <fenner@parc.xerox.com>
1995-09-25 16:57:54 +00:00
David Greenman
b025187719 siostop() is a void function, so don't return a value. 1995-09-24 04:59:16 +00:00
Peter Wemm
e0ad6557c5 Add some hooks visible from outside via nlist, so pstat can read the tty
state.
1995-09-22 20:00:12 +00:00
Stefan Eßer
77b573149a New approach to the PCI bus configuration mechanism probe problem:
- try to make sure there is any kind of PCI device
- if there is anything at port 0x0cf8, then check for mech. 1 or 2
1995-09-22 19:10:54 +00:00
Peter Wemm
b769f8efd6 Remove the "Danger will robinson!" printf's at the start. I'm pretty happy
with the driver's stability now.  I've not had a single problem with it for
weeks..  All that remains is a bit of performance tuning, and finishing
the manpages.
1995-09-22 18:28:21 +00:00
Bruce Evans
2e69f359d1 Fix benign type mismatches in isa interrupt handlers. Many returned int
instead of void.
1995-09-19 18:55:37 +00:00
Poul-Henning Kamp
ccdbc84cba The stuff needed to remove a pccard with a sio port on it...
Not optimal, but pretty solid.
1995-09-19 12:37:41 +00:00
Stefan Eßer
a3adc4f8c5 Revert most changes of previous commit.
Changes relative to 1.12:
- Put extra instruction between outl()/inl() sequence to prevent the
  old value being read back because of the bus capacitance.
- Additional check for existence of register at CONF2_ENABLE_PORT.
1995-09-18 21:48:39 +00:00
Bruce Evans
191e1a59da Remove transitory labelling code. Labels are now handled by essentially
the original 4.4lite code.  Machine Specific Partitions are now handled
separately.
1995-09-16 17:04:06 +00:00
Jordan K. Hubbard
6c11cc590a Make dsp0 work for playback.
Submitted by:	Alain Kalker <alain@Wit401402.student.utwente.nl>
1995-09-15 22:04:03 +00:00
Stefan Eßer
2d14418625 Another try to determine the PCI bus configuration mode (and whether
there is a PCI bus at all) ...

- Do not expect the chip sets to follow even very clearly expressed
  requirements of the PCI 2.0 spec.
- Do not read back the value just written to an I/O port without making
  sure that some other data have crossed the bus in between ...
1995-09-15 21:43:45 +00:00
Andreas Schulz
9af3551d46 Correct the calculation of the unit number. it is not minor(x) & 3. It need
to be shifted >> 3. The last bits are the partition info.
1995-09-15 10:45:42 +00:00
David Greenman
d69caef5ed Killed isa_allocphysmem() and isa_freephysmem(). They are completely used
functions. This file is disgusting; the isa DMA stuff is especially bad and
should be rewritten.
1995-09-15 03:10:06 +00:00
Stefan Eßer
d7ea35fc88 Improved verification of configuration space accesses working:
Scan for devices instead of assuming that device 0 is present on bus 0
of every PCI motherboard.
1995-09-14 20:27:31 +00:00
Stefan Eßer
cda6791190 Make the PCI host bridge probe code more robust when dealing with chip sets
that use configuration mode 1, but still violate the PCI 2.0 specs ...
(Required for the Compaq Proliant, for example.)
1995-09-13 17:03:47 +00:00
Peter Wemm
832e06d4dc From Bruce Evans: (prototype related changes, other cleanups)
Add prototypes.  Use static for function definitions to match existing
prototypes.  Otherwise leave functions that should be static as extern.
TODO: declare everthing except sidriver and siintr as static.  I use
some new cdevs registration functions to do this for syscons and pcvt.

Fix siintr() to match its prototype in ioconf.c (don't return anything).
This may break the eisa support, but Julian says that eisa interrupts
never worked anyway.

(EISA support was never tested anyway - Peter)

Submitted by:	bde
1995-09-13 08:45:28 +00:00
Peter Wemm
c91214d4b8 Restore two checks for TS_ISOPEN.. I managed to panic my machine
without them..  I thought TS_CONNECTED implied TS_ISOPEN, but apparently
that's not the case.
1995-09-11 06:28:38 +00:00
Bruce Evans
e7451974bb Make pcvt and syscons live in the same kernel. If both are enabled, then
the first one in the config has priority.  They can be switched using
userconfig().

i386/i386/conf.c:
Initialize the shared syscons/pcvt cdevsw entry to `nx'.

Add cdevsw registration functions.

Use devsw functions of the correct type if they exist.

i386/i386/cons.c:
Add renamed syscons entry points to constab.

i386/i386/cons.h:
Declare the renamed syscons entry points.

i386/i386/machdep.c:
Repeat console initialization after userconfig() in case the current
console has become wrong.  This depends on cn functions not wiring down
anything important.

sys/conf.h:
Declare new functions.

i386/isa/isa.[ch]:
Add a function to decide which display driver has priority.  Should be
done better.

i386/isa/syscons.c:
Rename pccn* -> sccn*.

Initialize CRTC start address in case the previous driver has moved it.

i386/isa/syscons.c, i386/isa/pcvt/*
Initialize the bogusly shared variable Crtat dynamically in case the
stored value was changed by the previous driver.

Initialize cdevsw table from a template.

Don't grab the console if another display driver has priority.

i386/isa/syscons.h, i386/isa/pcvt/pcvt_hdr.h:
Don't externally declare now-static cdevsw functions.

i386/isa/pcvt/pcvt_hdr.h:
Set the sensitive hardware flag so that pcvt doesn't always have lower
priority than syscons.  This also fixes the "stupid" detection of the
display after filling the display with text.

i386/isa/pcvt/pcvt_out.c:
Don't be confused the off-screen cursor offset 0xffff set by syscons.

kern/subr_xxx.c:
Add enough nxio/nodev/null devsw functions of the correct type for syscons
and pcvt.
1995-09-10 21:36:12 +00:00
David Greenman
4590fd3a2a Fixed init functions argument type - caddr_t -> void *. Fixed a couple of
compiler warnings.
1995-09-09 18:10:37 +00:00
Søren Schmidt
2bf07b2bd7 Patch to the atapi driver, by Serge V.Vakulenko, minor changes
by me...

Original message:

This patch upgrades the ATAPI CD-ROM driver to version 1.3.

It has three bugs fixed:

1) The `controller not ready' message at startup and later.
   It was caused by staled media change bit.

2) Incorrect shuffling of model string for some drives (NEC, Mitsumi).

3) Handling of drives which report itself as been of direct-access type,
   instead of CD-ROM type.

There is one known bug which is not fixed yet -- probing
in absense of IDE disks. A work-around exists though (thanks Steve!).
If you have no IDE disks attached, then remove them from the kernel
config file to make the CD-ROM attach correctly.
Unfortunately, there is no way to disable them from the kernel
interactive config mode.

Reviewed by:	sos (Soren Schmidt)
Submitted by:	vak@gw.cronyx.msk.su (Serge V.Vakulenko)
1995-09-09 11:41:04 +00:00
Bruce Evans
11d2504079 Actually, 97 out of 304 devsw functions had benignly mismatched types. 1995-09-08 19:57:13 +00:00
Julian Elischer
5116eb02e2 Added devfs nodes for other devices.. (didn't read the docs correctly) 1995-09-08 19:01:28 +00:00
Julian Elischer
f6b98df677 added ID strings so we know what version we have... 1995-09-08 18:30:34 +00:00
Bruce Evans
1c6d84074a Declare `geomtab' as static. It was bogusly shared between the asc and
the gsc drivers.
1995-09-08 16:38:52 +00:00
Bruce Evans
4fbadacb81 3 out of 5 new devsw functions had benign type mismatches. 1995-09-08 16:27:55 +00:00
Bruce Evans
6003967057 Fix benign type mismatches in devsw functions. 82 out of 299 devsw
functions were wrong.
1995-09-08 11:09:15 +00:00
Julian Elischer
819fb11f5e Submitted by: Luigi Rizzo (luigi@iet.unipi.it)
Obtained from: Luigi Rizzo and Gunther Schadow
Kernel support for the asc scanner driver
1995-09-08 03:14:00 +00:00
Steven Wallace
6edd39c483 Make files get the NWDC definition from "wdc.h" instead of "wd.h".
This way, if using wd and/or wcd devices, the wdc controller code
will get compiled.
1995-09-07 08:20:18 +00:00
John Dyson
5e887e181c Correct the location of a "return". This can/will cause system crashes. 1995-09-06 05:06:18 +00:00
Justin T. Gibbs
0be4f315f7 ahcprobe now takes a flags argument. For EISA/VL adapters set it to
AHC_FNONE.
1995-09-05 23:39:31 +00:00
Jordan K. Hubbard
c734076e9c Yet Another Sound Patch (YASP :-). This should fix the problems with
the cs4231, soundblaster, and pas-16 that people have been reporting.
Submitted by:	james
1995-09-05 19:48:58 +00:00
Bruce Evans
08ab924c0d The cmd' and addr' args to psmioctl() were in the wrong order. This
probably broke MOUSEIOCREAD which is the only ioctl supported.
1995-09-05 06:23:39 +00:00
Julian Elischer
193e7834a5 Submitted by: John Lind (john@starfire.mn.org)
/*
+  * Code for MTERASE added by John Lind (john@starfire.mn.org) 95/09/02.
+  * This was very easy due to the excellent structure and clear coding
+  * of the original driver.
+  */
1995-09-05 05:45:34 +00:00
Julian Elischer
8af5d536ff devfs changes..
changes to allow devices that don't probe (e.g. /dev/mem)
to create devfs entries
this required giving 'configure' its own SYSINIT entry
so we could duck in just before it with a DEVFS init
and some device inits..
my devfs now looks like:
./misc
./misc/speaker
./misc/mem
./misc/kmem
./misc/null
./misc/zero
./misc/io
./misc/console
./misc/pcaudio
./misc/pcaudioctl
./disks
./disks/rfloppy
./disks/rfloppy/fd0.1440
./disks/rfloppy/fd1.1200
./disks/floppy
./disks/floppy/fd0.1440
./disks/floppy/fd1.1200
also some sligt cleanups.. DEVFS needs a lot of work
but I'm getting back to it..
1995-09-03 05:43:50 +00:00
Jordan K. Hubbard
4fb1d90a95 Jim's attempt to fix the new sound code somewhat. Tested with
the pas-16, GUS, and GUS-MAX cards.  Sound blaster owners, please
test also!
Submitted by:	Jim Lowe <james>
1995-09-01 19:09:11 +00:00
Jordan K. Hubbard
49148d6390 Jim's latest fixes.
Submitted by:	james
1995-09-01 00:25:18 +00:00
Jordan K. Hubbard
dbae4437e2 Address Bruce's mmap concerns in this driver too.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1995-08-29 16:44:46 +00:00
Guido van Rooij
de319b9419 Add SIOCGIFADDR ioctl so rarpd actually works with the if_ep interface. 1995-08-28 12:01:17 +00:00
Bruce Evans
7ae06c2b2e Remove extra arg from one call to uha_done(). 1995-08-25 20:39:01 +00:00
Bruce Evans
ac0418c3ae Remove extra arg from the call to ds_crc(). 1995-08-25 19:50:15 +00:00
Bruce Evans
b2c4393679 Remove extra args from the calls to getit(). The bug was benign with the
default function call convention.
1995-08-25 19:24:56 +00:00
Poul-Henning Kamp
0d2966d3f2 Andrew McRae's pcmcia/pccard code, the kernel part.
This is still very green, but I have managed to get my modem working.
Lots of work still to do, but now at least we can commit it. /phk

Reviewed by:	phk
Submitted by:	Andrew McRae <andrew@mega.com.au>
1995-08-24 08:56:20 +00:00
Justin T. Gibbs
07b1c6b3c9 Remove hard coded assumption that SCSI busses have 7 targets.
This change forces the controller drivers to allocate a scsibus_data struct
via a call to scsi_alloc_bus(), fill in the adapter_link field, and optionally
modify any other fields of the struct.  Scsi_alloc_bus() initializes all fields
to the default, so the changes in most drivers are very minimal.  For drivers
that support Wide controllers, the maxtarg field will have to be updated to
allow probing of all targets (for an example, look at the aic7xxx driver).

Scsi_attachdevs() now takes a scsibus_data* as its argument instead of an
sc_link*.  This allows us to expand the role of the scsibus_data struct for
other bus level configuration setings (max number of transactions, current
transaction opennings, etc for better tagged queuing support).

Reviewed by: Rodney Grimes <rgrimes>, Peter Dufault <dufault>, Julian Elischer <julian>
1995-08-23 23:03:34 +00:00
Jordan K. Hubbard
215b0e62d5 Don't clip d_ncylinders to value used by partitions. 1995-08-23 11:43:45 +00:00
Jordan K. Hubbard
b8ef36f62e Properly initialize the d_ncylinders field to the maximum number of
cylinders.
1995-08-23 10:41:57 +00:00
Peter Wemm
5275513295 Fix some outstanding bugs in the DCD modem control..
Implement the slip/ppp "hotchar" detection to improve latency
Debug the L_RINT bypass code..
Fix an interesting feature that caused 8-bit chars to loose their top bit
in some circumstances..

This finishes the remaining outstanding problems that I'm aware of, with
the exception of efficiency...  Optimizing can come later after it's fully
debugged.
1995-08-22 00:48:17 +00:00
Jordan K. Hubbard
6788ce49a0 Bring in Serge Vakulenko's IDE CDROM (ATAPI) driver. A number of
people have now indicated to me that it's working more than well
enough to bring into -current.
Submitted by:	Serge Vakulenko <vak@cronyx.ru>
1995-08-18 11:26:35 +00:00
Nate Williams
a16b708542 Fix the 3C589 driver to work with the BNC connector.
Note, I tested this on a NEC Versa, IBM 750C, and a IBM 755CX w/out
problems.  The card still works fine in TP mode.

Submitted by:	schwarz@alpharel.com (Steve Schwarz)
Reviewed by:	jleppek@suw2k.ess.harris.com (James Leppek)
1995-08-16 23:34:28 +00:00
Nate Williams
a42b8f1321 Added missing semi-colon in the XT_KEYBOARD code. W/out it the code
would not compile.
1995-08-16 22:36:43 +00:00
Bruce Evans
bf25be48a5 Make everything except the unsupported network sources compile cleanly
with -Wnested-externs.
1995-08-16 16:14:28 +00:00
Joerg Wunsch
54e98df56b Increase the DELAY_GETREPLY to 5000000. Not dangerous, this is
actually a timeout only.  The existing behaviour caused a

  mcd0: timeout getreply

at halt/reboot time.

Submitted by:	graichen@sirius.physik.fu-berlin.de (Thomas Graichen)
1995-08-15 19:56:59 +00:00
Peter Wemm
1cf4903ecd Slight change to the location of the default termios flags to make them
a little easier to change, and revert to the "standard" specialix behavior
with CRTSCTS enabled in the initial cflag (but configurable).
1995-08-13 15:44:37 +00:00
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
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
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
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
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
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