Commit Graph

23076 Commits

Author SHA1 Message Date
John Baldwin
7e4b7c97de Don't perform an mi_switch() when we release Giant during cpu_exit(). We
are about to call cpu_switch() anyways.

Found by:	witness
2000-11-15 19:44:38 +00:00
Kirk McKusick
5f90cac7f1 In preparation for deprecating CIRCLEQ macros in favor of TAILQ
macros which provide the same functionality and are a bit more
efficient, convert use of CIRCLEQ's in netgraph PPP code to TAILQ's.

Reviewed by:	Archie Cobbs <archie@dellroad.org>
2000-11-15 19:40:34 +00:00
Warner Losh
c7ba419499 vx no longer uses pci compat shims and this doesn't need a count 2000-11-15 18:43:41 +00:00
Warner Losh
5c75885e24 MFGENERIC: 1.291 2000-11-15 18:42:44 +00:00
Warner Losh
e655ea71de Add pmtimer device, necessary for proper time keeping when apm or
other power management devices are enabled.
2000-11-15 18:36:24 +00:00
Ben Smithurst
c6662b8e3d remove period from SEE ALSO. 2000-11-15 17:02:54 +00:00
Nick Hibma
60295bde4c Set OPEN Flag on open.
Make set_config(1) print warning message if it fails.
2000-11-15 10:36:08 +00:00
John Baldwin
8b9d6e94af Enable all interrupts in switch_trampoline after releasing the sched_lock.
This is needed so that kernel threads created before interrupts are
enabled do not run with interrupts disabled once the system is up and
running.
2000-11-15 01:48:49 +00:00
John Baldwin
4ae465d099 Always enable interrupts during fork_trampoline() after releasing the
sched_lock.  This is needed for kernel threads that are created before
interrupts are enabled.  kthreads created by kld's that are created at
SI_SUB_KLD such as the random kthread.

Tested by:	phk
2000-11-14 23:01:24 +00:00
David E. O'Brien
f9c70d7647 Don't use the Gawkism strftime(). Pass in the date stamp on the awk
command line instead.

Approved by:	dcs
2000-11-14 21:02:49 +00:00
Kirk McKusick
a077f63555 In preparation for deprecating CIRCLEQ macros in favor of TAILQ
macros which provide the same functionality and are a bit more
efficient, convert use of CIRCLEQ's in resource manager to TAILQ's.

Approved by:	Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
2000-11-14 20:46:02 +00:00
Bill Paul
fa167b8eaa Add support for the Accton EN2242 MiniPCI adapter. This is just an
ADMtek Centaur chip, so all we need is the PCI ID.

Submitted by:	Scott Lang <scottl@FreeBSD.org>
2000-11-14 19:35:22 +00:00
John Baldwin
8204c68ecc Only hold the mutex for an eventhandler list while the list is being accessed.
Specifically, don't hold the lock while calling event handlers as a handler
may tsleep() while holding the mutex.

Found by:	witness
2000-11-14 18:22:59 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Kirk McKusick
bd4bd019fb When deleting a file, the ordering of events imposed by soft updates
is to first write the deleted directory entry to disk, second write
the zero'ed inode to disk, and finally to release the freed blocks
and the inode back to the cylinder-group map. As this ordering
requires two disk writes to occur which are normally spaced about
30 seconds apart (except when memory is under duress), it takes
about a minute from the time that a file is deleted until its inode
and data blocks show up in the cylinder-group map for reallocation.
If a file has had only a brief lifetime (less than 30 seconds from
creation to deletion), neither its inode nor its directory entry
may have been written to disk. If its directory entry has not been
written to disk, then we need not wait for that directory block to
be written as the on-disk directory block does not reference the
inode. Similarly, if the allocated inode has never been written to
disk, we do not have to wait for it to be written back either as
its on-disk representation is still zero'ed out. Thus, in the case
of a short lived file, we can simply release the blocks and inode
to the cylinder-group map immediately. As the inode and its blocks
are released immediately, they are immediately available for other
uses. If they are not released for a minute, then other inodes and
blocks must be allocated for short lived files, cluttering up the
vnode and buffer caches. The previous code was a bit too aggressive
in trying to release the blocks and inode back to the cylinder-group
map resulting in their being made available when in fact the inode
on disk had not yet been zero'ed. This patch takes a more conservative
approach to doing the release which avoids doing the release prematurely.
2000-11-14 09:00:25 +00:00
Matt Jacob
78f3dc6530 Pick up kernelname for bootinfo structure (if possible), otherwise
from environment.
2000-11-14 08:12:15 +00:00
Matt Jacob
492ecc5fbd init booted_kernel from environment kernelname (if there) 2000-11-14 08:11:03 +00:00
Matt Jacob
178e6e0fed move init of booted_kernel to bootinfo.c 2000-11-14 08:10:15 +00:00
Kirk McKusick
d6514f21d7 In preparation for deprecating CIRCLEQ macros in favor of TAILQ
macros which provide the same functionality and are a bit more
efficient, convert use of CIRCLEQ's in NFS to TAILQ's.
2000-11-14 08:00:39 +00:00
Kirk McKusick
dc029a4bd7 Missed conversion of CIRCLEQ => TAILQ for mount list. 2000-11-14 06:38:18 +00:00
Jordan K. Hubbard
4dc665b8bf Proper capitalization of PCMCIA (and avoid matching pcm) 2000-11-14 01:13:57 +00:00
Jordan K. Hubbard
68ce54fbde In the year 2000, I think it's perfectly reasonable to include audio
support by default in GENERIC.
2000-11-14 01:11:13 +00:00
Bill Paul
a614c4dc7b Close PR# 21843 and PR# 21864. This adds support for WEP and updates some
of the data structures to include new members that weren't defined in the
manual I have.

I opted to use Doug Ambrisko's WEP patches since David Cornejo's patches
did not include the necessary changes to ancontrol(8) to actually enable
and use WEP.

