Commit Graph

160705 Commits

Author SHA1 Message Date
Maxim Sobolev
f70a8a9cf5 o Cylinder numbers are 10 bits in the MBR;
o Sector numbers are only 6 bits in the MBR;

o bde'cize name of the local variable.

Submitted by:	bde
2011-01-24 07:16:20 +00:00
Adrian Chadd
a9c52f70eb Add a simple tool to print the contents of a v4k EEPROM dump. 2011-01-24 06:46:03 +00:00
Kirk McKusick
7649cb0043 The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities
include sys/time.h instead of time.h. This include is incorrect as
per the manpages for the APIs and the POSIX definitions. This commit
replaces sys/time.h where necessary with time.h.

The commit also includes some minor style(9) header fixup in newfs.

This commit is part of a larger effort by Garrett Cooper started in
//depot/user/gcooper/posix-conformance-work/ -- to make FreeBSD more
POSIX compliant.

Submitted by:  Garrett Cooper   yanegomi at gmail dot com
2011-01-24 06:17:05 +00:00
Gordon Tetlow
9c990fb2a4 Honor $PAGER instead of always calling more.
Approved by:	colin@
MFC after:	1 week
2011-01-24 04:32:59 +00:00
Pyun YongHyeon
7be4de2de7 Apply TX interrupt moderation to all RTL810xE PCIe Fast Ethernet
controllers. Experimentation with RTL8102E, RTL8103E and RTL8105E
showed dramatic decrement of TX completion interrupts under high TX
load(e.g.  from 147k interrupts/second to 10k interrupts/second)
With this change, TX interrupt moderation is applied to all
controllers except RTL8139C+.
2011-01-24 00:01:06 +00:00
Michael Tuexen
f7a77f6fd3 Add stream scheduling support.
This work is based on a patch received from Robin Seggelmann.

MFC after: 3 months.
2011-01-23 19:36:28 +00:00
Nathan Whitehorn
a0a3479c06 Disable ATAPI DMA unconditionally on Apple Kauai ATA controllers, like it
is on the MacIO ones. It appears to be unreliable on all DBDMA-based
controllers for unknown reasons, which should be figured out eventually.

Tested by:	Torfinn Ingolfsen
MFC after:	1 week
2011-01-23 17:20:11 +00:00
Josh Paetzel
16c4413fa6 This script parses output of userland tools. In the case of a faulted
zpool the output causes the script to bail out with syntax errors.
Since a scrub of a faulted zpool is pointless, just skip over any pools
marked as such.

