Commit graph

26985 commits

Author SHA1 Message Date
Hajimu UMEMOTO e43cc4ae36 When running aplication joined multicast address,
removing network card, and kill aplication.
imo_membership[].inm_ifp refer interface pointer
after removing interface.
When kill aplication, release socket,and imo_membership.
imo_membership use already not exist interface pointer.
Then, kernel panic.

PR:		29345
Submitted by:	Inoue Yuichi <inoue@nd.net.fujitsu.co.jp>
Obtained from:	KAME
MFC after:	3 days
2001-08-04 17:10:14 +00:00
Warner Losh a253d9b47b Kill debug output for sn device. It is confusing the natives 2001-08-04 05:27:52 +00:00
John Baldwin c9c1406f76 Add KTR_INTR tracepoints for when clock interrupts are triggered. 2001-08-03 20:54:41 +00:00
Hajimu UMEMOTO 2a21da3022 When global anycast address was assigned to lo0, wrong source
address was selected.

Reported by:	Shingo WATANABE <nabe@nabechan.org>
Submitted by:	JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
MFC after:	3 days
2001-08-03 19:10:31 +00:00
Robert Watson fd6aaf7fe1 Anton kindly pointed out (and fixed) a bug in the Jail handling of the
bind() call on IPv4 sockets:

  Currently, if one tries to bind a socket using INADDR_LOOPBACK inside a
  jail, it will fail because prison_ip() does not take this possibility
  into account.  On the other hand, when one tries to connect(), for
  example, to localhost, prison_remote_ip() will silently convert
  INADDR_LOOPBACK to the jail's IP address.  Therefore, it is desirable to
  make bind() to do this implicit conversion as well.

  Apart from this, the patch also replaces 0x7f000001 in
  prison_remote_ip() to a more correct INADDR_LOOPBACK.

This is a 4.4-RELEASE "during the freeze, thanks" MFC candidate.

Submitted by:	Anton Berezin <tobez@FreeBSD.org>
Discussed with at some point:	phk
MFC after:	3 days
2001-08-03 18:21:06 +00:00
Robert Watson 7d69e57088 Remove dangling prototype for the now defunct procfs_kmemaccess()
call.

Obtained from:	TrustedBSD Project
2001-08-03 17:51:05 +00:00
Daniel C. Sobral 07203494d2 MFS: Avoid dropping fragments in the absence of an interface address.
Noticed by:	fenner
Submitted by:	iedowse
Not committed to current by:	iedowse ;-)
2001-08-03 17:36:06 +00:00
Robert Watson 436b89d434 Collapse a Pmem case in with the other debugging files case for procfs,
as there are now "unusual" protection properties to Pmem that differ
from the other files.  While I'm at it, introduce proc locking for
the other files, which was previously present only in the Pmem case.

Obtained from:	TrustedBSD Project
2001-08-03 17:20:34 +00:00
Robert Watson 57de737e82 Remove read permission for group on the /proc/*/mem file, since kmem
no longer requires access.

Reviewed by:	tmm
Obtained from:	TrustedBSD Project
2001-08-03 17:15:40 +00:00
Robert Watson f2e6be5865 Prior to support for almost all ps activity via sysctl, ps used procfs,
and so special-casing was introduced to provide extra procfs privilege
to the kmem group.  With the advent of non-setgid kmem ps, this code
is no longer required, and in fact, can is potentially harmful as it
allocates privilege to a gid that is increasingly less meaningful.
Knowledge of specific gid's in kernel is also generally bad precedent,
as the kernel security policy doesn't distinguish gid's specifically,
only uid 0.

This commit removes reference to kmem in procfs, both in terms of
access control decisions, and the applying of gid kmem to the
/proc/*/mem file, simplifying the associated code considerably.
Processes are still permitted to access the mem file based on
the debugging policy, so ps -e still works fine for normal
processes and use.

Reviewed by:	tmm
Obtained from:	TrustedBSD Project
2001-08-03 17:13:23 +00:00
Bill Fenner 02e3112ae7 Don't terminate the uiomove() loop on a zero-length mbuf. It's not
particularly nice that IPSEC inserts a zero-length mbuf into the
 chain, and that bug should be fixed too, but interfaces should be
 robust to bad input.
Print the interface name when TUNDEBUG()ing about dropping an mbuf.
2001-08-03 16:51:53 +00:00
Mike Smith feade91944 Reverse the logic here again with regards to "trusted" ACPI timer
implementations.  More of them seem to be broken, so only "trust"
timers we know work.
2001-08-03 09:52:53 +00:00
Mike Smith d93b034fe9 Shoud build resources in the _CRS buffer. Oops.
Submitted by:	"neckpain@nettaxi.com" <neckpain@nettaxi.com>
2001-08-03 08:38:49 +00:00
Mike Smith a692219d8a Move the resource pointer when we reallocate the buffer.
Submitted by:	"neckpain@nettaxi.com" <neckpain@nettaxi.com>
2001-08-03 08:38:11 +00:00
Bosko Milekic ba3e88262e Rename mb_init() mbuf subsystem initialization routine to mbuf_init(), in
order to avoid namespace collision with subr_mchain.c's mb_init(). This
wasn't "fatal" as the mbuf initialization routine mb_init() was local to
subr_mbuf.c which in turn didn't pull in subr_mchain.c's mb_init()
declaration, but it should deffinately be changed now before it creates
headache.
2001-08-03 05:05:32 +00:00
Jake Burkholder f74250ca46 Remove some code that appears to have endian problems with INVARIANTS.
This is #if BIG_ENDIAN, but is only necessary if malloc types are shorts,
not struct malloc_type * like they are now.
2001-08-03 03:31:45 +00:00
Jake Burkholder 7cabcd9841 Move some code related to managing pv entries from the pmap module to
the pv module.  It works now that vtophys for sttes works.
2001-08-03 01:27:15 +00:00
Jake Burkholder d741ca6bdb Fix a bug translating virtual translation table entry addresses to physical
addresses.  It helps to use the physical address that the virtual address
actually maps to (doh!).  Comment out some code that crashes.

Found independently by:	tmm
2001-08-03 01:21:24 +00:00
Jake Burkholder 3db6135894 Define proc0paddr. Call init_param() as early as possible. 2001-08-03 01:11:49 +00:00
Jake Burkholder d2734d58ab Add a Makefile, ldscript, and config magic for sparc64. This is tailored
to build with a cross compiler alongside the standard compiler; it would be
more desirable to build in a chroot.
2001-08-03 01:09:10 +00:00
Jake Burkholder 1994658f04 Add an Elfhashelt type for sparc64. 2001-08-03 01:00:41 +00:00
Scott Long c6eafcf2c5 Reformat for 80 columns. Sorry, but I had to do it. 2001-08-03 00:50:30 +00:00
Peter Wemm 5635f2a580 Further Makefile.* sync (from Makefile.ia64). The lint target has been
commented out in the entire life of the 2.x+ branch and given the amount
of gcc-specific code we have and the warning checks that gcc does I'm not
sure that it is going to get us much for some time.
2001-08-03 00:07:54 +00:00
Peter Wemm d74dddff88 Move MKMODULESENV+= *after* MKMODULESENV= 2001-08-03 00:01:13 +00:00
Peter Wemm b2c17e333e Add a cosmetic comment. 2001-08-02 23:54:23 +00:00
John Baldwin b39bc3e160 Use 'p' instead of the potentially more expensive 'curproc' inside of
mi_switch().
2001-08-02 22:15:31 +00:00
George C A Reid 1ad86e6dd7 Set up the via_chinfo structures properly so we write to the correct
registers later on; this fixes the VIA82C686 sound problems recently
reported by a number of people.
2001-08-02 22:13:10 +00:00
Warner Losh c7021493ba Make the fmt arguments to make_dev and make_dev_alias const char *.
Approved on IRC as long as it didn't cause a large number of warnings by: phk