NOTE: I don't currently have access to an Aironet card, so I can't test
any of this. Everything compiles and close scrutiny doesn't reveal any
obvious problems, but Murphy's Law applies. This means I will probably
leave these changes in -current for a bit longer than usual until I'm
sure they work right.
2000-11-13 23:04:16 +00:00
Andrew Gallatin
2c4ab9ddfa Make linux_sendsig and linux_sigreturn use all 64 bits of a
linux_sigset_t by updating the linux_sigframe struct so as to include
linux's "extramask" field.  This field contains the upper 32-bits of
the sigset.  extramask sits behind a linux_fpstate struct, which I've
defined primarily for padding purposes.

While we're here, define LINUX_NSIG in terms of LINUX_NBPW (32) and
LINUX_NSIG_WORDS (2).

This fixes problems where threaded apps would accumulate a large
number of zombies.  This was happening because the exit signal resides
in the upper 32-bits of the sigset and was never getting unmasked by
the manager thread after the first child exited.

PR: 		misc/18530  (may be related, originator not yet contacted)
Reviewed by:	marcel
2000-11-13 20:44:05 +00:00
John Baldwin
af80d322a6 Fix a bug with handling of the saved interrupt state for spin mutexes in
the MTX_EXIT_WITH_RECURSION() assembly macro (currently unused).

Submitted by:	bde
2000-11-13 18:39:18 +00:00
Yoshihiro Takahashi
8965720482 Initialize bus_space_handle_t with zero (for PC-98). 2000-11-13 11:48:38 +00:00
Marcel Moolenaar
7cf6a3b430 Fix F_SETOWN on pipes. Linux returns EINVAL while we send a SIGIO
signal. There's at least 1 program that is known to break.
Submitted patch has been edited to match current code.

MFC: yes
Submitted by: bde
2000-11-13 04:08:56 +00:00
Justin T. Gibbs
7357f64514 Classify all EISA cards with major firmware revions '2' as 742As.
This allows us to successfully attach early Storage Dimension cards.

Allocate mailboxes for the 742A bellow the 16MB limit.  Although these
cards seem to be able to deal with all other types of data anywhere
in a 32bit address space, 24bit addresses are required for mailboxes.

bt_eisa.c:
	Add device IDs for all Storage Dimension products I could
	find from their web site.

Thanks to Ted Mittelstaed for loaning me the equipment to diagnose
and fix these problems.
2000-11-13 03:44:20 +00:00
Justin T. Gibbs
96dfd8bb97 Don't attempt to reference a NULL scb_data area during teardown events
occurring early in initialization.  This fixes attachments to the parity
engines that FreeBSD doesn't support.
2000-11-13 03:35:43 +00:00
Bosko Milekic
1edd6ddf05 Change the ext_type type from short to int, since it doesn't cost us
anything and it's likely to be faster on alphas.

Also, add EXT_MOD_TYPE for modules that want to add their own ext_type and
are not network drivers (so they don't use EXT_NET_DRV).
2000-11-13 02:59:57 +00:00
Warner Losh
f50b4dbebd Add ray driver for card (OLDCARD) and pccard (NEWCARD) entries.
Add sn driver for pccard (NEWCARD).
2000-11-12 21:47:23 +00:00
Warner Losh
3e8e7863b2 Changes necessary to make this work.
The prior version in the tree was repo-copied from Duncan Barclay's
cvs tree.

Also add $FreeBSD$

Submitted by: Duncan Barclay
Committed-via: raylan link with two webgear cards.
2000-11-12 21:43:52 +00:00
Søren Schmidt
0cdc179319 Only offset raid disks > 1 on the HPT, this should solve the
boot problems..
However this demands that dangerously dedicated disks use an
offset of at least 10 from the start to not overwrite the
raid config sector on the HPT...
2000-11-12 20:45:14 +00:00
Søren Schmidt
07296bbba1 Better handling of immediate commands, mainly to solve timeouts
in the atapi-tape code...
2000-11-12 20:41:24 +00:00
Søren Schmidt
a9c1b0e23a Hopefully fix the probing problems that caused lost slaves etc.. 2000-11-12 20:40:05 +00:00
David Greenman
866746b6a6 Fixed a certain panic on IO error in sendfile(): Page must be set PG_BUSY
before calling vm_page_free() on it.
2000-11-12 14:51:15 +00:00
Justin T. Gibbs
420bf58729 aic7xxx.c:
Shutdown the card when a catastrophic error occurs.  This quenches
	any interrupts stemming from the card.

aic7xxx_inline.h:
	Return instead of processing additional interrupt state
	after handling a catastrophic error.  We now shutdown the
	chip in this case in the hopes that the system can live
	without this controller.  The shutdown process invalidates any
	other interrupt state.

aic7xxx.seq:
	Only attempt to clear SCSIBUSL on Ultra2 controllers.  The
	clearing is workaround for a selection timeout bug on U2/U160
	controllers and happens to be illegal on aic7770 (EISA/VL)
	controllers.
2000-11-12 05:19:46 +00:00
Bosko Milekic
2424013a99 Add new M_RDONLY flag, which can be set during setup (MEXTADD, for example),
and which indicates that the ext_buf is to be marked READ-ONLY.

Also introduce M_WRITABLE() macro, which will return true if:
* M_RDONLY is _not_ set AND:
* either mbuf has no ext_buf attached OR it has an ext_buf attached but the ref
  count is NOT above 1.

sf_bufs (sendfile) are marked M_RDONLY.

Now code determining whether an mbuf's data area is "shared" or not can be
made to use this instead of doing its own (often incorrect) thing.

Submitted by: bmilekic, dwmalone, and Ian Dowse
Reviewed by: dwmalone, jlemon
2000-11-11 23:12:27 +00:00
Bosko Milekic
b7db1f9818 Change MEXTADD usage to pass the two new arguments.
Reviewed by: jlemon
2000-11-11 23:08:22 +00:00
Bosko Milekic
15072affc8 Change check from mbuf->m_ext.ext_free to use the new ext_type in order
to determine whether the given mbuf has a cluster (or some other type of
external storage) attached to it.

Note: This code should eventually be made to use M_WRITABLE() to determine
whether or not a copy should be made.

Reviewed by: jlemon
2000-11-11 23:07:38 +00:00
Bosko Milekic
0a1df235ba While I'm here, get rid of (now useless) MCLISREFERENCED and use MEXT_IS_REF
instead.
Also, fix a small set of "avail." If we're setting `avail,' we shouldn't
be re-checking whether m_flags is M_EXT, because we know that it is, as if
it wasn't, we would have already returned several lines above.

Reviewed by: jlemon
2000-11-11 23:05:59 +00:00
Bosko Milekic
e778918123 * Have m_pulldown() use the new M_WRITABLE() macro in order to determine
whether the given ext_buf is shared.

* Have the sf_bufs be setup with the mbuf subsystem using MEXTADD() with the
two new arguments.

Note: m_pulldown() is somewhat crotchy; the added comment explains the
situation.

Reviewed by: jlemon
2000-11-11 23:04:15 +00:00
Bosko Milekic
8bcbe4b7a6 Change check for existence of mbuf->m_ext.ext_free to check of new ext_type
in order to determine whether the ext_buf is a cluster, or some other type
of storage.

Reviewed by: jlemon
2000-11-11 23:01:44 +00:00
Robert Watson
7f73938e96 o Fix a mis-transcription of sef's -STABLE protection fixes--only root
could debug processes after the commit that introduced the typo.
  Security is good, but security is not always the same as turning things
  off :-).

