]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoMention BCM5752 support in two more places.
Christian Brueffer [Thu, 17 Nov 2005 16:37:16 +0000 (16:37 +0000)]
Mention BCM5752 support in two more places.

18 years agoDocument tunables.
Gleb Smirnoff [Thu, 17 Nov 2005 15:10:40 +0000 (15:10 +0000)]
Document tunables.

18 years ago-mdoc sweep.
Ruslan Ermilov [Thu, 17 Nov 2005 13:00:00 +0000 (13:00 +0000)]
-mdoc sweep.

18 years agoMFOpenBSD 1.62:
Gleb Smirnoff [Thu, 17 Nov 2005 12:56:40 +0000 (12:56 +0000)]
MFOpenBSD 1.62:

  Prevent backup CARP hosts from replying to arp requests, fixes strangeness
  with some layer-3 switches. From Bill Marquette.

Tested by: Kazuaki Oda <kaakun highway.ne.jp>

18 years agoWhen a user is in more than 16 groups the call to authunix_create() will
Hartmut Brandt [Thu, 17 Nov 2005 12:19:19 +0000 (12:19 +0000)]
When a user is in more than 16 groups the call to authunix_create() will
result in abort() beeing called. This is because there is a limit of
the number of groups in the RPC which is 16. When the actual number of
groups is too large it results in xdr_array() returning an error which,
in turn, authunix_create() handles by just calling abort().

Fix this by passing only the first 16 groups to authunix_create().

18 years agodoc sweep
Ruslan Ermilov [Thu, 17 Nov 2005 12:16:33 +0000 (12:16 +0000)]
doc sweep

18 years ago-mdoc sweep.
Ruslan Ermilov [Thu, 17 Nov 2005 12:15:23 +0000 (12:15 +0000)]
-mdoc sweep.

18 years agoCorrectly handle a TCP connection being shutdown by the server while
Colin Percival [Thu, 17 Nov 2005 11:01:32 +0000 (11:01 +0000)]
Correctly handle a TCP connection being shutdown by the server while
we're reading response headers.  (Handle it as a connection-killing
error, rather than entering an infinite loop reading zero bytes.)

Reported by: simon
Discovered thanks to: A not-very-transparent transparent HTTP proxy.
MFC after: 3 days

18 years ago- Backout last change, since it is memory overkill for a non busy host or
Gleb Smirnoff [Thu, 17 Nov 2005 10:13:18 +0000 (10:13 +0000)]
- Backout last change, since it is memory overkill for a non busy host or
  for a notebook with em(4) adapter.
- Introduce tunables em.hw.txd and em.hw.rxd, which allow administrator
  to configure number of transmit and receive descriptors.
- Check em.hw.txd and em.hw.rxd against hardware limits [*] and require
  them to be multiple of 128.

[*] According to comments in if_em.h the 82540EM/82541ER chips can handle
    more than 256 descriptors. Since we don't have this hardware to test,
    we decided to mimic NetBSD wm(4) driver, that limits these chips to
    256 descriptors.

In collaboration with: yongari

18 years agoDo not install boot_i386.8 on all architectures.
Ruslan Ermilov [Thu, 17 Nov 2005 09:39:36 +0000 (09:39 +0000)]
Do not install boot_i386.8 on all architectures.

18 years agoPrefer NULL to 0.
Pyun YongHyeon [Thu, 17 Nov 2005 08:56:21 +0000 (08:56 +0000)]
Prefer NULL to 0.
Add missing lock/unlock in sysctl handler.
Protect accessing NULL pointer when resource allocation was failed.
style(9)

Reviewed by: scottl
MFC after: 1 week

18 years agoRemove vestiges of oldcard and owi.
Ruslan Ermilov [Thu, 17 Nov 2005 06:51:49 +0000 (06:51 +0000)]
Remove vestiges of oldcard and owi.

18 years agoMinor cleanups:
Bruce Evans [Thu, 17 Nov 2005 03:53:22 +0000 (03:53 +0000)]
Minor cleanups:

s_cosf.c and s_sinf.c:
Use a non-bogus magic constant for the threshold of pi/4.  It was 2 ulps
smaller than pi/4 rounded down, but its value is not critical so it should
be the result of natural rounding.

s_cosf.c and s_tanf.c:
Use a literal 0.0 instead of an unnecessary variable initialized to
[(float)]0.0.  Let the function prototype convert to 0.0F.

Improved wording in some comments.

Attempted to improve indentation of comments.

18 years agofixed a typo in comment
SUZUKI Shinsuke [Thu, 17 Nov 2005 02:34:50 +0000 (02:34 +0000)]
fixed a typo in comment

18 years agoFix spelling mistake.
David E. O'Brien [Thu, 17 Nov 2005 02:32:39 +0000 (02:32 +0000)]
Fix spelling mistake.

Submitted by: kris

