]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoMake sure to remap adjusted resources.
nwhitehorn [Sun, 5 Feb 2012 16:54:26 +0000 (16:54 +0000)]
Make sure to remap adjusted resources.

12 years agoAdd new socket options: TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL and
glebius [Sun, 5 Feb 2012 16:53:02 +0000 (16:53 +0000)]
Add new socket options: TCP_KEEPINIT, TCP_KEEPIDLE, TCP_KEEPINTVL and
TCP_KEEPCNT, that allow to control initial timeout, idle time, idle
re-send interval and idle send count on a per-socket basis.

Reviewed by: andre, bz, lstewart

12 years agoRemove extra semicolon.
mav [Sun, 5 Feb 2012 16:41:06 +0000 (16:41 +0000)]
Remove extra semicolon.

Submitted by: emaste

12 years agoRevert the _NOPROF entries on cpu_throw, cpu_switch and savectx. They can be
andreast [Sun, 5 Feb 2012 15:59:18 +0000 (15:59 +0000)]
Revert the _NOPROF entries on cpu_throw, cpu_switch and savectx. They can be
profiled too now.

MFC after: 2 weeks

12 years agoIf a local write request is from the synchronization thread, when it
trociny [Sun, 5 Feb 2012 15:23:32 +0000 (15:23 +0000)]
If a local write request is from the synchronization thread, when it
is synchronizing data that is out of date on the local component, we
should not send G_GATE_CMD_DONE acknowledge to the kernel.

This fixes the issue, observed in async mode, when on synchronization
from the remote component the worker terminated with "G_GATE_CMD_DONE
failed" error.

Reported by: Artem Kajalainen <artem kayalaynen ru>
Reviewed by: pjd
MFC after: 1 week

12 years agoFix the regression introduced in r226859: if the local component is
trociny [Sun, 5 Feb 2012 15:21:08 +0000 (15:21 +0000)]
Fix the regression introduced in r226859: if the local component is
out of date BIO_READ requests got lost instead of being sent to the
remote component.

Reviewed by: pjd
MFC after: 1 week

12 years agoAdd exca to powerpc modules build as a dependency for cbb.
jhibbits [Sun, 5 Feb 2012 13:29:01 +0000 (13:29 +0000)]
Add exca to powerpc modules build as a dependency for cbb.

12 years agoFix typo in r231010.
glebius [Sun, 5 Feb 2012 12:52:28 +0000 (12:52 +0000)]
Fix typo in r231010.

Submitted by: linimon

12 years agoAnalogous to r230407 a separate path buffer in vfs_mount.c is required
mm [Sun, 5 Feb 2012 10:59:50 +0000 (10:59 +0000)]
Analogous to r230407 a separate path buffer in vfs_mount.c is required
for r230129. Fixes a out of bounds write to fspath.

MFC after: 10 days

12 years agoWhitespace fixes.
ed [Sun, 5 Feb 2012 09:17:49 +0000 (09:17 +0000)]
Whitespace fixes.

- Remove redundant empty lines.
- Replace ^L by \014. This allows you to safely cat/grep/etc this file
  without causing confusion.

12 years agoBetter comment for ifa_init(), ifa_ref(), ifa_free().
glebius [Sun, 5 Feb 2012 08:53:05 +0000 (08:53 +0000)]
Better comment for ifa_init(), ifa_ref(), ifa_free().

12 years agoIn ifa_init() initialize if_data.ifi_datalen. This would be
glebius [Sun, 5 Feb 2012 08:31:15 +0000 (08:31 +0000)]
In ifa_init() initialize if_data.ifi_datalen. This would be
required after upcoming changes from bz@.

Discussed with: bz

12 years agoAdd 32-bit compat code for AIO kevent flags introduced in revision 230857.
davidxu [Sun, 5 Feb 2012 04:49:31 +0000 (04:49 +0000)]
Add 32-bit compat code for AIO kevent flags introduced in revision 230857.

12 years agoAdd support for bus_adjust_resource() on all PowerPC/AIM PCI bridges. With
nwhitehorn [Sun, 5 Feb 2012 00:51:59 +0000 (00:51 +0000)]
Add support for bus_adjust_resource() on all PowerPC/AIM PCI bridges. With
this change, NEW_PCIB appears to work without incident at least on a G5
iMac. More testing will be required before it is turned on in GENERIC.

