Commit Graph

167233 Commits

Author SHA1 Message Date
Jason Helfman
bca5071ff0 Add myself with mentor relationships
Add tabthorpe -> crees

Approved by: crees (mentor)
2011-12-20 21:16:49 +00:00
Konstantin Belousov
6f100596e5 Change the type of real_dev_bsize variable from long to u_int.
The DIOCGSECTORSIZE takes u_int * as an argument, using long *
causes failures on big-endian targets.

Diagnosed by:	Michiel Boland <boland37 xs4all nl>
PR:	sparc64/163460
Tested by:	pho (x86), flo (sparc64)
MFC after:	1 week
2011-12-20 20:39:00 +00:00
Martin Matuska
5e95ed1f11 Sync bsdcpio with vendor branch release/2.8:
Revision 3770:
Merge r3768 from trunk: Fix typo in dev/ino verification for cpio formats.

Obtained from:	http://code.google.com/p/libarchive
MFC after:	2 weeks
2011-12-20 20:37:17 +00:00
Martin Matuska
6c35858460 Sync bsdtar with vendor branch release/2.8:
Revision 3769:
Merge r3744 from trunk:  Correctly return errors when reading
an archive using @archive extension.

Obtained from:	http://code.google.com/p/libarchive
MFC after:	2 weeks
2011-12-20 20:36:00 +00:00
Martin Matuska
05d8f68a62 Sync libarchive with vendor branch release/2.8:
3730:
Fix issue 174 (Windows path names, not relevant for FreeBSD)

3734:
Merge r1989: archive_clear_error should set errno to 0.

3735:
Merge r3247 from trunk: Clear errors before returning
from archive_read_support_format_all()

3799:
Check the position before dereferencing the pointer.
This avoids dereferencing one byte past the end of a string

3824:
Merge r3823 from trunk for issue 199 (hang in iso9660 reading)

Obtained from:	http://code.google.com/p/libarchive
MFC after:	2 weeks
2011-12-20 20:34:02 +00:00
Alan Cox
7e77373c83 The size passed to kmem functions should be in terms of bytes and not
pages.

Avoid an out-of-bounds array access.

Reviewed by:	cperciva
2011-12-20 20:29:45 +00:00
Alan Cox
971238ae48 The Xen pmap doesn't support superpages. So, there is no point in it
initializing structures, like the pv table, that are only used to
implement superpages.  In fact, some of the unnecessary code in
pmap_init() was actually doing harm.  It was preventing the kernel from
booting on virtual machines with more than 768 MB of memory.

Tested by:	sbruno
2011-12-20 20:16:12 +00:00
Martin Matuska
f6ccfb42a2 Update libarchive, tar and cpio to version 2.8.5
The following additional vendor revisions are applied:

Revision 3740:
Use archive_clear_error() to clear the error markers.

Obtained from:	http://code.google.com/p/libarchive
MFC after:	2 weeks
2011-12-20 20:06:33 +00:00
Martin Matuska
f873e4d1bd Merge vendor revision 3723:
Fixes extraction of Zip entries that use length-at-end without specifying
either the compressed or uncompressed length.  In particular, fixes bsdtar
extraction of such files.

Obtained from:	http://code.google.com/p/libarchive
Reported by:	Patrick Lamaiziere <patfbsd@davenulle.org> (freebsd-stable@)
MFC after:	1 week
2011-12-20 20:02:07 +00:00
Alexander Motin
e3bf726bee Add some more cross-references. 2011-12-20 17:44:25 +00:00
Alexander Motin
e0dceef5c2 Fix copy-paste typo. 2011-12-20 17:32:13 +00:00
Alexander Motin
2a6be868ea Add timecounters(4) man page alike to eventtimers(4). 2011-12-20 17:10:34 +00:00
Pedro F. Giffuni
1ac4aa743c Many style fixes.
Remove C99 initializers: they don't help in this case.
Set errno to 0 before strtoll() (from NetBSD).

PR:		151850
Suggested by:	bde
Approved by:	jhb (Mentor)
MFC after:	2 weeks
2011-12-20 15:50:54 +00:00
Alexander Motin
8f72e930c1 s/LAPIC/local APIC/ to closer follow Intel documents.
Submitted by:	jhb
2011-12-20 15:19:33 +00:00
John Baldwin
f9a0145857 Allow boot0cfg to force a PXE boot via boot0 on the next boot.
- Fix boot0 to check for PXE when using the pre-set setting for the
  preferred slice.
- Update boot0cfg to use slice 6 to select PXE.  Accept a 'pxe' argument
  instead of a number for the 's' option as a way to select PXE as well.

Submitted by:	Andrew Boyer  aboyer averesystems
MFC after:	2 weeks
2011-12-20 15:19:29 +00:00
Alexander Motin
89affab00c Remove extra "and" left from earlier version. 2011-12-20 14:12:50 +00:00
Gleb Smirnoff
f08535f872 Restore a feature that was present in 5.x and 6.x, and was cleared in
7.x, 8.x and 9.x with pf(4) imports: pfsync(4) should suppress CARP
preemption, while it is running its bulk update.