18 years agoRearranged the the optimizations for special cases to reduce the average
Bruce Evans [Thu, 17 Nov 2005 02:20:04 +0000 (02:20 +0000)]
Rearranged the the optimizations for special cases to reduce the average
number of branches.

Use a non-bogus magic constant for the threshold of pi/4.  It was 2 ulps
smaller than pi/4 rounded down, but its value is not critical so it should
be the result of natural rounding.  Use "<=" comparisons with rounded-
down thresholds for all small multiples of pi/4.

Cleaned up previous commit:
- use static const variables instead of expressions for multiples of pi/2
  to ensure that they are evaluated at compile time.  gcc currently
  evaluates them at compile time but C99 compilers are not required
  to do so.  We want compile time evaluation for optimization and don't
  care about side effects.
- use M_PI_2 instead of a magic constant for pi/2.  We need magic constants
  related to pi/2 elsewhere but not here since we just want pi/2 rounded
  to double and even prefer it to be rounded in the default rounding mode.
  We can depend on the cmpiler being C99ish enough to round M_PI_2 correctly
  just as much as we depended on it handling hex constants correctly.  This
  also fixes a harmless rounding error in the hex constant.
- keep using expressions n*<value for pi/2> in the initializers for the
  static const variables.  2*M_PI_2 and 4*M_PI_2 are obviously rounded in
  the same way as the corresponding infinite precision expressions for
  multiples of pi/2, and 3*M_PI_2 happens to be rounded like this, so we
  don't need magic constants for the multiples.
- fixed and/or updated some comments.

18 years agoMake the elf wrapper work with recent kernel.debug changes.
Olivier Houchard [Thu, 17 Nov 2005 01:32:01 +0000 (01:32 +0000)]
Make the elf wrapper work with recent kernel.debug changes.

18 years agoOBE
Warner Losh [Wed, 16 Nov 2005 20:58:56 +0000 (20:58 +0000)]
OBE

18 years agoRevert a part of the previous commits to these files that made the NMI
John Baldwin [Wed, 16 Nov 2005 20:58:40 +0000 (20:58 +0000)]
Revert a part of the previous commits to these files that made the NMI
IPI_STOP handling code use atomic_readandclear() to execute the restart
function on the first CPU to resume and restore the behavior of always
executing the restart function on the BSP since this is in fact what the
non-NMI IPI_STOP handler does.  I did add back in a statement to clear
the restart function pointer after it is executed to match the behavior
of the non-NMI IPI_STOP handler.

18 years agothis is no longer needed.
Warner Losh [Wed, 16 Nov 2005 20:58:35 +0000 (20:58 +0000)]
this is no longer needed.

18 years agoRevert previous commit to these files. There isn't a race necessitating
John Baldwin [Wed, 16 Nov 2005 20:55:57 +0000 (20:55 +0000)]
Revert previous commit to these files.  There isn't a race necessitating
an xchg instruction as we only try to execute the startup function if
the CPU ID is 0 (i.e. the BSP).  I missed this earlier.

18 years agoFix a typo in the check for an invalid APIC. If we are told about an
John Baldwin [Wed, 16 Nov 2005 20:29:29 +0000 (20:29 +0000)]
Fix a typo in the check for an invalid APIC.  If we are told about an
I/O APIC that doesn't exist, then a read of the version register is going
to return -1 which is 0xffffffff not 0xffffff.

Tested on: i386
Tested by: Nikos Ntarmos ntarmos at ceid dot upatras dot gr
MFC after: 1 week

18 years agoCorrect description of RLIMIT_CPU.
John Baldwin [Wed, 16 Nov 2005 18:18:52 +0000 (18:18 +0000)]
Correct description of RLIMIT_CPU.

Reported by: bde

18 years agoXref ng_ether(4) and ng_iface(4) nodes, which are used in examples.
Gleb Smirnoff [Wed, 16 Nov 2005 14:08:17 +0000 (14:08 +0000)]
Xref ng_ether(4) and ng_iface(4) nodes, which are used in examples.

18 years agofixed a kernel crash due to an improper removal of callout-timer
SUZUKI Shinsuke [Wed, 16 Nov 2005 12:36:08 +0000 (12:36 +0000)]
fixed a kernel crash due to an improper removal of callout-timer
(ToDo: similar fix is necessary for other NDP-related callout-timers
 in netinet6/nd6*.c)

PR: kern/88725
MFC after: 1 month

18 years agoUnbreak on amd64.
Ruslan Ermilov [Wed, 16 Nov 2005 12:33:04 +0000 (12:33 +0000)]
Unbreak on amd64.

18 years agoFix currency symbol -- it should be 'NEW SHEQEL SIGN' (U+20AA).
Tim J. Robbins [Wed, 16 Nov 2005 11:20:51 +0000 (11:20 +0000)]
Fix currency symbol -- it should be 'NEW SHEQEL SIGN' (U+20AA).