12 years agosh: Fix swapped INTON/INTOFF.
jilles [Sat, 4 Feb 2012 23:29:07 +0000 (23:29 +0000)]
sh: Fix swapped INTON/INTOFF.

A possible consequence of this bug was a memory leak if SIGINT arrived
during a 'set' command (listing variables).

MFC after: 1 week

12 years agoCompatibility with IBM firmware.
nwhitehorn [Sat, 4 Feb 2012 23:25:18 +0000 (23:25 +0000)]
Compatibility with IBM firmware.

12 years agosh: Use vfork in a few common cases.
jilles [Sat, 4 Feb 2012 23:12:14 +0000 (23:12 +0000)]
sh: Use vfork in a few common cases.

This uses vfork() for simple commands and command substitutions containing a
single simple command, invoking an external program under certain conditions
(no redirections or variable assignments, non-interactive shell, no job
control). These restrictions limit the amount of code executed in a vforked
child.

There is a large speedup (for example 35%) in microbenchmarks. The
difference in buildkernel is smaller (for example 0.5%) but still
statistically significant. See
http://lists.freebsd.org/pipermail/freebsd-hackers/2012-January/037581.html
for some numbers.

The use of vfork() can be disabled by setting a variable named
SH_DISABLE_VFORK.

12 years agoFix installation script after r230482 -- a missing character apparently.
nwhitehorn [Sat, 4 Feb 2012 23:00:27 +0000 (23:00 +0000)]
Fix installation script after r230482 -- a missing character apparently.
Now, back to convalescing.

12 years agoAfter multiple requests for back out, after multiple promisses from adrian@
pjd [Sat, 4 Feb 2012 20:17:07 +0000 (20:17 +0000)]
After multiple requests for back out, after multiple promisses from adrian@
to fix it (without fixing it), after making one of my servers unbootable,
after now making also my laptop unbootable and after running out of patiance
back out r229800 until better solution is found.

12 years agoMissed file in r230993.
nwhitehorn [Sat, 4 Feb 2012 20:09:06 +0000 (20:09 +0000)]
Missed file in r230993.

12 years agoMiffed r230993 due to a one-character typo while reviewing the patch.
nwhitehorn [Sat, 4 Feb 2012 20:04:35 +0000 (20:04 +0000)]
Miffed r230993 due to a one-character typo while reviewing the patch.

12 years agoUnify OF PCI infrastructure, including changing from parsing the device
nwhitehorn [Sat, 4 Feb 2012 19:54:13 +0000 (19:54 +0000)]
Unify OF PCI infrastructure, including changing from parsing the device
tree based on heuristics to parsing it based on the spec. This should also
lay the foundation for NEW_PCIB on PowerPC.

MFC after: 3 months

12 years agoAvoid warnings about duplicate modules.
nwhitehorn [Sat, 4 Feb 2012 19:50:26 +0000 (19:50 +0000)]
Avoid warnings about duplicate modules.

MFC after: 2 weeks

12 years agoFix $ipv6_network_interfaces handling in rc.d/routing. It could fail when
hrs [Sat, 4 Feb 2012 18:14:49 +0000 (18:14 +0000)]
Fix $ipv6_network_interfaces handling in rc.d/routing.  It could fail when
it was set to "auto", for example.

MFC after: 3 days

12 years agoCorrect typo in comment (numbver)
emaste [Sat, 4 Feb 2012 18:14:39 +0000 (18:14 +0000)]
Correct typo in comment (numbver)

12 years agoFix a possible infinite loop in "route flush" on 64-bit archs.
hrs [Sat, 4 Feb 2012 17:53:22 +0000 (17:53 +0000)]
Fix a possible infinite loop in "route flush" on 64-bit archs.

MFC after: 3 days

12 years agoWhenever a new kernel thread is spawned, explicitly clear any CPU affinity
rstone [Sat, 4 Feb 2012 16:49:29 +0000 (16:49 +0000)]
Whenever a new kernel thread is spawned, explicitly clear any CPU affinity
set on the new thread.  This prevents the thread from inadvertently
inheriting affinity from a random sibling.

Submitted by: attilio
Tested by: pho
MFC after: 1 week

12 years agoFix input validation in SO_SETFIB.
hrs [Sat, 4 Feb 2012 15:00:26 +0000 (15:00 +0000)]
Fix input validation in SO_SETFIB.

Reviewed by: bz
MFC after: 1 day