PR:		kern/22711
Obtained from:	brooks@one-eyed-alien.net
2000-11-10 23:57:48 +00:00
Andrew Gallatin
922683e01a Enable linux thread support on the alpha. The guts of linux_clone was
mainly cut-n-pasted from the i386 port, except for the method of setting
the child's stack which is the only MD part of this function.

I've tested with the example apps shipped with the linux threads source
code (ex1-ex6) and with several binary builds of Mozilla.
2000-11-10 23:04:31 +00:00
Andrew Gallatin
f16647740e Simplify and correct OSF/1 signal handling.
- No signal translation is needed.  Our signals match the OSF/1 signals
- an OSF/1 sigset_t is 64 bits.  Make certain to use all 64-bits of it.
  We'd previously only used the lower 32 bits.   This was mostly harmless
  as I don't know of an OSF/1 apps which use any signals > 31.  However,
  the alpha Linux ABI uses the osf/1 signal routines and threaded linux
  apps tyically use signals 32 and 33 to comminicate with the manager
  thread, so it is important we preserve the upper 32-bits.

Reviewed by: marcel (at least in principal)
2000-11-10 23:00:54 +00:00
John Baldwin
20af769e69 Don't overwrite the filename for KTR_EXTEND with "../../kern/kern_ktr.c". 2000-11-10 22:30:44 +00:00
John Baldwin
9842fc8dda Axe some unused variables. 2000-11-10 21:54:19 +00:00
John Baldwin
bf619f9506 Fix SMP kernel compiles by #include'ing machine/globals.h to get the
cpuid variable.
2000-11-10 21:52:04 +00:00
Marcel Moolenaar
ebea866055 Revert auto-generation. The Alpha port is broken.
Syncing with it is wrong.
2000-11-10 21:30:19 +00:00
John Baldwin
0fe4e534b1 Minor whitespace nit in a comment. 2000-11-10 21:21:20 +00:00
John Baldwin
b5d09a79b5 Ignore the INTR_MPSAFE flag when calculating the priority of an interrupt
thread.
2000-11-10 21:19:14 +00:00
Justin T. Gibbs
72df3c5621 Sync Perforce IDs, add tranceiver state change support, and correct
numerous error recovery buglets.

Many thanks to Tor Egge for his assistance in diagnosing problems with
the error recovery code.

aic7xxx.c:
	Report missed bus free events using their own sequencer interrupt
	code to avoid confusion with other "bad phase" interrupts.

	Remove a delay used in debugging.  This delay could only be hit
	in certain, very extreme, error recovery scenarios.

	Handle transceiver state changes correctly.  You can now
	plug an SE device into a hot-plug LVD bus without hanging
	the controller.

	When stepping through a critical section, panic if we step
	more than a reasonable number of times.

	After a bus reset, disable bus reset interupts until we either
	our first attempt to (re)select another device, or another device
	attemps to select us.  This removes the need to busy wait in
	kernel for the scsi reset line to fall yet still ensures we
	see any reset events that impact the state of either our initiator
	or target roles.  Before this change, we had the potential of
	servicing a "storm" of reset interrupts if the reset line was
	held for a significant amount of time.

	Indicate the current sequencer address whenever we dump the
	card's state.

aic7xxx.reg:
	Transceiver state change register definitions.

	Add the missed bussfree sequencer interrupt code.

	Re-enable the scsi reset interrupt if it has been
	disabled before every attempt to (re)select a device
	and when we have been selected as a target.

	When being (re)selected, check to see if the selection
	dissappeared just after we enabled our bus free interrupt.
	If the bus has gone free again, go back to the idle loop
	and wait for another selection.

	Note two locations where we should change our behavior
	if ATN is still raised.  If ATN is raised during the
	presentation of a command complete or disconnect message,
	we should ignore the message and expect the target to put
	us in msgout phase.  We don't currently do this as it
	requires some code re-arrangement so that critical sections
	can be properly placed around our handling of these two
	events.  Otherwise, we cannot guarantee that the check of
	ATN is atomic relative to our acking of the message in
	byte (the kernel could assert ATN).

	Only set the IDENTIFY_SEEN flag after we have settled
	on the SCB for this transaction.  The kernel looks at
	this flag before assuming that SCB_TAG is valid.  This
	avoids confusion during certain types of error recovery.

	Add a critical section around findSCB.  We cannot allow
	the kernel to remove an entry from the disconnected
	list while we are traversing it.  Ditto for get_free_or_disc_scb.

