]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agosh: Fix crash when parsing '{ } &'.
jilles [Sun, 13 Jan 2013 19:26:33 +0000 (19:26 +0000)]
sh: Fix crash when parsing '{ } &'.

MFC after: 1 week

11 years agosh: Don't lose $? when backquoted command ends with semicolon or newline.
jilles [Sun, 13 Jan 2013 19:19:40 +0000 (19:19 +0000)]
sh: Don't lose $? when backquoted command ends with semicolon or newline.

An empty simple command was added and overwrote the exit status with 0.

This affects `...` but not $(...).

Example:
  v=`false;`; echo $?

11 years agoMerge Perforce changeset 219952 to head:
rwatson [Sun, 13 Jan 2013 16:57:11 +0000 (16:57 +0000)]
Merge Perforce changeset 219952 to head:

  Make different bus attachments for Altera and Terasice
  device drivers share the same devclass_t.

Sponsored by: DARPA, AFRL

11 years agoPartially merge Perforce changeset 219944 to head:
rwatson [Sun, 13 Jan 2013 16:53:31 +0000 (16:53 +0000)]
Partially merge Perforce changeset 219944 to head:

  Consistently use the vendor name "sri-cambridge" for device
  compatibility strings on the BERI platform.

Sponsored by: DARPA, AFRL

11 years agoPartially merge Perforce changeset 219942 to head:
rwatson [Sun, 13 Jan 2013 16:51:57 +0000 (16:51 +0000)]
Partially merge Perforce changeset 219942 to head:

  Implement an FDT attachment for altera_avgen(4).

Portions of the changeset updating DTS and device.hints will be merged
separately.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219941 to head:
rwatson [Sun, 13 Jan 2013 16:44:45 +0000 (16:44 +0000)]
Merge Perforce changeset 219941 to head:

  Copy altera_avgen(4) nexus attachment as a starting point for an
  FDT attachment.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219940 to head:
rwatson [Sun, 13 Jan 2013 16:43:59 +0000 (16:43 +0000)]
Merge Perforce changeset 219940 to head:

  Rework altera_avgen(4) to cleanly(ish) separate nexus bus
  attachment from the driver itself.  This should allow us to
  plug in an fdt attachment more easily.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219939 to head:
rwatson [Sun, 13 Jan 2013 16:41:25 +0000 (16:41 +0000)]
Merge Perforce changeset 219939 to head:

  Start restructuring of altera_avgen(4) so that it can have an FDT
  attachment -- this requires first properly breaking out the current
  nexus attachment from the driver implementation.

Sponsored by: DARPA, AFRL

11 years agoPartially merge Perforce changeset 219938 to head:
rwatson [Sun, 13 Jan 2013 16:27:56 +0000 (16:27 +0000)]
Partially merge Perforce changeset 219938 to head:

  Write FDT attachment for the Terasic MTL (multitouch LCD) driver.
  Exploit the fact that FDT allows multiple memory ranges to be
  assigned to a device, giving us a cleaner description than
  device.hints does.

Portions of this changeset that remove mtl from BERI device.hints and
add to DTS will be merged separately.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219937 to head:
rwatson [Sun, 13 Jan 2013 16:21:51 +0000 (16:21 +0000)]
Merge Perforce changeset 219937 to head:

  Copy Terasic MTL nexus bus attachment as a starting point for an
  FDT attachment for the same driver.

Sponsored by: DARPA, AFRL

11 years agoPartially merge Perforce changeset 219930 to head:
rwatson [Sun, 13 Jan 2013 16:20:40 +0000 (16:20 +0000)]
Partially merge Perforce changeset 219930 to head:

  Add an Intel StrataFlash (isf) driver FDT attachment.

Portions of the original changeset hooking up FDT use for BERI will be
merged separately.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219929 to head:
rwatson [Sun, 13 Jan 2013 15:16:18 +0000 (15:16 +0000)]
Merge Perforce changeset 219929 to head:

  Replicate nexus attachment for isf(4) to become an FDT attachment.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219927 to head:
rwatson [Sun, 13 Jan 2013 15:15:24 +0000 (15:15 +0000)]
Merge Perforce changeset 219927 to head:

  Implement an FDT attachment for the Altera SD Card driver

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219926 to head:
rwatson [Sun, 13 Jan 2013 15:13:25 +0000 (15:13 +0000)]
Merge Perforce changeset 219926 to head:

  Copy Altera SDCard nexus attachment as a starting point for the FDT
  attachment.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219922 to head:
rwatson [Sun, 13 Jan 2013 15:12:35 +0000 (15:12 +0000)]
Merge Perforce changeset 219922 to head:

  Update nexus parts in copied DE4LED attachment to use FDT.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219921 to head:
