Commit Graph

3255 Commits

Author SHA1 Message Date
bde
ccb03434e1 Fix misplaced idempotency #endif.
Fix tabs and spaces in the wrong places.
1995-04-29 15:24:00 +00:00
ache
cb7b9e37e9 Enable _POSIX_SAVED_IDS and fix comment to describe current situation 1995-04-29 14:20:35 +00:00
ache
b5a00f5c09 set[ug]id(): call suser() only when neccesarry
Submitted by: bde
1995-04-29 11:46:15 +00:00
jkh
51f5f7d1b7 Bruce is right - ENOTTY is more appropriate than EINVAL in this case. 1995-04-29 11:36:47 +00:00
jkh
aa56ab148f fixes the ioctl routine to not chew up massive amounts of kernel time
if an invalid ioctl is done on /dev/klog.  logioctl() needs to return
an errno instead of -1 on a failed ioctl.
Submitted by:	Mike Pritchard <mpp@mpp.com>
1995-04-29 05:09:19 +00:00
gpalmer
bd3306b414 The address is freefall.cdrom.com, not freefall.cdrom.com.cdrom.com :-) 1995-04-29 01:09:34 +00:00
pst
a752a5a50d Incorporate new radix code from UCB. This fixes the orphaned mask bugs.
This submission was done by hand-applying FreeBSD local modifications on
top of the UCB code, rather than trying to patch the UCB code in on top
of the FreeBSD code due to the extensive changes.

Reviewed by:	pst	(been handling 30k routes for 4+ months)
Obtained from:	Sklower/Woody/Honing/Traina (8.4 UCB release)
1995-04-28 23:01:37 +00:00
gpalmer
7b46789c75 (Sorry about prev. blank message - I realised I needed a change too late).
Removed unused var. and correct a printf formatting string.
1995-04-28 22:24:37 +00:00
gpalmer
c96882e6c5 *** empty log message *** 1995-04-28 22:23:19 +00:00
dufault
c59a32610b Add ioctl calls for Freeze/Thaw. 1995-04-28 19:26:02 +00:00
ache
4cffe3ae52 Implement SLIOCSUNIT (set slip unit number) 1995-04-28 18:47:29 +00:00
ache
c2c1329cc8 Implement POSIX SAVED_IDS for setuid/setgid 1995-04-28 18:17:29 +00:00
ache
bbace9e38f setre*(): simplify return scheme, pointed by Bruce 1995-04-28 17:00:27 +00:00
dufault
2ddcc16c37 Rename "aio.h" to "dataacq.h" 1995-04-28 12:08:03 +00:00
dufault
916c1f75cf Renamed "aio.h" as <sys/dataacq.h>. 1995-04-28 12:05:36 +00:00
sos
73b40965c0 Added nsccons variable for use by pstat
Submitted by:	 ache
1995-04-28 09:10:56 +00:00
dufault
c139bc1e76 Add National Instruments "LabPC" driver 1995-04-28 00:51:40 +00:00
ache
4592669422 Implement setreuid/setregid according to SunOS manpage 1995-04-27 19:23:24 +00:00
phk
f04c13a6e6 New and improved version from the author.
Submitted by:	DI. Christian Gusenbauer <cg@fimp01.fim.uni-linz.ac.at>
1995-04-27 18:22:36 +00:00
gibbs
2f2fb134b4 Additions to support the WAITING_SCB list that the sequencer maintains.
It is the kernel driver's responsibility to do the list manipulation whenever
a selection timeout or a request sense occurs.

Print out the interrupt type that the device has been set to.  It seems that
one of the Asus motherboards botches this and David thought a diagnostic would
be nice.

Fix a bug in my diagnostic code that David found.

