]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoRemove C99 initializer, since dominant style is to use non-C99 initializers.
Gleb Smirnoff [Wed, 3 Mar 2010 18:49:15 +0000 (18:49 +0000)]
Remove C99 initializer, since dominant style is to use non-C99 initializers.

Requested by: jhb

14 years agoRemove last traces of <utmp.h>.
Ed Schouten [Wed, 3 Mar 2010 18:30:10 +0000 (18:30 +0000)]
Remove last traces of <utmp.h>.

14 years agoSeveral changes to fix livelock under high load, introduced by r203489:
Alexander Motin [Wed, 3 Mar 2010 17:58:41 +0000 (17:58 +0000)]
Several changes to fix livelock under high load, introduced by r203489:
- change the way in which command queue overflow is handled;
- do not expose to CAM two command slots, used for driver's internal purposes;
- allow driver to use up to 1024 command slots, instead of 256 before.

14 years agoRemove programming LED register and enable 25MHz TX clock for
Pyun YongHyeon [Wed, 3 Mar 2010 17:56:52 +0000 (17:56 +0000)]
Remove programming LED register and enable 25MHz TX clock for
88E1149 PHY. This will fix intermittent watchdog timeouts as well
as very slow network performance on 88E8072 Yukon Extreme.

PR: kern/144148
MFC after: 1 week

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Wed, 3 Mar 2010 17:55:51 +0000 (17:55 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
the software.

Obtained from: NetBSD

14 years agoIntroduce ath_hal_setInterrupts(), a macro for ah_setInterrupts().
Rui Paulo [Wed, 3 Mar 2010 17:42:39 +0000 (17:42 +0000)]
Introduce ath_hal_setInterrupts(), a macro for ah_setInterrupts().

Pointed out by: sam

14 years agoReplace Id keyword with FreeBSD keyword and set the svn props correctly.
Rui Paulo [Wed, 3 Mar 2010 17:32:32 +0000 (17:32 +0000)]
Replace Id keyword with FreeBSD keyword and set the svn props correctly.
No functional change.

14 years agoImproving the clocks auto-tunning by firstly checking if the atrtc may be
Attilio Rao [Wed, 3 Mar 2010 17:13:29 +0000 (17:13 +0000)]
Improving the clocks auto-tunning by firstly checking if the atrtc may be
correctly initialized and just then assign to softclock/profclock.
Right now, some atrtc seems reporting strange diagnostic error* making the
current pattern bogus.

In order to do that cleanly, lapic_setup_clock(), on both ia32 and amd64,
now accepts as arguments the desired sources to handle, and returns the
actual ones (LAPIC_CLOCK_NONE is forbidden because otherwise there is no
meaning in calling such function).
This allows to bring out into commont x86 code the handling part for
machdep.lapic_allclocks tunable, which is retained.

Sponsored by: Sandvine Incorporated
Tested by: yongari, Richard Todd
<rmtodd at ichotolot dot servalan dot com>
MFC: 3 weeks
X-MFC: r202387, 204309

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Wed, 3 Mar 2010 17:07:02 +0000 (17:07 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years ago- Include CURDIR in case the makefile is not run from the same directory.
Ulf Lilleengen [Wed, 3 Mar 2010 16:45:58 +0000 (16:45 +0000)]
- Include CURDIR in case the makefile is not run from the same directory.

14 years agoAllow lseek(SEEK_END) to work on disk devices by using the DIOCGMEDIASIZE
John Baldwin [Wed, 3 Mar 2010 16:18:04 +0000 (16:18 +0000)]
Allow lseek(SEEK_END) to work on disk devices by using the DIOCGMEDIASIZE
to determine the media size.

Submitted by: nox
MFC after: 1 week

14 years agoIn reallocf(3), free the memory only when size != 0. Otherwise, when the
Jaakko Heinonen [Wed, 3 Mar 2010 15:43:26 +0000 (15:43 +0000)]
In reallocf(3), free the memory only when size != 0. Otherwise, when the
System V compatibility option (malloc "V" flag) is in effect a zero sized
reallocf() could cause a double free.

PR: bin/141753
Submitted by: Dan Lukes

14 years agoAdd support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor.
George V. Neville-Neil [Wed, 3 Mar 2010 15:05:58 +0000 (15:05 +0000)]
Add support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor.

Add macros for properly accessing coprocessor 0 registers that
support performance counters.

Reviewed by: jkoshy rpaulo fabien imp
MFC after: 1 month

14 years agoMake the comment follow style(9) format.
Ivan Voras [Wed, 3 Mar 2010 13:29:39 +0000 (13:29 +0000)]
Make the comment follow style(9) format.

Spotted by: jhb

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Wed, 3 Mar 2010 10:18:03 +0000 (10:18 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years ago- Remove unused include path.
Ulf Lilleengen [Wed, 3 Mar 2010 08:24:15 +0000 (08:24 +0000)]
- Remove unused include path.

14 years ago- Revert Makefile to revision r203368, as the svn mv from contrib/csup replaced
Ulf Lilleengen [Wed, 3 Mar 2010 08:23:19 +0000 (08:23 +0000)]
- Revert Makefile to revision r203368, as the svn mv from contrib/csup replaced
  the Makefile with a broken version.

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Wed, 3 Mar 2010 07:38:12 +0000 (07:38 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoUpgrade to version 9.6.2. This version includes all previously released
Doug Barton [Wed, 3 Mar 2010 05:45:24 +0000 (05:45 +0000)]
Upgrade to version 9.6.2. This version includes all previously released
security patches to the 9.6.1 version, as well as many other bug fixes.

This version also incorporates a different fix for the problem we had
patched in contrib/bind9/bin/dig/dighost.c, so that file is now back
to being the same as the vendor version.

Due to the fact that the DNSSEC algorithm that will be used to sign the
root zone is only included in this version and in 9.7.x those who wish
to do validation MUST upgrade to one of these prior to July 2010.

14 years agoSpell START_FRAME CALLFRAME_SIZ now.
Warner Losh [Wed, 3 Mar 2010 02:46:36 +0000 (02:46 +0000)]
Spell START_FRAME CALLFRAME_SIZ now.

14 years agoAlso define _MIPS_ISA here.
Warner Losh [Wed, 3 Mar 2010 02:44:20 +0000 (02:44 +0000)]
Also define _MIPS_ISA here.

Submitted by: jmallet@

14 years agoTeach newfs(8) to understand size modifiers for all options taking
Maxim Sobolev [Wed, 3 Mar 2010 02:05:09 +0000 (02:05 +0000)]
Teach newfs(8) to understand size modifiers for all options taking
size or size-like argument. I.e. "-s 32k" instead of "-s 32768".
Size parsing function has been shamelessly stolen from the truncate(1).
I'm sure many sysadmins out there will appreciate this small
improvement.

MFC after: 1 week

14 years agoDocument the VM detection type and sysctl a bit better.
Ivan Voras [Tue, 2 Mar 2010 23:57:42 +0000 (23:57 +0000)]
Document the VM detection type and sysctl a bit better.

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 22:25:50 +0000 (22:25 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 22:16:40 +0000 (22:16 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 22:11:14 +0000 (22:11 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 21:59:03 +0000 (21:59 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 21:50:36 +0000 (21:50 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years ago- Add missing includes to make example "compilable".
Gleb Smirnoff [Tue, 2 Mar 2010 21:10:44 +0000 (21:10 +0000)]
- Add missing includes to make example "compilable".
- Use C99 initializer just in case if driver_t may change in future.
- Use NULL for pointer arguments instead of 0.

14 years agoVendor import of BIND 9.6.2
Doug Barton [Tue, 2 Mar 2010 19:49:55 +0000 (19:49 +0000)]
Vendor import of BIND 9.6.2

14 years agoRemove manual .includes in cddl Makefiles
Ulrich Spörlein [Tue, 2 Mar 2010 19:04:07 +0000 (19:04 +0000)]
Remove manual .includes in cddl Makefiles

- Break the dependency on ../Makefile.inc for .PATH, and include
  ../Makefile.inc implicitly. This is required to ...
- Set WARNS?=6 in top-level Makefile.inc
- Remove now redundant WARNS settings, add WARNS?=0 where appropriate
- Remove redundant SHLIB_MAJOR overrides
- Use NO_MAN, not MK_MAN=no
- Remove redundant inclusion of bsd.own.mk
- Order Makefiles more according to style.Makefile(9)
- Reduce diff of cddl Makefiles against each other

No objection: pjd
Approved by: ed (co-mentor)

14 years agoRemove redundant WARNS?=6 overrides and inherit the WARNS setting from
Ulrich Spörlein [Tue, 2 Mar 2010 18:44:08 +0000 (18:44 +0000)]
Remove redundant WARNS?=6 overrides and inherit the WARNS setting from
the toplevel directory.

This does not change any WARNS level and survives a make universe.

Approved by:        ed (co-mentor)

14 years agoDocument COMPRESS_USER_CORES, and the new %I and %H core formatters.
Alfred Perlstein [Tue, 2 Mar 2010 18:43:12 +0000 (18:43 +0000)]
Document COMPRESS_USER_CORES, and the new %I and %H core formatters.

14 years agoinclude COMPRESS_USER_CORES and gzio in NOTES.
Alfred Perlstein [Tue, 2 Mar 2010 18:42:29 +0000 (18:42 +0000)]
include COMPRESS_USER_CORES and gzio in NOTES.

Requested by: Niclas Zeising

14 years agoput inclusion of net/zlib.c under "device gzio" instead of "zlib" since right
Alfred Perlstein [Tue, 2 Mar 2010 18:41:20 +0000 (18:41 +0000)]
put inclusion of net/zlib.c under "device gzio" instead of "zlib" since right
now there is no reason to only include "zlib".

Requested by: jhb

14 years agoBring in the most recent version of ipfw and dummynet, developed
Luigi Rizzo [Tue, 2 Mar 2010 17:40:48 +0000 (17:40 +0000)]
Bring in the most recent version of ipfw and dummynet, developed
and tested over the past two months in the ipfw3-head branch.  This
also happens to be the same code available in the Linux and Windows
ports of ipfw and dummynet.

The major enhancement is a completely restructured version of
dummynet, with support for different packet scheduling algorithms
(loadable at runtime), faster queue/pipe lookup, and a much cleaner
internal architecture and kernel/userland ABI which simplifies
future extensions.

In addition to the existing schedulers (FIFO and WF2Q+), we include
a Deficit Round Robin (DRR or RR for brevity) scheduler, and a new,
very fast version of WF2Q+ called QFQ.

Some test code is also present (in sys/netinet/ipfw/test) that
lets you build and test schedulers in userland.

Also, we have added a compatibility layer that understands requests
from the RELENG_7 and RELENG_8 versions of the /sbin/ipfw binaries,
and replies correctly (at least, it does its best; sometimes you
just cannot tell who sent the request and how to answer).
The compatibility layer should make it possible to MFC this code in a
relatively short time.

Some minor glitches (e.g. handling of ipfw set enable/disable,
and a workaround for a bug in RELENG_7's /sbin/ipfw) will be
fixed with separate commits.

CREDITS:
This work has been partly supported by the ONELAB2 project, and
mostly developed by Riccardo Panicucci and myself.
The code for the qfq scheduler is mostly from Fabio Checconi,
and Marta Carbone and Francesco Magno have helped with testing,
debugging and some bug fixes.

14 years agoCorrect mfip module dependency on mfi. This allows mfip to be loaded as
Konstantin Belousov [Tue, 2 Mar 2010 17:34:11 +0000 (17:34 +0000)]
Correct mfip module dependency on mfi. This allows mfip to be loaded as
module when mfi is a module itself.

Reviewed by: jhb, scottl
MFC after: 1 week

14 years agoDo not leak vnode lock when msdosfs mount is updated and specified
Konstantin Belousov [Tue, 2 Mar 2010 17:24:33 +0000 (17:24 +0000)]
Do not leak vnode lock when msdosfs mount is updated and specified
device is different from the device used to the original mount.

Note that update_mp does not need devvp locked, and pmp->pm_devvp cannot
be freed meantime.

Reported and tested by: pho
MFC after: 3 weeks

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 17:20:04 +0000 (17:20 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 17:06:40 +0000 (17:06 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 17:05:19 +0000 (17:05 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoAlways assign WARNS using ?=
Ulrich Spörlein [Tue, 2 Mar 2010 16:58:04 +0000 (16:58 +0000)]
Always assign WARNS using ?=

- fix some nearby style bugs
- include Makefile.inc where it makes sense and reduces duplication

Approved by: ed (co-mentor)

14 years agoremove unnecessary casts leftover from a bogus fix to a previous bug
Luigi Rizzo [Tue, 2 Mar 2010 16:24:16 +0000 (16:24 +0000)]
remove unnecessary casts leftover from a bogus fix to a previous bug

14 years agoUpdate device-labeling logic for Biba, LOMAC, and MLS to recognize new-style
Robert Watson [Tue, 2 Mar 2010 15:05:48 +0000 (15:05 +0000)]
Update device-labeling logic for Biba, LOMAC, and MLS to recognize new-style
pts devices when various policy ptys_equal flags are enabled.

Submitted by: Estella Mystagic <estella at mystagic.com>
MFC after: 1 week

14 years agoCouple of suggestions from Sam regarding latest commit:
Rui Paulo [Tue, 2 Mar 2010 12:59:42 +0000 (12:59 +0000)]
Couple of suggestions from Sam regarding latest commit:
o rename the new variables to comply with the naming scheme
o move the new variables to an AR5212 specific struct
o use ahp when available
o revert to previous ts_flags check

14 years agoAdd AR9285 sources.
Rui Paulo [Tue, 2 Mar 2010 12:51:39 +0000 (12:51 +0000)]
Add AR9285 sources.

14 years ago- Move rmi_pci_bus_space to header and avoid extern
Randall Stewart [Tue, 2 Mar 2010 12:11:00 +0000 (12:11 +0000)]
- Move rmi_pci_bus_space to header and avoid extern
- remove unused and commented code (MIPS_BUS_SPACE_PCI, pic_usb_ack)
- use rmi_pci_bus_space for USB too (needs byteswap)
- uncomment xls_ehci.c in files.xlr
- changes to xls_ehci.c - updated with dev/usb/controller/ehci_*.c as

Obtained from: JC - c.jayachandran@gmail.com

14 years agoOnly destroy pm_fatlock on error if it was initialized.
Konstantin Belousov [Tue, 2 Mar 2010 11:02:59 +0000 (11:02 +0000)]
Only destroy pm_fatlock on error if it was initialized.

MFC after: 3 weeks

14 years agoSync with recent changes from luigi - struct ng_ipfw_tag superceeded
Gleb Smirnoff [Tue, 2 Mar 2010 10:43:41 +0000 (10:43 +0000)]
Sync with recent changes from luigi - struct ng_ipfw_tag superceeded
by more general ipfw_rule_ref. The latter isn't documented here, since
it should be documented in ipfw.4.

14 years agoMFV of r204563, tzdata2010c:
Edwin Groothuis [Tue, 2 Mar 2010 10:03:06 +0000 (10:03 +0000)]
MFV of r204563, tzdata2010c:

Paraguay changes its DST schedule, postponing the March rule to
April and modifying the October date.

14 years agoSome style and language improvements.
Alexander Motin [Tue, 2 Mar 2010 09:23:54 +0000 (09:23 +0000)]
Some style and language improvements.

Submitted by: ru

14 years agoVendor import of tzdata2010c
Edwin Groothuis [Tue, 2 Mar 2010 08:38:44 +0000 (08:38 +0000)]
Vendor import of tzdata2010c

Paraguay changes its DST schedule, postponing the March rule to
April and modifying the October date.

Obtained from: ftp://elsie.nci.nih.gov/pub/

14 years ago-mabi-calls and -msoft-float aren't needed either
Warner Losh [Tue, 2 Mar 2010 07:44:38 +0000 (07:44 +0000)]
-mabi-calls and -msoft-float aren't needed either

Submitted by: jmallet@

14 years ago- Unmark authentication support as a TODO item.
Ulf Lilleengen [Tue, 2 Mar 2010 07:37:35 +0000 (07:37 +0000)]
- Unmark authentication support as a TODO item.

14 years agoUpdate macros for multiple ABI support from NetBSD.
Warner Losh [Tue, 2 Mar 2010 07:27:30 +0000 (07:27 +0000)]
Update macros for multiple ABI support from NetBSD.
Also update SZREG define in ucontext

14 years ago- Move csup away from contrib/ and into usr.bin/. Software is no longer
Ulf Lilleengen [Tue, 2 Mar 2010 07:26:07 +0000 (07:26 +0000)]
- Move csup away from contrib/ and into usr.bin/. Software is no longer
  contributed, and main development is happening in the FreeBSD repo.

Suggested by: joel

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 07:25:20 +0000 (07:25 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years ago-mno-dsp hasn't been required for a while now.
Warner Losh [Tue, 2 Mar 2010 07:24:47 +0000 (07:24 +0000)]
-mno-dsp hasn't been required for a while now.

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Tue, 2 Mar 2010 07:20:46 +0000 (07:20 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Approved by: pjd
Obtained from: NetBSD

14 years agoMerge projects/enhanced_coredumps (r204346) into HEAD:
Alfred Perlstein [Tue, 2 Mar 2010 06:58:58 +0000 (06:58 +0000)]
Merge projects/enhanced_coredumps (r204346) into HEAD:

  Enhanced process coredump routines.

  This brings in the following features:
  1) Limit number of cores per process via the %I coredump formatter.
  Example:
    if corefilename is set to %N.%I.core AND num_cores = 3, then
    if a process "rpd" cores, then the corefile will be named
    "rpd.0.core", however if it cores again, then the kernel will
    generate "rpd.1.core" until we hit the limit of "num_cores".

    this is useful to get several corefiles, but also prevent filling
    the machine with corefiles.

  2) Encode machine hostname in core dump name via %H.

  3) Compress coredumps, useful for embedded platforms with limited space.
    A sysctl kern.compress_user_cores is made available if turned on.

    To enable compressed coredumps, the following config options need to be set:
    options COMPRESS_USER_CORES
    device zlib   # brings in the zlib requirements.
    device gzio   # brings in the kernel vnode gzip output module.

  4) Eventhandlers are fired to indicate coredumps in progress.

  5) The imgact sv_coredump routine has grown a flag to pass in more
  state, currently this is used only for passing a flag down to compress
  the coredump or not.

  Note that the gzio facility can be used for generic output of gzip'd
  streams via vnodes.

Obtained from: Juniper Networks
Reviewed by: kan

14 years agoBring in more built-in defines from NetBSD
Warner Losh [Tue, 2 Mar 2010 05:59:14 +0000 (05:59 +0000)]
Bring in more built-in defines from NetBSD
a few #defines from JC.

# tested only with o32 at the moment

Submitted by: C. Jayachandran (CJ)
Obtained from: NetBSD

14 years agoAdd n32 ABI generators...
Warner Losh [Tue, 2 Mar 2010 05:43:04 +0000 (05:43 +0000)]
Add n32 ABI generators...

Submitted by: neel, jmallet

14 years agoRemove taskqueue based interrupt handling. After r204541 msk(4)
Pyun YongHyeon [Tue, 2 Mar 2010 01:45:02 +0000 (01:45 +0000)]
Remove taskqueue based interrupt handling. After r204541 msk(4)
does not generate excessive interrupts any more so we don't need
to have two copies of interrupt handler.
While I'm here remove two STAT_PUT_IDX register accesses in LE
status event handler. After r204539 msk(4) always sync status LEs
so there is no need to resort to reading STAT_PUT_IDX register to
know the end of status LE processing. Just trust status LE's
ownership bit.

14 years agoDocument newly added loader tunable and sysctl variable dev.mskc.%d.int_holdoff
Pyun YongHyeon [Mon, 1 Mar 2010 23:56:51 +0000 (23:56 +0000)]
Document newly added loader tunable and sysctl variable dev.mskc.%d.int_holdoff

14 years agocalculates the integer square root if a positive integer X is larger
Weongyo Jeong [Mon, 1 Mar 2010 23:51:13 +0000 (23:51 +0000)]
calculates the integer square root if a positive integer X is larger
than 256 instead of using sqrt_table.

Reported by: Joe Marcus Clarke <marcus at freebsd dot org>

14 years agoImplement rudimentary interrupt moderation with programmable
Pyun YongHyeon [Mon, 1 Mar 2010 23:39:43 +0000 (23:39 +0000)]
Implement rudimentary interrupt moderation with programmable
countdown timer register. The timer resolution may vary among
controllers but the value would be represented by core clock
cycles. msk(4) will automatically computes number of required clock
cycles from given micro-seconds unit.
The default interrupt holdoff timer value is 100us which will
ensure less than 10k interrupts under load. The timer value can be
changed with dev.mskc.0.int_holdoff sysctl node.

Note, the interrupt moderation is shared resource on dual-port
controllers so you can't use separate interrupt moderation value
for each port. This means we can't stop interrupt moderation in
driver stop routine. Also have msk_tick() reclaim transmitted Tx
buffers as safety belt. With this change there is no need to check
missing Tx completion interrupt in watchdog handler, so remove it.

14 years agoMake sure to enable flow-control only if established link is
Pyun YongHyeon [Mon, 1 Mar 2010 22:55:35 +0000 (22:55 +0000)]
Make sure to enable flow-control only if established link is
full-duplex. Previously msk(4) used to allow flow-control on
1000baseT half-duplex media. Also GMAC pause is enabled if link
partner is capable of handling it.
While I'm here use IFM_OPTIONS instead of using IFM_GMASK to check
optional flags of link.

14 years agoProperly sync status LEs after processing.
Pyun YongHyeon [Mon, 1 Mar 2010 22:43:22 +0000 (22:43 +0000)]
Properly sync status LEs after processing.

14 years agoAdd PCI ID for MCS9901.
Xin LI [Mon, 1 Mar 2010 20:41:27 +0000 (20:41 +0000)]
Add PCI ID for MCS9901.

Submitted by: gcooper
PR: kern/144397
MFC after: 1 month

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Mon, 1 Mar 2010 17:20:04 +0000 (17:20 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Mon, 1 Mar 2010 17:05:46 +0000 (17:05 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoProperly setup the TX FIFO threshold for AR5416 based chipsets,
Rui Paulo [Mon, 1 Mar 2010 17:04:19 +0000 (17:04 +0000)]
Properly setup the TX FIFO threshold for AR5416 based chipsets,
including the AR9285. This seems to fix some users's problems.

Submitted by: Jorge Boncompte [DTI2] <jorge at dti2.net>

14 years agoThe NetBSD Foundation has granted permission to remove clause 3 and 4 from
Joel Dahl [Mon, 1 Mar 2010 16:52:11 +0000 (16:52 +0000)]
The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD

14 years agoDeliver siginfo when signal is generated by thr_kill(2) (SI_USER with properly
Bruno Ducrot [Mon, 1 Mar 2010 14:27:16 +0000 (14:27 +0000)]
Deliver siginfo when signal is generated by thr_kill(2) (SI_USER with properly
filled si_uid and si_pid).

Reported by: Joel Bertrand <joel.bertrand systella fr>
PR: 141956
Reviewed by: kib
MFC after: 2 weeks

14 years agoPrint the contents of the miscellaneous (MISC) register to the console if
John Baldwin [Mon, 1 Mar 2010 13:56:15 +0000 (13:56 +0000)]
Print the contents of the miscellaneous (MISC) register to the console if
it is valid along with the other register values when a machine check is
encountered.

MFC after: 1 week

14 years agoPrefer vocabulary of 'Current' and 'Limit' to 'Value' and 'Maximum' in
Robert Watson [Mon, 1 Mar 2010 12:11:37 +0000 (12:11 +0000)]
Prefer vocabulary of 'Current' and 'Limit' to 'Value' and 'Maximum' in
netstat -Q.

MFC after: 6 days
Sponsored by: Juniper Networks

14 years agoNot all programs including kvm.h include the necessary headers to use
Robert Watson [Mon, 1 Mar 2010 09:46:27 +0000 (09:46 +0000)]
Not all programs including kvm.h include the necessary headers to use
u_int, so prefer unsigned int.

MFC after: 6 days
Pointed out by: bz, kib, Mr Tinderbox

14 years ago- Add ALI M5228 PATA ID.
Alexander Motin [Mon, 1 Mar 2010 07:32:49 +0000 (07:32 +0000)]
- Add ALI M5228 PATA ID.
- Add missed DMA initialization for ALI SATA chips.

14 years agoTeach netstat -Q to work with -N and -M by adding libkvm versions of data
Robert Watson [Mon, 1 Mar 2010 00:46:45 +0000 (00:46 +0000)]
Teach netstat -Q to work with -N and -M by adding libkvm versions of data
query routines.  This code is necessarily more fragile in the presence of
kernel changes than querying the kernel via sysctl (the default), but
useful when investigating crashes or live kernel state via firewire.

MFC after: 1 week
Sponsored by: Juniper Networks

14 years agoWhitespace tweak.
Robert Watson [Mon, 1 Mar 2010 00:43:05 +0000 (00:43 +0000)]
Whitespace tweak.

MFC after: 3 days

14 years agoChanges to support crashdump analysis of netisr:
Robert Watson [Mon, 1 Mar 2010 00:42:36 +0000 (00:42 +0000)]
Changes to support crashdump analysis of netisr:

- Rename the netisr protocol registration array, 'np' to 'netisr_proto',
  in order to reduce the chances of symbol name collisions.  It remains
  statically defined, but it will be looked up by netstat(1).

- Move certain internal structure definitions from netisr.c to
  netisr_internal.h so that netstat(1) can find them.  They remain
  private, and should not be used for any other purpose (for example,
  they should not be used by kernel modules, which must instead use the
  public interfaces in netisr.h).

- Store a kernel-compiled version of NETISR_MAXPROT in the global variable
  netisr_maxprot, and export via a sysctl, so that it is available for use
  by netstat(1).  This is especially important for crashdump
  interpretation, where the size of the workstream structure is determined
  by the maximum number of protocols compiled into the kernel.

MFC after: 1 week
Sponsored by: Juniper Networks

14 years agoA first cut at teaching libkvm how to deal with dynamic per-CPU storage
Robert Watson [Mon, 1 Mar 2010 00:27:55 +0000 (00:27 +0000)]
A first cut at teaching libkvm how to deal with dynamic per-CPU storage
(DPCPU):

A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes
of DPCPU.  Calls to kvm_nlist(3) will automatically translate DPCPU
symbols and return a pointer to the current CPU's version of the data.
Consumers needing to read the same symbol on several CPUs will invoke a
series of setcpu/nlist calls, one per CPU of interest.

This addition makes it possible for tools like netstat(1) to query the
values of DPCPU variables during crashdump analysis, and is based on
similar code handling virtualized global variables.

MFC after: 1 week
Sponsored by: Juniper Networks, Inc.

14 years agoRewrite red-black trees to do lazy balance fixup. This improves
Jason Evans [Sun, 28 Feb 2010 22:57:13 +0000 (22:57 +0000)]
Rewrite red-black trees to do lazy balance fixup.  This improves
insert/remove speed by ~30%.

14 years agoProvide BSD-style Makefile for the device tree compiler (dtc).
Rafal Jaworowski [Sun, 28 Feb 2010 22:09:09 +0000 (22:09 +0000)]
Provide BSD-style Makefile for the device tree compiler (dtc).

Note it is not connected to the build hierarchy yet.

Sponsored by: The FreeBSD Foundation

14 years agoLet dtc build with FreeBSD yacc/lex.
Rafal Jaworowski [Sun, 28 Feb 2010 22:06:07 +0000 (22:06 +0000)]
Let dtc build with FreeBSD yacc/lex.

Sponsored by: The FreeBSD Foundation

14 years agoMerge DTC-d75b33af.
Rafal Jaworowski [Sun, 28 Feb 2010 21:57:35 +0000 (21:57 +0000)]
Merge DTC-d75b33af.

This is a split merge because of non-uniform licensing of the DTC package
contents and the way these components will be used in the FreeBSD environment.

The original DTC package is composed of the following two major pieces:

1. sys/contrib/libfdt (BSD [dual] license)
2. contrib/dtc (GPLv2)

The libfdt component is going to be shared in all aspects of the environment:
- /boot/loader
- kernel
- dtc (the device tree compiler proper, userspace tool)

14 years agosimplify hash calculation
Bernd Walter [Sun, 28 Feb 2010 18:06:54 +0000 (18:06 +0000)]
simplify hash calculation

14 years agoMark msdosfs as mpsafe.
Konstantin Belousov [Sun, 28 Feb 2010 17:19:22 +0000 (17:19 +0000)]
Mark msdosfs as mpsafe.

Tested by: pho
MFC after: 3 weeks

14 years agoFix the race between dotdot lookup and forced unmount, by using
Konstantin Belousov [Sun, 28 Feb 2010 17:17:29 +0000 (17:17 +0000)]
Fix the race between dotdot lookup and forced unmount, by using
msdosfs-specific variant of vn_vget_ino(), msdosfs_deget_dotdot().

As was done for UFS, relookup the dotdot denode after the call to
msdosfs_deget_dotdot(), because vnode lock is dropped and directory
might be moved.

Tested by: pho
MFC after: 3 weeks

14 years agoUse pm_fatlock to protect per-filesystem rb tree used to allocate fileno
Konstantin Belousov [Sun, 28 Feb 2010 17:16:43 +0000 (17:16 +0000)]
Use pm_fatlock to protect per-filesystem rb tree used to allocate fileno
on the large FAT volumes. Previously, a single global mutex was used.

Tested by: pho
MFC after: 3 weeks

14 years agoAdd assertions for FAT bitmap state.
Konstantin Belousov [Sun, 28 Feb 2010 17:15:45 +0000 (17:15 +0000)]
Add assertions for FAT bitmap state.

Tested by: pho
MFC after: 3 weeks

14 years agoUse pm_fatlock to protect fat bitmap.
Konstantin Belousov [Sun, 28 Feb 2010 17:13:59 +0000 (17:13 +0000)]
Use pm_fatlock to protect fat bitmap.

Tested by: pho
MFC after: 3 weeks

14 years agoAdd per-mountpoint lockmgr lock for msdosfs. It is intended to be used
Konstantin Belousov [Sun, 28 Feb 2010 17:13:07 +0000 (17:13 +0000)]
Add per-mountpoint lockmgr lock for msdosfs. It is intended to be used
as fat bitmap lock and to replace global mutex protecting fileno rbtree.

Tested by: pho
MFC after: 3 weeks

14 years agoIn msdosfs deget(), properly handle the case when the vnode is found in hash.
Konstantin Belousov [Sun, 28 Feb 2010 17:11:31 +0000 (17:11 +0000)]
In msdosfs deget(), properly handle the case when the vnode is found in hash.

Tested by: pho
MFC after: 3 weeks

14 years agoIn msdosfs_inactive(), reclaim the vnodes both for SLOT_DELETED and
Konstantin Belousov [Sun, 28 Feb 2010 17:10:41 +0000 (17:10 +0000)]
In msdosfs_inactive(), reclaim the vnodes both for SLOT_DELETED and
SLOT_EMPTY deName[0] values. Besides conforming to FAT specification, it
also clears the issue where vfs_hash_insert found the vnode in hash, and
newly allocated vnode is vput()ed. There, deName[0] == 0, and vnode is
not reclaimed, indefinitely kept on mountlist.

Tested by: pho
MFC after: 3 weeks

14 years agoRemove seemingly unneeded unlock/relock of the dvp in msdosfs_rmdir,
Konstantin Belousov [Sun, 28 Feb 2010 17:09:09 +0000 (17:09 +0000)]
Remove seemingly unneeded unlock/relock of the dvp in msdosfs_rmdir,
causing LOR.

Reported and tested by: pho
MFC after: 3 weeks

14 years agoAssert that the msdosfs vnode is (e)locked in several places.
Konstantin Belousov [Sun, 28 Feb 2010 17:07:49 +0000 (17:07 +0000)]
Assert that the msdosfs vnode is (e)locked in several places.
The plan is to use vnode lock to protect denode and fat cache,
and having separate lock for block use map.

Change the check and return on impossible condition into KASSERT().

Tested by: pho
MFC after: 3 weeks

14 years agoRemove unused global statistic about fat cache usage.
Konstantin Belousov [Sun, 28 Feb 2010 17:06:42 +0000 (17:06 +0000)]
Remove unused global statistic about fat cache usage.

Tested by: pho
MFC after: 3 weeks

14 years agoIn both if_tun and if_tap:
Konstantin Belousov [Sun, 28 Feb 2010 16:25:49 +0000 (16:25 +0000)]
In both if_tun and if_tap:

Do not do additional dev_ref() on the newly created interface in the
if_clone create method [1]. This reference is not needed and never
removed, causing struct cdevpriv leakage. Remove the setting of
SI_CHEAPCLONE flag as well, since it is unused.

For dev_clone handlers, create cdevs with the call make_dev_credf(MAKEDEV_REF)
instead of calling make_dev() and then dev_ref(), to avoid a race.

Call drain_dev_clone_events() at the module unload time after dev_clone
handler is deinstalled.

Submitted by: Mikolaj Golub <to.my.trociny gmail com> [1]
MFC after: 1 week

14 years agoremove debug leftover
Bernd Walter [Sun, 28 Feb 2010 16:14:34 +0000 (16:14 +0000)]
remove debug leftover