aic7xxx_freebsd.c:
	Only assume that SCB_TAG is accurate if IDENTIFY_SEEN is
	set in SEQ_FLAGS.

	Fix a typo that caused us to execute some code for the
	non-SCB paging case when paging SCBs.  This only occurred
	during error recovery.
2000-11-10 20:13:41 +00:00
Justin T. Gibbs
aaad27fdfe Sync perforce IDs. 2000-11-10 19:54:17 +00:00
Bruce Evans
3a715f43c6 Quick fix for not writing group descriptor group, inode bitmaps or
block bitmaps before unmount() completes.  They were written using
bdwrite(), so they were normally written less than 32 seconds after
unmount(), but this is too late if the media is removed or the system
is rebooted soon after unmount().  sync()ing before unmount() didn't
help, because ext2fs uses buggy private caching for these blocks --
it doesn't even bdwrite() them until they are uncached or the filesystem
is unmounted.  sync()ing after unmount() didn't help, because sync()
only applies to (vnodes for) mounted filesystems.

PR:		22726
2000-11-10 14:54:15 +00:00
Yoshihiro Takahashi
a79d3d2428 The fe driver does not support pnp devices. 2000-11-10 14:05:47 +00:00
Benno Rice
fb75554e54 Beginnings of the powerpc machine dependant includes.
Reviewed by:	obrien
Obtained from:	NetBSD
2000-11-10 08:06:50 +00:00
Benno Rice
4cc1860f9b OpenFirmware/PowerPC loader, part 2.
As of this patchset, the loader builds (under NetBSD/macppc), boots, interacts
and talks to BOOTP/NFS servers.

(main.c was moved from boot/ofw/libofw to boot/ofw/common but has no revision
 history)

Reviewed by:	obrien
2000-11-10 06:39:58 +00:00
Benno Rice
f1fb6c2132 Give the network device a print method.
Reviewed by:	obrien
2000-11-10 06:37:43 +00:00
Benno Rice
5b98b64392 OpenFirmware/PowerPC loader, part 2.
This brings the loader up to the point where I can compile it under
NetBSD/macppc and have it boot, interact and talk to NFS servers.

sys/boot/ofw/libofw/main.c has been deleted (it has no revision history) and
replaced with sys/boot/ofw/common/main.c

Reviewed by:	obrien
2000-11-10 06:29:42 +00:00
Hajimu UMEMOTO
d80315aa1a backout my previous commit (KAME PR 296). foo != TUNNEL will
forbid "ANY" SA from being used for tnunel mode.

Reported by:	Chris Cason <casonc@netplex.aussie.org>
2000-11-09 17:55:17 +00:00
Pierre Beyssac
256de9e9ec Add missing delay after card reset.
This fixes randoms lockups when probing the card at boot time, when
more than 1 similar card is found in the machine.