Submitted by: Rostislav Krasny

18 years agoSync as close as possible with NetBSD.
Pawel Jakub Dawidek [Wed, 16 Nov 2005 11:03:00 +0000 (11:03 +0000)]
Sync as close as possible with NetBSD.
This includes fixes and cleanups listed below:

- If a process dissappears while we are signalling it, don't count it as a
  match/error.
- Better handling of errors and messages.
- Downgrade failure to kill(2) (other than ESRCH) from fatal error to a
  warning; otherwise processing aborts and possibly matching killees would
  remain unsignalled. This makes pkill match the Solaris behavior.
- Exit with 2 on usage errors as documented.

Obtained from: NetBSD
Glanced at by: maintainer (gad) [a bit different version of this patch]

18 years agoAvoid invoking the current script again when we need
Yaroslav Tykhiy [Wed, 16 Nov 2005 10:45:19 +0000 (10:45 +0000)]
Avoid invoking the current script again when we need
to issue sub-commands, e.g., restart = stop + start.
By calling run_rc_command instead, we provide rc.d
scripts with full control over their configuration
variables.

For an example problem the former approach caused, see
http://lists.freebsd.org/pipermail/freebsd-rc/2005-October/000311.html

Reviewed by: freebsd-rc
Tested by: Dirk Engling erdgeist <at> erdgeist.org
MFC after: 2 weeks

18 years agoI often find myself doing:
Pawel Jakub Dawidek [Wed, 16 Nov 2005 10:36:44 +0000 (10:36 +0000)]
I often find myself doing:

% pgrep <something> [to verify which processes match]
% pkill <something>

To speed such operation up, add -I option which works like rm(1)'s -i
option (unfortunately -i is already used in pkill(1)), ie. pkill will
ask for confirmation before killing each matching process.

After adding -j, -F, -i, -S, -o and -L options and other improvements,
I think I can add myself to the copyright header.

Glanced at by: maintainer (gad)

18 years agoDiff reduction to RELENG_6.
Ruslan Ermilov [Wed, 16 Nov 2005 07:24:31 +0000 (07:24 +0000)]
Diff reduction to RELENG_6.

18 years agoHaving three options (-a, -A, -I) controlling the output of dotted
Ruslan Ermilov [Wed, 16 Nov 2005 07:13:37 +0000 (07:13 +0000)]
Having three options (-a, -A, -I) controlling the output of dotted
files is too much and hard to follow.  Instead, make the -I option
just mean "do not automatically set -A for root".  That is, if -A
is explicitly set, -I is ignored.  Also, document -I in usage().
(The ls.c diff is better viewed relative to rev. 1.80.)

No objection: mux
Silence from: mnag
MFC after: 3 days

18 years agoConvert mount_smbfs to use nmount().
Craig Rodrigues [Wed, 16 Nov 2005 02:47:12 +0000 (02:47 +0000)]
Convert mount_smbfs to use nmount().

Reviewed by: bp (smbfs maintainer)

18 years ago- Add errmsg to the list of smbfs mount options.
Craig Rodrigues [Wed, 16 Nov 2005 02:26:25 +0000 (02:26 +0000)]
- Add errmsg to the list of smbfs mount options.
- Use vfs_mount_error() to propagate smbfs mount errors back to userspace.

Reviewed by: bp (smbfs maintainer)

18 years agoDo not pass noauto to nmount() or external mount program.
Craig Rodrigues [Wed, 16 Nov 2005 02:13:27 +0000 (02:13 +0000)]
Do not pass noauto to nmount() or external mount program.

Noticed by: maxim

18 years agoCatch up with loader_color -> loader_logo and document beastie_disable.
Ruslan Ermilov [Tue, 15 Nov 2005 21:26:49 +0000 (21:26 +0000)]
Catch up with loader_color -> loader_logo and document beastie_disable.

18 years agoRevise hcsecd(8) and sdpd(8) rc.d scripts.
Maksim Yevmenkin [Tue, 15 Nov 2005 20:36:26 +0000 (20:36 +0000)]
Revise hcsecd(8) and sdpd(8) rc.d scripts.

- Have both scripts automatically kldload ng_btsocket(4). I did not want to
  do it, but its easier for users and it seems other scripts do similar things;

- Assign few variables after load_rc_config, so the /etc/rc.conf overrides
  actually work;

MFC after: 1 week

18 years agoProvide a link to the documentation of the I/O APIC at Intel.
Andre Oppermann [Tue, 15 Nov 2005 20:18:13 +0000 (20:18 +0000)]
Provide a link to the documentation of the I/O APIC at Intel.

18 years agoAdd geometry of SiliconSystems 4GB CF card
Poul-Henning Kamp [Tue, 15 Nov 2005 18:48:52 +0000 (18:48 +0000)]
Add geometry of SiliconSystems 4GB CF card