However, reimplement the feature in more elegant manner, that is
partially inspired by newer OpenBSD:

- Rename term "suppression" to "demotion", to match with OpenBSD.
- Keep a global demotion factor, that can be raised by several
  conditions, for now these are:
  - interface goes down
  - carp(4) has problems with ip_output() or ip6_output()
  - pfsync performs bulk update
- Unlike in OpenBSD the demotion factor isn't a counter, but
  is actual value added to advskew. The adjustment values for
  particular error conditions are also configurable, and their
  defaults are maximum advskew value, so a single failure bumps
  demotion to maximum. This is for POLA compatibility, and should
  satisfy most users.
- Demotion factor is a writable sysctl, so user can do
  foot shooting, if he desires to.
2011-12-20 13:53:31 +00:00
Alexander Motin
73889c808a Add apic(4) man page, now mostly to cover its event timer functionality. 2011-12-20 13:49:52 +00:00
Gleb Smirnoff
df6faa4c5c - Fix examples to show new CARP style.
- Remove OpenBSDisms, add FreeBSDisms.
2011-12-20 13:32:56 +00:00
Ed Schouten
55a1bde99c Small cleanups to panic() prototype.
- Let panic() use _Noreturn and __printflike() instead of GCC-specific
  attributes.
- Remove prototype from ffs_subr.c and let it include ffs_extern.h.
- Forward declare struct inode to make ffs_extern.h not depend on it.
2011-12-20 12:34:17 +00:00
Gleb Smirnoff
352e70652f - Cover pfsync callouts deletion with PF_LOCK().
- Cover setting up interface between pf and pfsync with PF_LOCK().
2011-12-20 12:34:16 +00:00
Alexander Motin
f42acd0f79 Add eventtimers(9) man page, describing related KPIs.
Sponsored by:	iXsystems, Inc.
MFC after:	1 month
2011-12-20 11:40:22 +00:00
Alexander V. Chernikov
07d7b74b81 Add binding support to libradius(3).
Submitted by:    Sergey Matveychuk <sem33@yandex-team.ru>
Approved by:     ae (mentor)
MFC after:       2 weeks
2011-12-20 11:13:44 +00:00
Adrian Chadd
74ab90b71e Fix broken locking that I introduced in the previous commit. 2011-12-20 03:25:11 +00:00
Adrian Chadd
fd06fec782 IIC bitbang changes - prepare to make the bit delay configurable; debug print changes.
* Right now the delay is hard coded at 10uS. This is a bit long when doing lots
  of periodic i2c transactions. So create a 'udelay' parameter and initialise it
  to 10. This can be tuned later.

* Add a newline after a transaction finishes, so the debugging output isn't so
  horrible.
2011-12-20 02:49:01 +00:00
Alexander Motin
823efe3764 Oops, list of IDs is not sequential. Have to list all of them expoicitly. 2011-12-20 02:42:53 +00:00
Alexander Motin
3e6059772d Cast some vendor-specific spell on VIA VT1708S codecs to:
- make analog input loopback work;
 - get access to the mics boost controls.

Sponsored by:	iXsystems, Inc.
MFC after:	1 month
2011-12-20 02:00:27 +00:00
Adrian Chadd
ddd7699151 Remove these locks - they aren't strictly needed and cause measurable
performance issues.

* Access to the GPIO bus is already locked by requesting
  and releasing the bus - thus the lock isn't really needed
  for each GPIO pin change.
* Don't lock and unlock the GPIO bus for -each- i2c access -
  the i2c bus code is already doing this by calling the upper
  layer callback to request/release the bus. This thus locks
  the bus for the entirety of the transaction.

TODO:

* Further verify that everything is correctly requesting/
  releasing the GPIO bus.
* Look at how to lock the GPIO pin configuration stuff,
  potentially by locking/unlocking the bus at the gpiobus
  layer.
2011-12-20 00:33:56 +00:00
Xin LI
25841e912f Add comments in NOTES to say what viawd is. 2011-12-20 00:16:52 +00:00
Hans Petter Selasky
d63cc02d7a Make the recently added "no_shutdown_wait" sysctl writeable.
Suggested by:	avg @
MFC after:	3 days
2011-12-19 23:39:08 +00:00
Dimitry Andric
8a0e4ea185 In usr.sbin/yp_mkdb/yp_mkdb.c, cast some printf field width parameters
to int, cast time_t to intmax_t, and use the corresponding printf length
modifier.

MFC after:	1 week
2011-12-19 20:44:44 +00:00
Dimitry Andric
5eeae9a725 In usr.sbin/uhsoctl/uhsoctl.c, fix a few warnings about format strings
not being literals.

MFC after:	1 week
2011-12-19 20:38:26 +00:00
Dimitry Andric
5c67a2799c Fix r228719; when you use intmax_t, you need stdint.h.
Pointy hat to:	dim
MFC after:	1 week
2011-12-19 20:33:53 +00:00
Dimitry Andric
655353a78c Some people pointed out long is 32-bit on some arches, while time_t is
64-bit, so better cast time_t to intmax_t, and use the appropriate
printf format strings.

