Commit graph

29993 commits

Author SHA1 Message Date
Søren Schmidt 6ddce9039b Major update of the ATA RAID code, part 1:
Overhaul of the attach/detach code and structures, there were some nasty
bugs in the old implementation. This made it possible to collapse the
ATA/ATAPI device control structures into one generic structure.

A note here, the kernel is NOT ready for detach of active devices,
it fails all over in random places, but for inactive devices it works.
However for ATA RAID this works, since the RAID abstration layer
insulates the buggy^H^H^H^H^H^Hfragile device subsystem from the
physical disks.

Proberly detect the RAID's from the BIOS, and mark critical RAID1
arrays as such, but continue if there is enough of the mirror left
to do so.

Properly fail arrays on a live system. For RAID0 that means return EIO,
and for RAID1 it means continue on the still working part of the mirror
if possible, else return EIO.
If the state changes, log this to the console.

Allow for Promise & Highpoint controllers/arrays to coexist on the
same machine. It is not possible to distribute arrays over different
makes of controllers though.

If Promise SuperSwap enclosures are used, signal disk state on the
status LED on the front.

Misc fixes that I had lying around for various minor bugs.

Sponsored by: Advanis Inc.
2002-02-04 19:23:40 +00:00
Robert Watson 416031dcb8 Change EPERM to EOPNOTSUPP when failing pseudofs_setattr() arbitrarily.
Quoth the alfred:	The latter would be better.
2002-02-04 18:21:59 +00:00
Robert Watson dfe5fa8eb7 Return EPERM instead of 0 in the un-implemented pseudofs_setattr().
Conceivably, it should even return EOPNOTSUPP.
2002-02-04 18:09:29 +00:00
Robert Watson 4e1123c738 o Scatter vn_start_write() and vn_finished_write() through ACL code so
that it interacts properly with snapshotting.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-02-04 17:58:15 +00:00
Hajimu UMEMOTO 0e371878c8 Corrected an argument to in6_pcbnotify().
Obtained from:	KAME
MFC after:	1 week
2002-02-04 17:40:36 +00:00
Hajimu UMEMOTO c5993889d8 In tcp_respond(), correctly reset returned IPv6 header. This is essential
when the original packet contains an IPv6 extension header.

Obtained from:	KAME
MFC after:	1 week
2002-02-04 17:37:06 +00:00
Mark Murray 385fedb640 Back out the "upgrading" of NBBY to unsigned, as it exposes
bugs elsewhere, and also is well understood as a signed quantity.
2002-02-04 16:42:44 +00:00
Robert Watson eccbb13cb5 Note that Kirk apparently missed adding vn_start_write() and friends
to kern_acl.c when he added snapshotting.  This will need to be added
at some point.
2002-02-04 16:41:59 +00:00
Warner Losh a0e457a620 Default debugging to OFF now. 2002-02-04 15:55:21 +00:00
Yoshihiro Takahashi 8c84db8edd Supported C-NET(98)P2 PnP mode.
Submitted by:	"Hirokazu WATANABE" <gwna@geocities.co.jp>
MFC after:	3 days
2002-02-04 14:01:27 +00:00
Mike Silbersack c9fbdd0fa4 Remove mbuf exhaustion warning messages; these are handled by the
mbuf system in a rate-limited fashion now.

Reviewed by:	luigi
MFC after:	1 week
2002-02-04 03:15:27 +00:00
Josef Karthauser 0a7fe9cc0b Follow NetBSD and ANSIfy the function definitions.
Remove trailing whitespaces (submitted to NetBSD).
2002-02-03 17:03:34 +00:00
Mark Murray 6ebd73f0f6 WARNS=n and lint(1) silencer. Declare an array of (const) strings
as const char.
2002-02-03 11:57:32 +00:00
Mark Murray dc20def492 Zero functional difference; make some integer constants unsigned, as
they are used in unsigned context. This shuts lint(1) up in a few
significant ways with "signed/unsigned" arithmetic warnings.
2002-02-03 11:36:59 +00:00
Mark Murray 9a29e3250d Make the style a little bit more consistant by removing parameter
names from some prototypes. (Other prototypes here already have
these removed).
2002-02-03 11:21:22 +00:00
Bruce Evans 766f247a59 Use osigreturn(2) instead of sigreturn(2) plus broken magic for returning
from old signal handlers.  This is simpler and faster, and fixes (new)
sigreturn(2) when %eip in the new signal context happens to match the
magic value (0x1d516).  0x1d516 is below the default ELF text section,
so this probably never broken anything in practice.