18 years agoAdd some initial bits (currently unused) for upcoming AMRR support.
Damien Bergamini [Tue, 15 Nov 2005 17:58:16 +0000 (17:58 +0000)]
Add some initial bits (currently unused) for upcoming AMRR support.
AMRR = Adaptive Multi Rate Retry algorithm
More information: http://www-sop.inria.fr/rapports/sophia/RR-5208.html

More to come.

18 years agoAdd some initial bits (currently unused) for upcoming AMRR support.
Damien Bergamini [Tue, 15 Nov 2005 17:48:49 +0000 (17:48 +0000)]
Add some initial bits (currently unused) for upcoming AMRR support.
AMRR = Adaptive Multi Rate Retry algorithm
More information: http://www-sop.inria.fr/rapports/sophia/RR-5208.html

18 years agoOptimize and clean TX time computation.
Damien Bergamini [Tue, 15 Nov 2005 17:17:15 +0000 (17:17 +0000)]
Optimize and clean TX time computation.
Avoid a test and a modulus operation.

MFC after: 2 weeks

18 years agoAdd BCM5752 to HARDWARE section.
Gleb Smirnoff [Tue, 15 Nov 2005 14:48:52 +0000 (14:48 +0000)]
Add BCM5752 to HARDWARE section.

18 years agoRecognize Broadcom BCM5752 chip, that can be found in HP DC7600.
Gleb Smirnoff [Tue, 15 Nov 2005 14:43:22 +0000 (14:43 +0000)]
Recognize Broadcom BCM5752 chip, that can be found in HP DC7600.

PR: kern/88940
Submitted by: Alexander Hausner

18 years agoSome whitespace and style cleanup.
Gleb Smirnoff [Tue, 15 Nov 2005 10:54:20 +0000 (10:54 +0000)]
Some whitespace and style cleanup.

18 years agoUpdate ieee80211_mhz2ieee to understand public safety bands and spectrum
Sam Leffler [Tue, 15 Nov 2005 05:56:32 +0000 (05:56 +0000)]
Update ieee80211_mhz2ieee to understand public safety bands and spectrum
that can potentially be mapped to negative ieee #'s.

NB: before operation on the latter can be supported we need to cleanup
    various code that assumes ieee channel #'s are >= 0

18 years agonuke special handling to extend cts when bursting; it was race prone
Sam Leffler [Tue, 15 Nov 2005 05:49:02 +0000 (05:49 +0000)]
nuke special handling to extend cts when bursting; it was race prone

MFC after: 7 days

18 years agobandaid inconsistent state handling: the rate index map may be
Sam Leffler [Tue, 15 Nov 2005 05:47:20 +0000 (05:47 +0000)]
bandaid inconsistent state handling: the rate index map may be
stale when called to reset rate control state causing us to
pickup an invalid index, check for this and skip 'em (things
will eventually get fixed up so this is not harmful)

18 years agoUnbreak kernel builds.
Alexander Kabaev [Tue, 15 Nov 2005 04:19:27 +0000 (04:19 +0000)]
Unbreak kernel builds.

Submitted by: arr

18 years agoThe KAME's getipnodebyaddr() code honor the MULTI_PTRS_ARE_ALIASES
Hajimu UMEMOTO [Tue, 15 Nov 2005 03:40:15 +0000 (03:40 +0000)]
The KAME's getipnodebyaddr() code honor the MULTI_PTRS_ARE_ALIASES
define also, but res_config.h was not included into libc/net/name6.c.
So getipnodebyaddr() ignored the multiple PTRs.

PR: kern/88241
Submitted by: Dan Lukes <dan__at__obluda.cz>
MFC after: 3 days

18 years agoKeep track of volumes in non-optimal state and expose a simple count
Alexander Kabaev [Tue, 15 Nov 2005 02:38:35 +0000 (02:38 +0000)]
Keep track of volumes in non-optimal state and expose a simple count
of volumes that might need administrator attention through device
specific sysctl to simplify device monitoring.

Submitted by: Deomid Ryabkov <myself at rojer dot pp dot ru>

18 years agoAdd a new configuration variable, ipv4_addrs_<ifn>, which adds one or
Brooks Davis [Mon, 14 Nov 2005 23:34:50 +0000 (23:34 +0000)]
Add a new configuration variable, ipv4_addrs_<ifn>, which adds one or
more IPv4 address from a ranged list in CIRD notation:

ipv4_addrs_ed0="192.168.0.1/24 192.168.1.1-5/28"

In the process move alias processing into new ipv4_up/down functions to
more toward a less IPv4 centric world.

Submitted by: Philipp Wuensche <cryx dash freebsd at h3q dot com>

18 years agoBriefly document the use of kern.elf32.can_exec_dyn.
Olivier Houchard [Mon, 14 Nov 2005 22:24:48 +0000 (22:24 +0000)]
Briefly document the use of kern.elf32.can_exec_dyn.

