Commit Graph

6418 Commits

Author SHA1 Message Date
Bruce Evans
2e2d9bc760 Preserve %esi and %edi for all BIOS calls. This is probably only necessary
for get_diskinfo(), whose BIOS call sets %es:%edi in some cases, although
most documentation says that it doesn't change %edi in the cases that
happened to matter (for hard disks).

This shall be in 2.1.6 and 2.2.

Submitted by:	Tor.Egge@idt.ntnu.no
		(except I kept the unnecessary preservation of %edx and %ecx)
1996-11-11 14:03:33 +00:00
Mike Smith
4f731c9f37 Update the database of known devices (people, please consider this when you
are adding new drivers...) to match, as best I can tell, majors.i386.

Improve behaviour when attempting to save changes for devices that should
 not be changeable.  Now correclty avoids non-device items, PCI devices and
 devices with no isa_device structure.

Submitted by:	(observations from) joerg, bde
1996-11-11 09:09:37 +00:00
Justin T. Gibbs
ea4f3c468a Clean up the memory mapped/Programmed I/O stuff so that the driver completely
uses one or the other.  This required some changes to the ahc_reset()
function, and how early the probes had to allocate their softc.

Turn the AHC_IN/OUT* macros into inline functions and lowercase their names
to indicate this change.  Geting AHC_OUTSB to work as a macro doing
conditional memory mapped I/O would have been too gross.

Be smart about the STPWEN control bit in SCFRCTL1.  It should only be set
if the low byte of the bus is to be terminated.  We figure this out either
by "caching" the value left over from the BIOS setup before we reset the card
or by using the values stored in the seeprom if it is availible.
1996-11-11 05:26:14 +00:00
Justin T. Gibbs
30136d82b2 Clean up the memory mapped/Programmed I/O stuff so that the driver completely
uses one or the other.  This required some changes to the ahc_reset()
function, and how early the probes had to allocate their softc.

Turn the AHC_IN/OUT* macros into inline functions and lowercase their names
to indicate this change.  Geting AHC_OUTSB to work as a macro doing
conditional memory mapped I/O would have been too gross.

Stop setting STPWEN in the main driver and let the PCI front end do it
instead.  It knows better.

Add the clearing of the QOUTQCNT variable during command complete processing
in the SCB paging case.

Go back to doing unconditional retries for the QUEUE FULL status condition.
This is really a kludge, but the code to handle it properly is on the SCSI
branch and will not make it into 2.2.
1996-11-11 05:24:46 +00:00
Justin T. Gibbs
e0582e6561 Clean up the memory mapped/Programmed I/O stuff so that the driver completely
uses one or the other.  This required some changes to the ahc_reset()
function, and how early the probes had to allocate their softc.

Turn the AHC_IN/OUT* macros into inline functions and lowercase their names
to indicate this change.  Geting AHC_OUTSB to work as a macro doing
conditional memory mapped I/O would have been too gross.
1996-11-11 05:21:27 +00:00
Justin T. Gibbs
6fb5e0fa28 Add the AHC_FORCE_PIO option.
Update comment on AHC_SCBPAGING_ENABLE since I think it works now.
1996-11-11 05:17:34 +00:00
Justin T. Gibbs
8220b8706a Fix two problems with SCB Paging.
1) get_free_or_disc_scb was not being passed its argument correctly
   in one case

2) Add protection in the form of the QOUTQCNT variable to prevent
   overflowing the QOUTFIFO.

This should make SCB Paging work.  Really, I mean it now. 8-)
1996-11-11 05:16:41 +00:00
Bill Fenner
82c23eba89 Add the IP_RECVIF socket option, which supplies a packet's incoming interface
using a sockaddr_dl.

Fix the other packet-information socket options (SO_TIMESTAMP, IP_RECVDSTADDR)
to work for multicast UDP and raw sockets as well.  (They previously only
worked for unicast UDP).
1996-11-11 04:56:32 +00:00
John Dyson
d22671dcce Support the PG_G flag on Pentium-Pro processors. This pretty
much eliminates the unnecessary unmapping of the kernel during
context switches and during invtlb...
1996-11-11 04:20:19 +00:00
Nate Williams
a973755bfa Allow us to enable the 'XT_KEYBOARD' code using a configuration flag.
This allows the user to add modify syscons's configuration flags using
UserConfig that will allow older/quirky hardware (most notably older IBM
ThinkPad laptops) to work with the standard boot kernel.

Inspired by:	The Nomads
1996-11-10 16:44:13 +00:00
David Greenman
d66e3876dd Put the packet error printf inside #ifdef DIAGNOSTIC. 1996-11-10 13:36:46 +00:00
Bill Fenner
39172c9401 Re-enable the TCP SYN-attack protection code. I was the one who didn't
understand the socket state flag.