rwatson [Sun, 13 Jan 2013 15:10:27 +0000 (15:10 +0000)]
Merge Perforce changeset 219921 to head:

  Copy DE4 LED nexus bus attachment as a starting point for an FDT
  attachment.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219918 to head:
rwatson [Sun, 13 Jan 2013 15:08:17 +0000 (15:08 +0000)]
Merge Perforce changeset 219918 to head:

  Naive first cut at an FDT bus attachment for the Altera JTAG UART.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce changeset 219917 to head:
rwatson [Sun, 13 Jan 2013 14:38:09 +0000 (14:38 +0000)]
Merge Perforce changeset 219917 to head:

  Copy Altera JTAG UART nexus bus attachment as a starting point
  for an FDT bus attachment.

Sponsored by: DARPA, AFRL

11 years agoImprove support for disabled disks. If disabled disk disconnected and then
mav [Sun, 13 Jan 2013 14:30:37 +0000 (14:30 +0000)]
Improve support for disabled disks. If disabled disk disconnected and then
reconnected back, leave it as disconnected. If new disk inserted instead of
disabled, rebuild it and leave as enabled.

11 years agoAdd VirtIO to the i386 and amd64 GENERIC kernels
bryanv [Sun, 13 Jan 2013 07:14:16 +0000 (07:14 +0000)]
Add VirtIO to the i386 and amd64 GENERIC kernels

This also removes the kludge from r239009 that covered only
the network driver.

Reviewed by: grehan
Approved by: grehan (mentor)
MFC after: 1 week

11 years agoUse the right format string for line buffer.
delphij [Sun, 13 Jan 2013 04:28:44 +0000 (04:28 +0000)]
Use the right format string for line buffer.

PR: bin/174910
Submitted by: Fabian Keil <fk fabiankeil.de>

11 years agoAdd now missing color.4th.
marcel [Sat, 12 Jan 2013 23:44:13 +0000 (23:44 +0000)]
Add now missing color.4th.

11 years agoSet WITHOUT_SVN=yes for textproc/docproj.
hrs [Sat, 12 Jan 2013 22:41:29 +0000 (22:41 +0000)]
Set WITHOUT_SVN=yes for textproc/docproj.

Submitted by: gjb

11 years agoprocstat: only one mode flag can be specified, but required check for 'i'
mjg [Sat, 12 Jan 2013 22:20:37 +0000 (22:20 +0000)]
procstat: only one mode flag can be specified, but required check for 'i'
and 'j' modes was missing. Fix that.

MFC after: 3 days

11 years agoWindows handles INIT and VERIFY as array-wide and it doesn't specify which
mav [Sat, 12 Jan 2013 21:51:49 +0000 (21:51 +0000)]
Windows handles INIT and VERIFY as array-wide and it doesn't specify which
disks should be rebuilt. Our rebuild code is same time disk-centric.  To
handle this situation  properly check all disks for RBLD flags, and if no
disk specified try rebuild/resync all of them except newly inserted.

11 years agoQuiesce a couple of clang warnings
sbruno [Sat, 12 Jan 2013 18:30:52 +0000 (18:30 +0000)]
Quiesce a couple of clang warnings

Submitted by: hiren panchasara <hiren.panchasara@gmail.com>
Obtained from: Yahoo! Inc

11 years agoImplement migration from single disk to RAID1/IRRT for Intel metadata.
mav [Sat, 12 Jan 2013 18:25:48 +0000 (18:25 +0000)]
Implement migration from single disk to RAID1/IRRT for Intel metadata.
Windows driver uses such migration when it creates new arrays.  While GEOM
RAID has no mechanism to implement migration in general case, this specifc
case still can be handled easily via degraded RAID1 creation followed by
regular rebuild.

11 years agoDefine VM_KMEM_SIZE_MAX as a fraction of the kernel address space size
alc [Sat, 12 Jan 2013 18:06:21 +0000 (18:06 +0000)]
Define VM_KMEM_SIZE_MAX as a fraction of the kernel address space size
rather than a constant so that VM_KMEM_SIZE_MAX will scale automatically
with the kernel address space size.  This is particularly important for
MIPS because the same definition is used by both 32- and 64-bit kernels.

Tested by: jchandra

11 years agoThe new sade(8) is installed and works on all architectures, courtesy of
nwhitehorn [Sat, 12 Jan 2013 16:23:16 +0000 (16:23 +0000)]
The new sade(8) is installed and works on all architectures, courtesy of
gpart having better portability than libdisk. Don't mark sade(8) as obsolete
on non-x86 systems.

