Commit graph

165256 commits

Author SHA1 Message Date
Warren Block 762f55cd5f Fix a confusing sentence. [1]
Other wording tweaks.

Reviewed by:	imp [1]
Approved by:	gjb
2011-09-29 03:37:42 +00:00
Glen Barber cc13988649 Whitespace cleanup in build(7).
MFC after:	1 week
Need-MFC:	225858
2011-09-29 02:57:08 +00:00
Glen Barber 170c2788cb Document, and provide an example for, PORTS_MODULES in build(7).
PR:		161017
Submitted by:	gcooper
MFC after:	1 week
2011-09-29 02:52:33 +00:00
Glen Barber ef87c4dcd5 Fix a few grammar and mdoc nits in script.1
PR:		161088
Submitted by:	Ben Kaduk ( kaduk % mit ! edu )
MFC after:	1 week
Need-MFC:	225809
2011-09-29 02:29:32 +00:00
Konstantin Belousov 17514c1bd9 Style nit.
Submitted by:	jhb
MFC after:	2 weeks
2011-09-29 00:44:34 +00:00
Eitan Adler 963527148e - I am not the oldest committer alive (yet)
Approved by:	bapt (mentor)
2011-09-28 21:42:13 +00:00
Eitan Adler a2f4ffd69c - fix whitespace issue in calendar
- add a n after \

Submitted by:	brueffer
Approved by:	bapt (mentor)
2011-09-28 20:46:52 +00:00
Dag-Erling Smørgrav c177b01465 Belatedly regenerate after application of the HPN patch. 2011-09-28 20:42:22 +00:00
Xin LI 89b1da1ba2 Test if the interface is afif in dhcpif() and syncdhcpif(), as
done in ipv6_autoconfif.

Reviewed by:	hrs (freebsd-rc@)
MFC after:	1 week
2011-09-28 19:01:15 +00:00
Eitan Adler 576d2da4ac - add myself to committers-ports.dot
Approved by:	sahil (mentor)
2011-09-28 18:56:02 +00:00
Ed Schouten 9f365aa1d6 Get rid of major/minor number distinction.
As of FreeBSD 6, devices can only be opened through devfs. These device
nodes don't have major and minor numbers anymore. The st_rdev field in
struct stat is simply based a copy of st_ino.

Simply display device numbers as hexadecimal, using "%#jx". This is
allowed by POSIX, since it explicitly states things like the following
(example taken from ls(1)):

	"If the file is a character special or block special file, the
	size of the file may be replaced with implementation-defined
	information associated with the device in question."

This makes the output of these commands more compact. For example, ls(1)
now uses approximately four columns less. While there, simplify the
column length calculation from ls(1) by calling snprintf() with a NULL
buffer.

Don't be afraid; if needed one can still obtain individual major/minor
numbers using stat(1).
2011-09-28 18:53:36 +00:00
Eitan Adler 7d6060bd9c - add myself to calendar
Approved by:	sahil (mentor)
2011-09-28 18:49:37 +00:00
Xin LI f13a03d89e Sync RCS id with NetBSD, this was intentionally omitted from the advisory
in order to reduce patchset size.

MFC after:	3 days
2011-09-28 18:03:53 +00:00
Chris Rees ae7bd33eb5 Include limits.h instead of sys/limits.h to improve portability.
PR:		bin/150772
Submitted by:	Derrick Brashear <shadow@gmail.com>
Reviewed by:	Garrett Cooper <yanegomi@gmail.com>
Approved by:	cognet
2011-09-28 17:03:49 +00:00
Konstantin Belousov 2042bb377a Fix grammar.
Submitted by:	bf
MFC after:	2 weeks
2011-09-28 16:12:15 +00:00
Konstantin Belousov 578113aaa3 Remove locking of the vm page queues from several pmaps, which only
protected the dirty mask updates. The dirty mask updates are handled
by atomics after the r225840.

