Commit Graph

7218 Commits

Author SHA1 Message Date
Justin T. Gibbs 5154778752 Enlarge the message out buffer from 6 to 8 bytes. Now that sync and wide
negotiation messages may be tagged, we were overrunning the old buffer.
The variable that was getting squashed is updated before the message goes
out, causing corrupted SDTR or WDTR messages.  Depending on the phases
traversed before message out, this could cause the wrong offset to be
negotiated allowing data overruns to occur.  The problem is easier to
detect with wide targets on the chain since the allowed offset is smaller.

Also removed the unnecessary  clearing of SPIORDY during the message out
phase.  We don't rely on SPIORDY any more.
1997-02-18 20:22:52 +00:00
Nate Williams 9b4e82f125 Try to make the BROKEN_VLSI chipset detection better, and not break
non-broken chipssets whose ID is 0x84, such as the one found in the NEC
6030H.

> The code relies on the assumption that on a genuine_broken vlsi, you
> don't get 0x84 when probing slot 1 in the normal location.  On the versa I
> do get 0x84 when probing slot 1 in the normal location.  What you get on
> genuine_broken at the normal slot 1 location is unknown to me;

Submitted by:	Chris Timmons <skynyrd@opus.cts.cwu.edu>
1997-02-18 19:20:52 +00:00
Bruce Evans b0a5b85d06 Fixed biosboot to compile with Lite2. <sys/lock.h> is now a prerequisite
for <ufs/ufs/inode.h>.
1997-02-18 15:09:39 +00:00
Bruce Evans d314500e7e This now uses queue macros. Include <sys/queue.h> if !KERNEL to preserve
the documented interface.
1997-02-18 15:03:17 +00:00
Bruce Evans a8687b6dcd Added some ufs #includes so that this compiles with option LOCKF_DEBUG.
Moving this all from ufs wasn't a good move.  At least the debugging
routines depend on the file system.

Cleaned up the LOCKF_DEBUG #includes.
1997-02-18 14:37:26 +00:00
Bruce Evans 697030ed3d Removed vestiges of Mach lock types.
vm_map.h:
Removed #include of <sys/proc.h>.  curproc is only used in some macros
and users of the macros already include <sys/proc.h>.
1997-02-18 14:07:03 +00:00
Bruce Evans cd9307f60d Changed type of t_line from u_char to int. The Lite2 merge blew away
rev.1.6 which changed it from char to int.
1997-02-18 09:26:15 +00:00
Bruce Evans 78fd7b3d49 Fixed namei caching for LOOKUPs. It was broken for lstat() and olstat().
Successful lstat()s purged an existing entry as well as not caching the
result.

This bug was introduced in Lite1 by setting the LOCKPARENT flag for
[o]lstat() in order to support the inherit-attributes-from-parent-
directory misfeature for symlinks.  LOCKPARENT was previously only set
for CREATEs and DELETEs.  It is now set for LOOKUPs, but only for
[o]lstat(), so the problem wasn't very noticeable.
1997-02-18 06:46:41 +00:00
Bruce Evans 25ed2ac223 Changed `#ifdef COMPAT_PRELITE2' to `#ifndef NO_COMPAT_PRELITE2' so that
the old VFS_VFSCONF sysctl is enabled by default.

Initialize the vfc_vfsops field to non-NULL in sysctl_ovfs_conf()
so that the old VFS_VFSCONF sysctl actually works.  The old (still
current) getvfsent.c uses this "kernel-only" field to decide which
vfs's are configured (the old implementation returned null entries
for unconfigured vfs's).
1997-02-18 04:58:11 +00:00
Bruce Evans bd6d39b941 Changed `#ifdef COMPAT_PRELITE2' to `#ifndef NO_COMPAT_PRELITE2' so that
old nfs mount calls are supported by default.
1997-02-18 04:40:38 +00:00
Justin T. Gibbs 4e605384b5 Don't rely on AAP(Auto Access Pause) when queueing SCBs to the card. This
will increase the overhead of queueing a command, but some recent bug reports
make me believe that AAP isn't really working and that we are losing some
SCBs from the input queue.  Hopefully this will cure that problem.

Fix some bugs in the error recovery code.  Mainly these could cause us to
inadvertantly forget to untimeout an SCB that was recovered causing later
confusion.
1997-02-18 04:25:31 +00:00
David Greenman 70e534e78f Pass P_SUGID on to the child of a fork(). It was possible to get rlogin
to coredump previously since it (somewhat uniquely) is setuid and forks
without execing, and thus without passing P_SUGID the child could
coredump and possibly divulge sensitive information (such as encrypted
passwords from the passwd database).
1997-02-17 10:58:46 +00:00
Bruce Evans f79ef55e7a Replaced START_ENTRY by _START_ENTRY. -current hasn't got my cleanup
of DEFS.h which renamed it.
1997-02-17 07:21:28 +00:00
Bruce Evans dab159e3d6 Select between the generic math functions and the i387-specific ones
at runtime.

etc/make.conf:
Nuked HAVE_FPU option.

lib/msun/Makefile:
Always build the i387 objects.  Copy the i387 source files at build
time so that the i387 objects have different names.  This is simpler
than renaming the files in the cvs repository or repeating half of
bsd.lib.mk to add explicit rules.