MFC after: 3 days

18 years agoAdd a new sysctl, kern.elf[32|64].can_exec_dyn. When set to 1, one can
Olivier Houchard [Mon, 14 Nov 2005 22:24:00 +0000 (22:24 +0000)]
Add a new sysctl, kern.elf[32|64].can_exec_dyn. When set to 1, one can
execute a ET_DYN binary (shared object).
This does not make much sense, but some linux scripts expect to be able to
execute /lib/ld-linux.so.2 (ldd comes to mind).
The sysctl defaults to 0.

MFC after: 3 days

18 years ago0xb1881106 seems to be an AGP bridge and some BIOSes incorrectly handle
Jung-uk Kim [Mon, 14 Nov 2005 21:54:20 +0000 (21:54 +0000)]
0xb1881106 seems to be an AGP bridge and some BIOSes incorrectly handle
the bridge.  Therefore, we give the same treatment as we did for nForce3-250
and ULi chipsets.  VIA AGPv3 code was copied from agp_via.c.

18 years agoListen to jhb, and remove bogus claim of support of DE425.
Wilko Bulte [Mon, 14 Nov 2005 20:36:53 +0000 (20:36 +0000)]
Listen to jhb, and remove bogus claim of support of DE425.

Obtained from: jhb

18 years agoIn ktr_getrequest(), acquire ktrace_mtx earlier -- while the race
Robert Watson [Mon, 14 Nov 2005 19:30:09 +0000 (19:30 +0000)]
In ktr_getrequest(), acquire ktrace_mtx earlier -- while the race
currently present is minor and offers no real semantic issues, it also
doesn't make sense since an earlier lockless check has already
occurred.  Also hold the mutex longer, over a manipulation of
per-process ktrace state, which requires synchronization.

MFC after: 1 month
Pointed out by: jhb

18 years agoUpdate my email address, so people know where the exact /
Ariff Abdullah [Mon, 14 Nov 2005 18:37:59 +0000 (18:37 +0000)]
Update my email address, so people know where the exact /
proper / correct place to bug me.

Approved by: netchild (mentor)

18 years agoAdd Intel ICH7.
Joel Dahl [Mon, 14 Nov 2005 18:33:07 +0000 (18:33 +0000)]
Add Intel ICH7.

18 years agoFrom luigi:
Ariff Abdullah [Mon, 14 Nov 2005 18:21:23 +0000 (18:21 +0000)]
From luigi:
This one simply tries to simplify the logic to select the
buffer sizes. I am not sure it is necessary but the code
seems a bit more readable to me. And at least i have tried
to document how the buffer sizes are computed.

Thanks to luigi for deciphering one of the most cryptic part of
sound driver.

Submitted by: luigi
Approved by: netchild (mentor)

18 years agoFrom luigi:
Ariff Abdullah [Mon, 14 Nov 2005 18:20:47 +0000 (18:20 +0000)]
From luigi:
In SNDCTL_DSP_SETFRAGMENT, if you specify both read and
write channels, the existing code first acts on the
read channel, but as a side effect it updates the
arguments (maxfrags, fragsz) passed by the caller according
to acceptable values for the read channel, and then uses the
modified values to act on the write channel.
The problem with this approach is that, given a
(maxfrags, fragsz) user-specified value, the actual
values computed by the read and write channels may differ:
e.g. the read channel might want to allocate more fragments
than what the user specified because it has no side-effects
on the delay and it helps in case of slow readers,
whereas the write channel needs to use as few fragments
as possible to keep the audio latency low (very important
with telephony apps).

This patch stores the values computed by the read channel
into temproary variables so the write channel will use
the actual arguments of the ioctl.

This patch is very helpful with telephony apps such as asterisk.

Submitted by: luigi
Approved by: netchild (mentor)

18 years agoUnlike the rest of the world, NDIS code can access "struct
Ruslan Ermilov [Mon, 14 Nov 2005 18:19:57 +0000 (18:19 +0000)]
Unlike the rest of the world, NDIS code can access "struct
ifnet" before is has been fully initialized by if_attach().
Account for that to avoid a null pointer dereference.

18 years agoac97.c:
Ariff Abdullah [Mon, 14 Nov 2005 18:19:33 +0000 (18:19 +0000)]
ac97.c:
 - Added new codec id for CX20468-21 and VIA1617A.
   Submitted by: Chen Lihong <lihong.chen@gmail.com>
 - Re-enable SOUND_MIXER_IGAIN, but set the default level as 0 (mute)
   Suggested by: luigi

mixer.c:
 - Set default value for SOUND_MIXER_IGAIN as 0 (mute) to avoid
   feedback problems on some laptops (was disabled by jhb during
   ac97.c revision 1.42).

Approved by: netchild (mentor)