Submitted by:	alc
Tested by:	flo (sparc64)
MFC after:	2 weeks
2011-09-28 15:01:20 +00:00
Konstantin Belousov abb9b935ca Use the trick of performing the atomic operation on the contained aligned
word to handle the dirty mask updates in vm_page_clear_dirty_mask().
Remove the vm page queue lock around vm_page_dirty() call in vm_fault_hold()
the sole purpose of which was to protect dirty on architectures which
does not provide short or byte-wide atomics.

Reviewed by:	alc, attilio
Tested by:	flo (sparc64)
MFC after:	2 weeks
2011-09-28 14:57:50 +00:00
Alexander Motin 7778ab7e0c MFprojects/hid:
Import the rest of HID improvements from the branch:
 - improve report descriptor parser in libusbhid to handle several kinds of
reports same time;
 - add to the libusbhid API two functions wrapping respective kernel IOCTLs
for reading and writing reports;
 - tune uhid IOCTL interface to allow reading and writing arbitrary report,
when multiple supported by the device;
 - teach usbhidctl to set output and feature reports;
 - make usbhidaction support all the same item names as bhidctl.

Sponsored by: iXsystems, inc.
2011-09-28 14:52:25 +00:00
Konstantin Belousov 005f609130 Use the explicitly-sized types for the dirty and valid masks.
Requested by:	attilio
Reviewed by:	alc
MFC after:	2 weeks
2011-09-28 14:51:28 +00:00
Bjoern A. Zeeb 528737fdfe Pass the fibnum where we need filtering of the message on the
rtsock allowing routing daemons to filter routing updates on an
rtsock per FIB.

Adjust raw_input() and split it into wrapper and a new function
taking an optional callback argument even though we only have one
consumer [1] to keep the hackish flags local to rtsock.c.

PR:		kern/134931
Submitted by:	multiple (see PR)
Suggested by:	rwatson [1]
Reviewed by:	rwatson
MFC after:	3 days
2011-09-28 13:48:36 +00:00
Pawel Jakub Dawidek e3feec94eb Correct typo.
MFC after:	3 days
2011-09-28 13:25:27 +00:00
Pawel Jakub Dawidek 12daf727f6 If the underlying provider doesn't support BIO_FLUSH, log it only once
and don't bother trying in the future.

MFC after:	3 days
2011-09-28 13:19:47 +00:00
Pawel Jakub Dawidek 39852ce89e Break a bit earlier.
MFC after:	3 days
2011-09-28 13:13:43 +00:00
Pawel Jakub Dawidek 518dd4c0d9 After every activemap change flush disk's write cache, so that write
reordering won't make the actual write to be committed before marking
the coresponding extent as dirty.

It can be disabled in configuration file.

If BIO_FLUSH is not supported by the underlying file system we log a warning
and never send BIO_FLUSH again to that GEOM provider.

MFC after:	3 days
2011-09-28 13:08:51 +00:00
Martin Matuska 91109eb1c8 Remove assertion that prevents zfs rename of datasets with mountpoint=none
or mountpoint=legacy that have children datasets. This also fixes dataset
rename when receiving incremental snapshots as reported on freebsd-fs@

This assertion was made triggerable by opensolaris change #10196.

PR:		bin/160400
Reviewed by:	pjd
MFC after:	1 week
2011-09-28 11:57:10 +00:00
Bjoern A. Zeeb a06534c3c2 Fix handling of corrupt compress(1)ed data. [11:04]
Add missing length checks on unix socket addresses. [11:05]

Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-11:04.compress
Security:	CVE-2011-2895 [11:04]
Security:	FreeBSD-SA-11:05.unix
2011-09-28 08:47:17 +00:00
Adrian Chadd 0e0290482b Don't bother triggering the cabq queue if it's empty.
Obtained from:	Atheros
2011-09-28 03:11:51 +00:00
Adrian Chadd 7b15790a4b Fix lock order to be correcter.
Nothing else locks these two queues (cabq, avp mcastq), but it should
be consistent and correct.
2011-09-28 03:07:51 +00:00
Adrian Chadd 353d29772b Change the default CABQ time to be 70% of the beacon interval,
rather than the whole beacon interval.