Reviewed by: Wcarchive and David Greenman
1995-04-27 17:47:17 +00:00
gibbs
2a39795e51 Restructure the arbitration loop to allow for reselections that win out over
the adapter's selections.  Many fast periferals were getting upset when
the sequencer decided to rearbitrate after the device had already won
arbitration.  This also forced the creation of a list threaded through
the SCBs (since we don't have enough space anywhere else) of commands that
are awaiting reselection.  This list is run down before any new transactions
from the input queue are allowed.  The list is appened to whenever we begin
a selection (simple case since the selecting device is always at the head)
and by the kernel driver whenever a request sense occurs.  In the common
case, the list is only one element long, but when a reselection wins out
over a selection and that reselection generates a request sense, the
outstanding selection required for the retreval of the sense code grows
the list.  On machines with many targets, this might cause the list to grow
large, so this solution, which will allow up to the maximum number of I/O
requests capible of the card elements in the list, was chosen.  The list
manipulation is trivial and adds three sequencer instructions of overhead
to the selection phase.

This fixes the "target busy" errors from micropolis drives and the bursty
I/O problem when performing I/O between a Quantum Grand Prix and any other
device.  I anticipate that this will correct many of the problems that
have been reported with this driver.

Reviewed by: Wcarchive and David Greenman
1995-04-27 17:44:27 +00:00
pst
0cf76eba36 Add queue.h include file to all the TPIP code. 1995-04-26 21:32:42 +00:00
pst
4fc7842af9 Cleanup loopback interface support.
Reviewed by:	wollman
1995-04-26 18:10:58 +00:00
rgrimes
c7d6e91d3e Add outb to keyboard controller to do a cpu_reset, this fixes 2 known
cases of motherboards that failed to reboot.
1995-04-26 07:38:35 +00:00
wollman
e64372fe5c Disallow half-configured point-to-point interfaces. It's still possible to
get into a half-configured state by using the old-style ioctls;this
may be a feature.
1995-04-25 19:50:20 +00:00
wollman
37d5e6371e Finally finish the cloning cleanup work by making sure that clones
go away whenever a clone's parent is changed, or a route is added in a
certain set of circumstances.

This also includes code to forbid setting a route's gateway to an
address which can only be reached through that route, thus (hopefully)
eliminating one class of cloning bottomless-recursion bugs.
1995-04-25 19:12:07 +00:00
bde
fb3b1be800 Fix benign type mismatches int console functions. dev_t was assumed
to be `int' or smaller and some functions returned `int' instead
of `void'.  The first bug was detected when console functions were
defined in a place central enough for type checking to actually
work and the second bug was introduced when the interface was
changed to match what the console functions in other drivers actually
return.
1995-04-25 12:18:05 +00:00
sos
904ef31e94 Added mark_all() call so that screen is proberly updated
when scroll-lock history is disengaged.
1995-04-25 10:22:28 +00:00
dg
398d197d07 Fixed a "bswbuf" hang caused by the wakeup in relpbuf() waking up the
wrong thing.
1995-04-25 06:22:47 +00:00
phk
39febe0231 Document MFS_ROOT option. 1995-04-25 03:44:04 +00:00
phk
5440a1f83d Add support for MFS root filesystem. 1995-04-25 03:41:12 +00:00
phk
61b98e7056 Add a printf so we can see where we get our rootfs from. 1995-04-25 03:39:50 +00:00
dyson
74ec073fd4 Fixed the mmap hang fix previously committed so that it works
with options DIAGNOSTIC, and clear up an additional reference
count problem.
1995-04-25 03:32:37 +00:00
bde
c69ddf5c4f Add ioctls DIOCGSLICEINFO and DIOCSYNCSLICEINFO. The latter isn't
finished or tested.
1995-04-24 17:07:08 +00:00
bde
d4cee5b877 Undo the move of `#include "sc.h"' etc. to cons.h. It broke anything
that includes <machine/cons.h>.
1995-04-24 16:43:01 +00:00
bde
fae3d62cec Make bad144 debugging code conditional on ds_debug. 1995-04-24 06:04:36 +00:00
phk
c012f471a3 Added "bio" to matcd. 1995-04-24 05:33:59 +00:00
dyson
2233e44324 Changes to get rid of ufslk2 hangs when doing read/write to/from
mmap regions that are in the same file as the read/write.
1995-04-24 05:13:28 +00:00
phk
ad7dbe3b85 Changes John's handling of the flags a little bit, added a new one,
(0x4000 == sleephack) to handle disks which are confused after a sleep.
Fixed a spelling error.
1995-04-24 05:12:29 +00:00
phk
d09cb928d8 Did a s/[ \t]*$// 1995-04-24 05:09:53 +00:00
dyson
7a69949bef Implemented the multi-sector I/O enable and the 32 bit I/O probe
through the use of the config file flags as opposed to the option
"NSECS_MULTI".  "NSECS_MULTI" has been removed from the driver.
The new capability allows boot-time modification of the config.
1995-04-24 04:32:31 +00:00
dyson
7eb7ffe94c Removed the NSECS_MULTI option, and implemented both 32 bit probe
enable and multi-sector I/O enable by using the controller or device
flags capability.  Per a suggestion by phk.
1995-04-24 04:30:19 +00:00
jkh
1a53047ebf I noticed that some new -W options had been turned on the kernel compile since
I made the changes I sent you before.  In the interests of cleanliness, I made
modifications to /sys/i386/isa/tw.c to kill the warnings and make it compile
clean.  While I was at it, I also made a bunch of internal functions static.
Submitted by:	Gene Stark <gene@starkhome.cs.sunysb.edu>
1995-04-24 01:39:55 +00:00
gibbs
ad18e45bfc Set SCSI_NOSLEEP only when we really need to. This requires an additional
flags parameter to all xxstart routines so that the correct information can
be passed down into the device specific routines.  This is needed to ensure
that ccb/scb allocation routines don't hang.

Submitted by: John Dyson
1995-04-23 22:07:56 +00:00
gibbs
6e93e53489 Don't arbitrarily set SCSI_NOSLEEP. It is now handled correctly by the
higher level scsi code.

Spls should never be conditionalized, so don't do so here.

Restructure the get_scb routine so that we can't get into an infinite
loop if the ccbs are exhausted and we are are called with SCSI_NOSLEEP set.

Other driver maintainer's that based their scb allocation routines on Julian's
code should look at these changes and implement them for their driver.

The aic7xxx driver inspired these changes because early revs of the
aic7770 chips have so few SCBs that you can actually run out.  If you
have a rev C or aic7770 (as is reported by the driver probe) and had more
than 2 drives, you could get into an infinite loop when using up all of
the SCBs.  Since the driver will only allow two SCBs per device and I
only had two devices, I never saw this problem on my Rev C card.

Bzero only 19 bytes of the scb instead of 2k (ack!).  This was a hold
over from when a struct SCB only contained the information downloaded
to the board, but we now store kernel driver data in there as well.  This
greatly lowers the overhead for small transactions (I get ~1MB/sec for
dds with a 512 byte block size).

Submitted by: John Dyson with the aic7xxx specific optimization by me
1995-04-23 22:04:58 +00:00
gibbs
7233c0ee5e Don't arbitrarily set SCSI_NOSLEEP. It is now handled correctly by the
higher level scsi code.

Spls should never be conditionalized, so don't do so here.

Restructure the get_ccb routine so that we can't get into an infinite
loop if the ccbs are exhausted and we are are called with SCSI_NOSLEEP set.

Other driver maintainer's that based their ccb allocation routines on Julian's
code should look at these changes and implement them for their driver.

Submitted by: John Dyson
1995-04-23 21:58:35 +00:00
wollman
8de46439f9 Added `fe' device drive r for Fujitsu MB86960A family.
Submitted by: M.S. <seki@sysrap.cs.fujitsu.co.jp>
1995-04-23 18:31:50 +00:00
wollman
c8f541eea7 Substantially clean up LINT and add `fe'. 1995-04-23 18:30:27 +00:00
bde
002fbe0111 Declare the console switch functions completely.
Move declarations of console functions to cons.h (they should be
config(8)ed).
1995-04-23 12:55:55 +00:00
bde
16293134e3 Move declarations of console functions to cons.h (they should be
config(8)ed).

Update other misplaced prototypes.
1995-04-23 12:41:57 +00:00
ache
a16e9ab64d Make setreuid/setregid active syscalls 1995-04-23 12:22:06 +00:00
bde
96c0e5921d Correct the type of the `c' arg to pccnputc().
Move declarations of console functions to cons.h so that they can't be
defined inconsistently in several places.  They should be config(8)ed.
1995-04-23 10:15:42 +00:00
bde
e47c8d96fe Declare d_dump_t and d_mmap_t completely. Nothing depends on the
incomplete declarations here any more.  Some things depend on
incomplete declarations elsewhere.  The `offset' arg to d_mmap_t is
bogus (it is `int' but should be `vm_offset_t') but it is what the
driver mmap functions actually accept, although they are passed a
`vm_offset_t'.

Function declararions in headers should always be complete to avoid
warnings from `gcc -Wstrict-prototypes' for compiling modules that
don't even use the offending declarations.
1995-04-23 09:36:59 +00:00
julian
f980b8bc20 hmm spotted a difference resulting from a merge I didn't examine close enough 1995-04-23 09:17:24 +00:00
julian
f232958d7e include hooks for EISA configuration (possibly wrong :) 1995-04-23 09:13:08 +00:00
julian
3cc15a14e2 include new files for EISA configuration 1995-04-23 09:12:00 +00:00
julian
b9dab97ce8 files for the eisa specific autoconfiguration..
don't expect this to work yet.. but at least they're here..
(hey this cvs stuff is fun!)

activate with a line exactly like the isa line in the config file,
(but specifying eisa :)
patches to come..
1995-04-23 08:55:43 +00:00
bde
0df7682e26 Correct the type of the `acflag' arg to suser(). 1995-04-23 08:31:02 +00:00
bde
80c58cf361 inline -> __inline.
Headers should always use `__inline' for inline functions to avoid
syntax errors when modules that don't even use the offending functions
are compiled with `gcc -ansi'.
1995-04-23 08:05:49 +00:00
bde
db8f1d4c9c Don't export a bogus include to half the universe. 1995-04-23 07:47:12 +00:00
bde
364c312409 Declare wakeup() non-implicitly and don't bogusly cast its arg. 1995-04-23 07:39:21 +00:00
phk
2c48e6f0e4 Forgot this commit the other day. The receiving end of the "boot -C" option. 1995-04-23 04:14:41 +00:00
phk
b46de6d870 We will use /sbin/init on cdrom too. 1995-04-23 04:13:51 +00:00
dyson
078a1f6cf8 Change the initial delay in wdwait to a DELAY macro call. It is really
too long, but does not impact performance very much when using the
NSECS_MULTI option.  This will help solve some mysterious IDE I/O
problems.
1995-04-22 22:44:30 +00:00
dyson
786b6517f0 Document the wd.c option NSECS_MULTI. 1995-04-22 22:39:33 +00:00
phk
7970037676 First part of the "what version of CURRENT" fix.
We now have RELEASE=CURRENT in the CVS-tree.

If this hasn't been edited, we will use "BUILT-yyyymmdd" where the time is
that of the compile, and leave it at that, we can't do any better.

If there is no serious objections, I will modify the "cvs co" script on
freefall to fiddle this file after checkout so that it becomes
CURRENT-yyyymmdd, where the time is that of the checkout.
1995-04-22 21:39:15 +00:00
wpaul
8e0da1be68 Tiny printf formatting change: if we have no cpu_vendor or cpu_id info,
don't generate a newline. (Yeah, I'm picking nits, but that empty line
I get on my 386 just looks dumb, okay? :)
1995-04-22 03:58:46 +00:00
julian
d13094b9ee Submitted by: bde@freebsd.org 1995-04-21 22:20:34 +00:00
bde
9f390c3949 Make some functions static like they always should have been.
Change the interfaces of these functions to save space.  The code
that takes the least amount of space is often the opposite to what
you might expect.  E.g., it helps to waste a few bytes passing
pointers so that the compiler can't see that certain addresses
are identical (gcc likes to waste space by reloading fat constants
even when the constant is already in a register).

Rewrite getbootdev() to save 80 bytes of space and to make it less
ugly.  32 bytes were saved simply by omitting the continue statements
in the pseudo-switch.
1995-04-21 16:50:32 +00:00
bde
56ec7fa26b Update the pseudo-prototype for serial_putc() to match the actual prototype. 1995-04-21 16:30:18 +00:00
bde
f678b0530d Never pass char or short args to functions. This saves 64 bytes of
recently introduced bloat in just 2 calls to biosread(), although
very little in calls to putc() and serial_putc().  Gcc produces
amazingly bad code for unnecessary conversions.  E.g., if it has
`int x' in register %edx and wants to pass a char, then it could
simply push %edx and access only one byte in the callee.  Instead,
it sometimes unnecessarily spills %edx; it always sign extends
%edx and pushes the result.

Remove useless `extern' in function prototypes.

Remove unused declaration of `end'.

Declare pbzero() and pcpy() like the library bzero and bcopy().

Declare printf() properly.
1995-04-21 16:07:12 +00:00
dyson
96ab0db5f9 Slight re-ordering of the creation of a vmio object to fix a condition
that can cause NFS I/O failures.
1995-04-21 02:58:49 +00:00
dyson
92f8845813 Fixed a problem in _vm_object_page_clean that could cause an
infinite loop.
1995-04-21 02:48:40 +00:00
joerg
aabf900942 . Make Poul's boot2 overflow warning less noisy in case the blocks
do fit, and beeping in case of an overflow.

.  Drop a comment about the ``FORCE_COMCONSOLE'' option into
   README.serial.

.  Increase the name buffer for the root directory from 100 bytes
   to 8 KB;  this is in no way ideal, but (IMHO) the best that can
   be done by now.  People did encounter problems with their root
   dir name listing overflowing the allocated buffer space.  Once
   we've got the three-stage boot, we should implement some basic
   malloc().  Swap space is already getting tight now, perhaps the
   swap should go into another 64 KB segment instead.

.  Make the keyboard probe less paranoid.  It should not give up in
   case of a keyboard that's continuously demanding RESEND's.  Even
   though the keyboard reset apparently has not been reported to be
   complete, it's at the very least proven that there IS something
   like a keyboard available.

   This solves problems with the ``Gateway-2000 AllKey programmable''
   (sp?) keyboard, that experienced a total hang with the previous
   probe.

   Thanks goes to Scott Blachowicz <scott@statsci.com> for his
   extensive testing of my various interim (debugging) bootblocks
   to get this working.
1995-04-20 23:15:10 +00:00
julian
ae9af0df47 Add an option to make it easy to default to the hd1 mode
also save a few bytes
1995-04-20 23:05:23 +00:00
julian
d9e29e6a28 remove note about 'find' now that it's fixed. 1995-04-20 22:02:05 +00:00
julian
9f2f2e8eaa Submitted by: phk@freebsd.org
Reviewed by:	Julian
fixes the 'find' anomaly mentionned in the README
(hmm I guess I should fix that too..)

diff -r1.2 devfs_vnops.c
905a906
>                       dirent.d_type = DT_DIR;
914a916
>                       dirent.d_type = DT_DIR;
920a923,941
>                       switch(name_node->dnp->type) {
>                       case DEV_BDEV:
>                               dirent.d_type = DT_BLK;
>                               break;
>                       case DEV_CDEV:
>                               dirent.d_type = DT_CHR;
>                               break;
>                       case DEV_DDEV:
>                               dirent.d_type = DT_SOCK; /*XXX*/
>                               break;
>                       case DEV_DIR:
>                               dirent.d_type = DT_DIR;
>                               break;
>                       case DEV_SLNK:
>                               dirent.d_type = DT_LNK;
>                               break;
>                       default:
>                               dirent.d_type = DT_UNKNOWN;
>                       }
1995-04-20 22:00:05 +00:00
phk
fd0ba1a41d Added a check so compilation fails if the bootblocks are too big.
replaces a switch with ifs to reduce size.
1995-04-20 18:36:14 +00:00
julian
68f1a4cb95 Submitted by: julian
@#%$#@ ftp -p corrupted the file in transfer..
(cut off the last 2 lines).. fix this
1995-04-20 07:42:41 +00:00
julian
3588217ef6 Submitted by: julian
I did a cleanup on the code..
(why didn't I do that before I checked it in? I hear you ask..)
1995-04-20 07:34:55 +00:00
phk
4174a28737 The -current system with 'zp' driver hangs up when resumed from
suspended mode.  The patch for this bug follows.

Reviewed by:
Submitted by:	<hosokawa@mt.cs.keio.ac.jp>
1995-04-20 07:22:04 +00:00
julian
c0152577d3 Reviewed by:
Submitted by:	julian
oops rename doc file to README as agreed
1995-04-20 06:36:36 +00:00
phk
5bddd1a7b9 Added -C option to set RB_CDROM, so that we use our cdrom as root. 1995-04-20 06:08:27 +00:00
phk
8eea98a0a5 Added RB_CDROM flag, meaning "use CDROM as root". 1995-04-20 06:06:42 +00:00
phk
5f05ce2c1a Add wd2 and wd3 as swap-devices too. 1995-04-20 06:05:17 +00:00
phk
10bc5bc33d Remove the slice for the first 63 sectors for the OnTrack case, it's useless
and nobody care about it anyway.
1995-04-20 06:01:51 +00:00
wpaul
53205b4f9e Undo the stupidity I inflicted on these files and replace it with
some (hopefully) less offensive stupidity:

If we detect that a user has loaded a module that fails to initialize
itself correctly, panic. There really isn't a safe way to recover from
something like this; we can't know that the module is bad until after
the entry point is called, by which time it's too late to do anything
about it.
1995-04-20 05:08:53 +00:00
julian
54afbc6dc9 Reviewed by: no-one yet, but nonintrusive until configed in.. :)
Submitted by:	julian@freebsd.org
Obtained from:	written from scratch
1995-04-20 03:31:34 +00:00
julian
71f51e13cc Reviewed by: no-one yet, but non-intrusive
Submitted by:	julian@tfs.com
Obtained from:	written from scratch

slight changes to make space for devfs..
(also conditional test code in i386/isa/fd.c)

===================================================================
RCS file: /home/ncvs/src/sys/sys/malloc.h,v
retrieving revision 1.7
diff -r1.7 malloc.h
113a114,117
> #define M_DEVFSMNT    62      /* DEVFS mount structure */
> #define M_DEVFSBACK   63      /* DEVFS Back node */
> #define M_DEVFSFRONT  64      /* DEVFS Front node */
> #define M_DEVFSNODE   65      /* DEVFS node */
184c188,192
<       NULL, NULL, NULL, NULL, NULL, \
---
>       "DEVFS mount",  /* 62 M_DEVFSMNT */ \
>       "DEVFS back",   /* 63 M_DEVFSBACK */ \
>       "DEVFS front",  /* 64 M_DEVFSFRONT */ \
>       "DEVFS node",   /* 65 M_DEVFSNODE */ \
>       NULL, \
Index: sys/mount.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/mount.h,v
retrieving revision 1.16
diff -r1.16 mount.h
100c100,101
< #define       MOUNT_MAXTYPE   15
---
> #define MOUNT_DEVFS   16      /* existing device Filesystem */
> #define       MOUNT_MAXTYPE   16
118a120
>       "devfs",        /* 15 MOUNT_DEVFS */ \
Index: sys/vnode.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/vnode.h,v
retrieving revision 1.19
diff -r1.19 vnode.h
61c61
<       VT_UNION, VT_MSDOSFS
---
>       VT_UNION, VT_MSDOSFS, VT_DEVFS
1995-04-20 03:18:19 +00:00
julian
f9c25a602b Reviewed by: no-one yet, but non-intrusive
Submitted by:	julian@tfs.com
Obtained from:	written from scratch

slight changes to make space for devfs..
(also conditional test code in i386/isa/fd.c)
why casn't cvs picked up these changes and shown them here?
is this going to be a NULL commit?
who knows? (it scanned all the dirs)


===================================================================
RCS file: /home/ncvs/src/sys/sys/malloc.h,v
retrieving revision 1.7
diff -r1.7 malloc.h
113a114,117
> #define M_DEVFSMNT    62      /* DEVFS mount structure */
> #define M_DEVFSBACK   63      /* DEVFS Back node */
> #define M_DEVFSFRONT  64      /* DEVFS Front node */
> #define M_DEVFSNODE   65      /* DEVFS node */
184c188,192
<       NULL, NULL, NULL, NULL, NULL, \
---
>       "DEVFS mount",  /* 62 M_DEVFSMNT */ \
>       "DEVFS back",   /* 63 M_DEVFSBACK */ \
>       "DEVFS front",  /* 64 M_DEVFSFRONT */ \
>       "DEVFS node",   /* 65 M_DEVFSNODE */ \
>       NULL, \
Index: sys/mount.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/mount.h,v
retrieving revision 1.16
diff -r1.16 mount.h
100c100,101
< #define       MOUNT_MAXTYPE   15
---
> #define MOUNT_DEVFS   16      /* existing device Filesystem */
> #define       MOUNT_MAXTYPE   16
118a120
>       "devfs",        /* 15 MOUNT_DEVFS */ \
Index: sys/vnode.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/vnode.h,v
retrieving revision 1.19
diff -r1.19 vnode.h
61c61
<       VT_UNION, VT_MSDOSFS
---
>       VT_UNION, VT_MSDOSFS, VT_DEVFS
1995-04-20 03:16:31 +00:00
phk
0ab04d325b Added support for disks which "OnTrack Disk Manager" has munged.
I suggest you do all partitioning using the OnTrack SW, to avoid
confusing it.
1995-04-20 01:21:51 +00:00
dg
908373bf23 New flag: B_PAGING. Added as part of the vn driver hack. 1995-04-19 10:32:11 +00:00
dg
b90b28d0bf Escentially a rewrite by John Dyson. This is disgusting, and John agrees,
but the whole thing is, so what the hell. :-) This version is expected to
work.
1995-04-19 10:31:18 +00:00
olah
410572ff0c Include <sys/queue.h> because <netinet/in_pcb.h> (also included
later in tcp_debug.c) requires it due to the pcb changes of DavidG.
1995-04-19 10:26:04 +00:00
rgrimes
9f5ee292dc Reapply my fix for this:
Output the CPU features line during the probe on a seperate line, for
folks with lots of features the output use to wrap and look ugle.
1995-04-18 23:55:26 +00:00
wpaul
cf1102f3eb Couple of small cosmetic changes:
- Add $Id$ string.
- Fix comment ("we might *not* be able to unload the
module afterwards without panicking...")
- Get rid of variable 'j' that I used in name checking
for(;;) loop and use 'i' instead (I thought there'd be
a problem with this, but there isn't).
1995-04-18 14:10:21 +00:00
jkh
863f9a172f Matt says that no pre-2.3 pass boards were supposed to ship, but I certainly
got a 2.2 version DC21040 chip in my SMC ethernet card!  He suggests bumping
the check all the way down to 2.0 since it's pre-2.0 we're actually guarding
against.
Submitted by:   Matt Thomas <matt@lkg.dec.com>
1995-04-18 12:54:30 +00:00
ache
1c2d303c57 Add quotes around TUNE_1542 1995-04-18 11:02:22 +00:00
wpaul
1545a09afc Fix module handling to stop oddball modules (if_ppp_mod, if_sl_mod,
if_tun_mod, etc...) from crashing the system. These modules are useful,
but because they don't yet have proper load()/unload() functions,
they can lead to panics: if, for example, you load the if_ppp module,
any user can panic the system by running modstat.

You can also hang the system outright if you try to unload the PPP
module too.

Changes are as follows:

- Save the name passed to us during the RESERVE stage for name matching
(we can't load if_ppp_mod twice: we've have two ppp0's and two ppp1's,
which is beyond strange). This makes the lkmexists() cheks somewhat
redundant, but there's no way around it that I can see.

- If we call the module entry point and find that we have no lkm_any
structure in our 'private' section, create a fake one. This keeps
modstat happy. We mark such modules as LM_UNKNOWN.

- Don't allow LM_UNLOAD modules to be unloaded: it just ain't
possible. (Unless someone wants to write a pppunattach() function. :( )

- In lkmunreserve(), mark private.lkm_any as NULL so we don't get
confused later. I think this is bogus, but I can't prove it.

XXX: the name matching used to keep the user from loading two
instances of the same module can easily be defeated simply by
changing the module name or, in the case of the oddball modules,
simply by renaming the module files. I haven't found a nice simple
way to tell one module from another.
1995-04-18 02:29:26 +00:00
wpaul
6c00789e73 Add LM_UNKNOWN type for oddball modules (if_ppp_mod, if_sl_mod, etc...)
that haven't yet learned how to do the Right Thing when installing
themselves.
1995-04-18 02:17:15 +00:00
jkh
bd96da2b0a Extensive updates to this package.
Submitted by:   Gene Stark <gene@starkhome.cs.sunysb.edu>
1995-04-18 02:00:01 +00:00
phk
54397c3ca7 Print the BIOS geometries in a human-readable format. 1995-04-17 16:49:50 +00:00
gpalmer
bfe8788f82 Bump to 2.0-950418-SNAP 1995-04-17 10:19:31 +00:00
dg
2a9380bc86 Fixed a logic bug that caused the vmdaemon to not wake up when intended.
Submitted by:	John Dyson
1995-04-17 10:00:55 +00:00
dg
167c85fc93 Changed minimum supported rev of DC21040 to pass 2.2. 1995-04-17 08:16:14 +00:00
bde
d33263a1f9 Fix compiler warnings about benign overflow in initializers. 1995-04-17 05:52:17 +00:00
dg
bbeb2b7b7b Removed obsolete/unused variable declarations. Killed externs and included
appropriate include files.
1995-04-16 14:12:15 +00:00
dg
ec87c855e2 Removed obsolete/unused variable declarations.
Removed some extern declarations and included the correct include files.
1995-04-16 13:58:42 +00:00
joerg
01059d361c Remove the #ifdef REDUNDANT crud. This could be looked up in CVS by
interested parties.

Make the loader refuse to load anything below 1 MB -- we didn't
support it since FreeBSD 2.0R.  Avoid gratuitously wiping out the BIOS
variables or the loader.
1995-04-16 13:02:52 +00:00
dg
da86f0f051 Moved some zero-initialized variables into .bss. Made code intended to be
called only from DDB #ifdef DDB. Removed some completely unused globals.
1995-04-16 12:56:22 +00:00
dg
5985407888 Removed unused & empty bufstats() function. 1995-04-16 12:02:42 +00:00
dg
f20992c42e Removed gratuitous m->blah=0 assignments when initializing the vm_page
structs in vm_page_startup(). The vm_page structs are already completely
zeroed.
1995-04-16 11:50:45 +00:00
dg
85982d8c50 Killed gratuitous b_vp=NULL in bufinit. The entire buffer is already
bzero()'d.
1995-04-16 11:45:30 +00:00
dg
0af34effd6 Changed #ifdef around printlockedvnodes() from DEBUG to DDB. 1995-04-16 11:33:33 +00:00
dg
9872fc420a Make vegetarian and animal rights people happy and use 0xdeadc0de instead
of 0xdeadbeef as the 'spare' value.
1995-04-16 11:25:47 +00:00
dg
cf5ad49253 Make vegetarian and animal rights people happy and use 0xdeadc0de instead
of 0xdeadbeef as the fill pattern. Decreased MAX_COPY to 64 (256 was a bit
overzealous in most cases).
1995-04-16 11:25:15 +00:00
dg
90d170da28 Remove gratuitous waste of 2K of memory for BIOS variables. We never load
the kernel at 0-640k; we haven't had the ability to do that since before
2.0R. Furthermore, I fail to see how putting an instruction at 0 and then
doing a .org 0x500 is going to prevent the stuff from getting clobbered
in the first place; a.out is just too stupid to know about sparse address
spaces.
1995-04-16 10:12:16 +00:00
dg
d91a9049d3 Make "print_page_info" #ifdef DDB. 1995-04-16 09:59:16 +00:00
dg
4a44021446 1) Check for curproc != NULL in bread/bwrite. John convinced me that this
is necessary in order for panic+sync to work. Will also gloss over a panic
that Jordan was having with the install floppies that remains unexplainable.
2) Handle "bogus_page" a little better.
3) Set page protection to VM_PROT_NONE if the entire page has become !valid.

Submitted by:	John Dyson (2&3), me (1).
1995-04-16 05:11:14 +00:00
dg
13fe0c02d2 Various fixes from John Dyson:
1) Rewrote screwy code that uses an incore buffer without making it busy.
2) Use B_CACHE instead of B_DONE in cases where it is appropriate.
3) Minor code optimization.