Reviewed by:	semenu
2000-11-09 17:25:49 +00:00
Matt Jacob
259515a1ec Fix typo in END macro (END'ed enable twice)
PR:		22713
Submitted by:	Bernd Walter <ticso@cicely5.cicely.de>
2000-11-09 17:01:21 +00:00
Garrett Wollman
6e3793050f Fix a reference to ``Standard C'' to refer specifically to the 1990 version;
the requirement it describes is not in C99.
2000-11-09 15:42:05 +00:00
Hellmuth Michaelis
b51f30edab Fix i4b netgraph interface to not kernel panic at boot time
Make code compile and work for FreeBSD 4.x as well as FreeBSD 5.x
Submitted by: Michael Reifenberger <root@nihil.plaut.de>
2000-11-09 12:27:31 +00:00
Mike Smith
edcb5775ec Implement a trivial but effective interface for obtaining the kernel's
device tree and resource manager contents.  This is the kernel side of
the upcoming libdevinfo, which will expose this information to userspace
applications in a trivial fashion.

Remove the now-obsolete DEVICE_SYSCTLS code.
2000-11-09 10:21:23 +00:00
Marcel Moolenaar
806d7daafe Make MINSIGSTKSZ machine dependent, and have the sigaltstack
syscall compare against a variable sv_minsigstksz in struct
sysentvec as to properly take the size of the machine- and
ABI dependent struct sigframe into account.

The SVR4 and iBCS2 modules continue to have a minsigstksz of
8192 to preserve behavior. The real values (if different) are
not known at this time. Other ABI modules use the real
values.

The native MINSIGSTKSZ is now defined as follows:

Arch		MINSIGSTKSZ
----		-----------
alpha		    4096
i386		    2048
ia64		   12288

Reviewed by: mjacob
Suggested by: bde
2000-11-09 08:25:48 +00:00
Marcel Moolenaar
2da829a0c8 Sync with Alpha:
Do not use sysent.c, proto.h and syscall.h in source tree;
use auto-generated versions.
2000-11-09 07:27:55 +00:00
Takanori Watanabe
c69ab48d38 Farewell our code. We will switch acpica code from Intel.
This code has help us comprehence ACPI spec .

Contributors of this code is as follows(except for FreeBSD commiter):
Yasuo Yokoyama,
Munehiro Matsuda,
and ALL acpi-jp@jp.freebsd.org people.

Thanks.

R.I.P.
2000-11-09 05:09:52 +00:00
Andrew Gallatin
3598c2665c back out 1.66 -- the Elfxx_Brandinfo compat_3_brand field doesn't exist
in -current
2000-11-09 01:53:05 +00:00
Eivind Eklund
b8c8516a7f More paranoia against overflows 2000-11-08 21:53:05 +00:00
Søren Schmidt
1716750c65 Rearrange the timeouts in the reset code a bit, some ATAPI devices
are picky about this.
2000-11-08 21:25:43 +00:00
Søren Schmidt
30a777baa8 Hopefully solve the lost slave problem. 2000-11-08 19:31:39 +00:00
Matt Jacob
328b7df026 Clean this is up a bit for multiple MIDs... We can figure out which MID
for an interrupt to enable/disable from the vector (and GID too, if we
had multiple GIDs)- so, stupidly for now, search for the right mcpcia's
softc so we have the right base address for the bridge CSR to apply
IRQ bit-twiddle's to. Alas- this doesn't yet allow us to run, but it's
the right direction.
2000-11-08 18:48:21 +00:00
Matt Jacob
314d9ed71a Add special quirk for this ancient Viper drive. This is all creeping
driver bloat -I really *have* to do a quirk table that can be loaded
by the loader.

Submitted by:	Hellmuth Michaelis <hm@kts.org>
2000-11-08 18:37:12 +00:00
Jeroen Ruigrok van der Werven
6b1d8ceabe Fix CMSG and ALIGN macro usage.
Previously we had to include <machine/param.h> or <sys/param.h> bogusly
due to the fact that <sys/socket.h> CMSG macros needed the ALIGN macro,
which was defined in param.h.  However, including param.h was a disaster
for namespace pollution.
This solution, as contributed by shin a while ago, fixes it elegantly
by wrapping the definitions around some namespace pollution preventer
definitions.
This patch was long overdue.
This should allow any network programmer to use <sys/socket.h> as
before.

PR:		19971, 20530
Submitted by:	Martin Kaeske <MartinKaeske@lausitz.net>
		Mark Andrews <Mark.Andrews@nominum.com>
Patch submitted by:	shin
Reviewed by:	bde
2000-11-08 16:59:25 +00:00
Jeroen Ruigrok van der Werven
a88d714c23 Document DISABLE_PSE. 2000-11-08 15:53:49 +00:00
MIHIRA Sanpei Yoshiro
c3e07515b7 add a couple ESS Technology products(pci device id only).
FreeBSD src/sys/dev/sound/pcm/solo.c
	NetBSD syssrc/sys/dev/pci/pcidevs
	OpenBSD src/sys/dev/pci/pcidevs
2000-11-08 14:43:40 +00:00
MIHIRA Sanpei Yoshiro
1cb0b89246 add Texas Instruments TSB12LV22 OHCI IEEE 1394 Host Controller
Obtained from:	OpenBSD  src/sys/dev/pci/pcidevs
2000-11-08 14:04:54 +00:00
MIHIRA Sanpei Yoshiro
3304019f5a add Aureal Inc. AU8820/AU8830 Audio controller
Obtained from:	OpenBSD src/sys/dev/pci/pcidevs
2000-11-08 13:33:23 +00:00
Jeroen Ruigrok van der Werven
28d7984f3d Document CLUSTERDEBUG, CPU_UPGRADE_HW_CACHE and LOCKF_DEBUG. 2000-11-08 12:14:06 +00:00
Jeroen Ruigrok van der Werven
b95c229b4d Fix two typo's: teh -> the, ther -> there. 2000-11-08 12:08:53 +00:00
Jeroen Ruigrok van der Werven
5b488b3443 Fix some further english grammar and typo's. 2000-11-08 12:00:05 +00:00
Jeroen Ruigrok van der Werven
a47ea7b90e Fix typo's: UPGRADE_CPU_HW_CACHE -> CPU_UPGRADE_HW_CACHE 2000-11-08 11:58:07 +00:00
Jeroen Ruigrok van der Werven
edd5302d4d Document the following options:
FB_DEBUG,
	FB_INSTALL_CDEV,
	FE_8BIT_SUPPORT,
	IBCS2,
	KEY,
	LOUTB,
	SPX_HACK
2000-11-08 11:34:09 +00:00
Mike Smith
e9ca98b28f Hack to work around a probe which will lock up at least some i450GX-based
systems.

From the PR:

 When 'probe.slot' is PCI_SLOTMAX (== 31) and 'probe.func' is 7,
 call to 'pci_cfgread()' here and machine suddenly hangs up.
 I don't know why...  (or 450GX chipset's bug?)

PR:		i386/20379
Submitted by:	Masayuki FUKUI <fukui@sonic.nm.fujitsu.co.jp>
2000-11-08 11:25:15 +00:00
Jeroen Ruigrok van der Werven
f57fc21c46 Document XBONEHACK option. 2000-11-08 10:09:01 +00:00
Jeroen Ruigrok van der Werven
fac70739ff Document some AHC_* options. 2000-11-08 10:01:45 +00:00
Kenjiro Cho
41b4d8d540 restore the freebsd local type-cast fixes that I mistakenly removed
in the previous commit while attempting to sync with netbsd.

Pointed out by: bde
(never thought of compiling i386's LINT with -64-bit-longs...)
2000-11-08 05:45:46 +00:00
Mike Smith
78531822bb Don't build the ACPI CA debugger unless the ACPI_DEBUG option is present.
Only build the IA32 support on i386.  Build the IA64 support on IA64.
2000-11-08 02:57:01 +00:00
Matt Jacob
2ac2ed8a51 (KTR debugging) Say when we're disabling a vector. 2000-11-07 22:29:21 +00:00
David E. O'Brien
a5b64787e2 Sync with i386's GENERIC rev 1.287 (Minor ordering changes to make more
sections strictly alphabetical.)
2000-11-07 22:09:33 +00:00
David E. O'Brien
9d9615d81d Sync with i386/conf/GENERIC rev 1.288 (add comments for some ISA devices). 2000-11-07 22:07:07 +00:00
Warner Losh
cd594d0ec4 Merge from GENERIC 1.288 2000-11-07 21:26:34 +00:00
Warner Losh
30cb2a0dfb Make the ISA nic section look like the other device sections with
comments on the same line like so:
	device		foo		# FooInc Brand NetEther cards

Also, move the wireless NIC cards to their own section.

Add commented out wl driver in wireless section.

Remove obsolete or redundant comments about some of the wireless cards
that used to apply but don't since we've removed 'at foobus'.

There should be no functional changes in this change.
2000-11-07 21:20:52 +00:00
Warner Losh
7a90c33a8a Synchronize NEWCARD kernel to GENERIC kernel. It is still experimental,
but it doesn't hurt to keep these things in sync.
2000-11-07 21:07:35 +00:00
Warner Losh
5350155530 Minor ordering changes to make more sections strictly alphabetical. 2000-11-07 21:06:57 +00:00
Semen Ustimenko
600ae3dd25 Synced tx(4) driver descriptions + ``device tx'' line moved to the
list of drivers using miibus.