lib/msun/src/*.c:
Renamed all functions that have an i387-specific version by adding
`__generic_' to their names.

lib/msun/src/get_hw_float.c:
New file for getting machdep.hw_float from the kernel.

sys/i386/include/asmacros.h:
Abuse the ENTRY() macro to generate jump vectors and associated code.
This works much like PIC PLT dynamic initialization.  The PIC case is
messy.  The old i387 entry points are renamed.  Renaming is easier
here because the names are given by macro expansions.
1997-02-16 18:26:31 +00:00
Andrey A. Chernov a859cfcea9 Back ut FD_SETSIZE increasing until related kernel issues will be resolved 1997-02-16 06:39:43 +00:00
Andrey A. Chernov acc2427984 Bump default FD_SETSIZE from 256 to 1024 as many modern
systems do nowdays (like SunOs 5.5.1 f.e.)
256 is too small under real network load
1997-02-15 22:26:29 +00:00
Garrett Wollman d0390e0570 Fix the mechanism for choosing wehether to save the slow-start threshold
in the route.  This allows us to remove the unconditional setting of the
pipesize in the route, which should mean that SO_SNDBUF and SO_RCVBUF
should actually work again.  While we're at it:

- Convert udp_usrreq from `mondo switch statement from Hell' to new-style.
- Delete old TCP mondo switch statement from Hell, which had previously
  been diked out.
1997-02-14 18:15:53 +00:00
Garrett Wollman 4a26224c8d Send RTM_IFINFO messages whenever promiscuous and all-multicast
modes are enabled or disabled.
1997-02-14 15:30:54 +00:00
David Greenman 0305f20493 Changed timeout for requesting sense from 100ms to 1 second.
Submitted by:	gibbs
1997-02-14 03:13:37 +00:00
Bruce Evans 661e2ccd94 Changed #include order to match better order in 2.2. 1997-02-13 22:48:19 +00:00
Garrett Wollman 39191c8eb8 Provide PRC_IFDOWN and PRC_IFUP support for IP. Now, when an interface
is administratively downed, all routes to that interface (including the
interface route itself) which are not static will be deleted.  When
it comes back up, and addresses remaining will have their interface routes
re-added.  This solves the problem where, for example, an Ethernet interface
is downed by traffic continues to flow by way of ARP entries.
1997-02-13 19:46:45 +00:00
Garrett Wollman 30f700e9c7 Provide an alternative mbuf cluster allocator which permits use of
clusters greater than one page in length by calling contigmalloc1().
This uses a helper process `mclalloc' to do the allocation if
the system runs out at interrupt time to avoid calling contigmalloc
at high spl.  It is not yet clear to me whether this works.
1997-02-13 19:41:40 +00:00
Garrett Wollman 10825343b0 Provide an alternative interface to contigmalloc() which allows a specific
map to be used when allocating the kernel va (e.g., mb_map).  The VM
gurus may want to look this over.
1997-02-13 19:37:40 +00:00
KATO Takenori def9b7665d Synchronize with sys/i386/isa/syscons.c revision 1.201. 1997-02-13 18:43:50 +00:00
KATO Takenori 8ea8b7549d Synchronize with sys/i386/boot/biosboot/boot.c revision 1.62. 1997-02-13 18:41:03 +00:00
Garrett Wollman 5bee01c83f For large values of sb_max or MCLBYTES, it was possible for the expression
sb_max * MCLBYTES / (MSIZE + MCLBYTES)
used in sbreserve() to overflow, causing all socket creation attempts
to fail.  Force the calculation to use u_quad_t's, which makes overflow
less likely.
1997-02-13 18:05:46 +00:00
Bruce Evans 8363c19687 Get defaults for the boot device (and flags) from the file
"boot.config" (relative to the root directory on the 'a' partition
on the first BSD slice) if it exists.  If it doesn't exist, then
the only visible changes should be that the kernel name isn't reset
to "/kernel" after looking it up fails and that the default name
is now "kernel".

The new function readfile() can be used for other things:
- reading help messages.
- reading splash screens.
- reading userconfig info.
1997-02-13 13:15:47 +00:00
Søren Schmidt cc5625f0ed Oops, cut/paste could be done on tthe WRONG vty :(
pointed out by Kazu.
1997-02-13 11:58:49 +00:00
Bruce Evans a7d00b5bf6 Moved definition of FUNCTION_ALIGNMENT to a machine-dependent place.
Changed it from 4 to 16 for i386's.  It can be anything for i386's,
but compiler options limit it to a power of 2, and assembler and
linker deficiencies limit it to a small power of 2 (<= 16).
We use 16 in the kernel to get smaller tables (see Makefile.i386 and
<machine/asmacros.h>).  We still use the default of 4 in user mode.

Use HISTCOUNTER instead of (*kcount) in the definition of KCOUNT()
for consistency with other macros.
1997-02-13 10:47:29 +00:00
Bruce Evans 47cac30b9a Align text to 16-byte boundaries if profiling is enabled. This will
allow a fourfold reduction in the size of the profiling buffers.  This
goes with rev.1.91 of Makefile.i386 which does the same thing for C
functions.
1997-02-13 08:31:53 +00:00
Bruce Evans eb26546e6f Killed more FIFO ifdefs. All gone now. 1997-02-13 01:13:13 +00:00
Bruce Evans c626216f51 Removed FIFO ifdef again (see rev.1.5). 1997-02-13 00:42:10 +00:00
Bruce Evans 4f3850c2a8 Removed bogus B_AGE policy again (see rev 1.4).
Removed FIFO ifdef again (see rev.1.8).  This also fixes vfs initialization
since the VNODEOP_SET() was inside the ifdef.
1997-02-13 00:39:06 +00:00
Garrett Wollman 176395b2e8 Implement PRC_IFUP a la PRC_IFDOWN so that protocols know when an interface
has come bacl up (and can referse actions taken as a result of downing).
1997-02-12 18:54:32 +00:00
Mike Pritchard f3a778f288 Eliminate the last of the compile warnings in this module by
correctly casting the arguments to all of the null_bypass() calls.
1997-02-12 18:06:08 +00:00
Mike Pritchard fdc0430e50 Restore of #include <sys/kernel.h> so that this compiles without
warnings again.
1997-02-12 17:47:28 +00:00
Mike Pritchard 61f84e5b27 Don't depend on FIFO being defined to enable mkfifo.
It is now always compiled.

Submitted by:	bde
1997-02-12 16:55:32 +00:00
Mike Pritchard dc14cd9f1b This no longer depends on NFS being defined so that it
can check for an NFS root.  With Lite2, the file system
type can be checked by checking if the rootfs name == "nfs".
1997-02-12 16:46:25 +00:00
Mike Pritchard 670718e23a Remove function prototypes for vfs_mountroot and vgoneall, since
they were removed with the Lite2 merge.

Submitted by:	bde
1997-02-12 16:37:39 +00:00
Mike Pritchard 8092a8e143 Make this compile without warnings after the Lite2 merge:
- *fs_init routines now take a "struct vfsconf * vfsp" pointer
  as an argument.
- Use the correct type for cookies.
- Update function prototypes.

Submitted by:	bde
1997-02-12 16:31:27 +00:00
Mike Pritchard 10546e217e Rstored #include of <sys/kernel.h> so that this compiles
without warnings again.

Submitted by:	bde
1997-02-12 16:26:37 +00:00
Mike Pritchard fd7a659f2f Make this compile again after the Lite2 merge.
Call vget/VOP_UNLOCK with the correct number of
arguments.  Call vn_lock where appropriate.
vfs_goneall is now replaced by VOP_REVOKE.

Submitted by:	bde
1997-02-12 16:19:11 +00:00
Bruce Evans 5afe6df620 Fixed type mismatches. i_spare[N] in ufs/inode.h changed from long to
int.  Change ext2fs to match.  We probably already assume that ints have
>= 32 bits.
1997-02-12 15:35:18 +00:00
Mike Pritchard 63f50488b0 Make this compile again after the Lite2 merge.
Also add missing function prototypes.
1997-02-12 14:55:01 +00:00
Mike Pritchard aae8d53e0e Add missing function prototypes. 1997-02-12 14:54:14 +00:00
Bruce Evans 938958b97f Added parameter names to prototypes that were added in the last commit to
match nearby style.
1997-02-12 14:45:23 +00:00
Bruce Evans 9e67ea79f0 Restored #include of <sys/kernel.h> so that this compiles again. 1997-02-12 14:31:11 +00:00
Bruce Evans 86413edd9b Declare function args in order in recently K&Rised function headers. 1997-02-12 14:07:26 +00:00
Bruce Evans b52748bee5 Restored some lost function return types. 1997-02-12 14:00:00 +00:00
KATO Takenori 2f0fdf5504 Added check routine for memory window configuration. The probe
routine of C-NET(98) returns 0 when isa_dev->id_maddr == 0 or
isa_dev->id_msize == 0.
1997-02-12 13:39:24 +00:00
KATO Takenori 39a0888f8a Added memory addres and size of d8 (C-NET(98) network card). 1997-02-12 13:32:58 +00:00
Bruce Evans 56a956e530 Use a valid value for MSGSSZ
Don't specify PSM_CHECKSYNC twice.

Submitted by:	MSGSSZ by mi@aldan.ziplink.net
1997-02-12 09:47:31 +00:00
Mike Pritchard 72a5ee14de Add function protypes for the new Lite2 unionfs functions. 1997-02-12 07:54:22 +00:00
Steven Wallace 1a46116d9d Bug fix for SNDCTL_DSP_GETOSPACE ioctl. It would report 0 bytes
available in buffer when buffer was completely empty.
It now correctly reports the total buffer space available.

Reviewed by:	jkh, davidg
Obtained from:  Linux 1.3.20's sound driver code
1997-02-12 06:56:57 +00:00
Mike Pritchard 724ab19569 Add function prototypes for most of the new Lite2 functions.
Also made a few of the miscfs routines static to be
consistent.  Some modules simply required some additional
#includes to remove -Wall warnings.
1997-02-12 06:52:51 +00:00
Mike Pritchard 820d8cf44a Comment out a call to the #ifdef DIAGNOSTIC routine
vfs_bufstats().  This routine was not imported in the
Lite2 merge.
1997-02-12 06:46:11 +00:00
Nate Williams 8c1801dce9 In the disable_slot() routine, the variable "i" was
being used without ever being initialized.  From examining
the rest of the routine, it looks like this is a typo,
and it really should have been "1" instead of "i".

Submitted by:	mpp
1997-02-11 17:22:46 +00:00
Justin T. Gibbs a042d32c0b Fix a bug in the reporting of residuals. The code was relying on the SG_COUNT
filed in the hardware SCB not changing during the course of a transaction.
Since the sequencer now DMAs the hardware SCB back up to the host when it
detects a residual, this is no longer the case.  I added a field to the
"software" scb to mirror this information and it is now used for doing the
residual calculation.
1997-02-11 17:10:37 +00:00
Justin T. Gibbs 499c4ce9f6 Clear the DFCNTRL register after every busfree.
When setting the HCNT registers, do so in ascending order.

When performing tagged queueing in non-paging mode, also check the
disconnected bit in the SCB as extra sanity during a reconection.

Make the labels in the DMA routine more sane.

When doing a DMA, if we see the DMADONE condition come true, we can
simply turn of the DMA enable bits in DFCNTRL without testing the FIFO
state as HDONE is true when DMADONE is true and this emplies the FIFO is
empty.

These changes clear up the data overrun error messages and seem to prevent
the "timed out in data-in phase" problems.
1997-02-11 17:07:54 +00:00
Bruce Evans 596d40b9f4 Restored one line of "High Sierra" changes from rev.1.8.
The Lite2 changes in cd9660 are scarey.  I probably missed some
other lossage in this file.
1997-02-11 16:55:33 +00:00
Bruce Evans 49bb6bceaf Restored one line of "High Sierra" changes from rev.1.6 which was
blown away by the previous commit.

Not restored: trailing whitespace changes from rev.1.7.
Not restored: -Wall cleanup from rev.1.5.
1997-02-11 16:16:02 +00:00
Bruce Evans a9386c5274 Removed High Sierra task from TODO list. Joerg did it years ago and
other items were removed from the list when they were done in the
Lite2 merge.  The Lite2 merge just broke the High Sierra changes.
1997-02-11 16:15:15 +00:00
Bruce Evans 3d1713a8a5 Restored changes from rev.1.58-1.60 which were blown away by the
previous commit.
1997-02-11 15:03:31 +00:00
KATO Takenori 1c3ae72914 Deleted prototypes. They are in pc98_machdep.h. 1997-02-11 14:59:54 +00:00
KATO Takenori 33a262b0dc Synchronize with sys/i386/isa/if_ed.c revision 1.114. 1997-02-11 13:55:36 +00:00
KATO Takenori 512b30df54 Synchronize with sys/i386/conf/majors.i386 revision 1.12. 1997-02-11 13:54:44 +00:00
Julian Elischer db03b748e3 really minor cleanup
sc is set to ifp->if_softc so use it..
1997-02-11 09:29:48 +00:00
Garrett Wollman 1e49bd9cd3 Fix spelling of net.inet.ip.forwarding.
Add ARP_PROXYALL to defunct options.
1997-02-10 19:19:16 +00:00
Mike Pritchard 812ac98e83 Correct the new Lite2 #ifdef DIAGNOSTIC ffs_checkblk routine
to not return without setting a return value when it
can't read a block error or detects a bad cylinder group,
since the caller is expecting a return value.
It will now panic at this point, since the thing
to do in this case would be to return a "bad block"
status to the caller, and the caller will panic
anyways when that happens.

Also updated to panic strings in this routine to read
"ffs_checkblk: ..." instead of "checkblk: ...".
1997-02-10 17:05:30 +00:00
Mike Pritchard b49b12158f Make this compile again after the Lite2 merge.
VOP_UNLOCK was being called with the wrong mumber of arguments.

Also silenced a -Wall warning.
1997-02-10 16:34:16 +00:00
Mike Pritchard 59942ba155 Make this compile again after the Lite2 merge.
VOP_UNLOCK was being called with the wrong mumber of arguments.
1997-02-10 16:32:52 +00:00
Mike Pritchard 04a0d5e517 Make this compile after the Lite2 merge.
A non-existent variable was being used.
1997-02-10 16:29:32 +00:00
Mike Pritchard d2b52eb257 Make ffs_subr.c compile when DIAGNOSTIC is defined.
It looks like this was broken before the Lite2 merge :-(.
VOP_BMAP was being called with the wrong number of arguments.
1997-02-10 16:27:53 +00:00
Mike Pritchard 06bcc9e510 Make ccd compile again after the Lite2 merge.
VOP_UNLOCK was being called with the wrong number of arguments.
1997-02-10 16:24:33 +00:00
Darren Reed 4b93480b2a IP Filter is now character device #79 1997-02-10 12:17:45 +00:00
KATO Takenori 6ed46f82d8 Synchronize with Lite/2 commit: i386/i386/machdep.c, i386/i386/trap.c,
i386/isa/fd.c and i386/isa/wd.c revisions 1.227, 1.87, 1.96 and 1.123,
respectively.
1997-02-10 11:53:20 +00:00
Darren Reed 55452e7f59 Add IP Filter .c files for "config" & "config.new" use. 1997-02-10 11:52:36 +00:00
Darren Reed afed1b4988 Add IP Filter hooks (from patches). 1997-02-10 11:45:37 +00:00
David Nugent 184989c210 Fix off by one error in setlogin() syscall.
Don't overwrite session login unless the call is going to succeed.
1997-02-10 06:18:20 +00:00
John Dyson 996c772f58 This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>
1997-02-10 02:22:35 +00:00
Justin T. Gibbs 62e2cfe42e ULTRAENB->FAST20 1997-02-09 03:27:09 +00:00
Justin T. Gibbs 21c89fbab3 ahc_search_qinfo->ahc_search_qinfifo
ULTRAENB->FAST20

Add a missing ahc_run_done_queue if a BRKADDRINT occurs.  This should never
happen (haven't heard of one happening), but it was still a bug.

Brought the ordered tag sending code up into the tag code to be clearer.

If we decide we should send an ordered tag, only do so for the target that
timed out instead of all targets.

Initialize the STAILQ in ahc_serach__qinfifo.  This was causing a panic
during some recovery operations.

Remove the unused varable maxtarget.
1997-02-09 03:26:56 +00:00
Justin T. Gibbs de1dc306be Clear the channel after (re)selection instead of once we see the bus go
free.

When we clear SCSIRATE, also clear the FAST20 bit in SXFRCTL0.  This also
allowed me to clean up some of the ULTRA code.

ULTRAENB->FAST20 to follow the convention in the Adaptec data books.

Fix the data-overrun code to set both stcnt and hcnt otherwise, the transfer
will just hang until we get a timeout.

Add implicit support for the NOOP message.  I've never heard of the driver
issueing a reject for one, but its silly to reject NOOP and who knows how a
device might react.

In the dma routine, check SDONE before cleaing SDMAEN.  The data books mention
SDONE possibly being cleared when SDMAEN is reset.  Clients of dma now need
to check if SINDEX is cleared to know if a phasemis occured.

Fix some comments to be correct.
1997-02-09 03:23:28 +00:00
Joerg Wunsch 17d9b79a9f Add an entry for the Nakamichi 4-disk changer.
Submitted by:	K.R.Marshall@ukc.ac.uk (K.R.Marshall)
1997-02-08 13:26:31 +00:00
KATO Takenori 77720af4dd Replaced hardcoded unit number with ftu. 1997-02-08 09:59:27 +00:00
KATO Takenori 5007dce7da Synchronize with sys/i386/conf/majors.i386 revision 1.11. 1997-02-08 07:39:07 +00:00
Bill Paul 9baa6352dc Make some small tweaks to the messages to clean up some stuff
from last time. Some people have pointed out that there were some odd
side-effects in the changes I made. Two things are different:

- sc_print_addr() will print 'foodev0:' (i.e. sd0:, st0:, cd0:, etc...)
  if the device name is known. If it's not known, it'll use a longer
  notation. This shortens error messages back to a sane length.

- Added a small function called sc_print_init() to set the sc_printing
  flag so that sc_print_addr() will know that we want it to print a
  linefeed. Used this in scsi_device_attach() to restore proper carriage
  return printing behavior which I broke.

Remaining bogons: the NCR SCSI driver prints out information while the
device-specific attach routine is running with its own linefeeds. This
breaks up the individual messages emitted by the subdriver modules and
causes at least one message to appear on a line by itself without a
device spec prefix. I'm not sure of the correct way to fix this, and
I don't have any NCR SCSI hardware to test with anyway.

There's probably more, but I gather that a rewrite of the SCSI subsystem
is pending anyway, so I'll leave the rest to Those Who Know More About
This Than I (tm).
1997-02-08 03:42:22 +00:00
Poul-Henning Kamp b7a652ab84 I have no idea what this is all about, but it works and Bruce hasn't
complained so it cannot be entirely bad :-)

I include the email that probably explains it for people who already know:

> >Compiling with -O3 inlines functions.  However the function that is being
> >inlined in makeinfo.c (add_word_args()) is a vararg function and must not be
> >inlined.
> >
> >The code in question is K&R style, and AFIK, there is no way for the compiler
> >to determine that the function uses vararg.  Either change the code to use
> >prototypes, or use stdarg, or add a directive to prevent inlining.
>
> Not declaring a varargs function as varargs before it is used gives
> undefined behaviour.
>
> However, in practice the bug is probably in FreeBSD's <varargs.h>, which
> doesn't use gcc's __builtin_next_arg().  gcc should notice that it is
> used and not inline functions that have it.  <stdarg.h.> uses it, but I
> think there's another gcc builtin that it should be using.

Patch attached.  The ellipsis causes gcc to flag this as a varargs function,
and the name "__builtin_va_alist" is special cased in gcc to hide the last
argument in the arglist.

Reviewed by:	bde & phk
Submitted by:	jlemon@americantv.com (Jonathan Lemon)
1997-02-07 20:22:15 +00:00
KATO Takenori 15466e1892 Moved macros which are related to BIOS work area from pc98.h
(corresponds to isa.h) to pc98_machdep.h.
1997-02-07 19:07:43 +00:00
KATO Takenori f97a606a78 Enabled pccard code which was disabled by mistake.
Reminded by:	Masahiro Sekiguchi <seki@sysrap.cs.fujitsu.co.jp>
1997-02-07 19:02:41 +00:00
Kazutaka YOKOTA 445605a6e0 Fix for the Compaq Armada laptop.
The PS/2 mouse device responds to a reset command with a sequence of
ACK(fa), RESULT(aa) and ID(00).  Most PS/2 mice immediately returns
ACK, but spend sometime before sending RESULT. The Armada takes time
before ACK; extra delay is necessary before the call to read ACK.

The problem was reported in comp.unix.bsd.freebsd.misc and the patch
was tested by the reporter. No PR was filed, by the way.
1997-02-07 11:41:45 +00:00
David Nugent db2c31168e Correct comments relating to MAXLOGNAME.
MAXLOGNAME includes NUL terminator.
1997-02-07 10:41:41 +00:00
Joerg Wunsch a2f36095e2 The worm(4) driver needs a bdev major # now, too. 1997-02-06 22:20:33 +00:00
Joerg Wunsch ab865e3435 After so many people have been bugging me :), finally implement
read-mode access to CD-ROM media in the worm(4) driver.  No whistles
and bells yet, like all the CDIO* commands, but at least a start.

In order to do this, i had to slightly rearrange the semantics of an
open(2) on the worm driver: now, opening it with O_NONBLOCK set means
no actual IO operations will be intended but only ioctls are to be
processed.  This mode is used by wormcontrol(8) to prepare a track
and/or session.

I have only been able to test this on a 2.2-GAMMA system by now, and
only the !DEVFS part is tested yet.  Also, i have only done a dummy
burn so far, but wouldn't expect many surprises else.  Report bugs to
me ASAP, if there's reasonable demand and i hear no objections, i
might consider merging it into the 2.2 branch as well.
1997-02-06 22:19:44 +00:00
KATO Takenori 8716a6359b Deleted ioskip member of the structure pc98_edregister. The member
port is always used for accessing PAR and MAR instead of constant
interval of I/O address.
1997-02-06 14:16:52 +00:00
KATO Takenori a43de6bdb2 Cosmetic change. Sorted by function, added `1997' to copyright
notice,  and added comment.
1997-02-06 13:38:04 +00:00
Brian Somers 47c861ecc7 Don't zero ip->ip_sum during sum validation. This should only
affect programs that sit on top of divert(4) sockets.  The
multicast routing code already unconditionally zeros the sum
before recalculating.

Any code that unconditionaly sums a packet without first zeroing
the sum (assuming that it's already zero'd) will break.  No such
code seems to exist.
1997-02-06 11:14:22 +00:00
David Greenman 3b576b3e5e Fixed missing ioport offset from the reading/updating of the PLX
interrupt control/status register.

Submitted by:	Brian McGovern <bmcgover@cisco.com>
1997-02-05 22:19:18 +00:00
KATO Takenori 487c0bf139 Changed document encoding system from JIS X 0208 to EUC. 1997-02-05 16:52:51 +00:00
Andrey A. Chernov 1963788476 Fix misspelled variable name, -current build stopper 1997-02-05 07:23:56 +00:00
KATO Takenori b61f10e8bc Deleted obsolete structure, pc98_device. 1997-02-04 22:29:50 +00:00
KATO Takenori ed39d36d27 Moved PC-98 routine in sd_get_parms() to pc98_machdep.c. 1997-02-04 22:27:09 +00:00
Stefan Eßer cfc23ad40c Add interface revision field to pci_register_lkm parameter list.pci.c pcibus.h
This parameter is intended to allow new kernels to work with old LKM binaries,
provided the revision ID is incremented whenever the PCI LKM interface is
changed. The revision ID does not at all protect against changes in data
structures accesses by the driver.
1997-02-04 18:31:57 +00:00
David Greenman 001696da5b Changed several configuration options:
Disabled the DMA byte counters - I had it this way originally and this is
the recommended setting.
Set crscdt to CRS only (0) since this is what it should be for an MII PHY.
Also fixed some comments.
1997-02-04 11:44:15 +00:00
David Greenman 33d14d8671 Do "selective" reset rather than full reset...the manual specifically
says not to do the full reset because it can lock up the PCI bus if the
chip is active. Added various PORT command definitions to facilitate
this.
1997-02-04 10:53:12 +00:00
David Greenman 6e39e59963 Don't include the short-frames counter in with the input errors. This
counter is incremented on all short frames, including those that are
the result of collisions.
1997-02-04 07:39:28 +00:00
Bill Fenner 3aa7200510 Make sure we have arguments to pass before calling ifaof_ifpforaddr
and ifa_ifwithroute.

This eliminates the panic seen in kern/2647, although it doesn't
address the fact that RTM_CHANGE can't change flags.
1997-02-04 03:14:35 +00:00
Justin T. Gibbs a42f819712 Initialization of a variable got lost in the last commit when I moved
a piece of code into a subroutine.
1997-02-03 17:24:25 +00:00
Justin T. Gibbs c646d245b2 Fix an oversight in the handling of non-tagged abort requests. We need
to search the QINFIFO to remove any possible command that is waiting
otherwise our abort request may not be held up still waiting for the
first command to complete.
1997-02-03 16:29:07 +00:00
KATO Takenori 860f44565e Changed return value of ed_probe (= number of I/O ports). Because
I/O port address of most devices is not contiguos, a return value of
probe routine is not so useful for detecting conflict.  The return
value was too big, and kernel sometimes detected conflict even though
two devices are not conflict in I/O address between them.

Suggested by:	Chiharu Shibata <chi@rd.njk.co.jp>
1997-02-03 14:19:01 +00:00
Justin T. Gibbs 8ecec21da6 White space cleanup and other cosmetic style changes.
Fix a few panics during error recovery:
1) Stupid mistake in the "no SCB match handler"  where I was using the wrong
   variable (busy_scbid instead of scb_index).
2) Unbusy the target of an abort request if the command we are trying to
   abort is an untagged transaction.  If we don't, we get a fatal NO_MATCH_BUSY
   condition which "should never happen".
3) When an abort completes, turn off ahc->in_timeout or else the next timeout
   will hit the protective "scb timesout again" panic.
4) Fix a typo that caused the requeued "abort" SCB to have its TAG_ENB and
   disconnect bits to be cleared (missing ~) so that devices would complain
   about overlapped commands.

Be sure to turn off the unexpected busfree interrupt after we do a bus
reset since we are expecting the bus to go free in that case.

Return XS_TIMEOUT instead of XS_DRIVERSTUFFUP in certain scenarios.  XS_TIMEOUT
allows for retries, XS_DRIVERSTUFFUP does not.

Allow commands with SDTR and WDTR negotiation to be tagged.  The SCSI II spec
says that you probably should not do this for fear of hitting bogus devices.
The driver did this in the past for almost two years without any problem,
and not doing it causes problems during error recovery to a tag capable device
as the number of openings is higher than two and we'll start sending it
tagged commands causing "overlapped commands attempted" type errors.  The
real fix needs to happen in the generic SCSI layer which can limit the
number and type of transactions to a device during error recovery efficiently.

Give ourselves at least 100ms to perform a request sense instead of relying
on the original timeout to be long enough to complete this new command as
well as the one that generated the condition.

Removed some redundant code.
1997-02-03 02:16:16 +00:00
Justin T. Gibbs 1d6abdbc6f In dma_finish, don't disturb the direction bit in DFCNTRL when turning off
host DMAs.  The additional test to ensure that the DMA has stopped is also
unnecessary since we've already waited for the DMA to complete.

Update my copyright for the new year.
1997-02-03 02:02:04 +00:00
Joerg Wunsch c1b822b746 Do not accidentally default a device that failed probing to T_DIRECT
(since T_DIRECT just incidentally happens to be equal 0).  This causes
more harm than it would do good.  Instead , get it at the uk driver.

Reviewed by:	obrien@NUXI.com (David O'Brien)
1997-02-02 20:57:12 +00:00
Brian Somers d81e40431a Reset ip_divert_ignore to zero immediately after use - also,
set it in the first place, independent of whether sin->sin_port
is set.

The result is that diverted packets that are being forwarded
will be diverted once and only once on the way in (ip_input())
and again, once and only once on the way out (ip_output()) -
twice in total.  ICMP packets that don't contain a port will
now also be diverted.
1997-02-02 16:33:12 +00:00
Wolfram Schneider 1c34c7fd77 Make ibcs2 a little bit saver. Add copyright. 1997-02-02 14:40:38 +00:00
KATO Takenori d5605f2a31 Deleted i386_cpus[]. i386_cpus[] is a static variable in identcpu.c.
Found-by: lint
1997-02-02 10:43:35 +00:00
KATO Takenori 59e8efa110 Synchronize with sys/i386/isa/sio.c revision 1.158. 1997-02-02 08:09:41 +00:00
Joerg Wunsch c37ddbb8bd Correct the usage of fea0. It's an EISA driver now, so the ISA usage
is bogus.

Also, correct a stale comment about non-existing EISA support.
1997-02-01 19:53:12 +00:00
Bruce Evans d1adf9f099 Fixed the SMC fifo bug fix. sioopen() hung while input was streaming in
with <= 100 usec between each character arrival time.  This didn't happen
until rev.1.75 of clock.c because DELAY(100) used to delay for closer to
80 usec than 100 usec, and the minimum time between character arrivals is
87.8 usec at the maximum supported speed of 115200 bps 8N1.

Clear DCD timestamp flag on close (the input timestamp flag is already
cleared).
1997-02-01 16:04:16 +00:00
KATO Takenori b8586e15da - KNFized pc98 specific files.
- Disabled unuseinit_cpu_accel_mem() which doesn't work now.
- Deleted extra space at the end of line.
1997-01-31 17:38:58 +00:00
KATO Takenori 7546bbf82e Synchronize with sys/i386/isa/syscons.c revision 1.200. 1997-01-31 11:24:01 +00:00
KATO Takenori 0e5d7a6941 Synchronize with sys/i386/i386/locore.s revision 1.80. 1997-01-31 11:23:18 +00:00
John Dyson 5069bf5747 Another fix to inheriting shared segments. Do the copy on write
thing if needed.
Submitted by:	Alan Cox <alc@cs.rice.edu>
1997-01-31 04:10:41 +00:00
Joerg Wunsch 161f9f547e Fix yet another breakage i've missed when committing rev 1.14. It was
non-obvious to me since my test kernel didn't run NETATALK.  Sorry.

LINT should compile again now.
1997-01-30 22:51:02 +00:00
Joerg Wunsch ecd20d9e4d Fix a benign type mismatch i've introduced in rev 1.40.
Pointed out by:	bde
1997-01-30 22:47:55 +00:00
David Greenman e4c46b5e82 Removed PG_N from here, too. Some machines don't like it and it's unnecessary. 1997-01-30 20:22:02 +00:00
David Greenman 3def491346 Removed unnecessary PG_N flag from device memory mappings. This is handled
by the CPU/chipset already and was apparantly triggering a hardware bug that
causes strange parity errors.
1997-01-30 19:36:58 +00:00
Søren Schmidt ac59a2c67c Fixed the "switch to next screen" command (normally bound to the
key "print scrn".
It used to stop at the first non-open vty, now it skips the non-open
ones and thereby enable one to cycle around all open vty by pressing
"print scrn".
1997-01-30 15:12:17 +00:00
Kazutaka YOKOTA 50c193eb05 Removed reference to PSM_NO_RESET which is no longer available. 1997-01-30 11:59:36 +00:00
Satoshi Asami ec0c5f697a Change space to tab.
Pointed out by:	bde (this is only one of the four, though)
1997-01-30 11:05:57 +00:00
KATO Takenori da2c67c4aa Synchronize with sys/i386/isa/sio.c revision 1.157. 1997-01-30 10:48:06 +00:00
KATO Takenori d44a313ca1 Synchronize with sys/i386/isa/npx.c revision 1.38. 1997-01-30 10:45:36 +00:00
KATO Takenori d3e1120fab Synchronize with sys/i386/isa/clock.c revision 1.75. 1997-01-30 10:44:05 +00:00
Bruce Evans 49a116737e Estimate an initial overhead of 0 usec instead of 20 usec in DELAY().
I have code to calibrate the overhead fairly accurately, but there
is little point in using it since it is most accurate on machines
where an estimate of 0 works well.  On slow machines, the accuracy
of DELAY() has a large variance since it is limited by the resolution
of getit() even if the initial delay is calibrated perfectly.

Use fixed point and long longs to speed up scaling in DELAY().
The old method slowed down a lot when the frequency became variable.
Assume the default frequency for short delays so that the fixed
point calculation can be exact.

Fast scaling is only important for small delays.  Scaling is done
after looking at the counter and outside the loop, so it doesn't
decrease accuracy or resolution provided it completes before the
delay is up.  The comment in the code is still confused about this.
1997-01-29 22:51:44 +00:00
Bruce Evans 160da193e0 Fixes and workarounds for Hayes ESP:
- don't uselessly initialize the fifo "DMA" bit at attach time.
- initialize the fifo "DMA" bit at open time.  Without this, the device
  interrupts for every character received, reducing input performance
  to that of an 8250.
- don't uselessly initialize the fifo trigger level to 8 (scaled to
  256) at attach time.
- don't scale the fifo trigger level to 512 bytes.  The driver's pseudo-
  dma buffer has size 256, so it can't handle bursts of size 512 or 256.
  It should be able to handle the second lowest ftl (2 scaled to 64).
- don't reset the fifos in siostop().  Reset triggers a hardware bug
  involving wedging of the output interrupt bit  This workaround
  unfortunately requires ESP support to be configured.
1997-01-29 21:50:02 +00:00
Bruce Evans 0f49e57b57 Removed `Debugger("no slices")'. It's normal and harmless to have no
slices in sd_open() after a media change when the previous sd_open()
discards the previous slices and then fails.  sd_open() just handles
media changes poorly and fails too often.
1997-01-29 14:18:34 +00:00
Bruce Evans 26add14927 Disabled logging of masked exceptions on exit. Keep the side effect of
saving the state (see rev.1.17).
1997-01-29 13:46:28 +00:00
KATO Takenori b3136a8709 Fixed reset port address of PC-9801-108.
Submitted by:	Chiharu Shibata <chi@rd.njk.co.jp>
1997-01-29 12:42:41 +00:00
Justin T. Gibbs 9d5e1d812d Add 1997 to my copyright.
Change the autotermination code slightly to be more careful on narrow
adapters.
1997-01-29 05:28:21 +00:00
Justin T. Gibbs 54dd351d93 Add 1997 to my copyright.
If we can, use timeouts instead of DELAYs when dealing with a bus reset.
This prevents us from holding up the whole machine for a noticible amount
of time (especially for a real time app).

Make a pass over the timeout/error handling code.  Aborts are more
reliable.  We actually handle parity errors correctly now instead of
locking up the bus.  Added code to properly clean up disconnected SCBs
down on the card during error handling.  Improved robustness in several
areas.

If we are using defaults, but are an Ultra card, negotiate at 20MHz instead
of 10.

Don't attempt to handle any commands for 100ms after a reset has occured.
This is the minimum time before a target will respond to selection.  Also
disable the busfree interrupt before doing a bus reset.  This prevents the
driver from getting confused by an "unexpected busfree".
1997-01-29 05:27:03 +00:00
Justin T. Gibbs 8ebddd1e01 Add 1997 to my copyright.
Expand the boundaries of a pause disabled region to close of possible race
condition.

Revert a portion of the DMA code to fix false overruns.

Add a missing "add_scb_to_free_list" so we don't leak SCBs.
1997-01-29 05:19:46 +00:00
KATO Takenori d00c34d948 Synchronize with sys/i386/conf/options.i386 revision 1.34. 1997-01-28 13:10:22 +00:00
Poul-Henning Kamp e6bf99985c Some of these cards are always in promiscous mode :-(
If you enable ip forwarding your net melts down.
This is a workaround, probably not the correct fix.
1997-01-28 11:21:21 +00:00
Bruce Evans 30c8c5e8fa Fixed EXTRAVNODES ifdef.
Updated warnings about obsolete options.
1997-01-27 12:48:15 +00:00
Bruce Evans b3c5c18d36 Set the soft openfiles limit to maxfiles instead of to NOFILE.
The limit is now only used by init, so it may as well be "infinite".
Don't use RLIM_INFINITY, since setrlimit() doesn't allow setting
that value.  Use maxfiles instead of RLIM_INFINITY for the hard
limit for the same reason.

Similarly for the maxprocesses limits (use the "infinite" value of
maxproc instead if MAXUPRC and RLIM_INFINITY).

NOFILES, MAXUPRC, CHILD_MAX and OPEN_MAX are no longer used in
/usr/src and should go away.  Their values are almost guaranteed to
be wrong now that login.conf exists, so anything that uses the values
is broken.  Unfortunately, there are probably a lot of ports that
depend on them being defined.

The global limits maxfilesperproc and maxprocperuid should go away
too.
1997-01-27 12:43:36 +00:00
Bruce Evans d73ffacdf6 Removed bogus options CHILD_MAX and OPEN_MAX. 1997-01-27 12:39:39 +00:00
Bruce Evans 0f171f5949 Removed bogus options CHILD_MAX and OPEN_MAX.
Put obsolete GATEWAY option back in opt_defunct.h.  It's the only
significant option that has gone away since 2.1.6, so warning about
it might be useful.
1997-01-27 12:39:09 +00:00
Bruce Evans 488600a422 Added KBD_MAXRETRY and PSM_NO_RESET. 1997-01-27 11:54:56 +00:00
Bruce Evans 4bc24b97bc Added lots of undocumented options KBD*, MSG*, NBUF, NMBCLUSTERS, PSM*,
SEM* and SHM*.  These are already supported in the options files.  I
mostly used the default value plus 1.  This ensures that the LINT kernel
depends on the options headers.
1997-01-27 11:37:16 +00:00
Bruce Evans 25bd52fee7 Removed non-options MSGMAX, SEMAEM, SEMUSZ and SEMVMX. 1997-01-27 11:18:40 +00:00
Bruce Evans f73c7d2a31 Removed #undef of MSGMAX, so that a warning gets printed if it is
(bogusly) defined.
1997-01-27 11:18:27 +00:00
Julian Elischer d57d661cf2 fix mixleading comment (my error.. I wrote the comment) 1997-01-26 01:00:45 +00:00
Bill Paul fc7c79b907 Make the SCSI probe messages more BSDish. This may raise a few eyebrows
("Hey! Who made _you_ the keeper of all things BSDish?!") but this has
bugged me for a long time, and now that I finally have the chance
to hack on it (and test the results), I'll take my chances. I can also
point to other BSD implementations for precedents if you put my back to
the wall.

The only thing that's changed is how the messages are formatted. Now,
instead of having this:

aha0 at 0x330-0x333 irq 11 drq 5 on isa
(aha0:3:0): "HP C1553A 9503" type 1 removable SCSI 2
st0(aha0:3:0): Sequential-Access density code 0x24, variable blocks, write-enabled
(aha0:3:1): "HP C1553A 9503" type 8 removable SCSI 2
ch0(aha0:3:1): Medium-Changer 6 slot(s) 1 drive(s) 0 arm(s) 0 i/e-slot(s)

We have this:

aha0 at 0x330-0x333 irq 11 drq 5 on isa
scbus0 at aha0 bus 0
st0 at scbus0 target 3 lun 0
st0: <HP C1553A 9503> type 1 removable SCSI 2
st0: Sequential-Access density code 0x24, variable blocks, write-enabled
ch0 at scbus0 target 3 lun 1
ch0: <HP C1553A 9503> type 8 removable SCSI 2
ch0: Medium-Changer 6 slot(s) 1 drive(s) 0 arm(s) 0 i/e-slot(s)

Which is (to me anyway) is a lot more pleasant to look at. (Call me
crazy -- g'head: you know you wanna -- but the previous messages remind
me of Linux. Ever see the output from the linux device probes? It's a mess
of copyright notices, version numbers/dates, author e-mail addresses and
other crap. Let's not go there, okay? Bleh.)

Notice that devices are now specified in terms of the scsi bus they
live on rather than the adapter. This better reflects the contents
of the kernel config file (if you use wired-down device specifications
anyway) and removes some ambiguity that may arise if you have a multi-
channel adapter with more than one bus.

Also, sc_print_addr() now generates messages like this:
st0 at scbus0 target 3 lun 0: NOT READY asc:3a,0 Medium not present

instead of this:
st0(aha0:3:0): NOT READY asc:3a,0 Medium not present

I also added a quirk entry for the HP Superstore 12000e 6 tape DAT
autoloader, which needs SC_MORE_LUS in order for the changer device
to be properly probed and attached. (I'm working on a chcontrol utility
to manipulate the changer on this drive which should hopefully be general
enough to work with other changers too. If you want the prototype I have
now, it's at ftp://skynet.ctr.columbia.edu/pub/freebsd/changer.c.)

Remaining bugs:

- The 'foodev0: yadda yadda yadda' bits should probably be printed entirely
  by the device-specific subdriver attach code instead of half by the
  scsi_device_attach() routine and half by the device specific attach
  routine like it is now.

- The wired-down device specifications in the kernel config file should
  be used to control bus/device probing to some extent rather than just
  for choosing names for devices we find. If the config says there's a
  device at scbus0 target 0 lun 0 called sd0, we should look there and
  check for a device that can be managed by the sd driver. If we don't
  find one, we should probably complain that there's no device there or
  that there is a device but of the wrong type. Once all the devices from
  the wired down list have been probed, the code can then autodetect and
  autoattach any devices that remain unassigned.

- Apparently some tape changers (hi Ulf!) return 'not ready/medium not
  present' when the magazine is loaded but a tape has not been put in the
  drive yet. This causes an open(/dev/ch0) to fail and prevents you from
  using the changer.c utility to load the first tape into the drive. My
  HP changer does not behave this way. The workaround is to manually load
  a tape into the drive before attempting to use the changer program, but
  you can get in trouble if you accidentally eject a tape without loading
  a new one and you're at a remote location: you won't be able to load
  any tapes anymore. I'm not sure what the correct software solution is
  for this but ideally there should be one.

- I should not be doing this: I'm the NIS guru, not the SCSI guru.
  (This is not my beautiful code. How did I get here? My god: what
  have I done?)
1997-01-25 20:27:13 +00:00
Bruce Evans 4123678332 Sync with <pci/pcibus.h>. pcibus.c unfortunately still compiled (with
only 3 or 4 warnings) when pb_maxirq went away.
1997-01-25 18:51:01 +00:00
KATO Takenori 6d5d69845a Change default I/O recovery time for Cyrix 5x86 to 0. The BIOS
Writers Guide mentions that IORT should be 0 for errata fix.
1997-01-25 10:37:03 +00:00
KATO Takenori 1817f78ea0 Synchronize with sys/i386/i386/machdep.c rev. 1.226. 1997-01-25 06:42:19 +00:00
KATO Takenori d8750fa79b Synchronize with sys/i386/isa/syscons.{c,h} rev. 1.199 and 1.27,
respectively.
1997-01-25 06:38:14 +00:00
KATO Takenori 2410185246 Synchronize with sys/i386/isa/if_fe.c rev. 1.26. 1997-01-25 06:33:24 +00:00
Stefan Eßer 80432747dc Remove element pb_maxirq from struct pcibus. 1997-01-25 02:22:34 +00:00
Stefan Eßer e8bfed6d98 Improve on previous fix: Clean up getirq() as well, and remove redundant
warning messages.
1997-01-25 01:57:30 +00:00
David Greenman 098415100b Added a check/panic for v_usecount being 0 (no vnode reference) in
vnode_pager_alloc().
1997-01-24 22:20:23 +00:00
David Greenman fe95dc619a Changed dkunit() to use some previously unused bits in the 'type' field
to extend the unit field to 9 bits (512 units).
1997-01-24 22:13:09 +00:00
Justin T. Gibbs 09e505318a Add the definition for the CFAUTOTERM bit in the aic78xx SEEPROM.
Add auto-termination support as well as support for setting the high byte
termination.  Booting with '-v' will display the settings that the driver
chose.  If you stick narrow devices onto the external wide port, you had
better make sure that your converter cable terminates the bus, you have a
wide device on there that terminates the bus, or you manually set the
termination properly in SCSI-Select instead of using "Automatic".  The
code will get the setting right regardless if you *don't* have internal
wide devices in this type of configuration.  Unfortunatly this is a limitation
of the design of the Adaptec cards.
1997-01-24 22:04:14 +00:00
Justin T. Gibbs c2f69d249e 93cx6.c:
Style nit.  Backslashes in macro weren't aligned.

aic7xxx.c:
Preserve the value of STPWEN in SXFRCTL1 during initialization.  STPWEN
controls low byte termination and is setup by the PCI probe front end.
1997-01-24 21:59:32 +00:00
Justin T. Gibbs ed69a71305 Change the way DMA is handled during the command phase. Only test on
SDONE, not HDONE.

In the data phase dma handler, mask off just the enable bits instead of
clearing the whole register.  Clearing the direction bit could be bad.
Also don't stop a DMA until MREQPEND goes false.  Doing this may cause
an ABORT on the PCI bus although I have yet to see this happen.

Add definitions for MREQPEND and the BRDCTL register.  The BRDCTL register
is used to handle high byte termination and automatic termination testing.
1997-01-24 21:57:47 +00:00
Bruce Evans f42cf36fa8 Fixed some formatting bugs (mostly regressions in rev.1.48). Replaced
some magic numbers by pmap constants.  Cosmetic.
1997-01-24 20:37:57 +00:00
Bruce Evans d9cca175bc Initialize CR0_MP in setregs() in case npx0 is disabled or not configured.
Disabling npx0 works right now.

Don't reference `npxdriver' if npx0 is not configured.  Not configuring
npx0 doesn't quite work yet.

Don't clear potential non-npx pcb flags in setregs().
1997-01-24 19:01:54 +00:00
David E. O'Brien 8819cbef39 KNF style police.
Reported by:	Bruce
Thanks to:	Bruce for also providing a diff.
1997-01-24 12:39:11 +00:00
Stefan Eßer a67fa10338 Make IRQ 0 invalid in pci_map_int(), since it is hardwired to the
programmable interval timer chip in PC systems.
1997-01-23 22:58:03 +00:00
Søren Schmidt 0d3f983ad2 Add save/restore cursor as pr SCO screen(HW) manpage.
Fix ESC[2J to not move cursor home
Clear mouse cutmarking on more cases.
Minor changes by me.

Submitted by:	ache
1997-01-23 20:00:45 +00:00
Garrett Wollman 6a4c899092 Put newlines after log messages.
Submitted by:	seki@sysrap.cs.fujitsu.co.jp PR#2563 (but the patch didn't
		apply)
1997-01-23 16:17:09 +00:00
KATO Takenori 30fcb6026c Synchronize with sys/i386/i386/trap.c revision 1.86. 1997-01-23 08:39:59 +00:00
John Dyson 7e64cb7a96 Remove some dead code from trapwrite.
Submitted by:	Stephen McKay <syssgm@devetir.qld.gov.au>
1997-01-23 01:30:59 +00:00
Justin T. Gibbs 5ea6dc36ff Be smarter about enabling memory mapped I/O. The AHC_ALLOW_MEMIO option
should not be required anymore.

Turn on ULTRA for cards that don't have a BIOS or SEEPROM.
1997-01-22 18:07:15 +00:00
Justin T. Gibbs 71318ca3ea Remove some unnecessary overhead in the command complete processing. It
should be nearly impossible to overflow the QOUTFIFO (worst case 9 command
have to complete with at least 6 of them requiring paging on an aic7850),
so don't take the additional PIO hit to guard against this condition.  If we
don't see our interrupt in time, the system has bigger problems elsewhere.
If this ever does happen, the timeout handler will notice and retry the
command.

Remove the ABORT_TAG sequencer interrupt handler.  This condition can't happen
with the new SCB paging scheme.

Fix a few bugs noticed by Dan Eischen <deischen@iworks.InterWorks.org>
that could prevent ULTRA from being negotiated to drives above ID 7 and
also could allow an SCB to be passed to ahc_done twice during error recovery.

Fix a bug notice by Rory Bolt <rory@atBackup.com>.  It turns out that a
sequencer reset will actually start the sequencer running regardless of the
state of the pause bit.  This could lead to strange problems with loading
the sequencer.
1997-01-22 18:05:31 +00:00
Justin T. Gibbs 6d14c339f6 Clear the SCSI channel after we go to busfree instead of after re/selection.
Only enable reselections once the channel and SCSIRATE have been cleared.

Add a pause block around the test busy code in the non-tagged case to simplify
error recovery in the corner case of aborting an SCB that just got started.

Simplify reselection processing by removing the call to initialize_scsiid.

Clear the scsiseq re/select control bits and setup for catching bogus
busfrees earlier in the re/select process.

Improve the automatic PIO code.  It turns out that SPIORDY is not a reliable
hardware condition bit, so use REQINIT intstead.  Don't rely on PHASEMIS
either since it can take too long to come true.  Use a brute force comparison
instead.

Remove some unnecessary overhead in the command complete processing.  It
should be nearly impossible to overflow the QOUTFIFO (worst case 9 command
have to complete with at least 6 of them requiring paging on an aic7850),
so don't take the additional PIO hit to guard against this condition.  If we
don't see our interrupt in time, the system has bigger problems elsewhere.
If this ever does happen, the timeout handler will notice and retry the
command.
1997-01-22 18:01:07 +00:00
John Dyson 8130eff80a Fix I386 copyout support. The new page-table management code will
not lazy-fault page table pages.  Update the copyout support to take
that into account.  This should fix some segfault problems on such
machines.

After a short test period, we'll move this into 2.2.

Submitted by:	Stephen McKay <syssgm@devetir.qld.gov.au>
1997-01-22 06:15:27 +00:00
John Dyson fed9a9032e Fix two problems where a NULL object is dereferenced. One problem
was in the VM_INHERIT_SHARE case of vmspace_fork, and also in vm_map_madvise.
Submitted by:	Alan Cox <alc@cs.rice.edu>
1997-01-22 01:34:48 +00:00
Stefan Eßer 99867152a5 Add PCI LKM support:
The new function pci_register_lkm (struct pci_device *dvp) appends the
driver to the list of known PCI drivers, and initiates a PCI bus rescan.
1997-01-21 23:41:42 +00:00
Stefan Eßer 993dec9d58 Add PCI LKM support. 1997-01-21 23:23:40 +00:00
Garrett Wollman 82c39223b9 Count multicast packets received for groups of which we are not
a member separately from generic ``can't forward'' packets.  This
would have helped me find the previous bug much faster.
1997-01-21 21:08:09 +00:00
Garrett Wollman 93e808cd76 Who had the conical hat? Correct a typo, hidden by a bad cast,
which prevented IP multicast reception from happening.
1997-01-21 19:44:46 +00:00
David Nugent 1273ebf576 Copy process resource settings before modifying.
Candidate for 2.2.
1997-01-21 16:37:01 +00:00
KATO Takenori 2ffc5777b7 Synchronize with sys/i386/isa/syscons.c revision 1.198. 1997-01-21 07:11:14 +00:00
KATO Takenori 7aa571fe7e Synchronize with sys/i386/isa/syscons.c revision 1.197. 1997-01-20 12:26:04 +00:00
Søren Schmidt dc31ce3ddb Fix the bug that caused CTRL & ALT keys to be hanging sometimes after
an X seesion. Really stupid error of me, and I've been looking at
this code SO many times. Thanks to Kazutaka YOKOTA for seeing this..

Submitted by:	Kazutaka YOKOTA
1997-01-20 08:05:15 +00:00
John Dyson 6e20a16589 Make MADV_FREE work better. Specifically, it did not wait for
the page to be unbusy, and it caused some algorithmic problems
as a result.  There were some other problems with it also, so
this is a general cleanup of the code.
Submitted by:	Douglas Crosher <dtc@scrooge.ee.swin.oz.au> and myself.
1997-01-20 02:25:14 +00:00
Søren Schmidt cf35b775cb Oops, the position of the savefont code was wrong, cur_console
wasn't set yet.
1997-01-19 17:34:14 +00:00
KATO Takenori 86c07de1d7 Synchronize with sys/i386/isa/syscons.c revision 1.196. 1997-01-19 07:46:28 +00:00
David E. O'Brien bcd60335fc Add bits to identify AMD K5 and K6 cpu's.
Tested only on my AMD K5 PR-133.  Bit values for K6 taken from AMD document
on how to test such things.

2.2 Candidate.
1997-01-19 01:56:55 +00:00
KATO Takenori f533d5bfe1 Re-construct PC-98 code of device_infor[] entries. Enabled all
devices which was #ifndef PC98'ed.  This makes diff small between
i386/i386/userconfig.c and pc98/i386/userconfig.c.
1997-01-18 15:59:46 +00:00
Søren Schmidt 6b2c8fd9c3 Oops! I commented out the waiting for retrace loops, because the
one in draw_mouse causes spontanious hangs on my p5-100 when I
move the mouse excessively. Forgot that on the last commit, so
using the mouse or destructive cursor would produce large amounts
of flicker..
1997-01-18 15:53:48 +00:00
KATO Takenori c59a3dbd01 - Changed retry count from 1000000 to 10000 (same as IBM-PC's).
- Deleted unnecessary DELAY().
- Deleted space character at the end of line.
1997-01-18 15:51:43 +00:00
Poul-Henning Kamp c6a86c7775 Increase default msgbuf to 8k. 1997-01-18 14:09:16 +00:00
Joerg Wunsch 87a6a0f90a Catch up with the moving target: merge the change from rev 1.19 of the
now dead sys/pci/if_pdq.c which has been committed about by the same
time i made my tests with Matt's code.

LINT should compile now again.

Well, that's a clear case where ``CVS writer locks'' would certainly
(not) have helped. :-]
1997-01-18 13:03:21 +00:00
KATO Takenori 75ef4c3a5a Synchronize with sys/i386/conf/files.i386 (revision 1.151). 1997-01-18 10:29:55 +00:00
KATO Takenori 58e44cc813 Synchronize with sys/i386/isa/syscons.c (revision 1.195). 1997-01-18 10:26:43 +00:00
KATO Takenori b1c7657eef Synchronize with sys/i386/isa/clock.c (revision 1.74). 1997-01-18 10:25:04 +00:00
KATO Takenori ece9035f43 Synchronize with sys/i386/i386/machdep.c (revision 1.225). 1997-01-18 10:21:45 +00:00
KATO Takenori caff639262 Synchronize with sys/i386/i386/userconfig.s (revision 1.82). 1997-01-18 10:16:02 +00:00
Joerg Wunsch 00bbbd73e9 Round #2. This basically brings back the changes from rev 1.12.
I have only separated both to make it more convenient merging all this
into 2.2.
1997-01-17 23:56:20 +00:00
Joerg Wunsch e4107dcf00 This mega-merge brings Matt Thomas' 960801 FDDI driver (almost) up
to -current.

Thanks goes to Ulrike Nitzsche <ulrike@ifw-dresden.de> for giving me
a chance to test this.  Only the PCI driver is tested though.

One final patch will follow in a separate commit.  This is so that
everything up to here can be dragged into 2.2, if we decide so.

Reviewed by:	joerg
Submitted by:	Matt Thomas <matt@3am-software.com>
1997-01-17 23:54:45 +00:00
Joerg Wunsch b05ee6a563 Finally import the 960801 of Matt Thomas' DEC FDDI driver. I'm
importing it onto a vendor branch first, in the hope that this will
make future maintenance easier.

The conflicts are (hopefully) unimportant.  More commits that actually
bring this into the source tree will follow.

Submitted by:	Matt Thomas (thomas@lkg.dec.com)
1997-01-17 23:19:49 +00:00
Garrett Wollman c7e54a6a04 Don't try to do anything with the `ifr' parameter for SIOCADDMULTI
and SIOCDELMULTI; it is guaranteed to be null in the new system.
1997-01-17 19:38:16 +00:00
Jordan K. Hubbard f099c183d8 Add Intel EtherExpress Pro/10 Ethernet adapter to list of supported
devices.
1997-01-17 17:27:14 +00:00
KATO Takenori b2f4ff0875 Fixed unit select code in atapi_probe (PC98 specific). 1997-01-17 16:58:38 +00:00
Søren Schmidt 171b420b11 Bruce pointed out a bogon:
cur_console is NULL when copy_font() is first called from scinit().  This
is apparently harmless when scinit() is called early from sccninit() -
page 0 is apparently mapped r/w then, and 0->status contains suitable
garbage.  However, when there is a serial console, scinit() is first
called from scattach() when the page tables are completely initialized,
so the NULL pointer causes a panic.

Submitted by:	bruce
1997-01-17 15:49:13 +00:00
KATO Takenori 9124cd1f10 Disabled LPC_ENA related I/O access. This I/O access clobbers i8255
mode register on PC98.
1997-01-17 14:43:34 +00:00
KATO Takenori a84bc4735a Moved the definition of LPC_ENA into #else ... #endif. Changed
comment of LPC_ENA.
Submitted by:	Bruce Evans <bde@freebsd.org>
1997-01-17 14:40:39 +00:00
Jordan K. Hubbard 0942673f33 Adjust ex0 entries properly after talking with Javier. 1997-01-17 14:19:04 +00:00
Adam David 839cc09e53 implement "not" keyword for inverting the address logic 1997-01-16 21:04:29 +00:00
Nate Williams 4ee1132018 Bring back the fix from 1.32 that got spammed by recent changes. 1997-01-16 18:57:19 +00:00
Bruce Evans 6bed7e5140 Guard against the i8254 timer being uninitialzed if DELAY() is
called early for console i/o.  The timer is usually in BIOS mode
if it isn't explicitly initialized.  Then it counts twice as fast
and has a max count of 65535 instead of 11932.  The larger count
tended to cause infinite loops for delays of > 20 us.  Such delays
are rare.  For syscons and kbdio, DELAY() is only called early
enough to matter for ddb input after booting with -d, and the delay
is too small to matter (and too small to be correct) except in the
PC98 case.  For pcvt, DELAY() is not used for small delays (pcvt
uses its own broken routine instead of the standard broken one),
but some versions call DELAY() with a large arg when they unnecessarily
initialize the keyboard for doing console output.  The problem is
more serious for pcvt because there is always some early console
output.

Guard against the i8254 timer being partially or incorrectly
initialized.  This would have prevented the endless loop.

Should be in 2.2.
1997-01-16 18:28:20 +00:00
Bruce Evans 713aa001e2 Updated generated files. 1997-01-16 15:59:31 +00:00
Bruce Evans ac0ad63f37 Reduced #include spam in <sys/sysproto.h> and fixed things that depended
on it.

makesyscalls.sh:
This parsed $Id$.  Fixed(?) to parse $FreeBSD$.  The output is wrong when
the id is not expanded in the source file.

syscalls.master:
Fixed declaration of sigsuspend().  There are still some bogons and
spam involving sigset_t.
Use `struct foo *' instead of the equivalent `foo_t *' for some nfs and
lfs syscalls so that <sys/sysproto.h> doesn't depend on <sys/mount.h>.
1997-01-16 15:58:32 +00:00
KATO Takenori 280a2265d9 - Modified for PC-98.
- Included IBM-PC specific code in #ifndef PC98.
1997-01-16 14:56:16 +00:00
KATO Takenori 66548b7ce9 Synchronize with followings:
sys/i386/conf/files.i386 revision 1.149
	sys/i386/conf/options.i386 revision 1.33
	sys/i386/isa/if_fe.c revision 1.25
	sys/i386/isa/syscons.c revision 1.194
	sys/i386/isa/syscons.h revision 1.26
1997-01-16 14:50:17 +00:00
Bruce Evans f7b630a403 Added file kern_opt.c for putting warnings about defunct options in.
Warn about recently removed option EXTRAVNODES and about other rubbish
that hasn't been put in opt_defunct.h yet.
1997-01-16 13:31:55 +00:00
Bruce Evans 5131d64e0c Removed option EXTRAVNODES. All versions of FreeBSD-2.x have a sysctl
variable `kern.maxvnodes' which gives much better control over vnode
allocation than EXTRAVNODES (except in -current between 1995/10/28 and
1996/11/12, kern.maxvnodes was read-only and thus useless).
1997-01-16 13:16:10 +00:00
Jordan K. Hubbard 3b20426160 Add the ex driver (Intel EtherExpress Pro/10).
I have no idea if this works since I don't have one of the cards to test.
I also don't know what the LINT and GENERIC entries should look like,
so I just made up some values for now and left them commented out.
Someone who knows the factory settings for a Pro/10, please contact me!

Submitted-By: Javier Martín Rueda <jmrueda@diatel.upm.es>
1997-01-16 12:19:21 +00:00
Bruce Evans 7d350e7256 Fixed printing of small offsets. E.g., -4(%ebp) is now printed
as -0x4(%ebp) instead of as _APTD+0xffc(%ebp), and if GUPROF is
defined, 8(%ebp) is now printed as 0x8(%ebp) instead of as
GMON_PROF_HIRES+0x4(%ebp).
1997-01-16 11:27:11 +00:00
Jordan K. Hubbard 827d623ef8 Document INCLUDE_CONFIG_FILE. 1997-01-16 07:43:27 +00:00
KATO Takenori 0c6d0cce02 Re-enable ds_subtype, and ds_name (included in #ifdef PC98).
Userland programs which access partition information require
ds_subtype and ds_name on PC98.
1997-01-16 05:27:10 +00:00
John Dyson afa07f7e83 Change the map entry flags from bitfields to bitmasks. Allows
for some code simplification.
1997-01-16 04:16:22 +00:00
David Greenman 649c409d03 Fix bug related to map entry allocations where a sleep might be attempted
when allocating memory for network buffers at interrupt time. This is due
to inadequate checking for the new mcl_map. Fixed by merging mb_map and
mcl_map into a single mb_map.

Reviewed by:	wollman
1997-01-15 20:46:02 +00:00
Bruce Evans e0611bb287 Fixed longstanding annoying warning about a type mismatch. pmap doesn't
really uses pt_entry_t internally, so don't use it here.

Fixed range checking for writing.  The partial page (if any) following
etext wasn't writable.
1997-01-15 19:24:12 +00:00
Bruce Evans 16a02c1105 Removed redundant spl0()'s from kernel processes. They were work-arounds
for a bug in fork().
1997-01-15 19:05:08 +00:00
Bruce Evans 3e2bca9e04 Fixed interrupt unmasking for child processes which I broke in
rev.1.10 two years ago.  Children continued to run at splhigh()
after returning from vm_fork().  This mainly affected kernel
processes and init.  For ordinary processes, interrupts are normally
unmasked a few instructions later after fork() returns (it may be
important for syscall() not to reschedule the child processes).
Kernel processes had workarounds for the problem.  Init manages to
start because some routines "know" that it is safe to go to sleep
despite their caller starting them at a high ipl.  Then its ipl
gets fixed on its first normal return from a syscall.
1997-01-15 18:58:42 +00:00
Søren Schmidt b6b9dfa17e Upgrade the kbdio rutines to provide queued kbd & mouse events.
Minor other updates to syscons by me.

Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-01-15 18:16:32 +00:00
John Fieber b8a83a83ca Make the sound drivers work with DEVFS.
If you have something other than a Soundblaster 16, please try
this out!
1997-01-15 03:42:30 +00:00
Garrett Wollman e7d4c83b3f Update from driver author. Closes PR#2421.
Submitted by:	 seki@sysrap.cs.fujitsu.co.jp
1997-01-14 18:24:59 +00:00
Nate Williams bf083f9e6b One other minor include file change.
Submitted by:	bde
1997-01-14 16:29:05 +00:00
KATO Takenori 8df4619996 Synchronize with sys/i386/isa/if_ed.c revision 1.112 and
sys/i386/isa/if_fe.c revision 1.23 (new if_multiaddrs list).
1997-01-14 12:37:32 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Nate Williams d7394bb574 Include file cleanups.
Submitted by:	bde
1997-01-13 21:51:13 +00:00
Garrett Wollman 477180fbc8 Use the new if_multiaddrs list for multicast addresses rather than the
previous hackery involving struct in_ifaddr and arpcom.  Get rid of the
abominable multi_kludge.  Update all network interfaces to use the
new machanism.  Distressingly few Ethernet drivers program the multicast
filter properly (assuming the hardware has one, which it usually does).
1997-01-13 21:26:53 +00:00
KATO Takenori 14c138a505 Synchronize with sys/i386/i386/userconfig.c revision 1.80. 1997-01-13 12:32:09 +00:00
Nate Williams db7e7a7213 Just 'warn' the user that they are mixing dedicated drivers and generic
code if the option 'LINT_PCCARD_HACK' is specified (which should only
be used in LINT).

Demanded by:	bde
1997-01-13 05:22:40 +00:00
Nate Williams ec0ae37d10 Added options 'LINT_PCCARD_HACK' which (will very soon) allow LINT to
compile again.  The code to protect users from combining the dedicated
PCCARD drivers and the generic code is a warning if the above option
is included in the config file.

Demanded by:	bde
1997-01-13 05:21:09 +00:00
Mike Smith 995ee89c33 - Add [?] key and corresponding helptext/pager.
(helptext from Philippe Regnauld)
 - Make introfunc() work with serial terminals.
   (submitted by Jean-Marc Zucconi)
 - Eliminate excessive statusline redraw during screen updates.
   (requested by Peter Wemm)
 - Some trivial output formatting dinks.
1997-01-13 04:13:15 +00:00
Wolfram Schneider af20215665 Sort cross references. 1997-01-13 00:25:51 +00:00
John Dyson b447ce90f5 When we changed pmap_protect to support adding the writeable
attribute to a page range, we forgot to set the PG_WRITEABLE
flag in the vm_page_t.  This fixes that problem.
1997-01-11 23:50:42 +00:00
Nate Williams 9f2f000c7f Initialize pcic_imask with SWI_MASK to interference from timeout routines.
Suggested by:	bde
1997-01-11 23:40:08 +00:00
Nate Williams b1e21161bf Whoops, typo. 1997-01-11 18:32:27 +00:00
Nate Williams cc6da87199 Update the PCIC controller's imask with individual slot IRQ's.
Assuming that the intr_mask[] was updated by changing the maskptrs (the
existing update_intr_masks() function will not work) this code was
written so the PCIC controller insertion/removal events will not
interrupt the card IRQ handler events.

Some possible scenarios:
+ Card is removed during IRQ handler:

  - PCIC card handler is allowed to interrupt
  - card removal event is called, removing the driver and data structures
  * card interrupt handler continues w/out driver, data structures, and hardware

OR (the code just committed)

  * card IRQ handler has no hardware to read/write to, but has code and
    data to run on (XXX- Assume it completes and doesn't spin forever)
  - PCIC card handler unloads the card driver

The current situation at least leaves the card interrupt handlers the
drivers and data structures to work with although the hardware can't be
guaranteed.

Reviewed by:	bde
1997-01-11 18:23:20 +00:00
Nate Williams e4410844b0 Removed magic # 16 and replaced with ICU_LEN. 1997-01-11 17:59:38 +00:00
Nate Williams 8b8f892696 Now that all of the IRQ's should be allocated by the time this
pccard_configure() is called (except for LKm's :( ), build a list of
unassigned interrupts for the PCCARD code to use.

Reviewed by:	bde
1997-01-11 17:54:57 +00:00
Nate Williams 796c9a39d8 Moved pccard_configure() to the end of the configure() list. This
avoids problems with the PCIC controller grabbing an interrupt that
another card needs.

Closes PR: kernel/2405

Reviewed by:	bde
1997-01-11 17:41:36 +00:00
KATO Takenori 97fcf1ddb2 Fix typo. 1997-01-11 08:59:45 +00:00
John Dyson d4a272db61 Slightly correct the code that moves pages from the active to the
inactive queue.  This is only a minor performance improvement, but will
not affect perf on machines that don't have ref bits.
1997-01-11 07:22:24 +00:00