Commit graph

23787 commits

Author SHA1 Message Date
Jake Burkholder 063415120b Change return ??? to return -1 in some #if 0'ed code. 2001-01-12 08:24:25 +00:00
Bosko Milekic 6a47d852b9 Remove declaration of airq variable from outer block. There were two
declarations of a variable of the same name. The one in the outer block
was unused and probably just slipped in at one point or another. This
silences a compiler warning.
2001-01-12 07:49:29 +00:00
Jake Burkholder 7586909279 Remove unused per-cpu variables inside_intr and ss_eflags. 2001-01-12 07:47:54 +00:00
Bosko Milekic 987efc765e Prototype inet_ntoa_r and thereby silence a warning from GCC. The function
is prototyped immediately under inet_ntoa, which is also from libkern.
2001-01-12 07:47:53 +00:00
Bosko Milekic 00e5e98182 Remove useless include of sys/mbuf.h (no longer useful since the
mbuf subsystem init was moved to a better place).
2001-01-12 07:46:28 +00:00
Benno Rice aab719f090 Convert all instances of:
#include "quad.h"

to:

#include <libkern/quad.h>

as the former breaks under a kernel build.
This change had already been performed on the files that were used in other
kernel builds, however the PowerPC kernel build seems to require some that
weren't being used.

Reviewed by:	obrien, peter
2001-01-12 07:28:46 +00:00
Steve Price 298157102f Spell declarations correctly. 2001-01-12 02:49:40 +00:00
John Baldwin e97abfe751 Catch up to the name changes in the hwvol API. 2001-01-11 23:26:38 +00:00
John Baldwin 4fb369f815 - Move all of the hwvol functions into a mixer_hwvol_* namespace, and make
all of the hwvol members of struct snd_mixer live in a hwvol_* namespace.
- When changing the mixer device via the hwvol_mixer sysctl, reset the
  muted state so that a mute operation on a new device won't try to
  unmute the new device with the old device's saved volume.
- When the volume is muted, if a down or up volume request is received,
  first restore the saved volume level and then adjust it.

Reviewed by:	cg
2001-01-11 23:26:16 +00:00
John Baldwin a3e893e04f Woops, use the SYSCTL_STATIC_CHILDREN() macro instead of manually
expanding it for _hw_snd.
2001-01-11 23:22:33 +00:00
Julian Elischer 52fa355626 remove debug sysctl
slight tweek to hook removal. (or is that tweak?)
2001-01-11 23:05:34 +00:00
Julian Elischer 3e4084c88a Make hook deletion SMP safe. 2001-01-11 22:22:52 +00:00
Julian Elischer 954c4772dd Add an exported function ng_rmhook_self() that removes a hook
from a node, but does it via the locking queue, thus ensuring that the
node is locked when it's hook is removed.

Add 'deadnode' and 'deadhook' structures for when a node or hook is
invalidated but not yet freed. (not yet freed)
2001-01-11 19:27:54 +00:00
Julian Elischer cdbfe12417 Another brian fix, luckily not in live code. 2001-01-11 15:44:41 +00:00
Julian Elischer 0069b9cb86 Fix uninitialised pointer.
Found by: Brian Sommers
2001-01-11 15:42:22 +00:00
Hellmuth Michaelis 8301794f59 Add itjc ISDN hardware driver 2001-01-11 15:35:45 +00:00
Hellmuth Michaelis dc567da173 Add infrastructure for the itjc ISDN hardware driver
Submitted by:	Sergio de Souza Prallon <prallon@tmp.com.br>
2001-01-11 15:20:38 +00:00
Jake Burkholder df729d6f00 - Remove compatibility macros for accessing per-cpu variables.
__FreeBSD_version 500015 can be used to detect their disappearance.
- Move the symbols for SMP_prvspace and lapic from globals.s to
  locore.s.
- Remove globals.s with extreme prejudice.
2001-01-11 14:46:26 +00:00
Hellmuth Michaelis 2fbe70cb49 Add the ISDN itjc hardware driver. This driver supports the NETJet-S cards
from Traverse Technology and also the Teles PCI-TJ cards both based on the
chipset combination of the Siemens ISAC and the TJNet Tiger300/320 chips.

The itjc/i4b_hdlc.h file will hopefully soon be merged with the file
/usr/src/sys/i4b/layer1/i4b_hdlc.h.