MFC After: 700 hours
2001-08-02 20:35:35 +00:00
Jonathan Chen 7ba271ae0b fix memory leak when error during opening of routing socket
PR:		kern/29336
Submitted by:	Richard Andrades <richard@xebeo.com>
MFC after:	1 month
2001-08-02 19:56:29 +00:00
Kazutaka YOKOTA 0426db70c6 Include opt_splash.h. 2001-08-02 13:23:17 +00:00
Kazutaka YOKOTA 2fe5e0b184 Use #ifdef DEV_SPLASH (from opt_splash.h) rather than
#if NSPLASH > 0 (from splash.h) to test the presence
of the splash driver.
2001-08-02 13:22:33 +00:00
Kazutaka YOKOTA eac47d67be Add FBIO_BLANK ioctl support. Return ENODEV for yet-to-be-
supported ioctls for now.
2001-08-02 11:26:30 +00:00
Kazutaka YOKOTA 6d1699583d Add some definitions. Their actual support will be added
to video drivers later.
2001-08-02 11:17:38 +00:00
Sheldon Hearn 2cc33d7946 When building a debugging kernel with modules, build modules with
debugging support as well.

This relies on support added in rev 1.105 to kmod.mk.

Requested by:	peter
2001-08-02 10:56:59 +00:00
Maxim Sobolev fe603109d1 - Deny detaching requests until device is still open, otherwise it is possible
to hang or panic kernel by detaching disk from which fs is mounted;
- replace "md" with MD_NAME in yet another place.

Reviewed by:	phk
Approved by:	phk
2001-08-02 10:19:13 +00:00
Brian Somers 2b5dcd2ffe Pack struct uniqtag declarations to stop our data field from being pushed
4 bytes to the right on the alpha.

Tested by:	Thomas Pornin <Thomas.Pornin@ens.fr>
MFC after:	1 week
2001-08-02 09:28:31 +00:00
Sheldon Hearn f66116083c When building a debugging kernel with modules, build modules with
debugging support as well.  Debugging module support is handled
identically to kernel debugging support, right down to poor
choice of make variable names.
2001-08-02 09:22:18 +00:00
Kazutaka YOKOTA 4866e2769a Refine cursor type/shape control escape sequences and
ioctls. We can now add ve, vi and vs capabilities to
cons25 in termcap.

Discussed with and tested by: ache
2001-08-02 08:30:40 +00:00
Alfred Perlstein 61ce6eeee3 Fixups for the initial allocation by dillon:
1) allocate fewer buckets
  2) when failing to allocate swap zone, keep reducing the zone by
     a third rather than a half in order to reduce the chance of
     allocating way too little.

I also moved around some code for readability.

Suggested by: dillon
Reviewed by: dillon
2001-08-02 07:54:58 +00:00
Matt Jacob d51456f800 Oops- don't set 'goal' twice when you mean to set 'nvrm' as well.
This breaks bogus NVRAM boards.

MFC after:	1 day
2001-08-02 00:34:56 +00:00
Matt Jacob d82784053e Revert part of previous- I misunderstood the use of 'ncpus'- I thought it'd
been hack to keep clocks from being reinitialized.
2001-08-01 20:35:42 +00:00
Peter Wemm aa7a4dae6d Temporarily back out kern_sig.c rev 1.125 and kern_exit.c rev 1.131.
This paniced my one of my machines one time too many :-( and there is
no sign of a solution in the pipeline.  The deltas are still easily
available in cvs.  The problem is that if the parent has been swapped
out, the child process cannot grope around in the parent's UPAGES to
see the sigact[] array or it will fault.  This probably is a showstopper
for this implementation anyway.
2001-08-01 20:35:24 +00:00
Dima Dorfman 635751fa8c Fix grammar nit. 2001-08-01 20:16:12 +00:00
Warner Losh 53af1c8a3d TI cardbus bridges, 12xx and newer, have an interesting register. It
is the diagnostics register at offset 0x93.  When bit 5 is set in this
register, bits 4-7 in ExCA register 0x5 being 0000 are required for
pci interrupt routing.  When it is clear, then bit 4 of ExCA register
0x3 is used to enable it.

The only other issue is that when you route interrupts this way, you
must read ExCA register 0x4 in order to clear the interrupt, else you
get an interrupt storm.

Deal with this requirement by setting things up.  It is believed that
this won't hurt other chipsets, but other chipsets may require their
own work arounds.
2001-08-01 19:41:56 +00:00
Matt Jacob 802f355a3f Don't initialize a clock twice (it's not a function of number of
cpus).
2001-08-01 19:40:11 +00:00
Ian Dowse 02b31a0ee9 Fix a client-side memory leak in nfs_flush(). The code allocates
a temporary array to store struct buf pointers if the list doesn't
fit in a local array. Usually it frees the array when finished,
but if it jumps to the 'again' label and the new list does fit in
the local array then it can forget to free a previously malloc'd
M_TEMP memory.

Move the free() up a line so that it frees any previously allocated
memory whether or not it needs to malloc a new array.

Reviewed by:	dillon
2001-08-01 10:25:13 +00:00
Greg Lehey d505403792 open_device: Recognize ar device.
Submitted by:  Valery Kotchiev <valery@rudiment.dk>
2001-08-01 04:35:28 +00:00
Bosko Milekic bb6f838c79 Move CPU_ABSENT() macro to smp.h, where it belongs anyway. It will be
defined to 0 in the non-SMP case, which very much makes sense as it
permits its usage in per-CPU initialization loops (for an example, check
out subr_mbuf.c).
  Further, on a UP system, make mb_alloc always use the first per-CPU
container, regardless of cpuid (i.e. remove reliability on cpuid in the
UP case).

Requested by: alfred
2001-08-01 00:54:00 +00:00
Bill Fenner 46da4bc6fc Update our bpf.h with tcpdump.org's new DLT_ types.
Use our bpf.h instead of tcpdump.org's to build libpcap.
2001-07-31 23:27:06 +00:00
John Baldwin 36c2e9feb4 Apply the cluebat to myself and undo the await() -> mawait() rename. The
asleep() and await() functions split the functionality of msleep() up into
two halves.  Only the asleep() half (which is what puts the process on the
sleep queue) actually needs the lock usually passed to msleep() held to
prevent lost wakeups.  await() does not need the lock held, so the lock
can be released prior to calling await() and does not need to be passed in
to the await() function.  Typical usage of these functions would be as
follows:

        mtx_lock(&foo_mtx);
        ... do stuff ...
        asleep(&foo_cond, PRIxx, "foowt", hz);
        ...
        mtx_unlock&foo_mtx);
        ...
        await(-1, -1);

