Commit Graph

62 Commits

Author SHA1 Message Date
Rodney W. Grimes
b648f67ad6 Moved /sys/scsi code files information to independed files file where it
should have always been.
1993-08-20 08:53:08 +00:00
Andrew Moore
5bb374bc76 patch 1of2 to prevent kill -1 syslogd from hanging the console
blindly applied patch provided by Christoph Robitschko:
*** cons.c.orig	Sat Jun 12 07:57:53 1993
--- cons.c	Thu Aug 19 22:34:53 1993
***************
*** 56,61 ****
--- 56,62 ----
  #include "sys/tty.h"
  #include "sys/file.h"
  #include "sys/conf.h"
+ #include "sys/vnode.h"

  #include "cons.h"

***************
*** 105,118 ****
--- 106,130 ----
  	(*cp->cn_init)(cp);
  }

+ static struct vnode	*cnopenvp = NULLVP;
+
+
  cnopen(dev, flag, mode, p)
  	dev_t dev;
  	int flag, mode;
  	struct proc *p;
  {
+ 	int		error;
+
+
  	if (cn_tab == NULL)
  		return (0);
  	dev = cn_tab->cn_dev;
+ 	if (cnopenvp == NULLVP)
+ 		if ((error = getdevvp(dev, &cnopenvp, VCHR))) {
+ 			printf("cnopen: getdevvp returned %d !\n", error);
+ 			return(error);
+ 		}
  	return ((*cdevsw[major(dev)].d_open)(dev, flag, mode, p));
  }

***************
*** 121,130 ****
  	int flag, mode;
  	struct proc *p;
  {
  	if (cn_tab == NULL)
  		return (0);
  	dev = cn_tab->cn_dev;
! 	return ((*cdevsw[major(dev)].d_close)(dev, flag, mode, p));
  }

  cnread(dev, uio, flag)
--- 133,153 ----
  	int flag, mode;
  	struct proc *p;
  {
+ 	int		error;
+
+
  	if (cn_tab == NULL)
  		return (0);
  	dev = cn_tab->cn_dev;
! 	if (vcount(cnopenvp) <= 1)
! 		error = (*cdevsw[major(dev)].d_close)(dev, flag, mode, p);
! 	else
! 		error = 0;
! 	if (error == 0) {
! 		vrele(cnopenvp);
! 		cnopenvp = NULLVP;
! 	return(error);
! 	}
  }

  cnread(dev, uio, flag)
1993-08-20 05:46:09 +00:00
Andrew Moore
7aed710168 added Bustek 545 support (patch from Christoph Robitschko):
*** aha1542.c~	Thu Aug 19 14:25:33 1993
--- aha1542.c	Thu Aug 19 14:25:49 1993
***************
*** 954,959 ****
--- 954,960 ----
  	printf("aha%d:",unit);
  #define	PRNT(x) printf(x)
  #endif	__386BSD__