12 years agoAdd "nodevice adw" to WITHOUT_SOURCELESS_UCODE.
rmh [Sat, 4 Feb 2012 13:45:39 +0000 (13:45 +0000)]
Add "nodevice adw" to WITHOUT_SOURCELESS_UCODE.

Approved by: kib (mentor)
MFC after: 13 days

12 years agoRemove useless and potentially dangerous rw() function which tries to
jh [Sat, 4 Feb 2012 13:37:31 +0000 (13:37 +0000)]
Remove useless and potentially dangerous rw() function which tries to
update access and modification times by reading and writing the file.
chmod(2) in rw() doesn't help because utimes(2) allow owner and the
super-user to change times. Using just utimes(2) should be sufficient.

The -f option becomes no-op.

Reviewed by: jilles

12 years agoBe as explicit as possible when describing relation between the -m mask
kib [Sat, 4 Feb 2012 13:12:52 +0000 (13:12 +0000)]
Be as explicit as possible when describing relation between the -m mask
argument and slices. Adjust example for the same reason.

Submitted by: Valentin Nechayev <netch netch kiev ua>
MFC after: 3 days

12 years agoAdd /usr/src/cddl/ to the hierarchy.
joel [Sat, 4 Feb 2012 08:03:01 +0000 (08:03 +0000)]
Add /usr/src/cddl/ to the hierarchy.

12 years agoFix typo in comment.
pjd [Sat, 4 Feb 2012 07:59:12 +0000 (07:59 +0000)]
Fix typo in comment.

MFC after: 3 days

12 years agoAdd MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disable
rmh [Sat, 4 Feb 2012 00:54:43 +0000 (00:54 +0000)]
Add MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disable
kernel modules that include binary-only code.

More fine-grained control is provided via MK_SOURCELESS_HOST (for native code
that runs on host CPU) and MK_SOURCELESS_UCODE (for microcode).

Reviewed by: julian, delphij, freebsd-arch
Approved by: kib (mentor)
MFC after: 2 weeks

12 years agoRestore callee saved registers later and micro-optimize.
jkim [Fri, 3 Feb 2012 21:24:28 +0000 (21:24 +0000)]
Restore callee saved registers later and micro-optimize.

12 years agoFix a function prototype to reflect reality. No functional change.
jkim [Fri, 3 Feb 2012 21:21:00 +0000 (21:21 +0000)]
Fix a function prototype to reflect reality.  No functional change.

12 years agoRevert r230913 and r230914.
mm [Fri, 3 Feb 2012 13:40:51 +0000 (13:40 +0000)]
Revert r230913 and r230914.

The initialization was correct, the problem needs deeper analysis.

12 years agoPrint the owner process for unix domain sockets when restricted to the
pluknet [Fri, 3 Feb 2012 09:07:53 +0000 (09:07 +0000)]
Print the owner process for unix domain sockets when restricted to the
specified files.

PR: bin/143962
MFC after: 2 weeks

12 years agoWhitespace removal.
rpaulo [Fri, 3 Feb 2012 02:06:14 +0000 (02:06 +0000)]
Whitespace removal.

12 years agoAdd some missing radar config parameters to athradar.
adrian [Thu, 2 Feb 2012 21:04:24 +0000 (21:04 +0000)]
Add some missing radar config parameters to athradar.

12 years agoInsert ordered command every 1/4 of the current command timeout, not 1/4
mav [Thu, 2 Feb 2012 19:02:15 +0000 (19:02 +0000)]
Insert ordered command every 1/4 of the current command timeout, not 1/4
of the default one.

Without this change setting kern.cam.ada.default_timeout to 1 instead of 30
allowed me to trigger several false positive command timeouts under heavy
ZFS load on a SiI3132 siis(4) controller with 5 HDDs on a port multiplier.

MFC after: 1 week

12 years agoFix the netback driver build for i386.
ken [Thu, 2 Feb 2012 17:54:35 +0000 (17:54 +0000)]
Fix the netback driver build for i386.

netback.c: Add missing VM includes.

xen/xenvar.h,
xen/xenpmap.h: Move some XENHVM macros from <machine/xen/xenpmap.h> to
<machine/xen/xenvar.h> on i386 to match the amd64 headers.

conf/files: Add netback to the build.

Submitted by: jhb
MFC after: 3 days

12 years agoRemove leftovers from previous commits.
joel [Thu, 2 Feb 2012 17:25:39 +0000 (17:25 +0000)]
Remove leftovers from previous commits.

Approved by: jhb