11 years agoMerge Perforce changeset 219933 and portions of 219962 (omits changes to
rwatson [Sat, 12 Jan 2013 16:09:33 +0000 (16:09 +0000)]
Merge Perforce changeset 219933 and portions of 219962 (omits changes to
unmerged BERI DTS files) to head:

  Use the OFW compatible string "mips,mips4k" rather than
  "mips4k,cp0" for interrupt control using MIPS4k CP0.

  Suggested by:   thompsa

  Implement a MIPS FDT PIC decode routine to use when no PIC has been
  configured, which assumes a cascade back to the nexus bus (e.g.,
  the on-board CP0 interrupt management parts on the MIPS).  If the
  soc bus in a MIPS DTS file is declared as "mips4k,cp0"-compatible,
  then this will be enabled.  This is sufficient to allow IRQs to be
  configured on BERI.

Sponsored by: DARPA, AFRL

11 years agoFixed mbuf free when receive structures fail to allocate.
smh [Sat, 12 Jan 2013 16:05:55 +0000 (16:05 +0000)]
Fixed mbuf free when receive structures fail to allocate.

This prevents quad igb card on high core machines, without any nmbcluster or
igb queue tuning wedging the boot process if all nics are configured.

Reviewed by: jfv
Approved by: pjd (mentor)
MFC after: 1 week

11 years agoNote that cpufreq(4) is not available on all hardware.
nwhitehorn [Sat, 12 Jan 2013 16:01:58 +0000 (16:01 +0000)]
Note that cpufreq(4) is not available on all hardware.

PR: bin/175139
MFC after: 2 weeks

11 years agoMerge Perforce changeset 219925 to head:
rwatson [Sat, 12 Jan 2013 15:58:20 +0000 (15:58 +0000)]
Merge Perforce changeset 219925 to head:

  Provided a bus_space implementation for FDT, modelled on
  bus_space_generic, but with a local version of the map address
  routine that does a P->V translation, as is the case with NLM's
  similar routine for XLP.  It's not clear to me that this is the
  right solution -- possibly this belongs in simplebus -- however,
  it is sufficient to get the DE4 LED driver working.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce chance 219924 to head:
rwatson [Sat, 12 Jan 2013 15:53:45 +0000 (15:53 +0000)]
Merge Perforce chance 219924 to head:

  In a sign of weakness, replicate the MIPS bus_space_generic.c to
  produce a new FDT version, which will perform necessary address
  space translation for bus_space -- the solution used in NLM's MIPS
  FDT support, but possibly not quite the right thing.  This is
  inconsistent with regular I/O via the nexus and the generic
  bus_space, which instead perform translation via pmap_mapdev()
  when a resource is activated.  However, it will work while I
  attempt to identify what the right way to reconcile possible
  approaches.

  (Another approach might be to make simplebus use Nexus's activate
  routine instead of a generic one?)

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce change @219948 to head:
rwatson [Sat, 12 Jan 2013 13:20:21 +0000 (13:20 +0000)]
Merge Perforce change @219948 to head:

  Add code so that the BERI boot process can ask the kernel linker for
  DTB blobs that may have been left for it by the boot loader, as done
  on PowerPC and ARM.  This will require both a more mature boot
  loader, and more mature boot loader argument passing mechanism,
  than currently supported on BERI.

Sponsored by: DARPA, AFRL

11 years agoMerge Perforce change @219935 to head:
rwatson [Sat, 12 Jan 2013 12:34:59 +0000 (12:34 +0000)]
Merge Perforce change @219935 to head:

  Initialise Openfirmware/FDT code earlier in the FreeBSD/beri boot,
  so that the results will be available for configuring the console
  UART (eventually).

  Suggested by:   thompsa

Sponsored by: DARPA, AFRL

11 years agoFreeze device queue before returning errors to CAM. This is required
mav [Sat, 12 Jan 2013 11:36:23 +0000 (11:36 +0000)]
Freeze device queue before returning errors to CAM.  This is required
for proper error recovery, including keeping original request order.

Reviewed by: hselasky

11 years agoFix libcxxrt / libc++ build with the clang in head.
theraven [Sat, 12 Jan 2013 10:06:59 +0000 (10:06 +0000)]
Fix libcxxrt / libc++ build with the clang in head.

Pointy hat to: theraven

11 years agoAdd basic support for Intel Rapid Recover Technology (Intel RRT).
mav [Sat, 12 Jan 2013 09:35:44 +0000 (09:35 +0000)]
Add basic support for Intel Rapid Recover Technology (Intel RRT).
It is alike to RAID1, but with dedicating master and recovery disks and
providing manual control over synchronization.  It allows to use recovery
disk as snapshot of the master disk from the time of the last sync.

This implementation is not functionaly complete comparing to Windows,
but it is better then silent conversion to RAID1 on first boot.

11 years agoAdd FILES section.
joel [Sat, 12 Jan 2013 09:08:37 +0000 (09:08 +0000)]
Add FILES section.

Submitted by: jmc@OpenBSD

11 years agoeditrc only read from $HOME.
joel [Sat, 12 Jan 2013 09:07:19 +0000 (09:07 +0000)]
editrc only read from $HOME.

Submitted by: LEVAI Daniel (via jmc@OpenBSD)

11 years agoRemove EOL whitespace.
joel [Sat, 12 Jan 2013 08:44:54 +0000 (08:44 +0000)]
Remove EOL whitespace.

11 years agoRevert r245316. Systems with non-standard uids/gids are more prevalent
brooks [Fri, 11 Jan 2013 23:44:35 +0000 (23:44 +0000)]
Revert r245316.  Systems with non-standard uids/gids are more prevalent
that I'd feared.  Discussion is ongoing about the scope of a safer
solution.

11 years agoMFi386: Make similar changes that were made to atkbdc in r245315.
imp [Fri, 11 Jan 2013 23:42:24 +0000 (23:42 +0000)]
MFi386: Make similar changes that were made to atkbdc in r245315.

11 years agoUse the -N option to install and nmtree to eliminate the need for the
brooks [Fri, 11 Jan 2013 23:08:19 +0000 (23:08 +0000)]
Use the -N option to install and nmtree to eliminate the need for the
checks for missing users and groups.

Sponsored by: DARPA, AFRL

11 years agoPass the device_t into atkbd_{probe,attach}_unit and get the
imp [Fri, 11 Jan 2013 21:42:23 +0000 (21:42 +0000)]
Pass the device_t into atkbd_{probe,attach}_unit and get the
controller unit and keyboard unit from there. It will be needed
for other things in the future as well...

11 years agostyle(9) changes before I do more real changes.
imp [Fri, 11 Jan 2013 21:19:45 +0000 (21:19 +0000)]
style(9) changes before I do more real changes.

11 years agoBump __FreeBSD_version for install -N and (belatedly) nmtree.
brooks [Fri, 11 Jan 2013 21:11:01 +0000 (21:11 +0000)]
Bump __FreeBSD_version for install -N and (belatedly) nmtree.

11 years agoImplement the -N <dbdir> option which allows an alternate passwd and
brooks [Fri, 11 Jan 2013 20:53:28 +0000 (20:53 +0000)]
Implement the -N <dbdir> option which allows an alternate passwd and
group file to be used.  This is useful for installing on systems where
a user or group does not currently exist.

Sponsored by: DARPA, AFRL
Obtained from: NetBSD
MFC after: 5 days

11 years agoAdd pwcache(3) and vis(3) to libegacy as install(1) is about to grow a
brooks [Fri, 11 Jan 2013 20:51:02 +0000 (20:51 +0000)]
Add pwcache(3) and vis(3) to libegacy as install(1) is about to grow a
dependency on them.

Sponsored by: DARPA, AFRL

11 years ago- Add missig xpt_schedule() call for cases when requested immediate CCB
mav [Fri, 11 Jan 2013 19:11:56 +0000 (19:11 +0000)]
- Add missig xpt_schedule() call for cases when requested immediate CCB
priority is lower then payload/TUR one.

- Reduce TUR priority and avoid sending them if there are any other
outstanding commands, alike to DA driver.

11 years agoUse find -exec to install zoneinfo instead of requiring xargs to be an
brooks [Fri, 11 Jan 2013 18:37:51 +0000 (18:37 +0000)]
Use find -exec to install zoneinfo instead of requiring xargs to be an
install tool.

Suggested by: delphij

11 years agoAdd contrib/libc-vis to the include path so we reliably pick up the right
brooks [Fri, 11 Jan 2013 17:51:03 +0000 (17:51 +0000)]
Add contrib/libc-vis to the include path so we reliably pick up the right
version of vis.h.

Reported by: dim

11 years agoAdd support for Lua 5.2.
obrien [Fri, 11 Jan 2013 17:34:30 +0000 (17:34 +0000)]
Add support for Lua 5.2.

Submitted by: skreuzer

11 years agoDo not schedule periph for payload/TUR requests if reprobe is in progress
mav [Fri, 11 Jan 2013 16:10:11 +0000 (16:10 +0000)]
Do not schedule periph for payload/TUR requests if reprobe is in progress
to avoid sending extra READ CAPACITY requests by dastart().  Schedule periph
again on reprobe completion, or otherwise it may stuck indefinitely long.

This should fix USB explore thread hanging on device unplug, waiting for
periph destruction.

Reported by: hselasky

11 years agoIn r244401 I accidently moved strunvis and strunvisx from version 1.0 to
brooks [Fri, 11 Jan 2013 15:50:01 +0000 (15:50 +0000)]
In r244401 I accidently moved strunvis and strunvisx from version 1.0 to
1.3 breaking the libc ABI. Revert that change (breaking the ABI again
for users who updated after December 18th).

11 years agoMerge new version of libcxxrt. This brings in three fixes:
theraven [Fri, 11 Jan 2013 15:05:55 +0000 (15:05 +0000)]
Merge new version of libcxxrt.  This brings in three fixes:

- Don't treat pointers to members as pointers in catch blocks (they're usually
  fat pointers).