Submitted by:	Sergio de Souza Prallon <prallon@tmp.com.br>
2001-01-11 14:35:45 +00:00
Hellmuth Michaelis 6624680fec Add infrastructure to support the ISDN itjc hardware driver.
Submitted by:	Sergio de Souza Prallon <prallon@tmp.com.br>
2001-01-11 14:26:39 +00:00
Hellmuth Michaelis 2fd9d69993 Update the ihfc driver with a patch from the author. He writes: This patch
enables the driver to work on current (I have not tested the isa part fully,
but I suppose it should work). The patching from jlemon caused a crash at
probe time. This is probably my fault not having added a comment for
"RESET_SOFT" saying: "this resets all!".

Submitted by:	Hans Petter Selasky <hselasky@c2i.net>
2001-01-11 13:38:38 +00:00
Archie Cobbs ce5e5f9953 Unbreak compilation. 2001-01-11 04:13:46 +00:00
David Malone 3b54736e19 Style improvements for last fix. Should be functionally the same.
Submitted by:	bde
2001-01-11 00:13:54 +00:00
Julian Elischer f585602984 Only free items that are not already free or passed to other nodes.
Clever work by: Brian Sommers (Brian@freeBSD.org)
2001-01-10 23:49:03 +00:00
Julian Elischer 70de87f2ef Changes to stop zombie nodes showing up in active node lists.
Also some changes resulting from debug work done earlier.
2001-01-10 23:19:32 +00:00
Archie Cobbs 9fd265ddd6 lmc_ifup() was not checking the state of the interface. This would
cause the watchdog to (incorrectly) detect the interface state
going from down to up one second after lmc_ifup() was called,
causing lmc_ifup() to be called again, and resetting everything.
Fix by checking the interface state within lmc_ifup().

Submitted by:	Darren Croke <djc@packetdesign.com>
2001-01-10 22:53:52 +00:00
Greg Lehey 891b3d045f Reinstate 1.19.
Prodded by: iedowse
2001-01-10 21:42:06 +00:00
Mitsuru IWASAKI 673f959b2b Disable strstr() if ACPICA is compiled in userland.
Reviewed by:	msmith
2001-01-10 19:28:03 +00:00
Søren Schmidt 95eaffae1b Add session argument to *close_disk, allowing to set session type on fixate.
Add support for different blank/erase types.

Update headers.
2001-01-10 19:19:47 +00:00
Søren Schmidt de6aa2bfcc Add session argument to *CLOSEDISK, allowing to set session type on fixate.
Add defines for the different blank/erase types.
2001-01-10 19:17:38 +00:00
Mitsuru IWASAKI 13d4f7bae3 Enable fixed event at not only boot but also wakeup.
Reported and patch tested by:	Peter Dufault <dufault@hda.hda.com>
2001-01-10 18:01:51 +00:00
David E. O'Brien f0610a03d2 Bump __FreeBSD_version for libgcc/linking changes. 2001-01-10 17:41:49 +00:00
Jake Burkholder 549f00c753 Protect proc.p_pptr with the proctree lock. 2001-01-10 15:41:26 +00:00
Hellmuth Michaelis 0dac6ca13f Add PCI id's for the Planet PCI ISDN Adapter (Model IA128P-STDV)
Submitted by:	Luiz Henrique Duma <duma@bsi.com.br>
2001-01-10 13:34:23 +00:00
Mike Smith ed5c5fb423 Remove a mismatched splbio() in aac_start (the called functions each protect
themselves correctly).

Submitted by:	ps
2001-01-10 11:43:02 +00:00
Julian Elischer 9c8c302fd0 Fix some memory leaks
Add memory leak detection assitance.
2001-01-10 07:13:58 +00:00
Greg Lehey a208c55ad3 Part of rewrite of RAID-[45] locking code:
Rename INITIAL_LOCKS to PLEX_LOCKS, since it now stays a constant.

struct plex:
  Add a mutex lockmtx.
  Remove alloclocks.
2001-01-10 05:08:30 +00:00
Greg Lehey 91c6496f6e vinumstart: Don't check for B_DONE on return from bre(), it doesn't
happen any more.

abortrequest: don't bufdone the user bp on error, let vinumstart() do
it.