PR:		kern/22556
2000-11-07 20:22:19 +00:00
John Baldwin
a70d33d8f8 Remove the now unused and unneeded splassert macros and prototypes. 2000-11-07 18:51:42 +00:00
Alfred Perlstein
b5d335ad6d Protect against an infinite loop when prefaulting pages. This can
happen when the vm system maps past the end of an object or tries
to map a zero length object, the pmap layer misses the fact that
offsets wrap into negative numbers and we get stuck.

Found by: Joost Pol aka Nohican <nohican@marcella.niets.org>
Submitted by: tegge
2000-11-07 18:31:16 +00:00
Nick Hibma
1d8068f94a Fix for powering off a HP DJ950C during printing. As stated by Ian:
When the printer is turned off the pipe write will cause and error,
which causes lpd to close the device and reopen it to clear the error.
After a short while the device will disappear from the bus but lpd will
have opened the ulpt0 port by then. ulpt_status will check for status
without checking the sc->dying flag and panic the kernel when the device
finally disappears from the bus.

Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2000-11-07 10:50:34 +00:00
Kenjiro Cho
44b5247d95 newbusify the en atm driver. 2000-11-07 09:31:28 +00:00
Kenjiro Cho
da33d58137 newbusify the en atm driver.
also
 - sync with netbsd
 - fix a bug that miscalculates tx cell counts when the pointer size isn't 4

tested both ENI and Adaptec cards on both i386 and alpha.
2000-11-07 09:30:14 +00:00
Ruslan Ermilov
203de3b494 Fixed the security breach I introduced in rev 1.145.
Disallow getsockopt(IP_FW_ADD) if securelevel >= 3.

PR:		22600
2000-11-07 09:20:32 +00:00
John Baldwin
d902baa4ba Document the KTR_VERBOSE option. 2000-11-07 01:50:10 +00:00
John Baldwin
d8f03321bd - Remove much of the inlining of the KTR tracepoints into a ktr_tracepoint()
function declared in kern_ktr.c.  The only inline checks left are the
  checks that compare KTR_COMPILE with the supplied mask and thus should
  be optimized away into either nothing or a direct call to ktr_tracepoint().
- Move several KTR-related options to opt_ktr.h now that they are only
  needed by kern_ktr.c and not by ktr.h.
- Add in the ktr_verbose functionality if KTR_EXTEND is turned on.  If the
  global variable 'ktr_verbose' is non-zero, then KTR messages will be
  dumped to the console.  This variable can be set by either kernel code
  or via the 'debug.ktr_verbose' sysctl.  It defaults to off unless the
  KTR_VERBOSE kernel option is specified in which case it defaults to on.
  This can be useful when the machine locks up spinning in a loop with
  interrupts disabled as you might be able to see what it is doing when it
  locks up.

Requested by:	phk
2000-11-07 01:49:48 +00:00
Bill Paul
7d1fae05bb The vortex driver can be compiled as a KLD now. The EISA attachment
is only built on the i386 platform for now, since it depends on symbols
which I'm pretty sure won't be present in the alpha build.
2000-11-07 01:03:23 +00:00
Bill Paul
f425f328cd The vx driver no longer needs the PCI compat shims. Also should now
work on the alpha (at least the PCI part should).
2000-11-07 00:58:35 +00:00
Bill Paul
de2c27913c Update the vortex driver so that it no longer needs the PCI compat
interface. In addition to using newbus, it also uses bus_space rather
than inb/outb to make it MI. The grody static softc allocation stuff
has been removed as well.
2000-11-07 00:56:14 +00:00
John Baldwin
a924ab9741 Minor nit: missed ithd_loop -> sithd_loop in the KTR tracepoints. 2000-11-07 00:45:18 +00:00
John Baldwin
d9de7cc7bd Remove an unneeded #include <machine/bus.h> that snuck in accidentally with
the MI mutexes.

Submitted indirectly by:	bde
2000-11-07 00:44:24 +00:00
Cameron Grant
ab3978871b adjust dma channels for vibra16x; recording should now work. full duplex does
not work on vibra16x, so is disabled.
2000-11-07 00:38:59 +00:00
Cameron Grant
d19811446d slight mods to isa dma and channel flushing code 2000-11-07 00:32:35 +00:00
Cameron Grant
41b3c72639 if a channel dies, rejuvenate it on close() 2000-11-07 00:29:24 +00:00
Mike Smith
847166ca5a Ignore resources with a size of 0, as these are disabled (and we don't
deal with them properly elsewhere).

Submitted by:	Masayuki FUKUI <fukui@sonic.nm.fujitsu.co.jp>
2000-11-07 00:03:33 +00:00
Mike Smith
aef8008768 Remove unused PCI includes. 2000-11-06 22:33:49 +00:00
Cameron Grant
4e2e565cbd add AFMT_8BIT for easier determination of formats 2000-11-06 22:22:52 +00:00
Mike Smith
90aa4fc1ee Quieten some warnings about correct usage of assignments as truth values. 2000-11-06 21:32:13 +00:00
Justin T. Gibbs
2f22d08de1 Fix async notifications for listners registered to wildcard nodes. For
example, a client registered to receive specific events for bus 0, target *,
lun *, was not receiving notifications.