MFC after:	1 week
2011-12-19 20:29:50 +00:00
Andriy Gapon
167057914b ule: ensure that batch timeshare threads are scheduled fairly
With the previous code, if the range of priorities for timeshare batch
threads was greater than RQ_NQS, then the threads with low priorities in
the part of the range above RQ_NQS would be scheduled to the run-queues
as if they had high priorities at the beginning of the range.
In other words, threads with a nice level of +N could be scheduled as
if they had a nice level of -M.

Reported by:	George Mitchell <george@m5p.com>
Reviewed by:	jhb
Tested by:	George Mitchell <george@m5p.com> (earlier version)
MFC after:	1 week
2011-12-19 20:01:21 +00:00
Pyun YongHyeon
7659f3c35d Increase wait time for OP_TCPSTART command processing. It seems
100us is not enough to ensure prefetch unit work.
2011-12-19 19:02:36 +00:00
Pyun YongHyeon
cbecedb2c5 TCP header size is represented by number of 32bits words.
Fix the TCP header size calculation such that makes TSO engine
cache all header(ethernet/IP/TCP) bytes to its internal buffer.
While here, remove extra pull up for TCP payload.  Unlike some
em(4) controllers, fxp(4) does not require such work around for
TSO.
The two limitations are ethernet/IP/TCP header size should be less
than or equal to the size of controller's internal buffer(80 bytes)
and these header information should be found in the first fragment
of a TSO frame.
2011-12-19 19:00:34 +00:00
John Baldwin
a7f5f7948b Add a TASK_INITIALIZER() macro that can be used to statically
initialize a task structure.

Reviewed by:	gj
MFC after:	2 weeks
2011-12-19 18:55:13 +00:00
Dimitry Andric
ad5b59d82c In usr.sbin/timed, fix several issues with printf formats:
- Cast time_t's to long, and print them with %ld.
- Print ptrdiff_t's with %td.
- Print ssize_t's and size_t's with %zd and %zu.
- Print int32_t's with %d.
Also, replace some int variables with the more appropriate size_t.

MFC after:	1 week
2011-12-19 18:08:31 +00:00
Dimitry Andric
3803473797 In contrib/tcpdump/print-icmp6.c, fix a problem where the comparison
against icmp6_hdr::icmp6_type is done incorrectly.  (This fix has
already been applied upstream, but we do not have the latest version of
tcpdump.)

MFC after:	1 week
2011-12-19 17:32:54 +00:00
Dimitry Andric
6130c10567 Use NO_WCAST_ALIGN for usr.bin/hastctl and usr.bin/hastd; the alignment
warnings in sbin/hastd/lzf.c are only emitted for i386 and amd64, and
there they can be safely ignored.

MFC after:	1 week
2011-12-19 15:46:15 +00:00
Hans Petter Selasky
5ed294aec0 Add code to wait for USB shutdown to be executed at system shutdown.
Add sysctl which can be used to skip this waiting.

MFC after:	3 days
2011-12-19 15:35:05 +00:00
Andriy Gapon
528bf6e40e opensolaris compat: fix vcmn_err so that panic(9) produces a proper message
... instead of just a verbatim format string.

Reviewed by:	pjd
MFC after:	1 week
2011-12-19 14:55:14 +00:00
Hans Petter Selasky
6bd3e53514 Add missing unlock of USB controller's lock, when
doing shutdown, suspend and resume.

Suggested by:	avg @
MFC after:	3 days
2011-12-19 14:53:42 +00:00
Dimitry Andric
1d44b5b9f0 In usr.bin/vacation/Makefile, fix a typo in the comment about clang
warnings.

Spotted by:	arundel
MFC after:	1 week
2011-12-19 13:38:28 +00:00
Dimitry Andric
136fb141c6 Unfortunately, clang gives warnings about sendmail code that cannot be
turned off yet.  Since this is contrib code, and we don't really care
about the warnings, just turn make them non-fatal for now.

MFC after:	1 week
2011-12-19 13:35:44 +00:00
Gleb Smirnoff
3d6c421fab Remove if_carp.ko. /boot/kernel should be upgraded atomically.
Requested by:	netchild, bz
2011-12-19 12:50:12 +00:00
Bjoern A. Zeeb
2cce1b69c4 Unbreak the build after r228697 adding the { } block to make clear which
if the else belongs to.
2011-12-19 08:50:17 +00:00
Maxim Konovalov
d96ea877a7 o Convert IPv6 read-only stats sysctls to the read-write ones.
o Teach netstat(1) -z to reset these stats sysctls.

PR:		bin/153206
Reviewed by:	glebuis
Sponsored by:	NGINX, Inc.
MFC after:	1 month
2011-12-19 05:50:34 +00:00
Maxim Konovalov
47483045bc o Sort .Xrs. 2011-12-19 05:09:08 +00:00