Commit Graph

22948 Commits

Author SHA1 Message Date
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