Inspired by:	dillon on the couch at Usenix
2001-07-31 22:06:56 +00:00
John Baldwin e9121d0663 Add a safety belt to mawait() for the (cold || panicstr) case identical to
the one in msleep() such that we return immediately rather than blocking.

Submitted by:	peter
Prodded by:	sheldonh
2001-07-31 20:57:57 +00:00
John Baldwin b0606ca15f Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expect
the first sector of the emulated floppy to contain a valid MS-DOS BPB that
it can modify.  Since boot1 is the first sector of boot.flp, this resulted
in the BIOS overwriting part of boot1: specifically the function used to
read in sectors from the disk.

Submitted by:	Mark Peek <mark@whistle.com>
Submitted by:	Doug Ambrisko <ambrisko@ambrisko.com>
PR:		i386/26382
Obtained from:	NetBSD, OpenBSD (the example BPB)
MFC after:	1 month
2001-07-31 19:50:09 +00:00
John Baldwin 5cb0fbe47e If we have already panic'd then don't bother enforcing mutex asserts as
things are pretty much shot already and all panic'ing does is hurt our
chances of getting a dump.

Inspired by:	sheldonh
2001-07-31 17:45:50 +00:00
John Baldwin 32bca5fe03 - Fix panicstr checks to explicitly check against NULL.
- Add a few more panicstr checks so that we don't panic recursively.

Requested by:	sheldonh (2)
2001-07-31 17:44:57 +00:00
Robert Watson e7f65fdcf9 o Modify p_candebug() such that there is no longer automatic acceptance
of debugging the current process when that is in conflict with other
  restrictions (such as jail, unprivileged_procdebug_permitted, etc).
o This corrects anomolies in the behavior of
  kern.security.unprivileged_procdebug_permitted when using truss and
  ktrace.  The theory goes that this is now safe to use.

Obtained from:	TrustedBSD Project
2001-07-31 17:25:12 +00:00
Bill Paul 89b1abc0bf Re-order things slightly in the RX handler for VLAN support: we need
call vlan_input_tag() after stripping the ether header from the frame
with m_adj(), not before.

Noticed by: Brooks Davis <brooks@one-eyed-alien.net>
2001-07-31 16:38:58 +00:00
Warner Losh 6d5c3c4c96 bsh and bst are unused in softc, except for setting them. We do use the
bsh and bst in the pcic_slot structures.
2001-07-31 15:53:17 +00:00
Robert Watson 0ef5652e27 o Introduce new kern.security sysctl tree for kernel security policy
MIB entries.
o Relocate kern.suser_permitted to kern.security.suser_permitted.
o Introduce new kern.security.unprivileged_procdebug_permitted, which
  (when set to 0) prevents processes without privilege from performing
  a variety of inter-process debugging activities.  The default is 1,
  to provide current behavior.

  This feature allows "hardened" systems to disable access to debugging
  facilities, which have been associated with a number of past security
  vulnerabilities.  Previously, while procfs could be unmounted, other
  in-kernel facilities (such as ptrace()) were still available.  This
  setting should not be modified on normal development systems, as it
  will result in frustration.  Some utilities respond poorly to
  failing to get the debugging access they require, and error response
  by these utilities may be improved in the future in the name of
  beautification.

  Note that there are currently some odd interactions with some
  facilities, which will need to be resolved before this should be used
  in production, including odd interactions with truss and ktrace.
  Note also that currently, tracing is permitted on the current process
  regardless of this flag, for compatibility with previous
  authorization code in various facilities, but that will probably
  change (and resolve the odd interactions).

Obtained from:	TrustedBSD Project
2001-07-31 15:48:21 +00:00
Warner Losh 1b64899001 Fix typo where I assigned the bus tag and not the bus handled. It
appears that this may be unused, but I'll keep it for the moment.

Noticed by: Shizuka Kudo <shizukakudo_99@yahoo.com>
2001-07-31 15:42:44 +00:00
John Baldwin 4ce050bf39 GC some obsolete alpha code. 2001-07-31 14:35:36 +00:00
Hajimu UMEMOTO 79e15ef30c If LCP proto-rej is received, drop the protocol mentioned by the message.
This is to be friendly with non-IPv6 peer (If the peer complains due to
lack of IPv6CP, drop IPv6CP).  This basically implements "RXJ+" state
transition in the RFC.

Obtained from:	NetBSD
2001-07-31 07:27:01 +00:00
Warner Losh 372458622f A bunch of interrupt related cleanup.
o Move PIOCSRESOURCE from pccard to pcic so the kernel can give pccardd
  better hints as to what resources to use.
o Implement an undocumented hw.pcic.interrupt_route to allow people that
  need to do so to route their interrupts in a non-standard way.
o Only preallocate a resource in probe if we're routing via pci.
o If we aren't routing via pci, then set the irq to use explicitly
  to defeat the automatic IRQ routing of the pci layer.

This, with the pccardd code should be close to what can be committed
to -stable.
2001-07-31 06:44:37 +00:00
Warner Losh 4ee0b26518 Move pcic_override_irq from pcic_isa, to pcic. 2001-07-31 06:32:02 +00:00
Warner Losh 9f3112df2d Add CLPD6832_BCR_ISA_IRQ definition for ISA routing of interrupts.
Minor commentary tweaking.
2001-07-31 06:31:38 +00:00
Jake Burkholder 89bf8575ee Flesh out the sparc64 port considerably. This contains:
- mostly complete kernel pmap support, and tested but currently turned
  off userland pmap support
- low level assembly language trap, context switching and support code
- fully implemented atomic.h and supporting cpufunc.h
- some support for kernel debugging with ddb
- various header tweaks and filling out of machine dependent structures
2001-07-31 06:05:05 +00:00
Jake Burkholder 98bb5304e1 Add skeleton machine dependent headers and c files for a port of freebsd
to a new architecture.  This is the base of the sparc64 port, but contains
limited machine dependent code, and can be used a base for ports.  Included
are:
- standard machine dependent headers, tweaked for a 64 bit, big endian
  architecture, including empty versions of all the machine dependent
  structures
- a machine independent atomic.h, which can be used until a port has
  support for interrupts and the operations really need to be atomic
- stub versions of all the machine dependent functions, which panic
  when called and print out the name of the function that needs to
  be implemented.  functions which are normally in assembly files are
  not included, but this should reduce the number of different undefined
  references on the first few compiles from hundreds to 5 or 6
Given minimal startup code and console support it should be trivial to
make this compile and run the first few sysinits on almost any architecture.