18 years agoFix a long standing unhandled interrupt bug which can cause
Ariff Abdullah [Mon, 14 Nov 2005 18:18:52 +0000 (18:18 +0000)]
Fix a long standing unhandled interrupt bug which can cause
erratic system slowdown (beaten to a pulp) and possible panic. This
issue has bugged me for as long as I could remember, until I
realized that it is possible for register base offset to hold zero
value which is definitely a "FALSE".

Approved by: netchild (mentor)

18 years ago- Added few more Intel HDA ids (ICH 6/7) which does have backward
Ariff Abdullah [Mon, 14 Nov 2005 18:18:12 +0000 (18:18 +0000)]
- Added few more Intel HDA ids (ICH 6/7) which does have backward
  compatible AC97 codec.
- As the driver supports so many variants, create a table ids for
  ease of probing and maintenance.
  Submitted by: yongari
  Reviewed/Tested by: multimedia@
- From luigi:
The code to compute fragment sizes in the ich driver almost
invariably ends up using the full buffer available, no matter
how the user specifies fragment size and number.
With audio telephony (8khz, 16bit-stereo) and the 16k buffer
size this results in an unbearable 500ms delay.
This patch makes sure that we never use more than 4 fragments,
(i don't think we need more unless there are huge interrupt
servicing latencies), and obey to the requested fragment size,
so that latency is acceptable.
  Based on this (and after much regression tests), I can conclude
  that this driver works best with 2 fragments, thus solving various
  long standing issues of ICH driver not capable to flush or play
  short files perfectly.
  Suggested by: luigi (the idea of smaller fragments)
- MPSAFE conversion.

Approved by: netchild (mentor)

18 years agoUse both (enabled by default) DAC1 and DAC2 to provide 2
Ariff Abdullah [Mon, 14 Nov 2005 18:17:31 +0000 (18:17 +0000)]
Use both (enabled by default) DAC1 and DAC2 to provide 2
distinct hardware playback channels. DAC configuration can be
accessed through kernel hint - hint.pcm.<unit>.dac="val" with
following possible values:

   0 = Enable both DACs (default)
   1 = Enable single DAC (DAC1)
   2 = Enable single DAC (DAC2)
   3 = Enable both DACs, swap position (DAC2 comes first instead
       of DAC1)

Special case for ES1370:
   Unlike ES1371,2,3/CT5880, volume for each DAC 1 and 2 can be
   controlled indepedently (synth for DAC1, pcm for DAC2). It is
   possible that user will confuse by this behaviour, since both
   DACs are enabled by default. Thus, provide a knob through sysctl
   hw.snd.pcm<unit>.single_pcm_mixer:
     0 = each DACs will be controlled separately (synth/pcm).
     1 = combine both DACs volume mixer controller into a single
         "pcm" (default)
   As a side note, fixed rate operation (provided by previous
   commit) is not a mandatory if the configuration space does not
   involve DAC2 (perhaps disabled by user through the above kernel
   hint). Unlike DAC2, DAC1 has its own register / control space,
   not affected by the speed settings of ADC.

Tested by: multimedia@
Approved by: netchild (mentor)

18 years agoFix left/right channel mixed-up during recording by splitting recdev
Ariff Abdullah [Mon, 14 Nov 2005 18:16:59 +0000 (18:16 +0000)]
Fix left/right channel mixed-up during recording by splitting recdev
mask to recdev_l and recdev_r, since each have its own unique mask.

Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
Approved by: netchild (mentor)

18 years agoIn build_iovec(), if passed in len is -1, check to see if
Craig Rodrigues [Mon, 14 Nov 2005 17:39:00 +0000 (17:39 +0000)]
In build_iovec(), if passed in len is -1, check to see if
val is NULL before doing strlen() to calculate new len.

Submitted by: maxim

18 years agoo Style: restore tab indentation mangled in the previous delta.
Maxim Konovalov [Mon, 14 Nov 2005 16:04:01 +0000 (16:04 +0000)]
o Style: restore tab indentation mangled in the previous delta.

18 years agoEliminate coredump problem introduced by last commit.
Craig Rodrigues [Mon, 14 Nov 2005 13:35:08 +0000 (13:35 +0000)]
Eliminate coredump problem introduced by last commit.

Noticed by: Guido van Rooij <guido at gvr dot org>

18 years agoUse the new syntax for GENERIC.
Dag-Erling Smørgrav [Mon, 14 Nov 2005 13:34:15 +0000 (13:34 +0000)]
Use the new syntax for GENERIC.

18 years agoBuild a PAE kernel if a PAE config exists.
Dag-Erling Smørgrav [Mon, 14 Nov 2005 13:33:17 +0000 (13:33 +0000)]
Build a PAE kernel if a PAE config exists.

18 years agoAdd support for the += operator, which appends to a multiple-value variable.
Dag-Erling Smørgrav [Mon, 14 Nov 2005 13:32:30 +0000 (13:32 +0000)]
Add support for the += operator, which appends to a multiple-value variable.