PR:	conf/150228
Submitted by:	jpaetzel
Approved by:	kib (mentor)
MFC after:	3 days
MFC note:	only for RELENG_8
2011-01-23 17:13:29 +00:00
Bjoern A. Zeeb
1ffa3abd45 For make tinderbox there is no need to print the extra commands.
MFC after:	5 days
2011-01-23 16:28:44 +00:00
Jilles Tjoelker
61bb1f4313 init(8): Document that login(1) is now responsible for recording logouts.
init(8) only uses utmpx for recording reboots and shutdowns.
2011-01-23 14:54:45 +00:00
Adrian Chadd
d8d0c29db8 Enable the 11n PHY by default whether or not 11n is configured.
The linux ath9k driver and (from what I've been told) the atheros reference
driver does this; it then leaves discarding 11n frames to the 802.11 layer.

Whilst I'm here, merge in a fix from ath9k which maintains a turbo register
setting when enabling the 11n register; and remove an un-needed (duplicate)
flag setting.
2011-01-23 14:49:50 +00:00
Adrian Chadd
69d1f737f8 Update the AR9280v2 inivals to match what is in Linux ath9k.
This repairs the behaviour of my AR9280 - both radio chains now seem
to correctly be receiving.
2011-01-23 14:30:35 +00:00
Jilles Tjoelker
acf0ab0669 init: Only run /etc/rc.shutdown if /etc/rc was run.
It does not make sense to shut down daemons that were not started. In
particular, this fixes loss of mixer settings when shutting down using
shutdown(8), init(8) or ctrl+alt+del from single-user mode.

If /etc/rc reboots, /etc/rc.shutdown is not run.

Also fix segfaults and other erratic behaviour if init receives SIGHUP or
SIGTSTP while in single-user mode.

This commit does not attempt to fix any badness with signal handlers
(assumption that pointers can be read and written atomically, EINTR race
condition). I believe it does not make this badness any worse.

Silence on:	-arch@
2011-01-23 14:22:26 +00:00
Ed Maste
89db1db777 Use string literal format strings to quiet clang warnings. 2011-01-23 14:08:59 +00:00
Lawrence Stewart
a66ac850d7 An sbuf configured with SBUF_AUTOEXTEND will call malloc with M_WAITOK when a
write to the buffer causes it to overflow. We therefore can't hold the CC list
rwlock over a call to sbuf_printf() for an sbuf configured with SBUF_AUTOEXTEND.

Switch to a fixed length sbuf which should be of sufficient size except in the
very unlikely event that the sysctl is being processed as one or more new
algorithms are loaded. If that happens, we accept the race and may fail the
sysctl gracefully if there is insufficient room to print the names of all the
algorithms.

This should address a WITNESS warning and the potential panic that would occur
if the sbuf call to malloc did sleep whilst holding the CC list rwlock.

Sponsored by:	FreeBSD Foundation
Reported by:	Nick Hibma
Reviewed by:	bz
MFC after:	3 weeks
X-MFC with:	r215166
2011-01-23 13:00:25 +00:00
Konstantin Belousov
b7f0fc351e Fix typo.
MFC after:	3 days
2011-01-23 12:44:17 +00:00
Giorgos Keramidas
001dcb9133 Touch up the sample memory usage numbers a bit, to avoid wrapping
on terminal boundary.  While here add definition for 'G' and fix
the indentation of 'K' units.

Submitted by:	plunket
PR:		docs/153614
MFC after:	3 days
2011-01-23 11:08:39 +00:00
Ulrich Spörlein
de788839e2 libkvm: fix process runtime calculation on crashdumps
Fix a long standing bug, where the procs ticks where assumed to be in
us. Instead, read cpu_tick_frequency from the kernel and use the same
logic to convert runtime. This is still too optimistic in that it
assumes cpu_tick_frequency is available and fixed. Since this function
is only called on crashdumps, I think we can live with that. Testing has
shown the values to be correct for different kern.hz inside Virtualbox.

Bump WARNS. Alignment issues on some archs mean this is still at 3.

Reviewed by:	bde
2011-01-23 11:08:36 +00:00
Ulrich Spörlein
c10970dd7d libkvm code janitoring
- make WARNS=6 clean for archs w/o strict alignment requirments
- add const, ANSIfy, remove unused vars, cast types for comparison
- thanks to differing definitions of VM_MIN_ADDRESS across our archs, we
  need to trick the compiler to not complain about signedness. We could
  either fix VM_MIN_ADDRESS to always be a simple integer or make the
  check conditional on $ARCH.

Closes PRs:	kern/42386, kern/83364
Reviewed by:	bde
2011-01-23 11:08:28 +00:00
Dmitry Chagin
9a6a64d3c4 Style(9) fix.
Approved by:	kib(mentor)
MFC after:	1 month
2011-01-23 09:50:39 +00:00
Michael Tuexen
afb048b8ef Remove unnecessary checking of variable.
MFC after: 3 months.
2011-01-23 07:27:35 +00:00
Adrian Chadd
24edeee241 Add a new tool which takes a text hexdump of the current EEPROM contents. 2011-01-22 23:44:56 +00:00
Adrian Chadd
8363d9c421 Patch the athstats code/Makefile to cross-compile correctly. 2011-01-22 23:37:42 +00:00
Pawel Jakub Dawidek
79e82fe290 Add missing logs.
MFC after:	1 week
2011-01-22 23:30:01 +00:00
Bjoern A. Zeeb
2933a1ce67 Make make tinderbox work with MAKEOBJDIRPREFIX set (or in possibly other
combinations) by forcing FAILFILE into .CURDIR as we do for all other
universe output files. [1]  Similarly make FAILFILE start with "_." as well.

Reviewed by:	silence-on-src [1]
MFC after:	6 days
2011-01-22 23:16:44 +00:00
Bjoern A. Zeeb
841241fcb7 In make targets print the make variable TARGETS as we expect it rather
than the grammatically better sounding variant without the 'S'.  This
allows copy and paste and is less confusing.
2011-01-22 23:10:58 +00:00
Bjoern A. Zeeb
eee8163bef Properly document what the top-level make tinderbox does.
Reviewed by:	jmallett
MFC After:	3 days
X-MFC:		build.7 only
2011-01-22 22:57:28 +00:00
Pawel Jakub Dawidek
eed4e65fdb Add nv_assert() which allows to assert that the given name exists.
MFC after:	1 week
2011-01-22 22:38:18 +00:00
Pawel Jakub Dawidek
09d6ae1b34 Use more consistent function name with the others (pjdlogv_prefix_set()
instead of pjdlog_prefix_setv()).

MFC after:	1 week
2011-01-22 22:35:08 +00:00
Pawel Jakub Dawidek
911a2aa37a Use int16 for error.
MFC after:	1 week
2011-01-22 22:33:27 +00:00
Pawel Jakub Dawidek
5ed118d861 - On primary worker reload, update hr_exec field.
- Update comment.

MFC after:	1 week
2011-01-22 22:31:55 +00:00
Andrew Thompson
d929b72e23 Revert the ndis part of r212122, windrv_stub.c already adds a MODULE_VERSION
and this breaks loading miniport drivers from loader.conf

Reported by:	Yuri <yuri^rawbw^com>
Submitted by:	Paul B Mahol
MFC after:	3 days
2011-01-22 21:33:18 +00:00
Marcel Moolenaar
ea6de5ee49 s/utime/modtime/g -- utime shadows utime(3).
Submitted by:	Garrett Cooper
2011-01-22 21:27:17 +00:00
Dmitry Chagin
fd4194ca26 Option USB_HOST_ALIGN declared twice.
Approved by:	kib(mentor)
2011-01-22 20:53:27 +00:00
Konstantin Belousov
cb48d32015 Add my copyright.
Discussed with:	kan
2011-01-22 19:25:49 +00:00
Jaakko Heinonen
353429bfd2 Fix typos. 2011-01-22 15:19:25 +00:00
Hans Petter Selasky
d8d1becfdd Allow USB_HOST_ALIGN to be configured at compile time. This patch is
necessary for MIPS based RouterStation Pro board and maybe other MIPS
based boards as well.

Submitted by:	Milan Obuch
Approved by:	thompsa (mentor)
2011-01-22 13:52:23 +00:00
Glen Barber
ea46a1350c Fix '.Xr' ordering in SEE ALSO section.
Approved by:	keramida (mentor)
MFC after:	3 days
2011-01-22 13:18:28 +00:00
Maxim Sobolev
68df7abe8a Warn user when value entered is greated than the amount supported
by the MBR for the given parameter and set that parameter to the
maximum value instead of just truncating the most significant part
silently.

Could happen for example if the capacity of the device is more
than 2TB, so that the number of sectors is greater than 2Mib.

MFC after:	1 month
2011-01-22 05:21:20 +00:00
Marcel Moolenaar
b2b953afee Fix r217688. We need to call init_param1() before we use msgbufsize,
now that the size of the message buffer is a tunable.
2011-01-22 01:31:59 +00:00
Marcel Moolenaar
4cdbe2b967 Fix backtraces by defining ksym_start & ksym_end if DDB is
defined. The kernel linker doesn't deal with symbols of
type NOTYPE and typically gives the wrong symbol ($a) for
local symbols.

Obtained from:  Juniper Networks, Inc.
2011-01-22 00:32:12 +00:00
Jack F Vogel
7d5f64a903 Don't bother to run the flowcontrol code if there
is no change. Thanks to Andrew for the tweak.
2011-01-22 00:19:15 +00:00
Jack F Vogel
1d4e0b19e4 Missing case for 82598DA type adapter, thanks Andrew. 2011-01-22 00:08:06 +00:00
Jack F Vogel
c6f98cde15 Leftover bogus TX UNLOCK removed. Thanks to
Andrew Boyer.
2011-01-21 23:55:28 +00:00
Jilles Tjoelker
198c89c306 getgroups(2): Remove mention of <sys/param.h> and refer to sysconf(3).
Because {NGROUPS_MAX} may become variable, its value should be obtained
using sysconf(3). If a #define is used anyway, it should be obtained by
including <limits.h> as that is in POSIX like getgroups(2) itself is.
<sys/param.h> is not in POSIX.

MFC after:	1 week
2011-01-21 22:15:17 +00:00
John Baldwin
cd2895aab0 - Move special inode constants to ext2_dinode.h and rename them to match
NetBSD.
- Add a constant for the HASJOURNAL compat flag.

PR:		kern/153584
Submitted by:	Pedro F. Giffuni  giffunip at yahoo
2011-01-21 22:00:40 +00:00
John Baldwin
84edda0a2c Restore support for the 'async' and 'sync' mount options lost when
switching to nmount(2).  While here, sort the options.

PR:		kern/153584
Submitted by:	Pedro F. Giffuni  giffunip at yahoo
MFC after:	1 week
2011-01-21 21:33:46 +00:00
Tony Finch
9bbfc2e646 Update to upstrea version 2.5.6.
Detect IO errors properly.
Write #line directives to the correct output stream.

Obtained from:	http://dotat.at/prog/unifdef
2011-01-21 18:10:11 +00:00
Sergey Kandaurov
03139a7106 Add kern.msgbufsize default setting to /boot/defaults/loader.conf.
Suggested by:	Alex Kozlov <spam rm-rf.kiev.ua> (via private mail)
Approved by:	kib (mentor)
2011-01-21 12:15:21 +00:00
Sergey Kandaurov
4053b05b91 Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.
Submitted by:	perryh pluto.rain.com (previous version)
Reviewed by:	jhb
Approved by:	kib (mentor)
Tested by:	universe
2011-01-21 10:26:26 +00:00