Requested by:   alfred, imp, jhb
2001-07-31 05:45:16 +00:00
Jake Burkholder 9ceb184438 Machine dependent ifdefs for sparc64. 2001-07-31 04:14:30 +00:00
Jake Burkholder 3a9b5daf48 Oops. Last commit to vm_object.c should have got these files too.
Remove the use of atomic ops to manipulate vm_object and vm_page flags.
Giant is required here, so they are superfluous.

Discussed with:	dillon
2001-07-31 04:09:52 +00:00
Jake Burkholder b06805ad34 Remove the use of atomic ops to manipulate vm_object and vm_page flags.
Giant is required here, so they are superfluous.

Discussed with:	dillon
2001-07-31 04:03:53 +00:00
Jake Burkholder 146be906a1 Don't try to find an eventhandler list if the list of lists hasn't
been initialized yet.
2001-07-31 03:52:16 +00:00
Jake Burkholder 98b0e9d587 Don't try to print a field that doesn't exist; in usually commented
out debugging code.
2001-07-31 03:51:07 +00:00
Jake Burkholder 7e5102989e Use a machine dependent type, Elf_Hashelt, for the elements of the elf
dynamic symbol table buckets and chains.  The sparc64 toolchain uses 32
bit .hash entries, unlike other 64 bits architectures (alpha), which use
64 bit entries.

Discussed with: dfr, jdp
2001-07-31 03:46:39 +00:00
Yoshihiro Takahashi baa444b77e Removed PLIP support. 2001-07-31 03:39:35 +00:00
Jake Burkholder 8aa920fd1d Make the openfirmware functions work on 64 bit architectures by using
a standard cell_t type for the fields of all argument structs.  Also
make ihandle_t and phandle_t unsigned to avoid sign extension problems.

Approved by:	benno
2001-07-31 03:36:26 +00:00
Jake Burkholder c22c65b1d4 Quiet uninitialized variable warning (also a bug). 2001-07-31 03:32:24 +00:00
Peter Wemm 7b141d5db3 Check the filehandle size when mounting.
Obtained from:  Constantine Sapuntzakis <csapuntz@openbsd.org>
2001-07-30 20:01:59 +00:00
Jeroen Ruigrok van der Werven 7b389f3335 Fix obsolete code.
FreeBSD _does_ define ENOMSG, so no need for checking if we support it.

Inspired by PR:		22470
Which was submitted by:	Bjorn Tornqvist <bjorn@west.se>
MFC after:	1 week
2001-07-30 19:28:02 +00:00
Darren Reed 31f3bf83f6 fix import/merge related code problems 2001-07-30 10:53:23 +00:00
Mike Smith f16527bb44 The current resource buffer returned from an interrupt link device
in the case where there are no interrupts routed for it does not
contain enough space to use it to route an interrupt.  In the case
where we need to route an interrupt, throw away the returned buffer
and create a new one containing the interrupt we want.
2001-07-30 09:01:18 +00:00
Mike Smith 6d63101a75 - Prevent the ACPI code from being loaded as a module other than at
boot time.  Loading as a module once the system is up and running
   doesn't make any sense.

 - Fix acpi_FindIndexedResource (it would only check the first resource),
   changes the calling interface.

 - Add a new helper function (acpi_AppendBufferResource) to help building
   buffers containing resources.
2001-07-30 08:59:43 +00:00
Mike Smith d8a9fe36a1 Minor updates (no functional changes)
- Remove the beer-ware license (reqested by phk)
 - Reorganise so that the PIIX4 workaround code is kept together, and
   switch the workaround function via the timecounter struct, saving
   a compare in the read-timecounter codepath.  Also indicate that
   the workaround is active by changing the timecounter hardware string.
2001-07-30 08:57:55 +00:00
Warner Losh 7e766053f8 Don't use a buffer for the state info from the TI chips. Just print
it directly.  Also, minor style(9) nits near one or two of these
sites.
2001-07-30 07:17:40 +00:00
Matt Jacob 9ce9bdaf8a Redo how we manage SCSI device settings- have a 3rd flags (nvram) that records
either what's in NVRAM or what the safe defaults would be if we lack NVRAM.
Then we rename cur_XXXX to actv_XXXX (these are the currently active settings)
and the dev_XXX settings to goal_XXXX (these are the settings which we want
cur_XXXX to converge to).

This probably isn't entirely final as yet- but it's a lot closer to now
being what it should be, including allowing camcontrol to actually set
specific settings.
2001-07-30 01:00:21 +00:00
Matt Jacob d9c272f3ea Redo how we manage SCSI device settings- have a 3rd flags (nvram) that records
either what's in NVRAM or what the safe defaults would be if we lack NVRAM.
Then we rename cur_XXXX to actv_XXXX (these are the currently active settings)
and the dev_XXX settings to goal_XXXX (these are the settings which we want
cur_XXXX to converge to).