Reviewed by:	ken@FreeBSD.org
2000-11-06 20:12:07 +00:00
Justin T. Gibbs
47c2d60f79 aic7xxx.c:
When restarting the sequencer, ensure that the SCBCNT register
	is 0.  A non-zero count will prevent the setting of the CCSCBDIR
	bit in any future dma operations.  The only time CCSCBCNT would
	be non-zero is if we happened to halt the dma during a reset,
	but even that should never happen.  Better safe than sorry.

	When a command completes before the target responds to an
	ATN for a recovery command, we now notify the kernel so that
	any recovery operation requeued in the qinfifo can be removed
	safely.  In the past, we did this in ahc_done(), but ahc_done()
	may be called without the card paused.  This also avoids a
	recursive call to ahc_search_qinifo() which could have occurred if
	ahc_search_qinififo() happened to be the routine to complete
	a recovery action.

	Fix 8bit math used for adjusting the qinfifo.  The index must
	be wrapped properly within the 256 entry array.  We rely on the
	fact that qinfifonext is a uint8_t in most cases to handle
	this wrap, but we missed a few spots where the resultant
	calculation was promoted to an int.

	Change the way that we deal with aborting the first or second
	entry from the qinfifo.  We now swap the first entry in the
	qinfifo with the "next queued scb" to force the sequencer
	to see an abort collision if we ever touch the qinififo while
	the sequencer is mid SCB dma.

aic7xxx.reg:
	Add new MKMSG_FAILED sequencer interrupt.  This displaced
	the BOGUS_TAG interrupt used in some previous sequencer code
	debugging.

aic7xxx.seq:
	Increment our position in the qinfifo only once the dma
	is complete and we have verified that the queue has not
	been changed during our DMA.  This simplifies code in the
	kernel.

	Protect against "instruction creep" when issuing a pausing
	sequencer interrupt.  On at least the 7890/91/96/97, the
	sequencer will coast after issuing the interrupt for up
	to two instructions.  In the past we delt with this by
	using carefully placed nops.  Now we call a routine to
	issue the interrupt followed by a nop and a ret.

	Tell the kernel should an SCB complete with the MK_MESSAGE
	flag still set.  This means the target ignored our ATN request.

	Clear the channel twice as we exit the data phase.  On the
	aic7890/91, the S/G preload logic may require the second
	clearing to get the last S/G out of the FIFO.

aic7xxx_freebsd.c:
	Don't bother searching the qinfifo for a doubly queued
	recovery scb in ahc_done.  This case is handled by the
	core driver now.

	Free the path used to issue async callbacks after the callback
	is complete.

aic7xxx_inline.h:
	Split the SCB queue routine into a routine that swaps
	the SCB with the "next queued SCB" and a routine that
	calls the swapping routine and notifies the card of
	the new SCB.  The swapping routine is now also used by
	ahc_search_qinfifo.
2000-11-06 20:05:38 +00:00
Dag-Erling Smørgrav
fd9f324055 Check that p->p_pptr is not NULL - kernel processes have no parents! 2000-11-06 03:23:56 +00:00
Cameron Grant
e258e032ac fix paste-o in mixer code - actually set right channel volume instead of
doing the left channel twice.
2000-11-06 02:47:43 +00:00
Cameron Grant
b7d3143b0d fix es1370 mixer by adding reinit function to it's mixer function list. 2000-11-06 02:37:28 +00:00
David E. O'Brien
2055995ab0 ELF kernels should use an ELF sysvec. This allows us to move a.out
specific files to those platforms that acutally support a.out.
2000-11-05 19:14:00 +00:00
Paul Saab
3d122d8e2c Honor the ip address given in the root-path dhcp option.
PR:	21743
Submitted by:	Brian Candler <B.Candler@pobox.com>
2000-11-05 14:55:09 +00:00
Yoshihiro Takahashi
5c84db5258 Switched from i386/isa/scsi_dvcfg.h to cam/scsi/scsi_dvcfg.h 2000-11-05 14:34:35 +00:00
Yoshihiro Takahashi
6ffb65e8b1 Merged from the following changes.
sys/conf/Makefile.i386      1.211
sys/conf/files.i386         1.329
sys/isa/fd.c                1.186, 1.188 and 1.189
sys/isa/sio.c               1.305 and 1.317
sys/i386/conf/GENERIC       1.270, 1.281, 1.282 and 1.284
sys/i386/i386/machdep.c     1.419
sys/i386/i386/userconfig.c  1.184
2000-11-05 14:31:19 +00:00
Yoshihiro Takahashi
64ee4b5b08 Merged from the following changes.
sys/boot/i386/btx/btx/Makefile		1.9
sys/boot/i386/btx/btx/btx.s		1.23
sys/boot/i386/libi386/biosdisk.c	1.32 and 1.33
sys/boot/i386/libi386/biosmem.c		1.5
sys/boot/i386/libi386/comconsole.c	1.8
sys/boot/i386/libi386/gatea20.c		1.3
sys/boot/i386/libi386/time.c		1.4
sys/boot/i386/libi386/vidconsole.c	1.13
sys/boot/i386/loader/Makefile		1.48
sys/boot/i386/loader/main.c		1.22
2000-11-05 12:35:41 +00:00
David E. O'Brien
00910f2882 ELF kernels should use an ELF sysvec. This allows us to move a.out
specific files to those platforms that acutally support a.out.
2000-11-05 10:41:35 +00:00
Marcel Moolenaar
edc5a9dd25 Fix getdents syscall.
The offset field in struct dirent was set to the offset of
the next dirent in rev 1.36. The offset was calculated from
the current offset and the record length. This offset does
not necessarily match the real offset when we are using
cookies. Therefore, also use the cookies to set the offset
field in struct dirent if we're using cookies to iterate
through the dirents.
2000-11-05 07:31:17 +00:00
Marcel Moolenaar
2bfb7720d6 Fix breakage for parallel builds. 2000-11-05 03:10:45 +00:00
Poul-Henning Kamp
baef67f10f Always emply the NCO to attenuate jitter. The Receive clock recovery
circuit generates too much jitter to be used directly as xmit clock.

Don't miscount pending bytes in weird error conditions.

Drop the rest of a packet if we run out of tx-md's.

Trig the xmit-frame signal on rising edge, this fixed the one-bit-too-late
position of the HDLC frames in E1 mode.
2000-11-04 23:23:27 +00:00
Bosko Milekic
fe27eea9d1 Change the sf_bufs wakeups to be wakeup_one(), because we don't want to
wakeup all of the sleeping threads when we free only one buffer. This
avoids us having to needlessly try again (and fail, and go back to
sleep) for all the threads sleeping. We will now only wakeup the
thread we know will succeed.