locore.s:
In addition, don't build the signal trampoline for old signal handlers
when it is not used.

alpha:
Not fixed, but seems to be even less broken in practice due to more
advanced magic. A false match occurs for register #32 in mc_regs[].
Since there is no hardware register #32, a false match is only possible
for direct calls to sigreturn(2) that happen to have the magic number
in the spare mc_regs[32] field.
2002-02-03 09:13:58 +00:00
Bruce Evans 5c8d0a85b0 Improve the change in the previous commit: use a stub for osigreturn()
when it is not really used instead of unconditionalizing all of it.
2002-02-03 04:09:02 +00:00
Josef Karthauser f353db9f9a Regenerate. 2002-02-02 21:12:22 +00:00
Josef Karthauser 8df3da9acc Update comments and product identifiers so that they're the same
as NetBSD's definitions.
2002-02-02 21:09:54 +00:00
Josef Karthauser a342523198 Add some missing usb vendors (from NetBSD). 2002-02-02 21:02:13 +00:00
Josef Karthauser c910612aa9 Sync with NetBSD's version, dropping all the 'ltd', 'corp', etc.
It's more important to keep this file easily syncable across the
BSDs, and NetBSD have stated a preference for not adding them to
theirs.
2002-02-02 20:59:43 +00:00
Robert Watson 30969a81c5 o Add the prototype of cr_cansignal() from an earlier change to
kern_prot.c.  This has apparently been sitting in my local tree for
  ages, and has been generating a warning during the building of
  kern_prot.o.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-02-02 03:39:44 +00:00
Bruce Evans 3230a24cb4 Merged cy_pcireg.h into the one file that uses it (cy_pci.c). 2002-02-02 02:22:51 +00:00
Bruce Evans 7e8c3cecdf Fixed breakage of interrupt setup in previous commit. It used an
uninitialized variable in the !CY_PCI_FASTINTR case (*blush*).
2002-02-02 02:05:44 +00:00
Kirk McKusick 64011154e5 In the routines vrele() and vput(), we must lock the vnode and
call VOP_INACTIVE before placing the vnode back on the free list.
Otherwise there is a race condition on SMP machines between
getnewvnode() locking the vnode to reclaim it and vrele()
locking the vnode to inactivate it. This window of vulnerability
becomes exaggerated in the presence of filesystems that have
been suspended as the inactive routine may need to temporarily
release the lock on the vnode to avoid deadlock with the syncer
process.
2002-02-02 01:49:18 +00:00
Kirk McKusick c9f96392c7 When taking a snapshot, we must check for active files that have
been unlinked (e.g., with a zero link count). We have to expunge
all trace of these files from the snapshot so that they are neither
reclaimed prematurely by fsck nor saved unnecessarily by dump.
2002-02-02 01:42:44 +00:00
Alfred Perlstein 3865fa138b Remove bogus assertion in dup2 that can lead to panics when kernel
threads race for a file slot.

dup2(2) incorrectly assumes that if it needs to grow the ofiles
array that it will get what it wants.  This assertion was valid
before we allowed shared filedescriptor tables but is now incorrect.

The assertion can trigger superfolous panics if the thread doing a
dup2 looses a race with another thread while possibly blocked in
the MALLOC call in fdalloc.  Another thread may grab the slot we
are requesting which makes fdalloc return something other than what
we asked for, this will triggering the bogus assertion.

MFC after: 2 weeks
Reviewed by: phk
2002-02-01 19:25:36 +00:00
Alfred Perlstein 2b39743941 Avoid lock order reversal filedesc/Giant when calling FREE() in fdalloc
by unlocking the filedesc before calling FREE().

Submitted by: bde
2002-02-01 19:19:54 +00:00
Alfred Perlstein b7184973ed Don't recurse on filedesc lock in chroot_refuse_vdir_fds().
Noticed by: Michael Nottebrock <michaelnottebrock@gmx.net>
2002-02-01 18:27:16 +00:00
Bruce Evans b6fe6a5d88 Regenerate to make osigreturn standard. 2002-02-01 17:41:45 +00:00
Bruce Evans 860965f144 Made osigreturn(2) standard so that SYS_osigreturn can be used in the
signal trampoline for old signals.  The arches that support old signals
currently abuse sigreturn(2) instead.  This mainly complicates things
and slightly breaks the the new sigreturn(2).