This *might* fix kern/345 submitted by Heikki Suonsivu.
1995-04-16 05:05:25 +00:00
dg
dde090cb92 Fixed a few bugs in vm_object_page_clean, mostly related to not syncing
pages that are in FS buffers. This fixes the (believed to already have been
fixed) problem with msync() not doing it's job...in other words, the
stuff that Andrew has continuously been complaining about.

Submitted by:	John Dyson, w/minor changes by me.
1995-04-16 03:11:28 +00:00
gibbs
742e73c898 Have the aic7xxx build rules point at the sequencer's new location. 1995-04-16 01:20:00 +00:00
bde
38adc0cc1f Define DKBAD_NOTRKSEC. Cosmetic except it is required for recent changes
to bad144.c.
1995-04-15 23:21:28 +00:00
bde
8a0700e2de Remove bogus unused `struct cpu_disklabel'. 1995-04-15 22:46:28 +00:00
gibbs
f11c291bd9 John Aycock's BSD copyrighted sequencer assembler and sequencer code. This
is identical to the older version, just the copyright has changed.  Many
thanks go to Dean Gehnert of the Linux camp who went the extra mile to make
this happen.

Other changes:

Update assembler man page to include the -v and -D options

Merge in Dean's latest changes to the assembler

Have the sequencer do a MSG_REJECT when the negotiated syncronous rate
is lower than the adapter supports.  This forces asyncronous mode which
is faster at these rates anyway.

This code will be moved shortly to the non-gpld portion of the tree.
1995-04-15 21:45:56 +00:00
bde
7f506f8e3f Fix initializations of kdc_state for serial consoles.
Change order of RTS flow control tests so that less tests are required
in the usual case.

Clean up parts of previous commits.  Cosmetic.
1995-04-15 21:45:16 +00:00
gibbs
39c616077e kernel.h -> sys/kernel.h 1995-04-15 21:38:34 +00:00
gibbs
f02a51157b Be more careful with how we do a chip reset.
Clean up some comments.
1995-04-15 21:37:32 +00:00
bde
aef07eb418 Don't waste time sending an EOI to ICU1 if option AUTO_EOI_1 is defined.
Previously, this worked right if both AUTO_EOI_1 and AUTO_EOI_2 are
defined, but not if AUTO_EOI_1 is defined and AUTO_EOI_2 is not defined.
The latter case should be the default.  DUMMY_NOPS should be the default
too.  Currently there are only two NOPs slowing down rtcin() (although
there are no delays in writertc()) and several FASTER_NOPs slowing down
interrupt handling in vector.s.

Fix stack offsets for the (previously) unused untested
FAST_INTR_HANDLER_USES_ES case.
1995-04-15 21:32:18 +00:00
bde
9b26b2595b Speed up ttnread() in the !(ICANON | ISIG) case by copying to user space
through a temporary buffer instead of one character at a time.  The old
method takes about 6 usec/char on a 486DX2/66.  This is larger than than
the combined interrupt and PIO overhead for a 16550!

This change was first implemented in 1.1.5.  It was rewritten for 2.1.
The clist access functions allow a simpler implementation at some cost
in correctness and speed.  There needs to be an ungetc() function to
recover from EFAULT, and it wastes time to copy through a temporary
buffer.

Don't snoop on single characters that weren't read due to EFAULT.
Rewrite a snoop comment in my approximation to English.

Undo bogus exportation of ttnread().
1995-04-15 21:04:58 +00:00
bde
016188d594 Define IBUFSIZ as 384. This goes with speeding up ttnread().
OBUFSIZ should be increased to the same value as IBUFSIZE (both are
smaller than desirable because they have to fit on the stack), but
there are currently problems with magic buffer limits and watermarks.

Remove unused #define of TTMASK.

Undo bogus exportation of ttnread().
1995-04-15 20:59:28 +00:00
ats
d7e54087dc Put vnode_if.h and vnode_if.c into CLEANFILES that are automatically
generated. Should this lkm set VFS_LKM ?
1995-04-15 17:36:53 +00:00
phk
47d6323f22 Added kzipboot 1995-04-15 08:24:33 +00:00
phk
0de760f515 The magic code to uncompress a kernel.
Reviewed by:	phk
Obtained from:	Linux via 386BSD.
1995-04-15 08:23:55 +00:00
phk
5ba37b4ac3 Changes needed for kzip to work. 1995-04-15 06:54:13 +00:00
jkh
68aa043338 Make DISTNAME and RELEASE the same for now. It makes more sense. 1995-04-15 06:00:11 +00:00
jkh
81360e1f56 Go to a coherent release number for uname(1). 1995-04-15 03:56:06 +00:00
dg
501eb39bc3 For P_SUGID processes, we must also change ownership of the mem file
to root so that group kmem can still get to it. *SIGH*
1995-04-15 03:20:31 +00:00
dg
bd4a83f7b6 Retain group kmem readability for P_SUGID processes. 1995-04-15 02:50:13 +00:00
dg
d09b4cc36e Made /proc/n/mem file group kmem and group readable. Needed to fix ps so
that it doesn't need to be setuid root.
1995-04-15 02:30:17 +00:00
dg
b35ab421d2 Fixed serious off by one bug I introduced that will likely cause the
machine to panic whenever the name cache fills up.

Submitted by:	John Dyson
1995-04-15 00:49:35 +00:00
phk
a38dfc6ec2 "jl" and "jb" doesn't quite do the same thing...
Reviewed by:	phk
Submitted by:	"DI. Christian Gusenbauer" <cg@scotty.edvz.uni-linz.ac.at>
1995-04-14 23:01:33 +00:00
phk
9b693dac1e I commit this for Bruce, who has serious connectivity problmes pt.
This should NOT go into 2.0.5  /phk

Support disk slices.  This involves mainly replacing inline code with
function calls.  Support for ST506 drives is temporarily broken since
the `setgeom' arg to dsopen() is not implemented completely enough to
use.  The `setgeom' arg will go away and ST506 drives will be supported
in another way.  A large amount of dead code is left in wdopen() as a
reminder of the problems here.

Close the device in wdsize().  Open tracking was broken on all drives
with a swap device.

Remove support for soft write protection.  There are no ioctls to set
it.  It was used to disable writing to unlabelled disks, but we want
to support writing to foreign partitions on unlabeled disks.

Use generic dkbad routines to do about 2/3 of the work for supporting
bad144.

Improve disk statistics: estimate 4MB/sec instead of 8MB/sec for
the transfer rate (ISA max is 4MB/sec, old IDE max is 3.3MB/sec);
fix dk_xfer[] (it counted sectors, not transfers); keep the estimate
dk_seek[] = dk_xfer[] (was sectors, is now transfers); only count
words actually transferred (the count is still too high after a
failed write and after retries).  Remove wdxfer[].

Fix indentation in wdattach().  Fix resulting botched printing of the
disk size for ST506 drives.  Print the disk geometry less cryptically.
1995-04-14 22:31:58 +00:00
joerg
546565b16c Boot block cleanup.
o Fix the keyboard probe to properly wait for the ready bit before
sending a command to the keyboard controller.  This should avoid the
problems some people are experiencing where the boot blocks hang the
system during keyboard probe.  (It does solve it for me.)

o Fix a bug that effectively prevented the boot blocks from ever
passing control to the serial console.  [while(--retries) instead of
while(retries--)]

o Gratuitously reduced the keyboard probe timeout from 500 to 5
seconds. :)

o Introduced a new option ``FORCE_COMCONSOLE'' as a commented-out
example in the Makefile, to force the usage of a serial console
regardless of a keyboard being connected or not.

o Moved all external declarations to boot.h, declared all functions
there, and ANSIfied all function declarations/definitions.
(printf() remains bogus, however -- i'm too lazy to fix this.)
We're in the ninetees, dunno why we should still support compilers
from the 70's.
1995-04-14 21:26:53 +00:00
dufault
435cec8d72 Add scsi target 1995-04-14 15:14:33 +00:00
dufault
75d3c04bb2 Add scsi target support. 1995-04-14 15:13:46 +00:00
dufault
25c11fda17 Add scsi target. Add "after config" call to autoconf so that scsi
targets will be configured after all scsi busses have been configured.
1995-04-14 15:13:26 +00:00
dufault
6d55b4f4ce Add "sctarg" and document new SCSI_REPORT_GEOMETRY option for ache 1995-04-14 15:12:24 +00:00
dufault
cdd7abf61a Added "scsi target" device that can act as a target for scsi transfers
from an initiator
Added Julian's support for residuals.
Added Julian's fixes to the tape driver
Made compile cleanly with -Wall
Reduce boot up output
1995-04-14 15:10:44 +00:00
wpaul
d6f056e3cc Hopefully I won't get flamed for this: insert a few more #if defined(I486_CPU)
and #if defined (I586_CPU) thingies into identifycpu() so that we only
compile in what's actually needed for a given CPU. So far as I can tell,
none of my 386 machines generate a cpu_vendor code, so I made the extra vendor
and feature line conditional on I486_CPU and I586_CPU. (Otherwise we
print out a blank line which looks silly.)
1995-04-14 02:06:00 +00:00
wpaul
77a1da4908 According to a Usenet posting forward to me by Jordan, there's
at least one user out there who's system won't autoboot from the
serial console because of what sounds like 'phantom keystrokes'
making the timeout timer trip. I've tried to solve this by
adding an extra call to init_serial() right before the 'Boot:'
prompt is printed (done only if RB_SERIAL is set) to hopefully
make sure that the input buffer is clear. Unfortunately, the fellow
is in Germany and I haven't heard back from him yet. I haven't
been able to duplicate this problem on my hardware, so this is
a stab in the dark. At the very least, it shouldn't hurt anything.
1995-04-14 01:35:59 +00:00
wollman
1d33b70a7e Make class names easier to type 1995-04-13 20:37:51 +00:00
dg
c8c22da580 Backed out previous change - it reduces performance. (oops). 1995-04-13 18:24:33 +00:00
wollman
e5364c6474 Actually copy the class field over from the kernel to the user structure. 1995-04-13 15:33:14 +00:00
dg
2474db4145 Slight optimization to select(). 1995-04-13 15:27:51 +00:00
wollman
e7c1e3e7c6 Forgot two things in yesterday's massive devconf update:
initialized class for sio
don't bogusly re-initialize it in sio_registerdev()
1995-04-13 15:03:29 +00:00
ache
4050a13d4d Move setcompat code to another place, initial/locked devices
not supposed to work with old style ioctls
1995-04-13 11:11:11 +00:00
ache
2f4d55e303 Comment out ttcompat via COMPAT_SUNOS too
Fix error handling initial/callout devices
1995-04-13 09:22:40 +00:00
wpaul
f05aaa8b84 This a subtle reminder to people that not everybody compiles their
kernels with 'options I586_CPU.'

The declaration for pentium_mhz is hidden inside an #ifdef I586_CPU,
but machdep.c refers to it whether I586_CPU is defined or not. This
temporary hack puts the offending code inside an #ifdef I586_CPU as
well so that a kernel without it will successfully compile.

I must emphasize the word 'temporary:' somebody needs to seriously
beat on the identifycpu() function with an #ifdef stick so that
I386_CPU, I486_CPU and I586_CPU will do the right things.
1995-04-13 04:55:35 +00:00
dg
9ecdf9408e Various changes from Matt Thomas to improve media selection and fix
support for the DC21140.
1995-04-13 04:46:40 +00:00
jkh
46ddef1c22 DISTNAME="2.0-950412-SNAP" 1995-04-12 23:29:14 +00:00
phk
1bc7ad6183 Add "BREAK_TO_DEBUGGER" option. 1995-04-12 22:02:51 +00:00
phk
edf4b34147 ttsetcompat is a '#ifdef COMPAT_43' feature.
Dropping into the debugger when a break comes down the serial line is a
>MISFEATURE (1st class)< and has been put under it's own #ifdef.  This
should be a magic sequence of chars instead.
1995-04-12 22:00:41 +00:00
wollman
71d2138200 Add a class field to devconf and mst drivers.
For those where it was easy, drivers were also fixed to call
dev_attach() during probe rather than attach (in keeping with the
new design articulated in a mail message five months ago).  For
a few that were really easy, correct state tracking was added as well.
The `fd' driver was fixed to correctly fill in the description.
The CPU identify code was fixed to attach a `cpu' device.  The code
was also massively reordered to fill in cpu_model with somethingremotely
resembling what identifycpu() prints out.  A few bytes saved by using
%b to format the features list rather than lots of ifs.
1995-04-12 20:48:13 +00:00
martin
d9929b443b Break netboot into device specific versions.
nb8390.[cr]om for NS8390 boards (if_ed driver)
nb3c509.[cr]om for 3c509 boards (if_ep driver)

Submitted by:	Serge Babkin (babkin@hq.icb.chel.su)  [3c509 support]
1995-04-12 20:15:33 +00:00
phk
cfc2c474ad Improve the if_eg driver a bit in style. It's still by far the worst driver
we have :-/
1995-04-12 07:50:44 +00:00
dg
f897d2b6cc Fixed bug I introduced when changing PCB list to use 4.4BSD style queue
macros. Basically, detect 'tp' going away differently.
1995-04-12 06:49:56 +00:00
ache
0af83b403a Read of a record smaller then request size always fails
Submitted by: edward@edcom.com
1995-04-11 19:09:31 +00:00
ache
9a4bdf2d2a Fix link sys call
Submitted by: pritc003@maroon.tc.umn.edu
1995-04-11 18:32:17 +00:00
ache
ce7bc1dc67 Call new ttsetcompat() function for proper working
old v7 ioctls with locking bits.
1995-04-11 17:58:09 +00:00
ache
d80311f692 Extract "set" family functions to separate module, needed for
locking in sio f.e.
1995-04-11 17:54:25 +00:00
ache
ba958c0a48 Add new ttsetcompat function (from tty_compat) 1995-04-11 17:53:14 +00:00
bde
fcb32f752e Submitted by: Mike Pritchard <pritc003@maroon.tc.umn.edu>
Fix PR 303: msdosfs: moving a file into another directory causes panic.

" ... the code that does the rename already has the denode
locked when msdosfs_hashins() gets called, resulting in the panic
when the routine attempts to lock the denode again.
...
The attached patch changes the msdosfs_hashins() routine to not lock the
denode.  The caller is now resposible for obtaining the lock instead
of having msdosfs_hashins() do it for them."
1995-04-11 17:13:17 +00:00
bde
237cd452b6 Submitted by: Wolfgang Solfrank <ws@tools.de>
Fix off-by-1-sector error in the range checking for the end of the root
directory.  It was possible for the root directory to overwrite the FAT.
1995-04-11 16:43:20 +00:00
dg
40cb9a942e Handle the "syncing VCHR vnode hang" problem a little differently; just
don't lock the vnode - it doesn't appear to ever be necessary for VCHR
vnode/inodes. This fixes a bug introduced in the previous commit that
caused tty timestamps to act strange (causing 'w' and 'finger' to show
the tty wasn't idle when it may have been for hours).
1995-04-11 04:23:47 +00:00
jkh
6220fdb274 Performance enhancements and a redesign of the transmitter code.
Submitted by:	"Serge A. Babkin" <babkin@hq.icb.chel.su>
1995-04-10 21:25:06 +00:00
wollman
73264063ce Define tuncdev for the benefit of tunnel LKM so that it knows which
device slot to take.
1995-04-10 20:40:11 +00:00
wollman
9f1fdb4af4 Tunnel driver is nmow capable of installing its own cdevsw[] entry,
with a little help from conf.c.  While e're at it, actually declare the
tunnel entry points to have the correct types.  This fixes PR #306.
1995-04-10 20:35:45 +00:00
phk
18a5d3fa64 I got that wrong,
lnc0	@ 0x280
	lnc1	@ 0x300

moved le0 into sorted sequence.
1995-04-10 19:13:51 +00:00
phk
f45bffb79d lnc0 is @ 0x300
lnc1 is @ 0x280
1995-04-10 19:12:29 +00:00
wollman
4bd9e735a6 Correct name `cd9660' for MOUNT_CD9660 (but NB that this whole table
is bogus and only exists for the benefit of find(1)).  Old name was
`iso9660fs'.

Submitted by:	Andrew Atrens <atreand@statcan.ca>
1995-04-10 18:52:40 +00:00
ache
5c218cf305 sdattach: print out cyl/hd/sec info in the same format as wd driver does
as default case, very helpful in many cases.
1995-04-10 18:44:49 +00:00
joerg
27728dbdc0 There have been a few occasions where some actions could dereference
uninitialized tty pointers early during boot; it got very obvious when
pressing Alt-F11 after a boot -c.
1995-04-10 18:34:51 +00:00
dg
c9aa8e2bc6 Further satisfy my paranoia by making sure that the ACKNOW is only
set when ti_len is non-zero.
1995-04-10 17:37:46 +00:00
dg
29f8feab9e Fixed bug I introduced with my Nagel hack which caused tcp_input and
tcp_output to loop endlessly. This was freefall's problem during the past
day.
1995-04-10 17:16:10 +00:00
dg
edd2e07c91 Added splnet protections for PCB list manipulations and traversals. 1995-04-10 08:52:45 +00:00
phk
7e731c5d07 Changes to make FreeBSD use a CDROM as rootdev, for installation purposes.
If "BOOTCDROM" is defined, you get this pretty special case stuff.
1995-04-10 07:44:31 +00:00
ache
9e71f4b5e9 Call ptsstop in ptsclose instead of ptcwakeup 1995-04-10 01:45:43 +00:00
dg
cd51aefb3b Backed out Jordan's #include of queue.h 1995-04-10 00:43:18 +00:00
ache
a73ccaef2d ptcwakeup() was called from wrong places 1995-04-09 22:28:24 +00:00
jkh
bec47d2918 #include <sys/queue.h> or die horribly. 1995-04-09 16:46:47 +00:00
jkh
7d1fb8167a Part of Frank Durda IV's new matcd driver CD audio support.
Submitted by:   Frank Durda IV <uhclem%nemesis@fw.ast.com>
1995-04-09 15:50:48 +00:00
jkh
e0949c1367 This is the new submission of the matcd driver. In addition to the
new driver code, there are diffs to several other existing files
on the system and a man page.

This version of matcd implements the rest of the key ioctls related to
playing audio CDs and reading table of contents information from any
type of disc.

This update also corrects several problems detected since the original
version 1(10) was released.  These include:
1.	Jordons report on the kernel -c string problem.
2.	A problem with the driver being confused by other types of
	devices located at addresses it probes.
3.	An old CD TOC wouldn't always be cleared after a disc change.
4.	Cleaned up code so -Wall yields no warnings on 2.0 and later.
5.	A problem with drive getting out of sync with the driver when
	changing between CD-Data and CD-DA.

There have only been two reports from the field relating to problems
so either the first release isn't really being used or doesn't have
many problems.

If there are any problems with this submission, please let me know.

Submitted by:	Frank Durda IV <uhclem%nemesis@fw.ast.com>
1995-04-09 15:50:27 +00:00
jkh
dd8c269c96 Bump this to 950408-SNAP. 1995-04-09 07:17:45 +00:00
gibbs
b85b30828d More code optimizations. Use a slightly different approach to decide
whether a reconnecting target is a tagged device or not.
1995-04-09 06:40:16 +00:00
gibbs
01c2880911 Disable tagged queuing by default. option AHC_TAGENABLE will turn it on.
This is temporary until I can get a device flags added.
1995-04-09 06:39:01 +00:00
rgrimes
798677e519 Increase the timeout for FTCMD_SEEK commands to complete from 1 second to
1.5 seconds in ftintr_wait().

Three people have reported that this fixes the problem they are having.

Submitted by:	Steve Gerakines <steve2@genesis.tiac.net>
1995-04-09 06:23:12 +00:00
dg
39595648ad From John Dyson: Disabled multi-sector I/O. It is causing some people
problems.
1995-04-09 06:09:31 +00:00
dg
a68a51bd80 Changes from John Dyson and myself:
Fixed remaining known bugs in the buffer IO and VM system.

vfs_bio.c:
Fixed some race conditions and locking bugs. Improved performance
by removing some (now) unnecessary code and fixing some broken
logic.
Fixed process accounting of # of FS outputs.
Properly handle NFS interrupts (B_EINTR).

(various)
Replaced calls to clrbuf() with calls to an optimized routine
called vfs_bio_clrbuf().

(various FS sync)
Sync out modified vnode_pager backed pages.

ffs_vnops.c:
Do two passes: Sync out file data first, then indirect blocks.

vm_fault.c:
Fixed deadly embrace caused by acquiring locks in the wrong order.

vnode_pager.c:
Changed to use buffer I/O system for writing out modified pages. This
should fix the problem with the modification date previous not getting
updated. Also dramatically simplifies the code. Note that this is
going to change in the future and be implemented via VOP_PUTPAGES().

vm_object.c:
Fixed a pile of bugs related to cleaning (vnode) objects. The performance
of vm_object_page_clean() is terrible when dealing with huge objects,
but this will change when we implement a binary tree to keep the object
pages sorted.

vm_pageout.c:
Fixed broken clustering of pageouts. Fixed race conditions and other
lockup style bugs in the scanning of pages. Improved performance.
1995-04-09 06:03:56 +00:00
dg
6be26dbe4b Changes from John Dyson and myself:
Fixed remaining known bugs in the buffer IO and VM system.

vfs_bio.c:
Fixed some race conditions and locking bugs. Improved performance
by removing some (now) unnecessary code and fixing some broken
logic.
Fixed process accounting of # of FS outputs.
Properly handle NFS interrupts (B_EINTR).

(various)
Replaced calls to clrbuf() with calls to an optimized routine
call vfs_bio_clrbuf().

(various FS sync)
Sync out modified vnode_pager backed pages.

ffs_vnops.c:
Do two passes: Sync out file data first, then indirect blocks.

vm_fault.c:
Fixed deadly embrace caused by acquiring locks in the wrong order.

vnode_pager.c:
Changed to use buffer I/O system for writing out modified pages. This
should fix the problem with the modification date previous not getting
updated. Also dramatically simplifies the code. Note that this is
going to change in the future and be implemented via VOP_PUTPAGES().

vm_object.c:
Fixed a pile of bugs related to cleaning (vnode) objects. The performance
of vm_object_page_clean() is terrible when dealing with huge objects,
but this will change when we implement a binary tree to keep the object
pages sorted.

vm_pageout.c:
Fixed broken clustering of pageouts. Fixed race conditions and other
lockup style bugs in the scanning of pages. Improved performance.
1995-04-09 06:02:46 +00:00
dg
ec1da6645e Cosmetic changes. 1995-04-09 05:40:38 +00:00
dg
2e7fa9cc68 From Matt Thomas: Added support for 100Mb cards (such as the DEC DE-500-XA
and SMC 9332).
1995-04-09 04:46:15 +00:00
dg
0294ad93f7 Implemented PCB hashing. Includes new functions in_pcbinshash, in_pcbrehash,
and in_pcblookuphash.
1995-04-09 01:29:31 +00:00
dg
76e7284b1f Added a few more entries to the list of prime numbers. 1995-04-09 01:19:25 +00:00
phk
274c0ec7e7 Move default address of lnc0 to 0x300. Luigi Rizzo said that his card
cannot even go below 0x300...
1995-04-08 21:41:52 +00:00
joerg
36d79e32c9 Implement a simple hook (or hack?) to allow graphics device console
drivers to protect DDB from being invoked while the console is in
process-controlled (i.e., graphics) mode.

Implement the logic to use this hook from within pcvt.  (I'm sure
Søren will do the syscons part RSN).

I've still got one occasion where the system stalled, but my attempts
to trigger the situation artificially resulted int the expected
behaviour.  It's hard to track bugs without the console and DDB
available. :-/
1995-04-08 21:32:11 +00:00
ache
57f785ceab pca: change IO_PPI to IO_TIMER1 due to syscons conflict 1995-04-08 16:08:35 +00:00
joerg
ab9ab079e0 Some long-waiting fixes for the COFF module. They silence compiler
warnings and are cosmetic only.  Poul once requested them, but neither
Sean nor Søren commented on them, so i commit it now before it's
getting lost some day.
1995-04-08 15:52:30 +00:00
joerg
6a06a0c94e Update pcvt to 3.20 b24 1995-04-08 15:49:25 +00:00
phk
5dc5be5b42 Driver for 3c505 boards. Uses the onboard firmware, which is not a good
way to do it.  Doesn't support DMA or high speeds.

Contributed by:	Dean Huxley <dean@fsa.ca> via NetBSD
1995-04-08 09:39:36 +00:00
phk
e599f61d4c Added the "eg0" interface driver for the 3Com "3c505" or "etherlink/+"
card.  This is the braindamaged card with the 80186 CPU on it.  It is
slow, probably not very good after all, but hey, if you have one lying
around doing nothing anyway...

Added the "zp0" driver to GENERIC.
1995-04-08 09:36:04 +00:00
ache
53db1e84ff Add port IO_PPI for pca per Bruce suggestion 1995-04-06 14:01:20 +00:00
ache
bc60432a5a Print "on isa" for devices with port==0 per Bruce suggestion 1995-04-06 13:55:56 +00:00
rgrimes
740b51be4f Output the CPU features line during the probe on a seperate line, for
folks with lots of features the output use to wrap and look ugle.

Reviewed by:	phk
1995-04-06 07:55:42 +00:00
rgrimes
67d63d1cd7 Correct recalibrate/seek code at attach time so that we do not get
all the ``fdc0: ready for output in input'' messages when probing
for ft devices.

Submitted by:	Steve Gerakines <steve2@genesis.tiac.net>
1995-04-06 07:20:16 +00:00
jkh
6848e21caa 0x330 is the default address for SB Midi, not 0x300
Submitted by:	Doug Rabson <dfr@render.com>
1995-04-06 03:22:12 +00:00
jkh
7e87aa6a71 Correct the watchdog routine.
Submitted by:	"Serge A. Babkin" <babkin@hq.icb.chel.su>
1995-04-05 13:12:13 +00:00
olah
3b47571b11 Fix a bug in tcp_input reported by Rick Jones <raj@hpisrdq.cup.hp.com>.
If a goto findpcb occurred during the processing of a segment, the TCP and
IP headers were dropped twice from the mbuf which resulted in data acked
by TCP but not delivered to the user.
Reviewed by:	davidg
1995-04-05 10:32:14 +00:00
dg
b1cc50eb7e From Matt Thomas: Finished EISA support. 1995-04-05 08:19:23 +00:00
nate
5005adc204 Modify behavior of INCLUDES to never look in /usr/include unless we
can't find the src/include directory.

Reviewed by:	"Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
Submitted by:	Mike Pritchard <pritc003@maroon.tc.umn.edu>
1995-04-05 04:10:58 +00:00
ache
e3cb6c0433 Print "on motherboard" for isa? devices with id_iobase == 0 1995-04-04 22:48:40 +00:00
sos
a30a49e1dc Fixes to the hardware cursor emulation.
Submitted by:	ache
1995-04-04 20:06:26 +00:00
dg
306213f51b Added UIO_NOCOPY. 1995-04-04 17:01:49 +00:00
ache
70374e656d Move unit structure member down to optimize com->state per Bruce
suggestion. Move hotchar setting to set_bypass routine and rename it
to disc_optim
1995-04-04 16:26:04 +00:00
dg
a8bbfa41f1 Check for case of blkno already known to avoid unnecessary VOP_BMAP's.
Submitted by:	John Dyson
1995-04-04 02:10:17 +00:00
dg
334fcee0bb Added prototype for phashinit() function. 1995-04-04 02:02:28 +00:00
dg
135d8d9bc7 kern_subr.c:
Added a new type to uiomove - "UIO_NOCOPY" which causes it to update
pointers and counts, but doesn't do any data copying. This is needed
for upcoming changes to the way that the vnode pager does its page
outs.
Added a new hash init function call "phashinit" that allocates and
initializes a prime number sized hash table.

vfs_cache.c:
Changed hashing algorithm to use the remainder of dividing by a prime
number to improve the distribution characteristcs. Uses new phashinit
function in kern_subr.c.
1995-04-04 02:01:13 +00:00
dg
80066182b2 Fixed the formatting breakage I added in the previous commit. 1995-04-04 01:35:33 +00:00
ache
c1c6d1eaad Allow serial console BREAK to DDB
Use com->unit in several places
1995-04-03 10:29:14 +00:00
nate
cae449436a Added -I/usrinclude to the tail end of the INCLUDES line. This hack
will cause kernel compiles to work even if the src/includes directory
doesn't exist but still do the 'Right Thing' and pull files from the
source tree if it does exist.

Reviewed by:	Bruce Evans
1995-04-03 01:13:50 +00:00
wpaul
d8775565b9 Fix implicit declaration the right way. (This has not been a good
weekend for me.)
1995-04-03 00:25:06 +00:00
wpaul
c99c9fdc51 Fix implicit declaration of cngetc(). 1995-04-02 23:02:17 +00:00
ache
4985790c3b Back out changes related to locked bits until more elegant
solution will be found. Remove some unused variables sneaked in.
1995-04-02 19:28:58 +00:00
ache
7345e3632c Back out changes related to locked bits until more elegant solution will be
found. Fix flags declarations.
1995-04-02 19:26:50 +00:00
bde
b191ef7fb2 Remove redundant declarations. 1995-04-02 19:05:09 +00:00
joerg
9c27169626 Attempt to fix the `you can log into console only once' problem (PR
#179).  The fix implements a ttyhalfclose() (sort of), resetting the
session and pgrp pointers when the physical device is about to be
closed.