Reviewed by: green
2000-11-04 21:55:25 +00:00
David E. O'Brien
86d42bbdbe Our SHRT_MIN definition was actually 4 bits too big.
Submitted by:	Bradley T. Hughes <bhughes@trolltech.com>
2000-11-04 21:01:44 +00:00
Jonathan Lemon
8735719e43 tp->snd_recover is part of the New Reno recovery algorithm, and should
only be checked if the system is currently performing New Reno style
fast recovery.  However, this value was being checked regardless of the
NR state, with the end result being that the congestion window was never
opened.

Change the logic to check t_dupack instead; the only code path that
allows it to be nonzero at this point is NewReno, so if it is nonzero,
we are in fast recovery mode and should not touch the congestion window.

Tested by:	phk
2000-11-04 15:59:39 +00:00
Bruce Evans
f18c4450ac Added used include of <machine/bus.h> -- don't depend on evil namespace
pollution in <sys/mutex.h>.  This was half fixed in rev.1.3 of
midwayreg.h.  The pollution exposed the bug that this driver was using
toy versions of the bus space macros under FreeBSD.  Disabling the
toy versions made this driver compile but dependent on the pollution.
There was still a toy version of bus_space_read_1() in unreachable code.
2000-11-04 15:03:34 +00:00
Bruce Evans
442ed3a3c4 Enabled the used include of <machine/bus.h> -- don't depend on evil
namespace pollution in <sys/mutex.h>.  This was half fixed in rev.1.3
of midwayreg.h.  The pollution exposed the bug that this driver was
using toy versions of the bus space macros under FreeBSD.  Disabling
the toy versions made this driver compile and maybe support PIO space,
but dependent on the pollution.
2000-11-04 14:31:47 +00:00
Hajimu UMEMOTO
e9f420f2e4 Make compilable. if_fddisubr.c depended on sys/malloc.h by my
previous commit.

Reported by:	Jim Bryant <jbryant@A010-0935.KSCY.splitrock.net>
2000-11-04 14:21:23 +00:00
Robert Nordier
9e3377b8b3 Support a.out: avoid (%dx) in in/out instructions, and use an m4
macro to supply underscores for externals.
2000-11-04 13:03:52 +00:00
Paul Saab
9193b12844 MF4: Add LOADER_TFTP_SUPPORT make.conf flag. 2000-11-04 08:43:13 +00:00
Bruce Evans
1c1752872f Fixed breakage of mknod() in rev.1.48 of ext2_vnops.c and rev.1.126 of
ufs_vnops.c:

1) i_ino was confused with i_number, so the inode number passed to
   VFS_VGET() was usually wrong (usually 0U).
2) ip was dereferenced after vgone() freed it, so the inode number
   passed to VFS_VGET() was sometimes not even wrong.

Bug (1) was usually fatal in ext2_mknod(), since ext2fs doesn't have
space for inode 0 on the disk; ino_to_fsba() subtracts 1 from the
inode number, so inode number 0U gives a way out of bounds array
index.  Bug(1) was usually harmless in ufs_mknod(); ino_to_fsba()
doesn't subtract 1, and VFS_VGET() reads suitable garbage (all 0's?)
from the disk for the invalid inode number 0U; ufs_mknod() returns
a wrong vnode, but most callers just vput() it; the correct vnode is
eventually obtained by an implicit VFS_VGET() just like it used to be.

Bug (2) usually doesn't happen.
2000-11-04 08:10:56 +00:00
David E. O'Brien
e84f2add04 Now have the `linux' module on the Alpha too. 2000-11-04 07:31:46 +00:00
David E. O'Brien
66e7b133fe Fix generated include path.
Approved by:	JKH
2000-11-04 07:21:37 +00:00
Bosko Milekic
0eecc42758 Setup and put to use the mutex lock for sf_freelist, the sendfile(2) bufs
freelist. Should now be thread-friendly, in part.

Note: More work is needed in uipc_syscalls.c, but it will have to wait until
the socket locking issues are at least 80% implemented and committed.
2000-11-04 07:16:08 +00:00
David E. O'Brien
43cc92233d Fix the Elf64 branding initialization. 2000-11-04 05:04:47 +00:00
Boris Popov
1c4c2d8235 v_interlock is a mutex now, not simple lock. 2000-11-04 02:42:11 +00:00
Kenneth D. Merry
1087fd198e Fix a problem with the previous revision (1.42) that showed up with audio
CDs.

With audio CDs, you can't just do a READ(10) call on most drives without
first setting the blocksize with a mode select command.  The disklabel code
does a read of the first sector of the media to find a label if it exists.

This caused drives to return an error when an audio CD was in the drive,
due to the problem described above.

The solution is to read the table of contents on the CD, and only attempt
to read the disklabel if the first track is a data track.

This works on all the various CD and DVD media I have tried, but further
testing (especially with Video CDs and other mode 2 media) will be
needed to determine if this is a universal solution.
2000-11-04 02:05:25 +00:00
Søren Schmidt
4ce977b412 Fix breakage on some ATA chips that dont have busmastering set.
Tidy up the probe a bit..
2000-11-03 17:09:34 +00:00
Bruce Evans
e6410301f0 Support filesystems with the not-so-new "sparse_superblocks" feature.
When this feature is enabled, mke2fs doesn't necessarily allocate a
super block and its associated descriptor blocks for every group.
The (non-)allocations are reflected in the block bitmap.  Since the
filesystem code doesn't write to these blocks except for the first
superblock, all it has to do to support them is to not count them in
ext2_statfs() and not attempt to check them at mount time in
ext2_check_blocks_bitmap() (the check has never been enabled in
FreeBSD anyway).
2000-11-03 16:41:48 +00:00
Mike Smith
76ba114c80 If we can't get a command to back the bio we just took off the queue,
put the bio back, otherwise we'll drop it when we bail.  This was
causing bio lossage under load, leading to eventual system lockup.
2000-11-03 16:11:05 +00:00