- Correctly catch foreign exceptions in catchalls.

- Ensure that a happens-before relationship is established when setting
  terminate handlers in one thread and calling them in another.

11 years agoImport b9db3a010143160624f123763025ab544b69bd9a of libcxxrt. This brings in
theraven [Fri, 11 Jan 2013 15:00:43 +0000 (15:00 +0000)]
Import b9db3a010143160624f123763025ab544b69bd9a of libcxxrt.  This brings in
three fixes:

- Don't treat pointers to members as pointers in catch blocks (they're usually
  fat pointers).

- Correctly catch foreign exceptions in catchalls.

- Ensure that a happens-before relationship is established when setting
  terminate handlers in one thread and calling them in another.

11 years agoAdd ID for Nuvoton WPCM450RA0BX found on Supermicro X9SCA-F motherboards.
delphij [Fri, 11 Jan 2013 10:22:09 +0000 (10:22 +0000)]
Add ID for Nuvoton WPCM450RA0BX found on Supermicro X9SCA-F motherboards.

While I'm there, also make this driver to attach to devices that have
an unknown device ID.

MFC after: 1 month

11 years ago- Improve readability of sys_obreak().
zont [Fri, 11 Jan 2013 09:58:35 +0000 (09:58 +0000)]
- Improve readability of sys_obreak().