2.2 candidate.
1996-11-10 07:37:24 +00:00
Bruce Evans
171ed8bf14 Fixed lookup of ".." in checkpath. It always failed, so renames of
directories to a different parent directory always failed.  This bug
was caused by 4.4Lite2 changing the directory format and ext2fs not
keeping up.

Should be in 2.2.
1996-11-09 10:25:04 +00:00
John Dyson
2cb544c3c9 Fix an ordering bug -- pmap_remove_pages should be called BEFORE
vm_map_remove, not after...

2.2-RELEASE candidate.
1996-11-09 03:54:25 +00:00
Masafumi Max NAKANE
1473a85114 Back out my previous change.
It probably broke the support for the device.

Pointed-Out by:	joerg
1996-11-09 02:44:11 +00:00
Satoshi Asami
6b2f48440f Re-sync with -current. Should be in 2.2.
Submitted by:	The FreeBSD(98) Development Team
1996-11-09 00:39:59 +00:00
Satoshi Asami
634e26af7a (1) Update
(2) Don't depend on BOOTSEG

(3) Change BOOTSEG from 0x9000 to 0x1000

Should be in 2.2.

Submitted by:	FreeBSD(98) Development Team
1996-11-09 00:18:25 +00:00
Stefan Eßer
e6f6908163 Only access the specific interrupt status registers if required.
This follows more closely the suggestions in the latest NCR docs, and has
been running on my system for weeks with no problem. It does improve the
quality of diagnostic messages and does allow to better understand the
sequence of events in case of an error.

This should go into 2.2 and 2.1.6.
1996-11-08 23:46:04 +00:00
Bruce Evans
68a9989171 Fixed spacefree calculation in ext2_direnter(). This bug sometimes caused
panics.

This should be in 2.2, of course.

Submitted by:	davidg
Obtained from:	bouyer@antioche.ibp.fr (Manuel BOUYER) (fix for NetBSD)
1996-11-08 19:06:34 +00:00
Bruce Evans
f886b4857a Removed gratuitous differences between ext2_readwrite.c and ufs_readwrite.c.
This fixes several bugs and one missing feature:
- cluster_read() was needlessly used for reading files of size exactly 1
  block.
- EFAULT errors for read didn't terminate the loop.  This was probably
  harmless.
- IO_VMIO handling was missing near line 275.  I don't know what this does.
- B_CLUSTEROK was only set if (doclusterwrite) nead line 293.  This was
  harmless, if only because another bug prevents doclusterwrite from being
  0.
- MNT_NOATIME wasn't implemented.

This should be in 2.2, of course.

Reviewed by:	davidg
1996-11-08 18:50:09 +00:00
Satoshi Asami
33c58c9f8f Remove option I586_FAST_BCOPY. The code will be included by default
if I586_CPU is defined.  Note there is a runtime check so the code
won't be run for non-Pentium CPUs anyway.

2.2 candidate, this code has been tested for almost half year in -current.
1996-11-08 02:38:44 +00:00
Masafumi Max NAKANE
9358777784 Typo, MATSHITA -> MATSUSHITA.
2.2 & 2.1.6 candidate.
1996-11-07 18:13:57 +00:00
Joerg Wunsch
1d6ccf9cd6 Fix the message buffer mapping. This actually allows to increase
the message buffer size in <sys/msgbuf.h>.

Reviewed by:	davidg,joerg
Submitted by:	bde
1996-11-07 14:44:01 +00:00
Justin T. Gibbs
ebcf5ea509 Bzero the kernel scb array after it is allocated otherwise the control byte
used on the first transaction on an SCB is indeterminate.

Spaces -> tabs.
1996-11-07 06:39:44 +00:00
Bruce Evans
94ca32a3f5 Don't switch from fast interrupt handlers to normal interrupt
handlers if interrupts are nested more than a few (3) deep.  This
only reduces the maximum nesting level by 1 with the standard
drivers unless there is a related bug somewhere, but can't hurt
much (the worst case is returning to hoggish interrupt handler like
wdintr(), but such interrupt handlers hurt anyway).

Fixed a previously harmless race incrementing the interrupt nesting
level.

This should be in 2.1.6 and 2.2.
1996-11-07 03:05:27 +00:00
Mike Smith
c06ec9a76b Add the 'piix' device, to get the right flags for it. This appears to
fix Joerg's freeze.

Definitely a 2.2 candidate.

Reviewed by:	joerg
1996-11-07 01:13:37 +00:00
Joerg Wunsch
83e9a3b6fc Fix the sequence at odopen() time so the driver actually notices if a
medium with another size is being inserted.  Right now, this case was
broken and led to a situation where a medium could only be replaced
with another one of the same size.