The reference driver and Linux ath9k both choose 80% of the
beacon interval and they do it in the driver rather than
the HAL (Ath reference) or ath9k_hw (ath9k.)

This quietens stuck beacon conditions on my AR9220/AR9280
based NICs when a lot of burst broadcast/multicast traffic
is going on. It doesn't seem to annoy the earlier MACs as
much as the AR9280 and later one.

Obtained from:	Linux ath9k, Atheros
2011-09-28 03:05:04 +00:00
Adrian Chadd c3f2102bef The AR5212 setup path (also used by the AR5416 code) configures a
local variable with a beacon interval of 100 TU. This never gets modified
if the beacon interval configuration changes.

This may have been correct in earlier times, but with the advent of
staggered beacons (which default to 1 / ATH_BCBUF beacon interval, so
25 TU here) this value is incorrect.

It is used to configure the default CABQ readytime. So here, the cabq
was being configured to be much greater than the target beacon timer
(TBTT.)

The driver should be configuring a cabq readytime value rather then
leaving it to the HAL to choose sensible defaults. This should be
done in the future - I'm simply trying to ensure sensible defaults
are chosen.
2011-09-28 03:03:23 +00:00
Adrian Chadd 45a94a8341 Update the default AIFS value for hostap mode.
Obtained from:	Linux ath9k, Atheros reference
2011-09-28 02:54:42 +00:00
Dag-Erling Smørgrav 0b5056f5ef Don't force active mode FTP. 2011-09-27 19:54:58 +00:00
Dag-Erling Smørgrav bb6e332901 Document the fact that passive mode is now the default.
Update copyright dates and strip my middle name.
2011-09-27 19:02:44 +00:00
Dag-Erling Smørgrav 6337341d81 Update copyright dates and strip my middle name. 2011-09-27 18:57:26 +00:00
Dag-Erling Smørgrav 76b94eb6e9 Bump date. 2011-09-27 18:53:35 +00:00
Dag-Erling Smørgrav ecd18c961b Think first, commit second.
1. Allow the caller to select active mode.
2. Fix the envar logic so it *always* overrides the caller's flags.
3. Document the change from active to passive.
2011-09-27 18:42:09 +00:00
Dag-Erling Smørgrav 4f411f8601 Long overdue: make passive mode the default for ftp. 2011-09-27 18:23:58 +00:00
Mikolaj Golub 29da75477b When script(1) reads EOF from input it starts spinning on zero-byte
reads eating 100% CPU. Fix this by skipping select on STDIN after
reading EOF -- permanently if STDIN is not terminal and for one second
if it is.

Also after reading EOF from STDIN we have to pass it to the program
being scripted. The previous approach was to write zero bytes into the
pseudo-terminal. This does not work because zero-byte write does not
have any effect on read. Fix this by sending VEOF instead.

Submitted by:	Ronald Klop <ronald-freebsd8@klop.yi.org>
Discussed with:	kib, Chris Torek <chris.torek@gmail.com>
Approved by:	kib
MFC after:	1 week
2011-09-27 18:14:04 +00:00
Jens Schweikhardt 208aa01fbd Fix grammar.
PR:		140457
Submitted by:	jeremyhu AT apple.com
MFC after:	2 weeks
2011-09-27 17:54:10 +00:00
Kirk McKusick 8cd680f8c3 This update eliminates a lock-order reversal warning discovered
whle tracking down the system hang reported in kern/160662 and
corrected in revision 225806. The LOR is not the cause of the system
hang and indeed cannot cause an actual deadlock. However, it can
be easily eliminated by defering the acquisition of a buflock until
after all the vnode locks have been acquired.