Suggested by: alc
Reviewed by: alc
Approved by: kib (mentor)
MFC after: 1 week

11 years agoAdd flags argument to vfs_write_resume() and remove
kib [Fri, 11 Jan 2013 06:08:32 +0000 (06:08 +0000)]
Add flags argument to vfs_write_resume() and remove
vfs_write_resume_flags().

Sponsored by: The FreeBSD Foundation

11 years agoPlace-holders for enable/active parameter flags.
adrian [Fri, 11 Jan 2013 02:25:39 +0000 (02:25 +0000)]
Place-holders for enable/active parameter flags.

11 years agoOverhaul the stid allocator so that it can be used for IPv6 servers
np [Fri, 11 Jan 2013 00:07:01 +0000 (00:07 +0000)]
Overhaul the stid allocator so that it can be used for IPv6 servers
too.  The entry for an IPv6 server in the TCAM takes up the equivalent
of two ordinary stids and must be properly aligned too.

MFC after: 1 week

11 years agoUse better arm memory barrier
imp [Fri, 11 Jan 2013 00:03:19 +0000 (00:03 +0000)]
Use better arm memory barrier

11 years agocxgbe(4): Add functions to help synchronize "slow" operations (those not
np [Thu, 10 Jan 2013 23:56:50 +0000 (23:56 +0000)]
cxgbe(4): Add functions to help synchronize "slow" operations (those not
on the fast data path) and use them instead of frobbing the adapter lock
and busy flag directly.

Other changes made while reworking all slow operations:
- Wait for the reply to a filter request (add/delete).  This guarantees
  that the operation is complete by the time the ioctl returns.
- Tidy up the tid_info structure.
- Do not allow the tx queue size to be set to something that's not a
  power of 2.

MFC after: 1 week

11 years agoAdd an ugly hack to libgcc's unwind code, to make it behave properly at
dim [Thu, 10 Jan 2013 23:36:02 +0000 (23:36 +0000)]
Add an ugly hack to libgcc's unwind code, to make it behave properly at
runtime on amd64, when it is compiled by clang.  Some versions of clang
don't save and restore all callee registers, if a __builtin_eh_return()
intrinsic is used in a function.  This is particularly bad on amd64.

Until the problem gets fixed by upstream, use an asm statement to force
clang to assume the registers in question are clobbered, when invoking
__builtin_eh_return(), so it will emit code to save and restore them.

This should fix the crashes reported on -current with some C++ programs,
particularly those that throw exceptions over multiple function
boundaries.

Reported by: stefanf
MFC after: 3 days

11 years agoAdd xargs to the set of install tools when zoneinfo is not disabled.
brooks [Thu, 10 Jan 2013 23:29:36 +0000 (23:29 +0000)]
Add xargs to the set of install tools when zoneinfo is not disabled.
This fixes installworld which I had broken in r245265.

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>

11 years agoRemove all support for legacy NOFOO and NO_FOO build options.
des [Thu, 10 Jan 2013 22:44:19 +0000 (22:44 +0000)]
Remove all support for legacy NOFOO and NO_FOO build options.

11 years agoThe Giant lock is no longer used in the vm_map(9) part of the VM.
pluknet [Thu, 10 Jan 2013 22:36:30 +0000 (22:36 +0000)]
The Giant lock is no longer used in the vm_map(9) part of the VM.
While here, document that the process lock is acquired in vm_map_stack, too.

MFC after: 1 week

11 years agoRemove not very useful printf, that can be too chatty.
mav [Thu, 10 Jan 2013 21:38:31 +0000 (21:38 +0000)]
Remove not very useful printf, that can be too chatty.

ASUS P8Z77-V board reports _AC2, _AC3 and _AC4 setpoints as 0C.  With active
cooling already automatically set to _AC2, that still caused driver to print
two useless lines about temperature above _AC3 and _AC4 every ten seconds.
Three setponts of 0C is probably a board bug, but the same spam could happen
also in correct case if system is runnign not with the lowest cooling level.

11 years agoRather than using zic to both compile and install zoneinfo files,
brooks [Thu, 10 Jan 2013 19:46:08 +0000 (19:46 +0000)]
Rather than using zic to both compile and install zoneinfo files,
generate the files during the build and install them with install(1).
This was the one place in installworld where files (vs links) were
installed by a tool other than install.

Reviewed by: edwin, jilles

11 years agoThe current ZFS code expects ddt_zap_count to always succeed by asserting
delphij [Thu, 10 Jan 2013 19:26:56 +0000 (19:26 +0000)]
The current ZFS code expects ddt_zap_count to always succeed by asserting
the underlying zap_count() to return no errors.  However, it is possible
that the pool reaches to such a state where zap_count would return error,
leading to panics when a pool is imported.

This commit changes the ddt_zap_count to return error returned from
zap_count and handle the error appropriately.  With this change, it's now
possible to let zpool rollback damaged transaction groups and import the
pool.

Obtained from: ZFS on Linux github (e8fd45a0f975c6b8ae8cd644714fc21f14fac2bf)
MFC after: 1 month

11 years agoClang complains about the comparision of fak < 0 always being
imp [Thu, 10 Jan 2013 18:51:35 +0000 (18:51 +0000)]
Clang complains about the comparision of fak < 0 always being
false. It is right. Delete it because on the next line we catch all
'negative' cases with the test > 2, since 'negative' numbers are just
really big unsigned numbers and we do an identical action.

11 years agoWhen nullfs mount is forcibly unmounted and nullfs vnode is reclaimed,
kib [Thu, 10 Jan 2013 18:24:48 +0000 (18:24 +0000)]
When nullfs mount is forcibly unmounted and nullfs vnode is reclaimed,
get back the leased write reference from the lower vnode.  There is no
other path which can correct v_writecount on the lowervp.

Reported by: flo
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

11 years agoRe-enable ip6addrctl support but only for IPv6 address.
ume [Thu, 10 Jan 2013 14:08:19 +0000 (14:08 +0000)]
Re-enable ip6addrctl support but only for IPv6 address.

Requested by: Ben Morrow <ben__at__morrow.me.uk>
MFC after: 1 week

11 years ago- Reduce kernel size by removing unnecessary pointer indirections.
zont [Thu, 10 Jan 2013 12:43:58 +0000 (12:43 +0000)]
- Reduce kernel size by removing unnecessary pointer indirections.

GENERIC kernel size reduced in 16 bytes and RACCT kernel in 336 bytes.

Suggested by: alc
Reviewed by: alc
Approved by: kib (mentor)
MFC after: 1 week

11 years agoChanged scsi_da device requests to use the sysctl tunable value for retry_count
smh [Thu, 10 Jan 2013 12:25:00 +0000 (12:25 +0000)]
Changed scsi_da device requests to use the sysctl tunable value for retry_count
and da_default_timeout where their current hardcoded values matched the current
default value for said tunables.

PR: kern/169976
Reviewed by: pjd (mentor)
Approved by: mav

11 years agoUpdates delete_method sysctl changes to always maintain disk d_flags
smh [Thu, 10 Jan 2013 11:57:46 +0000 (11:57 +0000)]
Updates delete_method sysctl changes to always maintain disk d_flags
DISKFLAG_CANDELETE. While this change makes this layer consistent
other layers such as UFS and ZFS BIO_DELETE support may not notice
any change made manually via these device sysctls until the device
is reopened via a mount.

Also corrected var order in dadeletemethodsysctl

PR: kern/169801
Reviewed by: pjd (mentor)
Approved by: mav
MFC after: 2 weeks

11 years agoRemoves essentially unused variables from scsi_da probe setups
smh [Thu, 10 Jan 2013 11:28:12 +0000 (11:28 +0000)]
Removes essentially unused variables from scsi_da probe setups

PR: kern/169835
Reviewed by: pjd (mentor)
Approved by: mav
MFC after: 2 weeks

11 years agoAllow perl scripts to be used in rc.d scripts
smh [Thu, 10 Jan 2013 11:08:22 +0000 (11:08 +0000)]
Allow perl scripts to be used in rc.d scripts

PR: conf/117027
Reviewed by: pjd (mentor)
Approved by: hrs
MFC after: 2 weeks

11 years agoBugfix: Fix sizeof() argument.
hselasky [Thu, 10 Jan 2013 08:06:12 +0000 (08:06 +0000)]
Bugfix: Fix sizeof() argument.

Found by: Haakon Loevdal
MFC after: 1 week

11 years agoFix detection of Razer Copperhead as a USB mouse.
hselasky [Thu, 10 Jan 2013 07:45:46 +0000 (07:45 +0000)]
Fix detection of Razer Copperhead as a USB mouse.
Factor out USB mouse and keyboard detection logic.
Reject USB keyboards which have mouse alike HID items
in their HID descriptors.

Submitted by: Matthew W
MFC after: 1 week

11 years agoSimplify in6_setscope() function to get better performance.
ae [Thu, 10 Jan 2013 00:10:24 +0000 (00:10 +0000)]
Simplify in6_setscope() function to get better performance.
Currently we use interface indeces as zone IDs for link-local and
interface-local scopes, and since we don't have any tool to configure
zone IDs, there is no need to acquire the afdata lock several times per
packet only to read if_index value.
So, now in6_setscope reads zone IDs for interface-local, link-local and
global scopes without a lock.

Sponsored by: Yandex LLC
MFC after: 2 weeks

11 years agocxgbe(4): updates to the configuration file that controls how hardware
np [Wed, 9 Jan 2013 21:27:14 +0000 (21:27 +0000)]
cxgbe(4): updates to the configuration file that controls how hardware
resources are partitioned.

- Reduce the number of virtual interfaces reserved for PF4.  This leaves
  spare room in the source MAC table and allows the driver to setup
  filters that rewrite the source MAC address.

- Reduce the number of filters and use the freed up space for the CLIP
  (Compressed Local IPv6 addresses) table.  This is a prerequisite for
  IPv6 TOE support which will follow separately in a series of commits.

MFC after: 1 week

11 years agoAlways install our mtree as /usr/sbin/fmtree and link it as
brooks [Wed, 9 Jan 2013 21:07:08 +0000 (21:07 +0000)]
Always install our mtree as /usr/sbin/fmtree and link it as
/usr/sbin/mtree by default.

Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked
as /usr/sbin/mtree as well as /usr/sbin/nmtree.

11 years agoDon't drop options from the third retransmitted SYN by default. If the
jhb [Wed, 9 Jan 2013 20:27:06 +0000 (20:27 +0000)]
Don't drop options from the third retransmitted SYN by default.  If the
SYNs (or SYN/ACK replies) are dropped due to network congestion, then the
remote end of the connection may act as if options such as window scaling
are enabled but the local end will think they are not.  This can result in
very slow data transfers in the case of window scaling disagreements.

The old behavior can be obtained by setting the
net.inet.tcp.rexmit_drop_options sysctl to a non-zero value.

Reviewed by: net@
MFC after: 2 weeks

11 years agoUpdate where porters handbook lives.
gjb [Wed, 9 Jan 2013 20:10:45 +0000 (20:10 +0000)]
Update where porters handbook lives.

MFC after: 3 days

11 years agoFix the bindto parameter declaration.
ae [Wed, 9 Jan 2013 19:49:35 +0000 (19:49 +0000)]
Fix the bindto parameter declaration.

Submitted by: sem

11 years agoRemove unneeded variable.
ae [Wed, 9 Jan 2013 18:54:58 +0000 (18:54 +0000)]
Remove unneeded variable.

MFC after: 1 week

11 years agoAdd the "enable at reset" functionality to trigger spectral scan upon
adrian [Wed, 9 Jan 2013 18:50:06 +0000 (18:50 +0000)]
Add the "enable at reset" functionality to trigger spectral scan upon
a channel change/reset.

11 years agoAdd no_prefer_iface option.
ume [Wed, 9 Jan 2013 18:18:08 +0000 (18:18 +0000)]
Add no_prefer_iface option.
It stops treating the address on the interface as special by source
address selection rule even when the interface is outgoing interface.
This is desired in some situation.

Requested by: hrs
Reviewed by: IHANet folks including hrs
MFC after: 1 week

11 years agoMake CTL work a little better with loading and unloading drivers.
ken [Wed, 9 Jan 2013 17:02:08 +0000 (17:02 +0000)]
Make CTL work a little better with loading and unloading drivers.

Previously CTL would leave individual LUNs enabled in the target
driver, whether or not the port as a whole was enabled.  It would
also leave the wildcard LUN enabled indefinitely.

This change means that CTL will enable and disable any active LUNs,
as well as the wildcard LUN, when enabling and disabling a port.

Also, fix a bug that could crop up due to an uninitialized CCB
type.

ctl.c: Before calling ctl_frontend_online(), run through
the LUN list and enable all active LUNs.

After calling ctl_frontend_offline(), run through
the LUN list and disble all active LUNs.

scsi_ctl.c: Before bringing a port online, allocate the
wildcard peripheral for that bus.  And after taking
a port offline, invalidate the wildcard peripheral
for that bus.

Make sure that we hold the SIM lock around all
calls to xpt_action() and other transport layer
interfaces that require it.

Use CAM_SIM_{LOCK|UNLOCK} consistently to acquire
and release the SIM lock.

Update a number of outdated comments.  Some of
these should have been fixed long ago.

Actually do LUN disbables now.  The newer drivers
in the tree work correctly for this as far as I
know.

Initialize the CCB type to CTLFE_CCB_DEFAULT to
avoid a panic due to uninitialized memory.

Submitted by: Chuck Tuffli (partially)
MFC after: 1 week

11 years agoFix a bug in the device pager code that can trigger an assertion
ken [Wed, 9 Jan 2013 16:48:38 +0000 (16:48 +0000)]
Fix a bug in the device pager code that can trigger an assertion
in devfs if a particular race condition is hit in the device pager
code.

This was a side effect of change 227530 which changed the device
pager interface to call a new destructor routine for the cdev.
That destructor routine, old_dev_pager_dtor(), takes a VM object
handle.

The object handle is cast to a struct cdev *, and passed into
dev_rel().

That works in most cases, except the case in cdev_pager_allocate()
where there is a race condition between two threads allocating an
object backed by the same device.  The loser of the race
deallocates its object at the end of the function.

The problem is that before inserting the object into the
dev_pager_object_list, the object's handle is changed from the
struct cdev pointer to the object's own address.  This is to avoid
conflicts with the winner of the race, which already inserted an
object in the list with a handle that is a pointer to the same cdev
structure.

The object is then passed to vm_object_deallocate(), and eventually
makes its way down to old_dev_pager_dtor().  That function passes
the handle pointer (which is actually a VM object, not a struct
cdev as usual) into dev_rel().  dev_rel() decrements the reference
count in the assumed struct cdev (which happens to be 0), and
that triggers the assertion in dev_rel() that the reference count
is greater than or equal to 0.

The fix is to add a cdev pointer to the VM object, and use that
pointer when calling the cdev_pg_dtor() routine.

vm_object.h: Add a struct cdev pointer to the VM object
structure.

device_pager.c: In cdev_pager_allocate(), populate the new cdev
pointer.

In dev_pager_dealloc(), use the new cdev pointer
when calling the object's cdev_pg_dtor() routine.

Reviewed by: kib
Sponsored by: Spectra Logic Corporation
MFC after: 1 week

11 years agoDisable destination address selection support of
ume [Wed, 9 Jan 2013 15:22:37 +0000 (15:22 +0000)]
Disable destination address selection support of
getipnodebyname(1).  RFC 2553 mentions IPv6 addresses
are returned 1st.

Spotted by: uqs
MFC after: 1 week

11 years agoChange function argument type instead of casting.
hselasky [Wed, 9 Jan 2013 09:29:22 +0000 (09:29 +0000)]
Change function argument type instead of casting.

Suggested by: glebius @

11 years agoFix compile warning when using GCC:
hselasky [Wed, 9 Jan 2013 09:09:09 +0000 (09:09 +0000)]
Fix compile warning when using GCC:
Comparison between signed and unsigned.

MFC after: 1 week

11 years agoAdd a "pause" to busy wait loops in the cpu reset path.
neel [Wed, 9 Jan 2013 02:11:16 +0000 (02:11 +0000)]
Add a "pause" to busy wait loops in the cpu reset path.

This should not matter much when running on bare metal but it makes the guest
more friendly when running inside a virtual machine.

Discussed with: jhb
Obtained from: NetApp

11 years agoDefine IPI_IRQ_START and IPI_IRQ_END.
cognet [Wed, 9 Jan 2013 01:54:17 +0000 (01:54 +0000)]
Define IPI_IRQ_START and IPI_IRQ_END.

11 years agoUse get_pcpu() instead of using pcpup, as it's wrong for SMP.
cognet [Wed, 9 Jan 2013 01:52:28 +0000 (01:52 +0000)]
Use get_pcpu() instead of using pcpup, as it's wrong for SMP.

Submitted by: Lukasz Plachno <luk@semihalf.com>

11 years agoThe in6_setscope() function determines the scope zone id of an address
ae [Wed, 9 Jan 2013 00:36:06 +0000 (00:36 +0000)]
The in6_setscope() function determines the scope zone id of an address
and embeds it into address. Inside the kernel we keep addresses with
embedded zone id only for two scopes: link-local and interface-local.

For other scopes this function is nop in most cases. To reduce an
overhead of locking, first check that address is capable for embedding.
Also, handle the loopback address before acquire the lock.

Sponsored by: Yandex LLC
MFC after: 1 week