Roll core minor.
2001-07-30 00:59:32 +00:00
Matt Jacob df225582bf Redo how we manage SCSI device settings- have a 3rd flags (nvram) that records
either what's in NVRAM or what the safe defaults would be if we lack NVRAM.
Then we rename cur_XXXX to actv_XXXX (these are the currently active settings)
and the dev_XXX settings to goal_XXXX (these are the settings which we want
cur_XXXX to converge to).
2001-07-30 00:59:06 +00:00
Matt Jacob c7ec439040 Kill the command (don't rerun it) if we had an AUTOSENSE failure.
If we had an AUTOSENSE failure, we don't know what SENSE DATA
we had for a CHECK CONDITION. It's far better to assume failure
in this case.
2001-07-30 00:44:32 +00:00
Matt Jacob 387c7c9d0e (Forced commit- last one missed the comments)
Handle both old and new TARGIOALLOCUNIT/TARGIOFREEUNIT cases- the new
one allows us to specify inquiry data we want to use.

Handle more of the CAM_DIS_DISCONNECT case.
2001-07-30 00:30:58 +00:00
Matt Jacob 17ff160058 (Forced commit- last commit was inadvertant in that it missed the comments)
Move TARGCTLIOALLOCUNIT to OTARGCTLIOALLOCUNIT, TARGCTLIOFREEUNIT
to OTARGCTLIOFREEUNIT and redefine old associated structure to be
old_ioc_alloc_unit- deprecation but preservation of binaries.

Add new structure for same- but this one contains a pointer to
user defined INQUIRY data so you can define what the target
device looks like to the outside world.
2001-07-30 00:27:54 +00:00
Matt Jacob 102d676930 backout last commit- inadvertant 2001-07-30 00:22:57 +00:00
Matt Jacob 3759de8993 scsi_targetio.h 2001-07-30 00:21:29 +00:00
Matt Jacob c2accd3411 Propagate CAM_DIS_DISCONNECT on through:
1. If we get frozen, unfreeze for disable disconnects.
2. Put CAM_DIS_DISCONNECT commands at the head of the work queue
(we have a target still connected and we can't run anything else
until this command completes).

If we had an error sending the last CTIO, unfreeze the queue anyway.
2001-07-30 00:19:50 +00:00
Warner Losh 4c7bc18993 When booted -v (eg bootverbose is non-zero), have pccard report what
resources it is attempting to assign to a child object.  This should
help people track down mysterious resource allocation problems more
easily.

# Unfortunately, it is harder to do the conflict check and report which
# resource failed if the driver itself doesn't.
2001-07-30 00:03:58 +00:00
Ian Dowse 9e27954de1 Two recent commits in sys/ufs/ufs interacted badly with ext2fs
because it shares ufs code. In ufs_fhtovp(), the test on i_effnlink
is invalid because ext2fs does not maintain this field. In ufs_close(),
i_effnlink is also tested, to determines whether or not to call
vn_start_write(). The ufs_fhtovp issue breaks NFS exporting of
ext2fs filesystems; I believe the other is harmless.

Fix both cases by checking um_i_effnlink_valid in the ufsmount
struct, and use i_nlink if necessary.

Noticed by:	bde
Reviewed by:	mckusick, bde
2001-07-29 22:26:01 +00:00
Thomas Moestl 9c4968d152 Disallow ATAPI CD transfers that are not a multiple of the device block
size (previously, the transfer size would be rounded up to a multiple of
the block size, which would overflow the buffer).
This fixes panics when doing things like trying to mount audio CD's.

PR:		kern/21946
Review Timeout:	sos
2001-07-29 21:01:13 +00:00
Yoshihiro Takahashi f7827e0a6e Convert the olpt driver to using new-bus stuff. 2001-07-29 11:11:45 +00:00
Yoshihiro Takahashi 8ea2602a0d Merged from sys/dev/syscons/syscons.c revisions 1.367 and 1.368. 2001-07-29 10:52:07 +00:00
KATO Takenori cd9709998e Make symlink $S/$M/include -> compile/FOO/machine at kernel-depend
instead of geneassym.o.
2001-07-29 07:39:14 +00:00
Mark Murray 7d42654638 Diff-reduce this with GENERIC.
OK'ed by:	imp
2001-07-28 20:40:49 +00:00
Ian Dowse a4821e444e Permit direct swapping to NFS regular files using swapon(2). We
already allow this for NFS swap configured via BOOTP, so it is
known to work fine.

For many diskless configurations is is more flexible to have the
client set up swapping itself; it can recreate a sparse swap file
to save on server space for example, and it works with a non-NFS
root filesystem such as an in-kernel filesystem image.
2001-07-28 20:18:38 +00:00
Justin T. Gibbs 00efe71bc7 Remove a bootverbose diagnostic that makes bootverbose just too verbose. 2001-07-28 18:45:52 +00:00
KATO Takenori 1419e0df32 Merged from sys/i86/isa/npx.c revision 1.107. 2001-07-28 13:08:31 +00:00
Darren Reed 354699e12f fix conflicts created by import 2001-07-28 11:58:26 +00:00
Warner Losh c671fc7bfb #ifdef some 5.0 code with freebsd_version to reduce diffs with stable. 2001-07-28 04:25:11 +00:00
Warner Losh 29edba568b It is spelled INTR_FAST in current and INTR_TYPE_FAST in stable, so try to
make allowances.
2001-07-28 04:08:25 +00:00
Warner Losh 9d0ea05213 Stable requires machine/clock.h to quiet warnings. It isn't
strictly necessary on current, but having it in here makes the diffs with
stable smaller and doesn't hurt anything except for phk's redundant include
finder.
2001-07-28 04:04:05 +00:00
Warner Losh 23b663388a To reduce diffs with -stable, ifdef selinfo.h or select.h include 2001-07-28 03:47:10 +00:00
Warner Losh 63ccf86d11 Minor whitespace nit 2001-07-28 03:46:35 +00:00
Warner Losh 1cb94d461e Use spaces instead of hard tabs in the diagram. 2001-07-28 03:45:55 +00:00
Bill Paul 0a75b55602 Pacify users who get all bent out of shape when they see the "xl%d: command
never completed" message. The RX reset takes longer complete than it
used to, a lot longer in fact than xl_wait() is prepared to wait.
When we do the RX reset in xl_reset(), this cases xl_wait() to time out
and whine. We wait a little extra time now after the RX reset, which
should silence the warning.

Thanks to obrien for finally getting me a box with a NIC that
causes this problem for me to tinker with.
2001-07-27 20:55:45 +00:00
Bill Paul 2be840b347 Remember to zero out certain things that we malloc() and/or contigmalloc(). 2001-07-27 19:38:56 +00:00
Ian Dowse 54d6d2dfaf Disable the dirhash sanity check that panics if an unused directory
entry (d_ino == 0) is found in a position that is not the start of
a DIRBLKSIZ block.

While such entries cannot occur normally (ufs always extends the
previous entry to cover the free space instead), they do not cause
problems and fsck does not fix them, so panicking is bad.
2001-07-27 18:45:41 +00:00
Bill Paul 386a59d734 Uncomment a return(ENXIO) that I commented out for debugging purposes. 2001-07-27 18:28:37 +00:00
Warner Losh d13600a5af Introduce two new tunables from the boot loader.
hw.pcic.irq		Globally set the IRQ for all pcic devices' management
			interrupt (aka card status change or CSC interrupt)
			This is what used to be known as
			machdep.pccard.pcic_irq (which has been retained for
			now for compatibility).
hw.pcic.ignore_fuction_1 Ignores function 1 for all PCIC bridges by not
			attaching to them.  Lucent released a huge batch
			of cards that were imporperly manufactuered (lacking
			the 0 ohm resister to disable slot 1).  This is
			a big hammer to keep those cards from causing problems
			(I've had 4 people contact me saying my patches
			worked great once they added a kludge to always ignore
			function 1, or until they soldered these resistors
			in place!).

No clue where to document these.  They act as both boot loader environment
variables, as well as read-only sysctls after boot.

At the same time, sort sys/systm.h in its proper order after sys/sysctl.h.
2001-07-27 16:07:02 +00:00
Brooks Davis a4806cd1df Cleanup duplication in Aironet headers
PR:		kern/29210
Submitted by:	Doug Ambrisko <ambrisko@ambrisko.com>
MFC after:	3 days
2001-07-27 16:05:21 +00:00
Peter Wemm b219758f94 Revert previous accidental commit. FWIW, it was part of enabling
VM caching of disks through mmap() and stopping syncing of open files
that had their last reference in the fs removed (ie: their unsync'ed
pages get discarded on close already, so I made it stop syncing too).
2001-07-27 15:57:17 +00:00
Peter Wemm 24a590a074 Fix cut/paste blunder. Serves me right for doing a last minute tweak
to what I had for some time.

Submitted by:	bde
2001-07-27 15:52:49 +00:00
Mike Smith 7b60d04d2c The ACPI timer register corruption problem is resolved in the PIIX4
starting with the PIIX4M.  Restrict enabling the workaround to those
chips known to be buggy.
2001-07-27 09:01:13 +00:00
Warner Losh ebea20aed7 Minor nits merged from my stable tree:
o kill blank line that I introduced in cardinfo.h
o Delete unused variable wasinactive.
o return 0 from pccard_resume.
o Set the state and lastsate initially to be empty.
o move comment above code for interrupt dispatching.
o Powerstate interface is now available as of 430002, not 500000 (note that
  this change will be not 100% correct since the power state stuff didn't
  enter current until well after 500000, but it is good enough for the two
  branche we have going now).
2001-07-27 07:47:35 +00:00
Warner Losh 53286eb3f2 Additional clarification. 2001-07-27 07:32:59 +00:00
Warner Losh c1c1a23f53 Attempt to fix and document interactions between suspend/resume and pccardc
power x 0.

pccardc power x 0 used to disable the slot.  But a suspend/resume
would reactivate the pccard.  It no longer does that.  Now the
disabling of the slot is sticy until it is reset with power x 1 or the
card is ejected.  This seems closer to correct behavior to me.

o Process all card state changes the same using pccard_do_stat_change().
o Cleanup disabling the card so that we can preserve the state after
  the change.  Basically, don't set it to empty as often as we do.
o On suspend, the new state is "empty" and the laststate is "suspend"
o Document state machine with a diagram of states and edges.  The
  edges are labeld to tell the reader what event causes the external
  state changes.
o "machdep.pccard.pcic_resume_reset" may be obsolete now.  We always
  call the bridge driver's resume method on resume now.  Otherwise cards
  won't automatically show up.  If it needs to stay, I'll add it back.
2001-07-27 07:21:42 +00:00
Warner Losh 7d978ff754 Give hopefully better diagnostics about the card types we reject. 2001-07-27 07:14:12 +00:00
Peter Wemm 0b27d7104f Make PMAP_SHPGPERPROC tunable. One shouldn't need to recompile a kernel
for this, since it is easy to run into with large systems with lots of
shared mmap space.

Obtained from:	yahoo
2001-07-27 01:08:59 +00:00
Peter Wemm e664fdb13c The kernel *does* now define setjmp/longjmp. Dont duplicate it here.
In file included from ../../../dev/vinum/vinumhdr.h:77,
                 from ../../../dev/vinum/vinum.c:44:
../../../dev/vinum/vinumext.h:165: warning: redundant redeclaration of `setjmp' in same scope
../../../sys/systm.h:96: warning: previous declaration of `setjmp'
../../../dev/vinum/vinummemory.c:44: warning: redundant redeclaration of `longjmp' in same scope
../../../sys/systm.h:97: warning: previous declaration of `longjmp'
2001-07-27 00:44:36 +00:00
Peter Wemm 57e119f6f2 Fix a warning. 2001-07-27 00:04:39 +00:00
Peter Wemm 016517247f Patch up some style(9) stuff in tcp_new_isn() 2001-07-27 00:03:49 +00:00
Peter Wemm 92971bd3f1 s/OpemBSD/OpenBSD/ 2001-07-27 00:01:48 +00:00
Peter Wemm 3e02a8711a MASK_FPU_SW didn't do what it was expected to do. 2001-07-26 23:47:04 +00:00
Warner Losh e598f66151 Check the state of the slot when we resume. Set it to empty if we no
longer have a pccard in the slot.  This fixes the problem where pccard
would say that a card had been inserted on resume.  This also appears
to make the insert/remove events more reliable after a resume as well,
but that may be a different bug I need to hunt down.
2001-07-26 23:23:36 +00:00
Peter Wemm a03bd29498 Use the tunable maxusers rather than the compile-time one. Evaluate and
initialize in the right order to make derivative settings work right.
eg: at compile time, nmbufs was double nmbclusters.  For POLA this should
work the same at runtime.
2001-07-26 23:08:31 +00:00
Peter Wemm bd40659f85 Call the early tunable setup functions as soon as kern_envp is available.
Some things depend on hz being set not long after this.
2001-07-26 23:06:44 +00:00
Peter Wemm f74654de47 Move MAXUSERS out of opt_param.h to make sure that other code doesn't
use it rather than the tunable version.
2001-07-26 23:05:35 +00:00
Peter Wemm 18ec8d761c param.c no longer gets special treatment. Use the source tree version. 2001-07-26 23:04:46 +00:00
Peter Wemm ee342e1bf1 Move param.c out of the conf directory and make it fully dynamic.
Tunables are now derived at boot time from maxusers.  ie: change maxusers
via a tunable and all the derivative settings change.  You can change
the other tunables individually as well.  Even hz etc is tunable.
2001-07-26 23:04:03 +00:00
Thomas Moestl 3d3c27fedf Make sure the total number of sectors is not 0 for a vnode-type md to
avoid a division by zero which would occur on open() in this case.

Reviewed by:	phk
2001-07-26 20:05:20 +00:00
Hajimu UMEMOTO 13cf67f317 move ipsec security policy allocation into in_pcballoc, before
making pcbs available to the outside world.  otherwise, we will see
inpcb without ipsec security policy attached (-> panic() in ipsec.c).

Obtained from:	KAME
MFC after:	3 days
2001-07-26 19:19:49 +00:00
Jun-ichiro itojun Hagino b954a75e3c incorrect bounds-check on snprintf.
Submitted by:	fenner
2001-07-26 19:14:52 +00:00
Bosko Milekic 49f854f926 - Do not handle the per-CPU containers in mbuf code as though the cpuids
were indices in a dense array. The cpuids are a sparse set and treat
  them as such, setting up containers only for CPUs activated during
  mb_init().

- Fix netstat(1) and systat(1) to treat the per-CPU stats area as a sparse
  map, in accordance with the above.

This allows us to properly boot with certain CPUs disactivated. However, if
we later decide to re-activate said CPUs, we will barf until we decide to
implement CPU spinon/spinoff callback hooks to allow for said CPUs' per-CPU
containers to get configured on their activation.

Reported by: mjacob
Partially (sys/ diffs) Submitted by: mjacob
2001-07-26 18:47:46 +00:00
Maxim Sobolev aa7cc2322b Move definition of structure used in CONS_SCRSHOT ioctl in front of definition
of ioctl itself, like we have for all other ioctl's in this file.

MFC after:	2 weeks
2001-07-26 14:24:53 +00:00
Yoshihiro Takahashi 28b975bf3d Speed up console driver.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2001-07-26 03:07:07 +00:00
Mike Smith b964f385bb Fix typo (* -> &)
Submitted by:	Andrew Doran <ad@netbsd.org>
2001-07-26 02:20:47 +00:00
Scott Long 4aa620cdc6 Add /dev/hpn? as an alias to /dev/aac? so that the HP version of the CLI
utility will work, and document it in the manpage.

MFC after:	3 days
2001-07-25 22:36:17 +00:00
Peter Wemm e3d1d61f10 This commit was generated by cvs2svn to compensate for changes in r80357,
which included commits to RCS files with non-trunk default branches.
2001-07-25 22:10:56 +00:00
Peter Wemm 4f12dbc3f6 Commit the hwsleep.c patch for suspend/resume onto the vendor branch.
This has supposedly been incorporated into the Intel code already, so this
will get cleanly replaced with the "official" version when it is next
imported and will not cause any conflicts or hiccups.
2001-07-25 22:10:56 +00:00
Bill Fenner 3f2e902a15 Somewhat modernize ip_mroute.c:
- Use sysctl to export stats
- Use ip_encap.c's encapsulation support
- Update lkm to kld (is 6 years a record for a broken module?)
- Remove some unused cruft
2001-07-25 20:15:49 +00:00
Bill Fenner c3cb7e5d7a Don't bother passing p to rtioctl just so it can fail to pass it to mrt_ioctl 2001-07-25 20:15:28 +00:00
Bill Fenner fffcbbcd94 Unbreak ip_mroute_mod 2001-07-25 20:15:17 +00:00
Hajimu UMEMOTO 9a70151652 As commented in defined in sys/net/route.c, rt_fixchange() has a bad
effect, which would cause unnecessary route deletion:

 * Unfortunately, this has the obnoxious
 * property of also triggering for insertion /above/ a pre-existing network
 * route and clones.  Sigh.  This may be fixed some day.

The effect has been even worse, because recent versions of route.c set
the parent rtentry for cloned routes from an interface-direct route.
For example, suppose that we have an interface "ne0" that has an IPv4
subnet "10.0.0.0/24".  Then we may have a cloned route like 10.0.0.1
on the interface, whose parent route is 10.0.0.0/24 (to the interface
ne0).  Now, when we add the default route (i.e. 0.0.0.0/0),
rt_fixchange() will remove the cloned route 10.0.0.1.  The (bad) effect
also prevents rt_setgate from configuring rt_gwroute, which would not
be an intended behavior.

As suggested in the comments to rt_fixchange(), we need stricter check
in the function, to prevent unintentional route deletion.

This fix also solve the "IPV6 panic?" problem in nd6_timer().

Submitted by:	JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
MFC after:	4 days
2001-07-25 19:31:43 +00:00
Sheldon Hearn 81dd89bf46 Add build infrastructure for a libiconv loadable kernel module.
This should allow the use of the smbfs module without the
requirement to rebuild the kernel with LIBICONV.
2001-07-25 19:21:06 +00:00
Jonathan Lemon 48e417eb5a Reset the device's powerstate to d0 when resuming from a suspend
operation, not just when we initally attach to the device.

Submitted by: warner
2001-07-25 18:00:17 +00:00
Peter Pentchev 7ca4d05f34 Make dynamic sysctl entries start at 0x100, not decimal 100 - there are
static entries with oid's over 100, and defining enough dynamic entries
causes an overlap.

Move the "magic" value 0x100 into <sys/sysctl.h> where it belongs.

PR:		29131
Submitted by:	"Alexander N. Kabaev" <kabaev@mail.ru>
Reviewed by:	-arch, -audit
MFC after:	2 weeks
2001-07-25 17:21:18 +00:00
Peter Pentchev 107e7dc5c3 Style(9): function names on a separate line, max line length 80 chars.
Reviewed by:	-arch, -audit
MFC after:	2 weeks
2001-07-25 17:13:58 +00:00
Mitsuru IWASAKI 44df042b35 Better checking of duplicated interrupt handler installation.
Reviewed by:	msmith
2001-07-25 16:13:30 +00:00
Mitsuru IWASAKI 5394e6a026 Some minor fixes.
- Set system power profile only when AC-line status has canged.
 - Get initial AC-line status after whole system is up.

Reviewed by:	msmith
2001-07-25 16:08:58 +00:00
Warner Losh dd99c79cc1 Make the multiple interrupts attachment an error not a panic.
Sometimes, when pccardd is restarted, it fails to realize that the
device is already attached and tries to attach it again.  This leads
to bad mojo since the pccard code isn't setup to handle that, so the
panic was put in.  Now it appears that it is triggering too easily, so
I'm backing it off to a non-fatal error.
2001-07-25 15:09:54 +00:00
Dima Dorfman 101f105db2 Move the kernel stuff out of snoop.h. It was only there because some
of the snp* functions needed to be called from tty.c, which is no
longer the case.
2001-07-25 14:47:56 +00:00
Dima Dorfman 02bd5400fe sys/kern/tty_snoop.c is now sys/dev/snp/snp.c.
Repo-copy by:	jdp
2001-07-25 12:06:36 +00:00
Matt Jacob f44257c29a Remove ISP_SMPLOCK stuff- we're just using locking now.
Correctly reintroduce loop_seen_once semantics- that is, if we've never
seen good link, start bouncing commands with CAM_SEL_TIMEOUT. But we
have to be careful to have let ourselves try (in isp_kthread) to check
for loop up at least once.

PR:		28992
MFC after:	1 week
2001-07-25 04:23:52 +00:00
Matt Jacob 3910362ab8 Roll minor version. Remove ISP_SMPLOCK nonsense. We're using full locking,
and that's final.

MFC after:	1 week
2001-07-25 04:21:53 +00:00
Brian Somers 9088fa05ae If an attempt is made to LISTEN for a service tag that's already being
LISTENed for, return EEXISTS.

Only match the magic "*" service tag if no other LISTEN service tags
match.

Require an explicit LISTEN for an empty service tag in order to match
empty service requests.

Approved by:	julian
MFC after:	3 days
2001-07-25 03:34:07 +00:00
Matt Jacob d567d6183a Move netgraph to i386 only. Which is where it works only. 2001-07-25 00:20:33 +00:00
Brooks Davis bbce7eba7f IFT_8021_VLAN -> IFT_L2VLAN per if_vlan_var.h rev 1.9. With this change
LINT compiles, but doesn't link.
2001-07-25 00:19:59 +00:00
Brooks Davis 4d60fee22b Allow ng_split to be compiled in staticly.
MFC after:	7 weeks
2001-07-25 00:15:02 +00:00
Brooks Davis 851127a276 Make ng_split part of the module building process.
MFC after:	7 weeks
2001-07-24 23:42:56 +00:00
Brooks Davis bb5c977fbd General cleanup providing better style(9) conformance and generally
improved readability.  The two real functional changes are that
netgraph now sees this as the "split" node type rather then the
"ng_split" node type and that meta data is passed through without
processing rather then being dropped.

Reviewed by:	jhb, julian
MFC after:	7 weeks
2001-07-24 23:33:06 +00:00
Bill Fenner 1b2a4f7a3c Eliminate the panic, reported by Daniel Sobral, which occurs when
vlan_unconfig()-ing an interface on which multicast groups have been
joined.  Instead, keep the list of groups around (and, in fact, allow
changing of the membership list) and re-join them when the vlan interface
is reassociated with a lower level interface.
2001-07-24 17:14:37 +00:00
Assar Westerlund 2b3dc41c15 correct description of `vpp' for mknod/symlink: they are actually
returned locked
2001-07-24 16:16:00 +00:00
Kris Kennaway 6979f76ff6 Sync to OpenBSD (update comment and minor style change).
Obtained from:	OpenBSD
MFC after:	1 week
2001-07-24 11:34:22 +00:00
KATO Takenori 03b6f6e5ed Merged from sys/i386/conf/GENERIC revision 1.315. 2001-07-24 11:24:58 +00:00
Doug Rabson d4127edb9d Simplify the implementation of pmap_emulate_reference(). The new version
simply manipulates the pte which faulted instead of traversing the mapping
list for that page. This makes it possible to complete the trap without
needing locks and incidentally improves the accuracy of some statistics
used by the VM system.
2001-07-24 07:13:07 +00:00
Bill Fenner d2a75853a2 Use the IANA assignment IFT_L2VLAN directly instead of indirecting through
a privately #defined IFT_8021_VLAN.

MFC after:	3 days
2001-07-24 00:03:51 +00:00
Bill Paul 2a5772457d Turn on __STRICT_ALIGNMENT. We need this to fix up alignment so the alpha
won't trap.
2001-07-23 22:27:17 +00:00
Julian Elischer c31b4a5381 Add an external function to unlink a netgraph type from the types list. 2001-07-23 21:14:57 +00:00
Bill Paul 6b8fa04225 AIEEE! Commit the firmware image too. *blush* 2001-07-23 21:01:36 +00:00
Bill Paul de8e167ce6 Grrr. Module depends on vlan.h, and I committed the wrong version
of if_txpreg.h, which didn't have sc_rxbufprod defined in the softc
struct.
2001-07-23 20:54:31 +00:00
Bill Paul 362c5c1e02 You were knocked senseless by the Boomerang, spun around by the Cyclone,
blown over by the Hurricane and had a house dropped on you by the Tornado.
Now it's time to have your parade rained on by... the Typhoon!

This commit adds driver support for 3Com 3cR990 10/100 ethernet
adapters based on the Typhoon I and Typhoon II chipsets. This is actually
a port of the OpenBSD driver with many hacks by me.

No Virginia, there isn't any support for the hardware crypto yet. However
there is support for TCP/IP checksum offload and VLANs.

Special thanks go to Jason Wright, Aaron Campbell and Theo de Raadt for
squeezing enough info out of 3Com to get this written, and for doing
most of the hard work.

Manual page is included. Compiled as a module and included in GENERIC.
2001-07-23 20:44:54 +00:00
David E. O'Brien d09d8a1ed9 Remind people to document bumps in the Porter's Handbook. 2001-07-23 17:51:02 +00:00
Ruslan Ermilov 38c1bc358b Avoid a NULL pointer derefence introduced in rev. 1.129.
Problem noticed by:	bde, gcc(1)
Panic caught by:	mjacob
Patch tested by:	mjacob
2001-07-23 16:50:01 +00:00
Yoshihiro Takahashi 99df3e3b1a Integrate fdc.h into fd.c. 2001-07-23 13:07:24 +00:00
Assar Westerlund d3e5863fa9 make vm_page_select_cache static
Requested by:	bde
2001-07-23 12:34:31 +00:00
Kris Kennaway 56bded8a29 s/adress/address/
Inspired by:    OpenBSD
MFC After:      1 week
2001-07-23 12:05:27 +00:00
Kris Kennaway b0b32f29dc Typo fix: fasion -> fashion
Inspired by:	OpenBSD
MFC After:	1 week
2001-07-23 11:03:48 +00:00
Jim Pirzyk 814c95264f Added the linux_sysinfo function to implement sysinfo(2).
PR:		kern/27759
Reviewed by:	marcel
Approved by:	marcel
MFC after:	1 week
2001-07-23 06:22:10 +00:00
Jim Pirzyk 3d39316d2b Added the proper arguments the sysinfo system call
PR:		kern/27759
Reviewed by:	marcel
Approved by:	marcel
Obtained from:	Linux man page sysinfo(2)
MFC after:	1 week
2001-07-23 06:17:34 +00:00
Assar Westerlund 8f8cd845fa add %option nounput 2001-07-22 23:15:14 +00:00
Ian Dowse 071dbcd2cc Add a few missing spl calls in preparation for an MFC of the miibus
support.
2001-07-22 21:39:54 +00:00
Kris Kennaway 6521db35ae Note that the umass device requires scbus and da 2001-07-22 21:35:02 +00:00
Ian Dowse 2cc42e154e Remove an old hack that remembered if the card type was Linksys by
storing a flag in the global variable 'linksys' during the probe
routine and reading it during the attach routine. We now have the
ED_VENDOR_LINKSYS vendor code stored in sc->vendor, so check that
instead.
2001-07-22 21:31:44 +00:00
Hellmuth Michaelis f305cfab6a make driver compile under 4.3-STABLE 2001-07-22 19:55:05 +00:00
Mitsuru IWASAKI 56d8cb57b9 Don't do sleep state transition if specified sleep state is not
supported by the system.
2001-07-22 19:13:54 +00:00
Ian Dowse dc53090488 Attach the miibus for Linksys/Dlink cards from the attach routine,
not from the probe routine. This was an oversight when I originally
ported the miibus support to -current, though it was mostly harmless.

We now set the vendor code to the new value ED_VENDOR_LINKSYS in
ed_pccard_Linksys() at probe time. Then ed_pccard_attach() checks
the vendor code, and sets up the miibus if appropriate.

Reviewed by:	imp
2001-07-22 18:58:44 +00:00
Matthew Dillon 4fec48c6fe As per further discussions on hackers redo the SIGCHLD patch to not generate
an unexpected user-visible side effect with the sigaction flags.  Also cleanup
a minor union issue.

Submitted by: Rudolf Cejka <cejkar@dcse.fee.vutbr.cz>
MFC addendum: MFC will be combined w/ original commit
MFC after: 3 days
2001-07-22 18:47:31 +00:00
Kazutaka YOKOTA a4fc697e58 - Fix "off by one" error in VT_WAITACTIVATE. Correctly accept
0 as meaning the requesting vty.
- Accept 0 as the requesting vty in VT_ACTIVATE as in VT_WAITACTIVE.

PR: 24423
MFC after: 10 days
2001-07-22 13:58:23 +00:00
Assar Westerlund 17b65d5532 revert previous commit (bad style and not needed)
Noticed:	bde
2001-07-22 10:24:31 +00:00
Mike Smith 0bc88fe1eb Add another Dell 3/Di PCI ID. You'd think they had enough of these
already...
2001-07-22 04:06:36 +00:00
Assar Westerlund 8cfdf32239 add prototype for dosetrlimit 2001-07-22 00:21:19 +00:00
Assar Westerlund 51bb585207 revert previous accidental commit 2001-07-22 00:12:23 +00:00
Assar Westerlund 57762323e5 get rid of some printf and pointer type warnings 2001-07-22 00:12:22 +00:00
Assar Westerlund 81e8cb900e add <sys/sytm.h> (for cpufunc.h -> rdtsc) 2001-07-21 20:53:42 +00:00
Assar Westerlund 129a62d7c7 add <sys/cdefs.h> (for __unused and such) 2001-07-21 17:12:44 +00:00
Assar Westerlund 20de0f980e null_do_probe: mark as unused 2001-07-21 17:10:30 +00:00