Reported by:     Hans Ottevanger
PR:              kern/160662
2011-09-27 17:41:48 +00:00
Kirk McKusick 6b3b8a2109 This update eliminates the system hang reported in kern/160662 when
taking a snapshot on a filesystem running with journaled soft updates.

Reported by:     Hans Ottevanger
Fix verified by: Hans Ottevanger
PR:              kern/160662
2011-09-27 17:34:02 +00:00
Dag-Erling Smørgrav 5c5052cca4 Use fseeko() instead of fseek(). The rest of the code is off_t-aware,
but the use of fseek() means fetch(1) can't correctly resume a transfer
that was interrupted past the 2 GB mark.

Pointed out by:	ache@
MFC after:	3 weeks
2011-09-27 17:11:31 +00:00
Jung-uk Kim 7331c16912 Avoid accidental conflicts with C++ operator keywords.
MFC after:	1 week
2011-09-27 16:33:17 +00:00
Dag-Erling Smørgrav 27274e81b2 Followup to r225599: the fseek() was a no-op since the file was opened
in append mode.  Open it in read-write mode instead.  Also move the
fseek up one level to cover the (unlikely but not impossible) case where
the server accepts ranges but does not send a Content-Size header.

PR:		bin/117277
MFC after:	3 weeks
2011-09-27 15:57:13 +00:00
Ed Maste b08d3049f0 Improve battery capacity reporting
When a status pointer is passed in mfi_dcmd_command does not return an
errno (if the ioctl is successful), so move the test for NO_HW_PRESENT
outside of the error case.  This should fix incorrect reporting for
systems with a dead or no battery.

Additionally, handle error codes other than NO_HW_PRESENT by omitting
the battery capacity display.  LSI's supercap-based parts (CV series)
report their data using the same interface as battery-based parts,
except that they do not include the capacity stats (state of charge,
cumulative charge cycles, etc.)

Reviewd by:   jhb, bz
Tested by:    pluknet@, Garrett Cooper
PR:           bin/160581
MFC after:    1 week
2011-09-27 14:28:07 +00:00
Attilio Rao 79a5956c23 Revert r225372:
wdog_kern_pat() acquires eventhandler mutex, thus it cannot work in
kernel context (from where kdb_trap() runs).

The right way to fix this is both offering the
cpu-stop-on-panic-and-skip-locking logic and also a context for KDB
to officially run. We can re-enable this (or a similar) improvement
when these 2 patches hit the tree.

Sponsored by:	Sandvine Incorporated
Discussed with:	emaste, rstone
MFC after:	immediately
2011-09-27 13:42:11 +00:00
Bjoern A. Zeeb 75e54d6017 Unbreak no-ip and no-inet6 module builds with ipfw. For now continue to
build the ip_fw_pfil.c hooks and ipfw even in case of no-ip under the
assumption that the private L2 hook (which hopefully eventually will be a
pfil hook as well) can still be useful.

Allow building the module without inet as well.

Glanced at by:	jhb
MFC after:	3 days
2011-09-27 13:27:17 +00:00
Konstantin Belousov ce8bd78b2a Do not deliver SIGTRAP on exec as the normal signal, use ptracestop() on
syscall exit path. Otherwise, if SIGTRAP is ignored, that tdsendsignal()
do not want to deliver the signal, and debugger never get a notification
of exec.

Found and tested by:	Anton Yuzhaninov <citrin citrin ru>
Discussed with:	jhb
MFC after:	2 weeks
2011-09-27 13:17:02 +00:00
Konstantin Belousov a01fdfcef1 Install ciss(4) ioctl header (together with other .h files from sys/dev/ciss).
PR:	kern/109813
Discussued with:	Alex Samorukov <samm os2 kiev ua>
	(smartmontools maintainer)
MFC after:	1 week
2011-09-27 12:14:43 +00:00
Alexander Motin cf2446231a Add one more ID for the Marvell 88SE9128 6Gbps SATA controller.
MFC after:	3 days
2011-09-27 09:32:34 +00:00