12 years agoAdd copyright information on last commits to comply with CDDL.
mm [Thu, 2 Feb 2012 16:33:58 +0000 (16:33 +0000)]
Add copyright information on last commits to comply with CDDL.

Discussed with: pluknet@
MFC after: 3 days

12 years agoFix out of bounds write causing random panics,
mm [Thu, 2 Feb 2012 16:18:40 +0000 (16:18 +0000)]
Fix out of bounds write causing random panics,
uncovered by the change in r230256

Reviewed by: pluknet@
MFC after: 3 days

12 years agoMake CAM ATA honor old hw.ata.ata_dma and hw.ata.atapi_dma tunables.
mav [Thu, 2 Feb 2012 14:17:58 +0000 (14:17 +0000)]
Make CAM ATA honor old hw.ata.ata_dma and hw.ata.atapi_dma tunables.

Even having more specific hint.ata.X.mode controls, global ones are
still could be useful from some points, including compatibility.

PR: kern/164651
MFC after: 1 week

12 years agoUnbreak the i386 full PV (XEN kernel) build by reverting rev 230878 and
ken [Thu, 2 Feb 2012 07:38:40 +0000 (07:38 +0000)]
Unbreak the i386 full PV (XEN kernel) build by reverting rev 230878 and
taking the netback driver out of the build temporarily.

12 years agoCleanup some sound headers that don't need to be in the modules makefiles.
pfg [Thu, 2 Feb 2012 00:10:20 +0000 (00:10 +0000)]
Cleanup some sound headers that don't need to be in the modules makefiles.

Approved by: jhb (mentor)
MFC after: 1 week

12 years agoUse new OSS-based BSD-licensed header for cs sound driver.
pfg [Wed, 1 Feb 2012 21:38:01 +0000 (21:38 +0000)]
Use new OSS-based BSD-licensed header for cs sound driver.

The cs driver requires a table with firmware values. An
alternative firmware is available in a similar Open Sound
System driver. This is actually a partial revert of
Revision 77504.

Special thanks to joel@ for patiently testing several
replacement attempts.

The csa driver and the complete sound system are now free
of the GPL.

Tested by: joel
Approved by: jhb (mentor)
MFC after: 3 weeks

12 years agoAdd the GSO prefix descriptor define.
ken [Wed, 1 Feb 2012 20:19:33 +0000 (20:19 +0000)]
Add the GSO prefix descriptor define.

MFC after: 3 days

12 years agoAdd the netback driver to the build.
ken [Wed, 1 Feb 2012 20:18:57 +0000 (20:18 +0000)]
Add the netback driver to the build.

MFC after: 3 days

12 years agoFix NULL dereference panic on attempt to turn off (on system shutdown)
mav [Wed, 1 Feb 2012 20:12:44 +0000 (20:12 +0000)]
Fix NULL dereference panic on attempt to turn off (on system shutdown)
disconnected swap device.

This is quick and imperfect solution, as swap device will still be opened
and GEOM will not be able to destroy it. Proper solution would be to
automatically turn off and close disconnected swap device, but with existing
code it will cause panic if there is at least one page on device, even if
it is unimportant page of the user-level process. It needs some work.

Reviewed by: kib@
MFC after: 1 week

12 years agoAdd myself to the relevant docs.
davide [Wed, 1 Feb 2012 19:46:12 +0000 (19:46 +0000)]
Add myself to the relevant docs.

Approved by: alc, gnn (mentors)

12 years agoTry to avoid ambiguity when sysctl returns ENOMEM additionally
trociny [Wed, 1 Feb 2012 18:03:21 +0000 (18:03 +0000)]
Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check sockstat gets stuck in loop leaking the
memory if the returned ENOMEM was due the exceeded memorylocked
limit. This is easily can be observed running `limits -l 1k sockstat'.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoTry to avoid ambiguity when sysctl returns ENOMEM additionally
trociny [Wed, 1 Feb 2012 18:02:13 +0000 (18:02 +0000)]
Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check kvm_getprocs() gets stuck in loop if the
returned ENOMEM was due the exceeded memorylocked limit. This is
easily can be observed running `limits -l 1k top'.

Submitted by: Andrey Zonov <andrey zonov org>
MFC after: 1 week

12 years agoChange the notes about the pidfile to include Doug's preference
ghelmer [Wed, 1 Feb 2012 16:40:59 +0000 (16:40 +0000)]
Change the notes about the pidfile to include Doug's preference
for pre-creating the pidfile with appropriate owner and permissions.