+ 	DELAY(1000);	/* for Bustek 545 */
  	aha_cmd(unit,0, sizeof(conf), 0 ,&conf, AHA_CONF_GET);
  	switch(conf.chan)
  	{
1993-08-19 21:32:59 +00:00
Rodney W. Grimes
3b3837db61 Fixed poor timeout code in out_fdc. The timeout counter was not being
reinitialized between while loops.  Added comments about what was going
on in the out_fdc routine.

out_fdc now returns if the direction bit is not set in time instead of
trying to wait for MRQ to get cleared.
1993-08-12 09:21:20 +00:00
Rodney W. Grimes
1acce5a995 Removed one more reverence to the old Adaptec 1542b as.c driver, one less
dependent for autoconf.c.
1993-08-10 10:18:33 +00:00
Rodney W. Grimes
a08d4ed348 Finish removal of reminents of as.c Adaptec scsi driver. 1993-08-09 19:02:21 +00:00
Rodney W. Grimes
1ce6e34045 Moved _eintr{names,cnt} so that vmstat -i does not report all the debugging
stuff of the fast interrupt code.
1993-08-09 18:20:26 +00:00
Rodney W. Grimes
fc1fd08682 Removal of support for old scsi as.c driver, removal off old unneeded
kernel config files since AH?TEST are now supported by GENERICISA,
and the others used the old as driver they are no longer valid.
1993-08-09 14:39:37 +00:00
Rodney W. Grimes
78d172cab6 From guido@gvr.win.tue.nl Sat Aug 7 06:58:04 1993
I posted some patches on the 386bsd_patchkit list to prohibit io access.
Because of a noninitialised filed in the tss, this was possible.
It is included below as the patch to machdep.c
However, when you do this *necessary* fix (security), it will be
impossible form within user space to do io.

therefor, I included another fix: when you open /dev/io, you
get the access. Of course you can rewrite it to use another minor
and thus giving access to the iospace when /dev/mem is opened, e.g.

NOTE: The /dev/io entry has not been added to /dev/MAKEDEV yet.
The patch is in NetBSD.
1993-08-09 06:16:42 +00:00
Rodney W. Grimes
0f5b6b9987 Fixed for DQFLQUIET flag from: Terry Lee <terry@uivlsisd.csl.uiuc.edu>
I submitted the part of patch00155 that fixes wd.c not reporting any
bad blocks.  Unfortunately, the patch created a new problem that makes new
installations using that kernel impossible.  I have included a patch below that
should fix both problems.  The fix comes from Tom Ivar Helbekkmo's wd driver
(the Norway wd driver).  I've also eliminated the use of the DKFL_QUIET flag
completely, since it is not used anymore.

Fixed wdgetctrl routines for so that it returns a meaniful string for
non IDE disk drives.  It also nolonger returns success when a drive is
not really there.
1993-08-08 07:03:21 +00:00
Rodney W. Grimes
3db77f6ee9 Removed the asking for a root file system when booting from floppy as that
is now handled by the new boot blocks immediatly after the kernel is loaded.
1993-08-08 06:24:15 +00:00
Rodney W. Grimes
7e00252602 Added printf for cases AHB_ASN (async even notification) and AHB_HW_ERR so
that we are notified when these events occur.  This may lead us to the
cause of certain AHB timeout/lockup problems.

From: Roy Neese of Adaptec
1993-08-08 04:46:37 +00:00
Rodney W. Grimes
2ea3f75bd2 Fixed **probing for scsi devices** message to have a controller and unit
message on the begining of it:
aha0: **probing for scsi devices**
1993-08-06 11:59:06 +00:00
Nate Williams
4ff3cd9d3d Fix the problem where newvers gets called every time make is run on
the kernel.
1993-08-04 23:51:59 +00:00
David Greenman
0d1a37c0f1 * Fixed problem where some rev 8013EBT boards want the DCR_LS flag
* set in order to work in 16bit mode.

   Seems also to improve performance by 15%! (?!) I think there might
be more to this flag than the manual says.
1993-08-02 10:36:05 +00:00
Jordan K. Hubbard
c3b435bb51 Updated syscons to 0.2b - please test this! It won't be in the ALPHA
release, but it's still worth testing.
1993-07-30 02:20:26 +00:00
Jordan K. Hubbard
e5d2fcc149 Free'd up major number assigned to codrv. 1993-07-30 00:57:06 +00:00
Jordan K. Hubbard
e483a5b233 Removed entries for codrv, nuked sample config file since no longer necessary. 1993-07-30 00:56:31 +00:00
Nate Williams
02e451a8a9 Syncing our sources back with Julian's, and removing PATCHKIT headers.
Large Bustek changes, most everything else is minimal.
1993-07-29 11:55:37 +00:00
Nate Williams
f798d06073 fts(3) integration patches 1993-07-28 01:42:17 +00:00
David Greenman
269312019a * Applied fixes from Bruce Evans to fix COW bugs, >1MB kernel loading,
profiling, and various protection checks that cause security holes
  and system crashes.
* Changed min/max/bcmp/ffs/strlen to be static inline functions
  - included from cpufunc.h in via systm.h. This change
  improves performance in many parts of the kernel - up to 5% in the
  networking layer alone. Note that this requires systm.h to be included
  in any file that uses these functions otherwise it won't be able to
  find them during the load.
* Fixed incorrect call to splx() in if_is.c
* Fixed bogus variable assignment to splx() in if_ed.c
1993-07-27 10:52:31 +00:00
David Greenman
49386830c3 * Added include of systm.h to pick up inlined min/max/bcmp if you have
* them in cpufunc.h. Modified wait loop in reset to look a little better.
 * Added read for talley counters to prevent an infinite loop on old
 * 8003E's if they (the counters) overflow.
1993-07-27 03:13:50 +00:00
Jordan K. Hubbard
0f8495d03c Sample kernel config for syscons. 1993-07-26 21:27:38 +00:00
Jordan K. Hubbard
916347f77e Added necessary files for syscons (may move font include later, but for now
it's easier to leave there since I don't feel like breaking anything).
1993-07-26 21:21:11 +00:00
Jordan K. Hubbard
37338777df Added entry for syscons. 1993-07-26 21:19:30 +00:00
David Greenman
d0338d9612 Fixed logic problem which caused a bogus value to be written to the 3c503
asic register even if the board isn't a 3c503. This caused old 8003E's not
to work because they ignore IO address bits >10bits and the 3c503 asic is
located at +0x400....the offset was ignored by the 8003E and so the
value was written to one of the NIC registers. The bug was discovered by
Wolfgang Solfrank.
1993-07-25 23:43:30 +00:00
Rodney W. Grimes
5bd44448a9 Very small patch from Julian Elischer to make the ultra14f.c driver work
with the 34f as well.
1993-07-22 00:56:23 +00:00
Paul Richards
31e73a990a Fixed attach printfs for new format (thanks Chris) 1993-07-21 06:07:58 +00:00
Paul Richards
d55523f96b Added statistical counters ipackets,opackets etc. 1993-07-21 04:18:47 +00:00
David Greenman
69a164c5e3 Added config file override for memory size and added flags to force
8bit or 16bit operation, and a flag to disable transmitter double buffering.
   See the updated "ed.relnotes" file for information about how to set
the flags.
   This should be considered the first "production"  release. It still
needs a manual page, though.
1993-07-20 23:16:50 +00:00
Jordan K. Hubbard
ba52f64934 Applied Andrew's patch to fix loop-on-logout problem. 1993-07-20 02:06:49 +00:00
Jordan K. Hubbard
c58613f344 Changed comment relating to memsize to be a little less misleading. 1993-07-20 02:02:12 +00:00
Jordan K. Hubbard
2a1e5244b2 Fixed to allow iosiz config parameter to override what was (for me,
incorrectly) probed.  This allows you more flexibility in getting weird
WD 80x3 clones to work.
1993-07-20 01:39:24 +00:00
Jordan K. Hubbard
bb5d729efe Removed check for interrupting board before interrupts were enabled.
This should result in more AST clones getting seen.
1993-07-20 00:22:30 +00:00
Rodney W. Grimes
7ea04e18b1 Fixed sccs id to be From:\n com.c xxxx. The sccs id was changed by the
patch kit and it should not have been.
1993-07-18 21:27:57 +00:00
Paul Richards
1e41bb4918 Fixed warning from gcc1 (but not gcc2 for some reason).
2nd parameter to isread was unsigned char and function declaration was for
char. Changed function declaration to unsigned char.
1993-07-18 20:57:34 +00:00
Paul Richards
75124a8b13 Added volatile void to cpu_exit() in the hope that it would
stop warning about returning from gcc.

It hasn't but the declaration is still correct.
1993-07-18 20:56:17 +00:00
Paul Richards
a94a9c9493 Small fix to correct warning --
missing cast of u_short to int in isread call.
1993-07-18 04:18:00 +00:00
David Greenman
80b939867b New locore from Christoph Rubitschko. 1993-07-16 23:55:07 +00:00
David Greenman
01ae5b20df Updated kernel files to move occurances of "struct args" syscall
argument definitions outside of the function parameter list.  This is
to reduce the copious warning messages that (non-Jolitz) gcc produces.
Also fixed some bogus variable declarations and casts to make the
compiler happy.
1993-07-16 20:50:44 +00:00
Rodney W. Grimes
6d36c167f4 Changed header from 386BSD BOOT to FreeBSD BOOT. 1993-07-16 13:06:08 +00:00
David Greenman
2a6c898016 Modified attach printf's so that the output is compatible with the "new"
way of doing things. There still remain several drivers that need to
be updated.  Also added a compile-time option to pccons to switch the
control and caps-lock keys (REVERSE_CAPS_CTRL) - added for my personal
sanity.
1993-07-15 17:53:14 +00:00
Rodney W. Grimes
0d01087b28 From Bruce Evans:
lpt doesn't work here if the printer is not turned on at boot time (this
has been reported for other systems).