COMPAT is too limited to support the correct configuration of osigreturn,
and this commit doesn't attempt to fix it; it just moves the bogusness:
osigreturn() must now be provided unconditionally even on arches that
don't really need it; previously it had to be provided under the bogus
condition defined(COMPAT_43).
2002-02-01 17:27:14 +00:00
Bruce Evans 55a9536b65 Compile osigreturn() unconditionally since it will always be needed on
some arches and the syscall table is machine-independent.  It was
(bogusly) conditional on COMPAT_43, so this usually makes no difference.

ia64: in addition:
- replace the bogus cloned comment before osigreturn() by a correct one.
  osigreturn() is just a stub fo ia64's.
- fix the formatting of cloned comment before sigreturn().
- fix the return code.  use nosys() instead of returning ENOSYS to get
  the same semantics as if the syscall is not in the syscall table.
  Generating SIGSYS is actually correct here.
- fix style bugs.

powerpc: copy the cleaned up ia64 stub.  This mainly fixes a bogus comment.

sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
2002-02-01 15:44:03 +00:00
Yoshihiro Takahashi 3b8a3187c8 Expand COMBRD(x) macro. 2002-02-01 14:48:44 +00:00
Archie Cobbs d9bfecab53 Some netgraph parse types (such as for the 'value' field in ng_ksocket's
'struct ng_ksocket_sockopt') like to peek into the ng_mesg header for
information. Make sure when generating default values that we provide
a valid header to peek into.

MFC after:	1 week
2002-02-01 02:21:41 +00:00
David E. O'Brien b231cb3945 * Remove __P and convert to ANSI prototypes.
* Remove 'register'.  (some functions had 7+ register functions...)
* Fix SCM ID's.
2002-02-01 01:32:19 +00:00
Matthew Dillon 027df6bdd7 GC P_BUFEXHAUST leftovers, we've had a new mechanism to avoid buffer
cache lockups for over a year now.

MFC after:		0 days
2002-01-31 18:39:44 +00:00
Alfred Perlstein 7b9214f0b0 identify GLPRISM2 PCI WaveLAN/IEEE 802.11
Submitted by: Toni Andjelkovic <toni@soth.at>
2002-01-31 16:55:13 +00:00
Bruce Evans 92fd4795fa Finish revs.1.23 and 1.24 so that MCOUNT_ENTER really actually compiles
for SMP in the plain profiling case.  It seems to work too.

This error was not detected by LINT because LINT only compiles the
GUPROF profiling case, which is is a superset of the plain profiling
case for !SMP but which is so broken for SMP that the buggy code is
not compiled.
2002-01-31 13:49:55 +00:00
Maxim Sobolev e6f56180e3 Add support of PhotoClip USB Camera (http://www.myphotoclip.com):
- Vendor&Device IDs for USB product,
- quirk for SCSI CAM.

PR:		34481
Submitted by:	Olexander Kunytsa <kunia@x-telecom.net>
MFC in:		3 days
2002-01-31 11:39:17 +00:00
Takanori Watanabe 85dff349f4 Fix irq/drq handling. IRQ and DRQ resource information can be get
in one object for one resource. Array of values in a object means
possible values for the object.
2002-01-31 09:18:27 +00:00
Yoshihiro Takahashi 593cedcce3 MFi386: revision 1.489. 2002-01-31 08:35:38 +00:00
Yoshihiro Takahashi f9df78bb95 Changed iskanji[12] to inline functions. 2002-01-31 08:29:46 +00:00
Yoshihiro Takahashi e523a353a2 Merged from sys/dev/sio/{sio.c,sio_isa.c} revisions 1.363 and 1.5,
respectively.
2002-01-31 08:26:45 +00:00
Yoshihiro Takahashi 9fdd7481ef Add pc98 support. 2002-01-31 08:24:36 +00:00
Yoshihiro Takahashi c34cc16d46 Remove obsolete COMBRD* definitions. 2002-01-31 08:23:30 +00:00
Yoshihiro Takahashi cad5db6416 MFi386: revision 1.180 2002-01-31 04:28:52 +00:00
Yoshihiro Takahashi ae610d1fc6 MFi386: revision 1.52 2002-01-31 04:22:20 +00:00
Takanori Watanabe f8372ade81 Fix error handling.
PR:30665
Submitted by:TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp>
2002-01-31 01:23:22 +00:00
Julian Elischer a3aa8c3ee8 Allow this to compile again
not tested under LINT by: msmith
2002-01-30 23:38:31 +00:00
Alfred Perlstein 8a5c063a41 include sys/lock.h and sys/mutex.h to make compile.
Noticed by: Vincent Poy <vince@oahu.WURLDLINK.NET>
2002-01-30 23:28:25 +00:00