Requested by dougb

12 years agoAdd kqueue support to /dev/klog.
kib [Wed, 1 Feb 2012 14:34:52 +0000 (14:34 +0000)]
Add kqueue support to /dev/klog.

Submitted by: Mateusz Guzik <mjguzik gmail com>
PR:   kern/156423
MFC after: 1 weeks

12 years agoAdjust mvs(4) to handle interrupt cause reg depending on the actual number of
raj [Wed, 1 Feb 2012 13:39:52 +0000 (13:39 +0000)]
Adjust mvs(4) to handle interrupt cause reg depending on the actual number of
channels available

- current code treats bits 4:7 in 'SATAHC interrupt mask' and 'SATAHC
  interrupt cause' as flags for SATA channels 2 and 3

- for embedded SATA controllers (SoC) these bits have been marked as reserved
  in datasheets so far, but for some new and upcoming chips they are used for
  purposes other than SATA

Submitted by: Lukasz Plachno
Reviewed by: mav
Obtained from: Semihalf
MFC after: 2 weeks

12 years agoMake the sys/ucontext.h self-contained by changing the return type
kib [Wed, 1 Feb 2012 13:33:53 +0000 (13:33 +0000)]
Make the sys/ucontext.h self-contained by changing the return type
of __getcontextx_size(3) from size_t to int.

PR: ports/164654
MFC after: 1 month

12 years agoo Provide functions carp_ifa_addroute()/carp_ifa_delroute()
glebius [Wed, 1 Feb 2012 11:07:41 +0000 (11:07 +0000)]
o Provide functions carp_ifa_addroute()/carp_ifa_delroute()
  to cleanup routes from a single ifa.
o Implement carp_addroute()/carp_delroute() via above functions.
o Call carp_ifa_delroute() in the carp_detach() to avoid
  junk routes left in routing table, in case if user
  removes an address in a MASTER state. [1]

Reported by: az [1]

12 years ago- remove non-existent input directories from the configs
netchild [Wed, 1 Feb 2012 10:59:19 +0000 (10:59 +0000)]
- remove non-existent input directories from the configs
- add the target-arch to the project name where applicable (arch dependend code)
- fix comment for __FreeBSD__ [1]

Noticed by: bz [1]

12 years agoThe scheme code may not know about some inconsistency in the metadata.
ae [Wed, 1 Feb 2012 09:28:16 +0000 (09:28 +0000)]
The scheme code may not know about some inconsistency in the metadata.
So, add an integrity check after recovery attempt.

MFC after: 1 week

12 years agoEnable the pccard/cardbus modules for powerpc.
jhibbits [Wed, 1 Feb 2012 03:42:14 +0000 (03:42 +0000)]
Enable the pccard/cardbus modules for powerpc.

Approved by: nwhitehorn (mentor)

12 years agoIf multiple threads call kevent() to get AIO events on same kqueue fd,
davidxu [Wed, 1 Feb 2012 02:53:06 +0000 (02:53 +0000)]
If multiple threads call kevent() to get AIO events on same kqueue fd,
it is possible that a single AIO event will be reported to multiple
threads, it is not threading friendly, and the existing API can not
control this behavior.
Allocate a kevent flags field sigev_notify_kevent_flags for AIO event
notification in sigevent, and allow user to pass EV_CLEAR, EV_DISPATCH
or EV_ONESHOT to AIO kernel code, user can control whether the event
should be cleared once it is retrieved by a thread. This change should
be comptaible with existing application, because the field should have
already been zero-filled, and no additional action will be taken by
kernel.

PR: kern/156567

12 years agoSupport AR9281/AR5B91 - a 1x2 stream device based on the AR9280.
adrian [Tue, 31 Jan 2012 22:31:16 +0000 (22:31 +0000)]
Support AR9281/AR5B91 - a 1x2 stream device based on the AR9280.

* Override the TX/RX stream count if the EEPROM reports a single RX or
  TX stream, rather than assuming the device will always be a 2x2 strea
  device.

* For AR9280 devices, don't hard-code 2x2 stream.  Instead, allow the
  ar5416FillCapabilityInfo() routine to correctly determine things.

The latter should be done for all 11n chips now that
ar5416FillCapabilityInfo() will set the TX/RX stream count based on the
active TX/RX chainmask in the EEPROM.

Thanks to Maciej Milewski for donating some AR9281 NICs to me for
testing.