Closes PR #kern/1830: Can't mount optical disk...

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-11-06 17:31:14 +00:00
Bruce Evans
a01024e023 Count only hardware interrupts in cnt.v_intr, so that the individual
hardware interrupt counts add up to the total.  Previously, software
interrupts generated by splz() were counted in the total.  These
software interrupts seem to be very rare - there have apparently been
0 of them on freefall among the last 352448857 interrupts.
1996-11-06 17:02:38 +00:00
Bruce Evans
aebd564631 Compile linux_genassym with the same options as genassym. ${PARAM} and
- were missingUKERNEL.  This was harmless until I declared the kernel's
main().
1996-11-06 15:13:41 +00:00
Bruce Evans
f5227a832c Compile genassym without -static (undo rev.1.20). The default can be
depended on now, and linux_genassym has depended on it for a long time.
1996-11-06 14:56:11 +00:00
Bruce Evans
11bfa65a0b Rewrote the COMMENT about the bogus options CHILD_MAX and OPEN_MAX. These
will be renamed.

Fixed comments about unsupported network protocols.

ncr0 is a controller, not a device.  This make no difference.

Added undocumented options DEVFS_ROOT, I586_CTR_GUPROF and I586_PMC_GUPROF.
Sorted undocumented options.
1996-11-06 14:52:20 +00:00
Joerg Wunsch
b99dd17277 Updates and bugfixes to the worm driver:
. also detect the Phlips CDD2000; it's software-compatible with the HP part

Submitted by:	cau@cc.gatech.edu (Carlos Ugarte)

. correct the blocksize handling for CD-DA tracks, and fix multitrack
  handling

Submitted by:	nsayer@quack.kfu.com (Nick Sayer)

2.2 candidates!
1996-11-06 13:33:53 +00:00
Doug Rabson
f438ae02f5 Improve the queuing algorithms used by NFS' asynchronous i/o. The
existing mechanism uses a global queue for some buffers and the
vp->b_dirtyblkhd queue for others.  This turns sequential writes into
randomly ordered writes to the server, affecting both read and write
performance.  The existing mechanism also copes badly with hung
servers, tending to block accesses to other servers when all the iods
are waiting for a hung server.

The new mechanism uses a queue for each mount point.  All asynchronous
i/o goes through this queue which preserves the ordering of requests.
A simple mechanism ensures that the iods are shared out fairly between
active mount points.  This removes the sysctl variable vfs.nfs.dwrite
since the new queueing mechanism removes the old delayed write code
completely.

This should go into the 2.2 branch.
1996-11-06 10:53:16 +00:00
Justin T. Gibbs
16da2fbab4 Update to changes in generic SCSI layer. 1996-11-05 09:20:08 +00:00
Justin T. Gibbs
ac323a042d A little 80 column cleanup. 1996-11-05 08:49:17 +00:00
Justin T. Gibbs
bee7495e7a Add missing parenthesis. That's what I get for having e different versions
of this driver in three different trees. <sigh>
1996-11-05 08:39:33 +00:00
David Greenman
e75838f701 Eliminate an unnecessary synchronous write (and an 8K bcopy+bzero) when
truncating/deleting large files.

Reviewed by:	mckusick, dyson
Submitted by:	Kirk McKusick <mckusick@mckusick.com>, modified for
		FreeBSD by me.
1996-11-05 08:19:40 +00:00
Justin T. Gibbs
a75528de6b Clean up some code having to do with the 398X cards. We can't rely on the
7810 being either the last of the first device to be probed, so use a counting
scheme instead to determine when one card ends and another begins.  There may
be a better way to do this by decoding the PCI tag, which I will investigate
later.

2.2 Candidate.
1996-11-05 07:59:28 +00:00
Justin T. Gibbs
bf850955ed Move the include opt_aic7xxx in aic7xxx.h so that all of the driver files get
it automatically.  The AHC_FORCE_PIO option wasn't having any effect because
the PCI probe code didn't include this file.

Fix some problems with the new sync and wide negotiation code.  First off,
go back to async transfers by using a message reject again.  The SCSI II and
III spec indicate that if a target's response to an initiater does not suit
(i.e. its too low), then performing a message reject is the appropriate
response.  If, on the other hand, the initiator begins the negotiation and
we want to go async, we will send back an SDTR message with a 0 period and
offset.

Also fix a really bad negotiation problem caused by a missing "break".  This
would usually hit people that had "smart" wide devices that immediately
attempt sync negotiation after a successful wide negotiation.

2.2 Candidate.
1996-11-05 07:57:29 +00:00
Justin T. Gibbs
775395aaac index_untagged_scb should rely solely on the argument passed in SINDEX and
not access SCB_TCL directly.  This could have caused problems on twin channel
adapters.

2.2 Candidate.
1996-11-05 07:51:29 +00:00
Mike Smith
0a9d630ea8 Protect against PCI devices which may have their 'changed' flag set,
or list items which may look like devices but which don't have an
isa_device structure attached to them.