Suggested by: bde
1995-04-02 16:14:51 +00:00
ache
4ef8e00fc8 Fix error:
old type (stty) ioctls can easily bypass locking bits.
It involves manual conversion from old ioctls to new ones,
large piece of code duplicated from tty_compat.c
1995-04-02 04:21:09 +00:00
ache
0c265655a9 Fix error in TIOCSETC/TIOCSLTC, they need to call TIOCSETA.
Remove static from some functions, needed in sio (later)
1995-04-02 04:15:08 +00:00
ache
e0c421b8ae Return EINVAL instead of setting wrong in/out speed
Fix declaration of cc arrays
Remove static from compatspcodes, will needed in sio (later)
1995-04-02 03:51:53 +00:00
ache
ba8fc3a200 Move SET_BYPASS macro to function per Bruce suggestion.
Add set_bypass() call after l_close.
Move ttioctl()/set_bypass() pair under spltty() protection
1995-04-02 01:47:06 +00:00
wpaul
dcde10f10b Add declaration for struct ether_addr (this is where Sun documents
it to go).
1995-04-02 01:26:26 +00:00
bde
a5f4345bbd Fix slioctl(). It has to return -1 for ioctls that it doesn't know about
so that these ioctls can be handled by the calling layer(s).

Clean up the recently added code:
- include the appropriate header to declare an implicitly declared function.
- declare timeout functions correctly and remove numerous bogus casts that
  hid (but didn't fix) their incorrectness.
1995-04-02 00:11:48 +00:00
ache
fae695e434 Move setting BYPASS state to macro, use it in several times,
after ttioctl too, because it can change t_line.
Remove (TS_CNTTB | TS_LNCH) test, it is always inherits from
old tty mode and can't be reach in currently setted mode.
1995-04-01 23:56:08 +00:00
ache
dbfba204e4 Adjust TS_CAN_BYPASS_L_RINT state after l_open(), t_line
can be changed there.
1995-04-01 22:57:43 +00:00
ache
7b33b4d7f6 slopen() never sets t_line to SLIPDISC, but uses slip-specific queue allocation 1995-04-01 22:11:10 +00:00
joerg
52c166da0d subr_prf.c used to provide an exported function kprintf(), but only had
a private declaration for it.  Declare the function publically instead.
1995-04-01 20:19:00 +00:00
joerg
80157b8981 Correct a few minor things in pcvt:
o  the includes are now properly done by <sys/foo.h> instead of "foo.h"
o  a bunch of undeclared functions has been resolved
o  pcvt finally supports devconfig
1995-04-01 20:16:15 +00:00
bde
d88533eafa Fix count in mark_for_update() for insert-char(s) and delete-char(s).
Everything from the cursor to the end of the line must be updated.

Fix comment about erase-char(s).
1995-04-01 19:57:36 +00:00
gibbs
ee25bcf5b2 Log ABORT_TAG messages to the console.
When attempting to abort a command, don't assume that just because the
sequecer happens to have SCBPTR pointing at the scb we want that it is
an active command.
1995-04-01 19:53:04 +00:00
gibbs
957a98f387 Off by one error in -MSG-START+0 was just Justin being tired -- revert to
old value.

Remove unnecessary check for active messages in setup SCB.  This same test
would also jump to p_mesgin_done which would "ACK" an extra time possibly
confusing the target.

Tell the kernel driver whenever we send an ABORT_TAG message.
1995-04-01 19:51:40 +00:00