12 years agoCorrectly fetch the TX/RX stream count from the HAL.
adrian [Tue, 31 Jan 2012 22:27:35 +0000 (22:27 +0000)]
Correctly fetch the TX/RX stream count from the HAL.

Pointy hat to: me

12 years agoMake sound(4) more flexible in setting soft buffer and block sizes when
mav [Tue, 31 Jan 2012 21:46:28 +0000 (21:46 +0000)]
Make sound(4) more flexible in setting soft buffer and block sizes when
hardware imposes strict limitations on hard buffer and block sizes.

Previous code set soft buffer to be no smaller then hard buffer. On some
cards with fixed 64K physical buffer that caused up to 800ms play latency.
New code allows to set soft buffer size down to just two blocks of the hard
buffer and to not write more then that size ahead to the hardware buffer.
As result of that change I was able to reduce full practically measured
record-playback loop delay in those conditions down to only about 115ms
with theoretical playback latency of only about 50ms.

New code works fine for both vchans and direct cases. In both cases sound(4)
tries to follow hw.snd.latency_profile and hw.snd.latency values and
application-requested buffer and block sizes as much as limitation of two
hardware blocks allows.

Reviewed by: silence on multimedia@

12 years agoAdd isci(4) driver for amd64 and i386 targets.
jimharris [Tue, 31 Jan 2012 19:38:18 +0000 (19:38 +0000)]
Add isci(4) driver for amd64 and i386 targets.

The isci driver is for the integrated SAS controller in the Intel C600
(Patsburg) chipset.  Source files in sys/dev/isci directory are
FreeBSD-specific, and sys/dev/isci/scil subdirectory contains
an OS-agnostic library (SCIL) published by Intel to control the SAS
controller.  This library is used primarily as-is in this driver, with
some post-processing to better integrate into the kernel build
environment.

isci.4 and a README in the sys/dev/isci directory contain a few
additional details.

This driver is only built for amd64 and i386 targets.

Sponsored by: Intel
Reviewed by: scottl
Approved by: scottl

12 years ago- Restore XCR0 before restoring extended FPU states.
jkim [Tue, 31 Jan 2012 17:51:30 +0000 (17:51 +0000)]
- Restore XCR0 before restoring extended FPU states.
- Update my copyright dates.

Reviewed by: kib

12 years agoFix a spelling mistake in the surprise link down error constant.
jhb [Tue, 31 Jan 2012 15:48:40 +0000 (15:48 +0000)]
Fix a spelling mistake in the surprise link down error constant.

Submitted by: glebius

12 years agoAdd -e to set arbitrary kernel environment variables.
emaste [Tue, 31 Jan 2012 15:32:05 +0000 (15:32 +0000)]
Add -e to set arbitrary kernel environment variables.

Nextboot(8) can now set any combination of kernel name (-k), kernel
options (-o), and environment strings (-e).  As a result of this change
-k also becomes optional.

Reviewed by: freebsd-current (Ian Lepore, pluknet@, jhb@)

12 years agoIsolate v_caddr_t in the ie driver.
pluknet [Tue, 31 Jan 2012 13:00:40 +0000 (13:00 +0000)]
Isolate v_caddr_t in the ie driver.

Submitted by: Bruce Evans on net@

12 years agoJust in case, clear stream interrupts before enabling them.
mav [Tue, 31 Jan 2012 12:57:21 +0000 (12:57 +0000)]
Just in case, clear stream interrupts before enabling them.

12 years agoFix a whitespace nit
kevlo [Tue, 31 Jan 2012 05:49:49 +0000 (05:49 +0000)]
Fix a whitespace nit

Reviewed by: bz

12 years agoWhen a "mount -u" switches an NFS mount point from TCP to UDP,
rmacklem [Tue, 31 Jan 2012 03:58:26 +0000 (03:58 +0000)]
When a "mount -u" switches an NFS mount point from TCP to UDP,
any thread doing an I/O RPC with a transfer size greater than
NFS_UDPMAXDATA will be hung indefinitely, retrying the RPC.
After a discussion on freebsd-fs@, I decided to add a warning
message for this case, as suggested by Jeremy Chadwick.

Suggested by: freebsd at jdc.parodius.com (Jeremy Chadwick)
MFC after: 2 weeks