Based on analysis by:	tegge
2001-01-10 05:07:52 +00:00
Greg Lehey 6e763eb38a bre5: don't bufdone the user bp on error, let vinumstart() do it.
Based on analysis by:	tegge
2001-01-10 05:07:14 +00:00
Greg Lehey 83d4664f33 Remove obsolete functions [un]lockplex and [un]lockvol.
Rewrite lockrange and unlockrange.  The lock table is now a fixed
size, so there is no possibility for race conditions when expanding.
The current size (256 locked ranges) should be large enough that it
makes no sense to expand it.  To do expansion right would require
quiescing the plex (requiring at least 256 I/O completions), and the
performance implications are horrendous.

Add a mutex per plex for accessing the lock table.

Based on analysis by:	tegge
2001-01-10 05:06:37 +00:00
Greg Lehey 6694e200e5 Get definition of Malloc right when not using VINUMDEBUG
Pointed out by:	tegge
2001-01-10 05:05:46 +00:00
Greg Lehey 8684adf5cd open_drive: Refuse to open partition c of a disk device.
This should eliminate one case of foot shooting .

vinum_scandisk: If a drive in the partition table is downed, free it.
This duplicates code for the compatibility partition, which for some
reason was omitted here.
2001-01-10 05:02:44 +00:00
Greg Lehey 5f1a173c01 config_plex: Initialize mutex for parity plexes.
remove_plex_entry: Destroy mutex for parity plexes.

Part of rewrite of RAID-[45] locking code.
2001-01-10 05:01:12 +00:00
Jake Burkholder ef73ae4b0c Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
2001-01-10 04:43:51 +00:00
Bosko Milekic d113d3857e In m_mballoc_wait(), drop the mmbfree mutex lock prior to calling
m_reclaim() and re-acquire it when m_reclaim() returns. This means that
we now call the drain routines without holding the mutex lock and
recursing into it. This was done for mainly two reasons:

(i) Avoid the long recursion; long recursions are typically bad and this
    is the case here because we block all other code from freeing mbufs
    if they need to. Doing that is kind of counter-productive, since we're
    really hoping that someone will free.

(ii) More importantly, avoid a potential lock order reversal. Right now,
     not all the locks have been added to our networking code; but
     without this change, we're introducing the possibility for deadlock.
     Consider for example ip_drain(). We will likely eventually introduce
     a lock for ipq there, and so ip_freef() will be called with ipq lock
     held. But, ip_freef() calls m_freem() which in turn acquires the
     mmbfree lock. Since we were previously calling ip_drain() with mmbfree
     held, our lock order would be: mmbfree->ipq->mmbfree. Some other code
     may very well lock ipq first and then call ip_freef(). This would
     result in the regular lock order, ipq->mmbfree. Clearly, we have
     deadlock if one thread acquires the ipq lock and sits waiting for
     mmbfree while another thread calling m_reclaim() acquires mmbfree
     and sits waiting for the ipq lock.

Also, make sure to add a comment above m_reclaim()'s definition briefly
explaining this. Also document this above the call to m_reclaim() in
m_mballoc_wait().

Suggested and reviewed by: alfred
2001-01-09 23:58:56 +00:00
Duncan Barclay 25522b4ef4 Fix a minor bug that prevents NEWBUS users from setting more than
one memory map. The memory window for the PCIC is identifed by the resource id
for NEWSBUS drivers. pccardd always uses window 0 and rid 0 when setting maps
up. This fix does not affect pccardd's handling of common memory for ed cards.

Reviewed by:	imp
2001-01-09 23:39:32 +00:00
Matt Jacob b82286ac16 moved isp_pci.c from pci to dev/isp 2001-01-09 19:15:12 +00:00
Robert Watson 46a27060af o Minor style(9)ism to make consistent with -STABLE 2001-01-09 18:26:17 +00:00
Matt Jacob f0cab81245 The alpha architecture is 64 bits, so bus_addr_t && bus_size_t should really
be 64 bits wide. The largest known current actual physical implementation
is 40 bits, so BUS_SPACE_MAXADDR should reflect this. It also seems to
me that BUS_SPACE_UNRESTRICTED should b ~0UL, not ~0.
2001-01-09 18:17:48 +00:00
Jonathan Lemon 13403f7fd8 Move the mutex initialization from avma1pp_bchannel_setup into
avma1pp_attach_avma1pp, since the former may be called multiple
times and we only want to initialize the mutex once.

Submitted by: Thomas Moestl <tmoestl@gmx.net>
2001-01-09 15:01:42 +00:00