18 years agoAdd support for building other kernels than LINT and GENERIC.
Dag-Erling Smørgrav [Mon, 14 Nov 2005 12:59:10 +0000 (12:59 +0000)]
Add support for building other kernels than LINT and GENERIC.

18 years agoUnbreak for !INET6 case.
Ruslan Ermilov [Mon, 14 Nov 2005 12:50:23 +0000 (12:50 +0000)]
Unbreak for !INET6 case.

18 years agoEliminate build breakage due to warnings about const.
Craig Rodrigues [Mon, 14 Nov 2005 03:11:25 +0000 (03:11 +0000)]
Eliminate build breakage due to warnings about const.

18 years agoReuse delete_and_clear() template helper.
Alexander Nedotsukov [Mon, 14 Nov 2005 02:01:10 +0000 (02:01 +0000)]
Reuse delete_and_clear() template helper.

Approved by: imp

18 years agoFix misspelling.
Warner Losh [Mon, 14 Nov 2005 01:25:05 +0000 (01:25 +0000)]
Fix misspelling.

Submitted by: thompsa

18 years agoProvide a dummy NO_XBOX option that lives in opt_xbox.h for pc98.
Warner Losh [Mon, 14 Nov 2005 00:43:44 +0000 (00:43 +0000)]
Provide a dummy NO_XBOX option that lives in opt_xbox.h for pc98.
This allows us to eliminate a three ifdef PC98 instances.

18 years agoAdd xbox associated options/devices to LINT.
Warner Losh [Mon, 14 Nov 2005 00:20:27 +0000 (00:20 +0000)]
Add xbox associated options/devices to LINT.

Submitted by: Rink P.W. Springer

18 years agoUpdate to match geom_gpt:1.35
Marcel Moolenaar [Sun, 13 Nov 2005 22:02:04 +0000 (22:02 +0000)]
Update to match geom_gpt:1.35

o  Change the result of gctl(001) now that a bogus verb still requires
   a valid geom,
o  Insert gctl(024) to test for an appropriate error when a bogus verb
   is given that does have a proper geom parameter.

18 years agoo Slightly refactor the ctlreq code to maximize code sharing between
Marcel Moolenaar [Sun, 13 Nov 2005 21:53:55 +0000 (21:53 +0000)]
o  Slightly refactor the ctlreq code to maximize code sharing between
   verbs. Only the create verb operates on a provider. All other verbs
   operate on a GPT geom. Also, the GPT entry oriented verbs require
   a non-downgraded GPT.
o  Have all verbs take an optional flags parameter. The flags parameter
   is a string of single-letter flags. The typical use of these flags
   is to enable certain behaviour in support fo the gpt(8) tool.
o  Add dummy implementations for the destroy and recover verbs.

This change causes test 2 of the GPT regression test suite to fail.
The presence of a geom parameter is now required even for unknown
verbs.

18 years agoRestore backwards source compatibility with 6.x and 5.x.
Bill Paul [Sun, 13 Nov 2005 21:36:48 +0000 (21:36 +0000)]
Restore backwards source compatibility with 6.x and 5.x.

18 years agoUse ANSI definitions.
David Malone [Sun, 13 Nov 2005 21:17:24 +0000 (21:17 +0000)]
Use ANSI definitions.
Avoid using extern by declaring shared functions in header files.
Const poision.

18 years agolen and len2 work better as size_t
David Malone [Sun, 13 Nov 2005 21:03:56 +0000 (21:03 +0000)]
len and len2 work better as size_t

18 years agoConst poision, deregister and use ANSI definitions.
David Malone [Sun, 13 Nov 2005 20:50:17 +0000 (20:50 +0000)]
Const poision, deregister and use ANSI definitions.

18 years agoDeclare find_err in indent_globs.h where the other shared variables
David Malone [Sun, 13 Nov 2005 20:37:25 +0000 (20:37 +0000)]
Declare find_err in indent_globs.h where the other shared variables
live rather than listing it as an extern in indent.c.

18 years agoAvoid shadowing a local scratch variable,
David Malone [Sun, 13 Nov 2005 20:30:13 +0000 (20:30 +0000)]
Avoid shadowing a local scratch variable,

18 years agoFix a second missed case where the refcount is not decremented.
Andrew Thompson [Sun, 13 Nov 2005 20:26:19 +0000 (20:26 +0000)]
Fix a second missed case where the refcount is not decremented.

MFC after: 3 days

18 years agoFix a mbuf and refcnt leak in the broadcast code.
Andrew Thompson [Sun, 13 Nov 2005 19:36:59 +0000 (19:36 +0000)]
Fix a mbuf and refcnt leak in the broadcast code.

If the packet is rejected from pfil(9) then continue the loop rather than
returning, this means that we can still try to send it out the remaining
interfaces but more importantly the mbuf is freed and refcount decremented on
exit.