12 years agojwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011
rmacklem [Tue, 31 Jan 2012 02:11:05 +0000 (02:11 +0000)]
jwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011
under the subject "F_RDLCK lock to FreeBSD NFS fails to R/O target file".
This occurred because the server side NLM always checked for VWRITE
access, irrespective of the type of lock request. This patch
replaces VOP_ACCESS(..VWRITE..) with one appropriate to
the lock operation. It allows unlock and lock cancellation
to be done without a check of VOP_ACCESS(), so that files
can't be left locked indefinitely after the file permissions
have been changed.

Discussed with: zack
Submitted by: jwd (earlier version)
Reviewed by: dfr
MFC after: 2 weeks

12 years agoAllow contents of multiple directories to be merged to the current image.
jkim [Tue, 31 Jan 2012 00:32:37 +0000 (00:32 +0000)]
Allow contents of multiple directories to be merged to the current image.
Note this patch was submitted to NetBSD and they already adopted it.

http://mail-index.netbsd.org/source-changes/2012/01/28/msg031078.html

MFC after: 1 week

12 years agoRebase user/jimharris/isci branch from head.
jimharris [Tue, 31 Jan 2012 00:12:51 +0000 (00:12 +0000)]
Rebase user/jimharris/isci branch from head.

12 years agoAdd a DFS debugging mode which is useful when doing automated DFS
adrian [Tue, 31 Jan 2012 00:03:49 +0000 (00:03 +0000)]
Add a DFS debugging mode which is useful when doing automated DFS
compliance testing.

In order to allow for radar pattern matching to occur, the DFS CAC/NOL
handling needs to be made configurable.  This commit introduces a new
sysctl, "net.wlan.dfs_debug", which controls which DFS debug mode
net80211 is in.

* 0 = default, CSA/NOL handling as per normal.
* 1 = announce a CSA, but don't add the channel to the non-occupy list
  (NOL.)
* 2 = disable both CSA and NOL - only print that a radar event occured.

This code is not compiled/enabled by default as it breaks regulatory
handling.  A user must enable IEEE80211_DFS_DEBUG in their kernel
configuration file for this option to become available.

Obtained from: Atheros

12 years agoFix ATAPI code path to ensure bus_dma_segment structures are only used
jimharris [Mon, 30 Jan 2012 23:37:17 +0000 (23:37 +0000)]
Fix ATAPI code path to ensure bus_dma_segment structures are only used
within bus_dmamap_load context.

Sponsored by: Intel
Reported by: Sohaib Ahsan <sohaib dot ahsan intel com>

12 years agoRadar API related fixes.
adrian [Mon, 30 Jan 2012 23:07:27 +0000 (23:07 +0000)]
Radar API related fixes.

* For legacy NICs, the combined RSSI should be used.
  For earlier AR5416 NICs, use control chain 0 RSSI rather than combined
  RSSI.
  For AR5416 > version 2.1, use the combined RSSI again.

* Add in a missing AR5212 HAL method (get11nextbusy) which may be called
  by radar code.

This serves no functional change for what's currently in FreeBSD.

12 years agoWrap the bool typedef
jfv [Mon, 30 Jan 2012 23:03:21 +0000 (23:03 +0000)]
Wrap the bool typedef

12 years agoImprove media status reporting, when the driver knows...
imp [Mon, 30 Jan 2012 22:47:02 +0000 (22:47 +0000)]
Improve media status reporting, when the driver knows...

12 years agoManpages for the buf_ring and drbr interfaces.
brueffer [Mon, 30 Jan 2012 21:02:25 +0000 (21:02 +0000)]
Manpages for the buf_ring and drbr interfaces.

Submitted by: kmacy (aeons ago)
MFC after: 1 week

12 years agoAllow specification of build shell for the buildenv target.
imp [Mon, 30 Jan 2012 20:19:28 +0000 (20:19 +0000)]
Allow specification of build shell for the buildenv target.

Submitted by: ian lepore

12 years agoA debugger which requested PT_FOLLOW_FORK should get the notification
kib [Mon, 30 Jan 2012 20:00:29 +0000 (20:00 +0000)]
A debugger which requested PT_FOLLOW_FORK should get the notification
about new child not only when doing PT_TO_SCX, but also for PT_CONTINUE.
If TDB_FORK flag is set, always issue a stop, the same as is done for
TDB_EXEC.

Reported by: Dmitry Mikulin <dmitrym juniper net>
MFC after: 1 week

12 years agoAdd support for GNU RELRO.
kib [Mon, 30 Jan 2012 19:52:17 +0000 (19:52 +0000)]
Add support for GNU RELRO.

Submitted by: John Marino <draco marino st>
MFC after: 2 weeks