lpt has a weird mapping of the flag bits vs printer numbers and MAKEDEV
does not understand this (printer 0 uses minor numbers 0-0x3f, printer 1
uses minors 0x40-0x7f, etc).

The following (simpler) problems are fixed by the patch.

lpt did not check the minor number on open, so if NLPT1 == 1 and you
try to open printer 1 then random memory above the lpt_sc array is
accessed.  I thought I had this problem for minors 1 and 2.  However,
it does not actually occur until minor 0x40.  Does anyone have lpt64?

lpt had several unnecessary && broken ANSIisms and other sloppy
declarations.

Bruce
1993-07-13 18:52:49 +00:00
Charlie Root
f7710986e2 New boot blocks, from Bruce Evans, and NetBSD fixes. Allows kernel to
be loaded above 1MB.  Same boot code for floppies now.  Speed improvements.
etc etc etc. (I don't have much history on this, but then have been tested)
1993-07-13 18:15:32 +00:00
Rodney W. Grimes
605d655975 Fixed two occarances of ldos which should have been lods.
(From Christoph Robitschko)
1993-07-12 09:34:38 +00:00
Rodney W. Grimes
f2a2ec318a For all ed0 driver lines removed iosiz 8192, and fixed the weintr to be
edintr (error from last time I updated these)
1993-07-12 09:30:31 +00:00
Jordan K. Hubbard
e51a2feb26 Put if_we driver well and truly back into the kernel. 1993-07-09 01:17:46 +00:00
Paul Richards
8efffeb95f Added copyright message -- it didn't have one before 1993-07-09 00:09:34 +00:00
Charlie Root
c26491ecf4 Increased default data size (DFLDSIZ) to 16MB. Need to rebuild libutil,
kernel, ps and w for this to work!
1993-07-03 21:21:35 +00:00
Nate Williams
beb7ebb072 Added (protection) around negative constants, in case a program wants
to use the negative of that constant.

#define NEG_NUM -3
#define SAFE_NEG_NUM (-3)

i = -NEG_NUM;		/* Error --3 */
j = -SAFE_NEG_NUM	/* Okay -(-3) */
1993-06-30 22:59:18 +00:00