18 years agoThis commit was generated by cvs2svn to compensate for changes in r152390,
Sam Leffler [Sun, 13 Nov 2005 19:28:17 +0000 (19:28 +0000)]
This commit was generated by cvs2svn to compensate for changes in r152390,
which included commits to RCS files with non-trunk default branches.

18 years agocorrect check for whether or not md5 signature matches; applied
Sam Leffler [Sun, 13 Nov 2005 19:28:17 +0000 (19:28 +0000)]
correct check for whether or not md5 signature matches; applied
to vendor branch since this is already in their depot

18 years agoFix endianness issues. iwi now works on big endian architectures too.
Damien Bergamini [Sun, 13 Nov 2005 17:38:02 +0000 (17:38 +0000)]
Fix endianness issues.  iwi now works on big endian architectures too.

Obtained from: NetBSD (scw@)
MFC after: 2 weeks

18 years agoRemove the unused AAC_DRIVER_BUILD_DATE macro.
Jens Schweikhardt [Sun, 13 Nov 2005 17:26:36 +0000 (17:26 +0000)]
Remove the unused AAC_DRIVER_BUILD_DATE macro.
Nuke whitespace at EOL while I'm here.

Approved by: scottl (MAINTAINER)

18 years agoBe more robust when handling Rx interrupts. If we can't allocate a new mbuf,
Damien Bergamini [Sun, 13 Nov 2005 17:25:21 +0000 (17:25 +0000)]
Be more robust when handling Rx interrupts.  If we can't allocate a new mbuf,
just discard the received frame and reuse the old mbuf.
This should prevent the connection from stalling after high network traffic.

MFC after: 2 weeks

18 years agoBe more robust when handling Rx interrupts. If we can't allocate and DMA map
Damien Bergamini [Sun, 13 Nov 2005 17:19:12 +0000 (17:19 +0000)]
Be more robust when handling Rx interrupts.  If we can't allocate and DMA map
a new mbuf, just discard the received frame and reuse the old mbuf.
This should fix kernel panics on high network traffic.

MFC after: 2 weeks

18 years agoBe more robust when handling Rx interrupts. If we can't allocate and DMA map
Damien Bergamini [Sun, 13 Nov 2005 17:17:40 +0000 (17:17 +0000)]
Be more robust when handling Rx interrupts.  If we can't allocate and DMA map
a new mbuf, just discard the received frame and reuse the old mbuf.
This should fix kernel panics on high network traffic.

MFC after:      2 weeks

18 years agoBe more robust when handling Rx interrupts. If we can't allocate and DMA map
Damien Bergamini [Sun, 13 Nov 2005 17:16:06 +0000 (17:16 +0000)]
Be more robust when handling Rx interrupts.  If we can't allocate and DMA map
a new mbuf, just discard the received frame and reuse the old mbuf.
This should fix kernel panics on high network traffic.

Obtained from:  NetBSD (joerg@)
MFC after:      2 weeks

18 years agoAdd support for 24/32 bit audio formats/conversion.
Alexander Leidinger [Sun, 13 Nov 2005 14:20:26 +0000 (14:20 +0000)]
Add support for 24/32 bit audio formats/conversion.

It may be the case that you may hear some unwanted noise while
playing back with 24/32 bit. This is a problem in the USB system.
Explanation from Hans Petter Selasky:
---snip---
The current USB sound driver only uses one isochronous
buffer, that is restarted when it is completed. This will lead to a short
period of time, +1ms, where no sound data is sent to the external USB device.
Depending on the load of your computer, this can be as much as 50ms. So the
USB sound driver must use 2 isochronous transfers. At the beginning one will
queue both. Then these are restarted on completion. This will result in a
constant-rate data stream to the external sound device, a minimum sound
buffer equal to the size of the isochronous buffer, and possibly the sound
will reach your ears with less delay. Little delay is a result of constant
data rate. Currently only my USB driver will support that. If one tries that
with the USB driver in *BSD, then it will crash at the first moment one gets
a buffer underrun.
---snip---

Submitted by: Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp>
Mono-recording still not tested by: julian

18 years agoModify netstat -mb to use libmemstat when accessing a core dump or live
Robert Watson [Sun, 13 Nov 2005 14:06:01 +0000 (14:06 +0000)]
Modify netstat -mb to use libmemstat when accessing a core dump or live
kernel memory and not using sysctl.  Previously, libmemstat was used
only for the live kernel via sysctl paths.

This results in netstat output becoming both more consistent between
core dumps and the live kernel, and also more information in the core
dump case than previously (i.e., mbuf cache information).

Statistics relating to sfbufs still rely on a kvm descriptor as they
are not currently exposed via libmemstat.  netstat -m operating on a
core is still unable to print certain sfbuf stats available on the live
kernel.

MFC after: 1 week