This _shouldn't_ be possible, but it appears to have been
observed-by: Joerg
1996-11-05 05:52:36 +00:00
John Dyson
db2c0faa4c Vastly improved contigmalloc routine. It does not solve the
problem of allocating contiguous buffer memory in general, but
make it much more likely to work at boot-up time.  The best
chance for an LKM-type load of a sound driver is immediately
after the mount of the root filesystem.

This appears to work for a 64K allocation on an 8MB system.
1996-11-05 04:19:08 +00:00
Sujal Patel
e89054370f Add audio mixer ioctls.
Only writing to the mixer is implemented.
1996-11-05 02:04:37 +00:00
Guido van Rooij
b3ac88f13f New vx driver for:
3COM 3C590 Etherlink III PCI,
        3COM 3C595 Fast Etherlink PCI,
        3COM 3C592 Etherlink III EISA,
        3COM 3C590 Fast Etherlink EISA,
        3COM 3C900 Etherlink XL PCI and
        3COM 3C905 Fast Etherlink XL PCI.

This driver is based on OpenBSD's driver. I modified it to run under FreeBSd
and made it actually work usefully.
Afterwards, nao@tom-yam.or.jp (HAMADA Naoki) added EISA support as well as
early support for 3C900 Etherlink XL PCI and 3C905 Fast Etherlink XL PCI.
He also split up the driver in a bus independant and bus dependant parts.

Especially the 3c59X support should be pretty stable now.

Submitted by:	partly nao@tom-yam.or.jp (HAMADA Naoki)
Obtained from:partly OpenBSD
1996-11-04 22:17:20 +00:00
Søren Schmidt
10661203e7 Fix the hanging keyboard problem under Xaccel. Apprently we are loosing
an interrupt somewhere. The solution here is to check for keyboard
input each time the screen update timer ticks. Not pretty, but works.
1996-11-04 21:01:08 +00:00
Jeffrey Hsu
78769fbc6a struct mfsnode bloated in size by 12 bytes, so reduce spare padding by 3 longs.
We now only have 4 spare bytes before hitting the dreaded 32 byte threshold.
1996-11-04 20:53:02 +00:00
Bruce Evans
fd25850c96 Don't clobber max_ncyls, ending up guessing thetotal number of cylinders as
the number in the 4th slot.

Fixes PR 1893.

Should be in 2.1.5 and 2.2.
1996-11-04 17:40:43 +00:00
Bruce Evans
206e5b7e27 Fixed some races and misleading comments in ufs_rename().
1. When a directory is renamed to an existing (empty) directory,
it is possible for the target vnode to become the source vnode
underneath you (because another process may complete the same
rename).  It was assumed that this can't happen, and the bogus
errno EINVAL was returned.  This was fairly harmless.

Fix: return ENOENT instead, as if the source directory was renamed
a little earlier.

2. The same metamorphosis is possible for non-directories.  It was
assumed that this can't happen, and the code for handling "just
removing a link name" happened to be used.  This would have worked
except for fatal bugs in the link name removal - the link name was
assumed to still be there, and a null pointer was followed.

Fix: check the result of relookup().  This fixes PR 1930.

Notes:

(a) POSIX seems to say that removing link names shall have no effect.
BSD (4.4Lite2 at least) does something reasonable instead.

(b) The relookup() may find a file unrelated to the original.
Removing this isn't correct.  Consider 3 existing files A, B and
C, and concurrent renames: AB = rename(A, B), another AB, and
CA = rename("c", "a").  If rename() is atomic, then only the
following results are possible:

	AB, AB (fails), CA: A = original C, B = original A, C = gone
	AB, CA, AB:         A = gone,       B = original C, C = gone
	CA, AB, AB (fails): A = gone,       B = original C, C = gone

but ufs_rename() can give:

	A,AB,CA,B (sorta):  A = gone,       B = original A, C = gone

This usually doesn't matter, since getting into a race is usually
an error.
---

These fixes should be in 2.1.6 and 2.2.
1996-11-04 16:05:51 +00:00
Poul-Henning Kamp
50affa0e18 Set REVISION=3.0 and RELDATE=199701 1996-11-03 12:04:05 +00:00
John Dyson
5c2a644a47 Fix a problem with running down processes that have left wired
mappings with mlock.  This problem only occurred because of the
quick unmap code not respecting the wired-ness of pages in the
process.  In the future, we need to eliminate the dependency
intrinsic to the design of the code that wired pages actually
be mapped.  It is kind-of bogus not to have wired pages mapped,
but it is also a weakness for the code to fall flat because
of a missing page.

This show fix a problem that Tor Egge has been having, and also
should be included into 2.2-RELEASE.
1996-11-03 03:40:47 +00:00