12 years agoAdd definition for PT_GNU_RELRO.
kib [Mon, 30 Jan 2012 19:50:13 +0000 (19:50 +0000)]
Add definition for PT_GNU_RELRO.

MFC after: 3 days

12 years agoRefine the implementation of POSIX_FADV_NOREUSE for the read(2) case such
jhb [Mon, 30 Jan 2012 19:35:15 +0000 (19:35 +0000)]
Refine the implementation of POSIX_FADV_NOREUSE for the read(2) case such
that instead of using direct I/O it allows read-ahead similar to
POSIX_FADV_NORMAL, but invokes VOP_ADVISE(POSIX_FADV_DONTNEED) after the
read(2) has completed to purge just-read data.  The write(2) path continues
to use direct I/O for POSIX_FADV_NOREUSE for now.  Note that NOREUSE works
optimally if an application reads and writes full fs blocks.

12 years agoFix build for the case of powerpc64 kernel without COMPAT_FREEBSD32.
kib [Mon, 30 Jan 2012 19:31:17 +0000 (19:31 +0000)]
Fix build for the case of powerpc64 kernel without COMPAT_FREEBSD32.

MFC after: 2 months

12 years agoWhen detaching an AIO or LIO requests grab the lock and tell knlist_remove
ambrisko [Mon, 30 Jan 2012 19:19:22 +0000 (19:19 +0000)]
When detaching an AIO or LIO requests grab the lock and tell knlist_remove
that we have the lock now.  This cleans up a locking panic ASSERT when
knlist_empty is called without a lock when INVARIANTS etc. are turned.

Reviewed by: kib jhb
MFC after: 1 week

12 years agoNaturally align a newly added wakeup_fpusave.
jkim [Mon, 30 Jan 2012 18:28:56 +0000 (18:28 +0000)]
Naturally align a newly added wakeup_fpusave.

12 years agoNew hardware support: Intel X540 adapter support added.
jfv [Mon, 30 Jan 2012 16:42:02 +0000 (16:42 +0000)]
New hardware support:  Intel X540 adapter support added.
Some shared code reorganization along with the new adapter.
Sync changes to OACTIVE in igb into this driver.
Misc small fixes.

12 years agoAdd a constant for the PCI-e surprise link down uncorrectable error.
jhb [Mon, 30 Jan 2012 15:09:03 +0000 (15:09 +0000)]
Add a constant for the PCI-e surprise link down uncorrectable error.

12 years agoFix typo in comments.
mav [Mon, 30 Jan 2012 09:59:33 +0000 (09:59 +0000)]
Fix typo in comments.

12 years agoFinally, try to enable the nxstacks on amd64 and powerpc64 for both 64bit
kib [Mon, 30 Jan 2012 07:56:00 +0000 (07:56 +0000)]
Finally, try to enable the nxstacks on amd64 and powerpc64 for both 64bit
and 32bit ABIs. Also try to enable nxstacks for PAE/i386 when supported,
and some variants of powerpc32.

MFC after: 2 months (if ever)

12 years agoMove xrstor/xsave/xsetbv into fpu.c and reorder them.
kib [Mon, 30 Jan 2012 07:53:33 +0000 (07:53 +0000)]
Move xrstor/xsave/xsetbv into fpu.c and reorder them.

Requested by: bde
MFC after: 1 month

12 years agoSynchronize the struct sigcontext definitions on x86 with mcontext_t.
kib [Mon, 30 Jan 2012 07:51:52 +0000 (07:51 +0000)]
Synchronize the struct sigcontext definitions on x86 with mcontext_t.

Pointed out by: bde
MFC after: 1 month

12 years agoUupdate code to vendor rev. 4183 (release/2.8)
mm [Sun, 29 Jan 2012 22:20:28 +0000 (22:20 +0000)]
Uupdate code to vendor rev. 4183 (release/2.8)

Fixes vendor issue 224:
"Mishandling CD9660 images with RockRidge extensions from FreeBSD makefs"

References:
http://code.google.com/p/libarchive/issues/detail?id=224

MFC after: 1 week

12 years agoAlways return 0 if the sysctl failed.
trociny [Sun, 29 Jan 2012 20:39:42 +0000 (20:39 +0000)]
Always return 0 if the sysctl failed.

This fixes the bug: when procstat -xa was run and the sysctl for a
process returned ESRCH or EPERM, for this process procstat output the
result collected for the previous successful process.