]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoFix descriptors leak.
pjd [Sun, 14 Sep 2014 09:26:33 +0000 (09:26 +0000)]
Fix descriptors leak.

PR: bin/191002
Reported by: Ryan Steinmetz
Submitted by: mjg

9 years agoFix two small nits in ctl.conf(5).
trasz [Sun, 14 Sep 2014 08:35:44 +0000 (08:35 +0000)]
Fix two small nits in ctl.conf(5).

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoZFS support isn't actually experimental anymore, so no need to scare
nwhitehorn [Sun, 14 Sep 2014 02:31:53 +0000 (02:31 +0000)]
ZFS support isn't actually experimental anymore, so no need to scare
people.

9 years agoMake the root-on-zfs part of the installer warn a user who booted the installer via...
allanjude [Sun, 14 Sep 2014 01:57:22 +0000 (01:57 +0000)]
Make the root-on-zfs part of the installer warn a user who booted the installer via UEFI that we do not support booting ZFS via UEFI yet

PR: 193595
Approved by: nwhitehorn
MFC after: 5 days
Sponsored by: ScaleEngine Inc.
CR: https://reviews.freebsd.org/D782

9 years agoFix RTC clock writes on many Octeon boards.
kan [Sun, 14 Sep 2014 00:02:40 +0000 (00:02 +0000)]
Fix RTC clock writes on many Octeon boards.

The struct clocktime uses 0-based week day number, so back out part of
r229161 by gonzo, which actually broke the RTC clock writes on Sundays.

9 years agoAdd delay to Octeon MDIO access routines.
kan [Sun, 14 Sep 2014 00:02:37 +0000 (00:02 +0000)]
Add delay to Octeon MDIO access routines.

Prevent saturattion of the bus by constant polling which in
extreme cases can cause interface lockup. This makes FreeBSD
match similar case in the executive.

9 years agoResolve an ambiguity with the definition of a new auth-group
allanjude [Sat, 13 Sep 2014 23:50:51 +0000 (23:50 +0000)]
Resolve an ambiguity with the definition of a new auth-group
Resolve a markup mistake

Reviewed by: trasz
Approved by: bcr (mentor), wblock (mentor)
Sponsored by: ScaleEngine Inc.
CR: https://reviews.freebsd.org/D735

9 years agoRename the choices in the partitioning methods dialog to reflect current
nwhitehorn [Sat, 13 Sep 2014 22:14:19 +0000 (22:14 +0000)]
Rename the choices in the partitioning methods dialog to reflect current
reality. In particular, draw a connection between the auto ZFS script and
the auto UFS one, since they fulfill similar functions. I'm not sure the
auto ZFS code is actually experimental anymore, so it might be worth
changing that label still.

9 years agoMake the default choice for the chroot shell at the end be "No". This allows
nwhitehorn [Sat, 13 Sep 2014 22:03:51 +0000 (22:03 +0000)]
Make the default choice for the chroot shell at the end be "No". This allows
just pressing enter repeatedly to successfully install a reasonable system.

9 years agoRevert r271504. A new patch to solve this issue will be made.
hselasky [Sat, 13 Sep 2014 20:52:01 +0000 (20:52 +0000)]
Revert r271504. A new patch to solve this issue will be made.

Suggested by: adrian @

9 years agoReplace the imx5 and imx6 iomux drivers with a single common driver that
ian [Sat, 13 Sep 2014 20:09:34 +0000 (20:09 +0000)]
Replace the imx5 and imx6 iomux drivers with a single common driver that
uses the new fdt_pinctrl interface.

9 years agoCreate /tmp/bsdinstall_etc even if we aren't starting the installer so that
nwhitehorn [Sat, 13 Sep 2014 20:09:02 +0000 (20:09 +0000)]
Create /tmp/bsdinstall_etc even if we aren't starting the installer so that
dhclient can write resolv.conf when used from the live environment.

PR: 176078
MFC after: 3 days

9 years agoConvert the at91_pinctrl driver to use the new fdt_pinctrl interface.
ian [Sat, 13 Sep 2014 19:59:16 +0000 (19:59 +0000)]
Convert the at91_pinctrl driver to use the new fdt_pinctrl interface.

9 years agoCreate an interface and support routines for drivers that handle IO pin
ian [Sat, 13 Sep 2014 19:03:32 +0000 (19:03 +0000)]
Create an interface and support routines for drivers that handle IO pin
multiplexing and configuration based on FDT data.

Reviewed by: imp

9 years agoDo not set net.inet.ip.{sourceroute,accept_sourceroute} in a vnet jail.
hrs [Sat, 13 Sep 2014 18:54:15 +0000 (18:54 +0000)]
Do not set net.inet.ip.{sourceroute,accept_sourceroute} in a vnet jail.
The following warnings were displayed:

 sysctl: net.inet.ip.sourceroute=0: Operation not permitted
 sysctl: net.inet.ip.accept_sourceroute=0: Operation not permitted

9 years agoSwitch if_vlan(4) to rmlock.
melifaro [Sat, 13 Sep 2014 18:41:24 +0000 (18:41 +0000)]
Switch if_vlan(4) to rmlock.

MFC after: 2 weeks

9 years agoAdd the new iscsi(4) man page
allanjude [Sat, 13 Sep 2014 18:40:12 +0000 (18:40 +0000)]
Add the new iscsi(4) man page
Cross reference it from iscsid(8) and iscsictl(8)

Reviewed by: trasz
Approved by: bcr (mentor), wblock (mentor)
Sponsored by: ScaleEngine Inc.
CR: https://reviews.freebsd.org/D741

9 years agoWe don't need an exclusive object lock on the expected execution path
alc [Sat, 13 Sep 2014 18:26:13 +0000 (18:26 +0000)]
We don't need an exclusive object lock on the expected execution path
through {ext2,ffs}_getpages().

Reviewed by: kib, pfg
MFC after: 6 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd ZFS support to the bsdinstall partition editor and sade.
nwhitehorn [Sat, 13 Sep 2014 18:24:54 +0000 (18:24 +0000)]
Add ZFS support to the bsdinstall partition editor and sade.

Submitted by: Kurt Lidl (original version)
MFC after: 6 weeks

9 years agoSwitch if_vlan(4) to use counter(9) using new
melifaro [Sat, 13 Sep 2014 18:13:08 +0000 (18:13 +0000)]
Switch if_vlan(4) to use counter(9) using new
  if_get_counter api.

9 years agoMFV r271518:
delphij [Sat, 13 Sep 2014 17:48:44 +0000 (17:48 +0000)]
MFV r271518:

Correctly report hole at end of file.

When asked to find a hole, the DMU sees that there are no holes in the
object, and returns ESRCH.  The ZPL interprets this as "no holes before
the end of the file", and therefore inserts the "virtual hole" at the
end of the file.  Because DMU and ZPL have different ideas of where the
end of an object/file is, we will end up returning the end of file,
which is generally larger, instead of returning the end of object.

The fix is to handle the "virtual hole" in the DMU. If no hole is found,
the DMU will return a hole at the end of the file, rather than an error.

Illumos issue:
    5139 SEEK_HOLE failed to report a hole at end of file

MFC after: 1 week

9 years agoMake inclusion of fdt clock support conditional on fdt_clock, not just fdt.
ian [Sat, 13 Sep 2014 17:38:26 +0000 (17:38 +0000)]
Make inclusion of fdt clock support conditional on fdt_clock, not just fdt.
There are plenty of platforms that use fdt without needing the overhead of
the new clock support routines.

9 years agoMFV r271517:
delphij [Sat, 13 Sep 2014 17:36:34 +0000 (17:36 +0000)]
MFV r271517:

In zil_claim, don't issue warning if we get EBUSY (inconsistent) when
opening an objset, instead, ignore it silently.

Illumos issue:

    5140 message about "%recv could not be opened" is printed when booting after crash

MFC after: 1 week

9 years agoMFV r271516:
delphij [Sat, 13 Sep 2014 17:30:46 +0000 (17:30 +0000)]
MFV r271516:

Enable debug printf's when ZFS_DEBUG or debug= is set.

Illumos issue:

    5134 if ZFS_DEBUG or debug= is set, libzpool should enable debug prints

MFC after: 2 weeks

9 years agoMFV r271515:
delphij [Sat, 13 Sep 2014 17:24:56 +0000 (17:24 +0000)]
MFV r271515:

Add a new tunable/sysctl, vfs.zfs.free_max_blocks, which can be used to
limit how many blocks can be free'ed before a new transaction group is
created.  The default is no limit (infinite), but we should probably have
a lower default, e.g. 100,000.

With this limit, we can guard against the case where ZFS could run out of
memory when destroying large numbers of blocks in a single transaction
group, as the entire DDT needs to be brought into memory.

Illumos issue:
    5138 add tunable for maximum number of blocks freed in one txg

MFC after: 2 weeks

9 years agoMFV r271512:
delphij [Sat, 13 Sep 2014 16:51:23 +0000 (16:51 +0000)]
MFV r271512:

Illumos issue:
    5136 fix write throttle comment in dsl_pool.c

MFC after: 2 weeks

9 years agoMFV r271511:
delphij [Sat, 13 Sep 2014 16:41:39 +0000 (16:41 +0000)]
MFV r271511:

Use fnvlist_* to make code more readable.

Illumos issue:
    5135 zpool_find_import_cached() can use fnvlist_*

MFC after: 2 weeks

9 years agoMFV r271510:
delphij [Sat, 13 Sep 2014 16:26:14 +0000 (16:26 +0000)]
MFV r271510:

Enforce 4K as smallest indirect block size (previously the smallest
indirect block size was 1K but that was never used).

This makes some space estimates more accurate and uses less memory
for some data structures.

Illumos issue:
    5141 zfs minimum indirect block size is 4K

MFC after: 2 weeks

9 years agoDo not try to read i2c info when no transceiver is present.
melifaro [Sat, 13 Sep 2014 16:04:55 +0000 (16:04 +0000)]
Do not try to read i2c info when no transceiver is present.

MFC with: r270064
Sponsored by: Yandex LLC

9 years agoFix error handling in cpuset_setithread() introduced in r267716.
melifaro [Sat, 13 Sep 2014 13:46:16 +0000 (13:46 +0000)]
Fix error handling in cpuset_setithread() introduced in r267716.

Noted by: kib
MFC after: 1 week

9 years agoImplement control over command reordering via options and control mode page.
mav [Sat, 13 Sep 2014 10:34:23 +0000 (10:34 +0000)]
Implement control over command reordering via options and control mode page.

It allows to bypass range checks between UNMAP and READ/WRITE commands,
which may introduce additional delays while waiting for UNMAP parameters.
READ and WRITE commands are always processed in safe order since their
range checks are almost free.

9 years agovt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endif
dumbbell [Sat, 13 Sep 2014 09:33:37 +0000 (09:33 +0000)]
vt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endif

This fixes the build with sparc64 LINT for instance.

Reported by: bz@
MFC after: 3 days

9 years agoAdd "readcache" and "writecache" LUN options to control default behavior.
mav [Sat, 13 Sep 2014 08:55:22 +0000 (08:55 +0000)]
Add "readcache" and "writecache" LUN options to control default behavior.

Default values are "on".  Disabling requires backend to support IO_DIRECT
and IO_SYNC flags respectively, or some alternatives.

9 years agoImprove transmit sending offload, TSO, algorithm in general.
hselasky [Sat, 13 Sep 2014 08:26:09 +0000 (08:26 +0000)]
Improve transmit sending offload, TSO, algorithm in general.

The current TSO limitation feature only takes the total number of
bytes in an mbuf chain into account and does not limit by the number
of mbufs in a chain. Some kinds of hardware is limited by two
factors. One is the fragment length and the second is the fragment
count. Both of these limits need to be taken into account when doing
TSO. Else some kinds of hardware might have to drop completely valid
mbuf chains because they cannot loaded into the given hardware's DMA
engine. The new way of doing TSO limitation has been made backwards
compatible as input from other FreeBSD developers and will use
defaults for values not set.

MFC after: 1 week
Sponsored by: Mellanox Technologies

9 years agoImplement range checks between UNMAP and READ/WRITE commands.
mav [Sat, 13 Sep 2014 07:45:03 +0000 (07:45 +0000)]
Implement range checks between UNMAP and READ/WRITE commands.

Before this change UNMAP completely blocked other I/Os while running.
Now it blocks only colliding ones, slowing down others only due to ZFS
locks collisions.

Sponsored by: iXsystems, Inc.

9 years agoPropagate the error status of /usr/sbin/bhyve out of the vmrun.sh script.
rodrigc [Sat, 13 Sep 2014 05:08:35 +0000 (05:08 +0000)]
Propagate the error status of /usr/sbin/bhyve out of the vmrun.sh script.
Clean up the /dev/vmm entry for this VM when vmrun.sh exits.

Reviewed by: neel
Phabric:     D767

9 years agoAdd a sysctl to export the EFI memory map along with a handler in the
jhb [Sat, 13 Sep 2014 03:10:02 +0000 (03:10 +0000)]
Add a sysctl to export the EFI memory map along with a handler in the
sysctl(8) binary to format it.

Reviewed by: emaste
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D771

9 years agoRegen.
delphij [Sat, 13 Sep 2014 02:18:54 +0000 (02:18 +0000)]
Regen.

9 years agoImport HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
delphij [Sat, 13 Sep 2014 02:15:31 +0000 (02:15 +0000)]
Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

This is a stable/10 candidate for inclusion with 10.1-RELEASE.

Submitted by: Wei Hu <weh microsoft com>
MFC after: 1 week

9 years agoWorkaround for receiving Voice Calls using the E1750 dongle from
hselasky [Fri, 12 Sep 2014 22:40:12 +0000 (22:40 +0000)]
Workaround for receiving Voice Calls using the E1750 dongle from
Huawei. It might appear as if the firmware is allocating memory blocks
according to the USB transfer size and if there is initially a lot of
data, like at the answering machine prompt, it simply dies without any
apparent reason. The simple workaround for this is to force a zero
length packet at hardware level after every 512 bytes of data. This
will force the other side to use smaller memory blocks aswell.

MFC after: 1 week

9 years agoSimplify dvd package population with pkg-1.3.
gjb [Fri, 12 Sep 2014 22:20:07 +0000 (22:20 +0000)]
Simplify dvd package population with pkg-1.3.

Submitted by: bdrewery
MFC after: 3 days
X-MFC-With: r271480, r271483
Sponsored by: The FreeBSD Foundation

9 years agocxgbe(4): add support for the SIOCGI2C ioctl.
np [Fri, 12 Sep 2014 21:56:57 +0000 (21:56 +0000)]
cxgbe(4): add support for the SIOCGI2C ioctl.

9 years agoFix various issues with invalid file operations:
jhb [Fri, 12 Sep 2014 21:29:10 +0000 (21:29 +0000)]
Fix various issues with invalid file operations:
- Add invfo_rdwr() (for read and write), invfo_ioctl(), invfo_poll(),
  and invfo_kqfilter() for use by file types that do not support the
  respective operations.  Home-grown versions of invfo_poll() were
  universally broken (they returned an errno value, invfo_poll()
  uses poll_no_poll() to return an appropriate event mask).  Home-grown
  ioctl routines also tended to return an incorrect errno (invfo_ioctl
  returns ENOTTY).
- Use the invfo_*() functions instead of local versions for
  unsupported file operations.
- Reorder fileops members to match the order in the structure definition
  to make it easier to spot missing members.
- Add several missing methods to linuxfileops used by the OFED shim
  layer: fo_write(), fo_truncate(), fo_kqfilter(), and fo_stat().  Most
  of these used invfo_*(), but a dummy fo_stat() implementation was
  added.

9 years agoTweak pipe_truncate() to more closely match pipe_chown() and pipe_chmod()
jhb [Fri, 12 Sep 2014 21:20:36 +0000 (21:20 +0000)]
Tweak pipe_truncate() to more closely match pipe_chown() and pipe_chmod()
by checking PIPE_NAMED and using invfo_truncate() for unnamed pipes.

9 years agoPass the length of an structure to the pretty-printer backends as a
jhb [Fri, 12 Sep 2014 21:01:39 +0000 (21:01 +0000)]
Pass the length of an structure to the pretty-printer backends as a
size_t instead of an int.

9 years agoSimplify vntype_to_kinfo() by returning when the desired value is found
jhb [Fri, 12 Sep 2014 20:56:09 +0000 (20:56 +0000)]
Simplify vntype_to_kinfo() by returning when the desired value is found
instead of breaking out of the loop and then immediately checking the loop
index so that if it was broken out of the proper value can be returned.

While here, use nitems().

9 years agoFix 'function declaration isn't a prototype' warning.
ray [Fri, 12 Sep 2014 20:55:17 +0000 (20:55 +0000)]
Fix 'function declaration isn't a prototype' warning.

Pointed by: ian
MFC after: 1 week

9 years ago- Don't let rman_reserve_resource() activate the resource in
jhb [Fri, 12 Sep 2014 20:34:19 +0000 (20:34 +0000)]
- Don't let rman_reserve_resource() activate the resource in
  nexus_alloc_resource() and don't set a bushandle.
  nexus_activate_resource() will set a proper bushandle.
- Implement a proper nexus_release_resource().
- Fix ixppcib_activate_resource() to call rman_activate_resource()
  before creating a mapping for the resource.

Tested by: jmg

9 years agoFix duplicate PKG_ABI in the PKG_CACHEDIR path.
gjb [Fri, 12 Sep 2014 20:16:55 +0000 (20:16 +0000)]
Fix duplicate PKG_ABI in the PKG_CACHEDIR path.

MFC after: 3 days
X-MFC-With: r271480
Sponsored by: The FreeBSD Foundation

9 years agoAdd support for adding empty partition entries. I.e. skip partition
marcel [Fri, 12 Sep 2014 20:05:08 +0000 (20:05 +0000)]
Add support for adding empty partition entries. I.e. skip partition
numbers or names. This gives more control over the actual layout and
helps to construct BSD disklabels with /usr or /var at dedicated
partitions.

Obtained from: Juniper Networks, Inc.
MFC after: 3 days
Relnotes: yes

9 years agoSet PKG_CACHEDIR to an 'All/' directory one level lower
gjb [Fri, 12 Sep 2014 18:52:01 +0000 (18:52 +0000)]
Set PKG_CACHEDIR to an 'All/' directory one level lower
to fix 'pkg repo' generating repository metadata for the
on-disc packages.

MFC after: 3 days
X-MFC-to-10.1: yes
Sponsored by: The FreeBSD Foundation

9 years agoAdd support for serial and null console to UEFI boot loader.
ambrisko [Fri, 12 Sep 2014 17:32:28 +0000 (17:32 +0000)]
Add support for serial and null console to UEFI boot loader.

9 years agoExtra space from r271467.
pfg [Fri, 12 Sep 2014 15:54:18 +0000 (15:54 +0000)]
Extra space from r271467.

MFC after: 2 months

9 years agoext2fs: add ext2_getpages().
pfg [Fri, 12 Sep 2014 15:49:21 +0000 (15:49 +0000)]
ext2fs: add ext2_getpages().

Literally copy/pasted from ffs_getpages().

Tested with: fsx
MFC after: 2 months

9 years agoFix stray char on paste.
ray [Fri, 12 Sep 2014 14:17:09 +0000 (14:17 +0000)]
Fix stray char on paste.

Tested by: dumbbell and me
MFC after: 1 week

9 years agoSwitch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
ray [Fri, 12 Sep 2014 14:16:10 +0000 (14:16 +0000)]
Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
(forgetted in last commit)

Reviewed by: dumbbell (as D755)
MFC after: 1 week

9 years agoSwitch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
ray [Fri, 12 Sep 2014 14:14:50 +0000 (14:14 +0000)]
Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.

Reviewed by: dumbbell (as D755)
MFC after: 1 week

9 years agoRemove stray whitespaces.
ray [Fri, 12 Sep 2014 14:07:20 +0000 (14:07 +0000)]
Remove stray whitespaces.

9 years agoInitialize variables before resource_int_value().
mav [Fri, 12 Sep 2014 12:04:51 +0000 (12:04 +0000)]
Initialize variables before resource_int_value().

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

9 years agoFix ACL tests to correctly work with ZFS; previous version used wrong
trasz [Fri, 12 Sep 2014 09:50:32 +0000 (09:50 +0000)]
Fix ACL tests to correctly work with ZFS; previous version used wrong
paths.

PR: 191545
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years ago- Provide a sleepable lock to protect against ioctl() vs ioctl() races.
glebius [Fri, 12 Sep 2014 08:39:15 +0000 (08:39 +0000)]
- Provide a sleepable lock to protect against ioctl() vs ioctl() races.
- Use the new lock to protect against simultaneous DIOCSTART and/or
  DIOCSTOP ioctls.

Reported & tested by: jmallett
Sponsored by: Nginx, Inc.

9 years agoInitialize variables before resource_int_value().
mav [Fri, 12 Sep 2014 08:37:21 +0000 (08:37 +0000)]
Initialize variables before resource_int_value().

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

9 years ago- Fix argument list after 271387.
glebius [Fri, 12 Sep 2014 08:33:53 +0000 (08:33 +0000)]
- Fix argument list after 271387.
- While here fix typo.

Submitted by: markj

9 years agoAdd forgotten keymap files fr.kbd and fr.acc.kbd to the FILES list.
se [Fri, 12 Sep 2014 06:23:57 +0000 (06:23 +0000)]
Add forgotten keymap files fr.kbd and fr.acc.kbd to the FILES list.

Obtained from: thierry
MFC after: 3 days

9 years agoOptimize the common case of injecting an interrupt into a vcpu after a HLT
neel [Fri, 12 Sep 2014 06:15:20 +0000 (06:15 +0000)]
Optimize the common case of injecting an interrupt into a vcpu after a HLT
by explicitly moving it out of the interrupt shadow. The hypervisor is done
"executing" the HLT and by definition this moves the vcpu out of the
1-instruction interrupt shadow.

Prior to this change the interrupt would be held pending because the VMCS
guest-interruptibility-state would indicate that "blocking by STI" was in
effect. This resulted in an unnecessary round trip into the guest before
the pending interrupt could be injected.

Reviewed by: grehan

9 years agocxgbe(4): knobs to enable/disable PAUSE frame based flow control.
np [Fri, 12 Sep 2014 05:25:56 +0000 (05:25 +0000)]
cxgbe(4): knobs to enable/disable PAUSE frame based flow control.

MFC after: 1 week

9 years agoBe compatible with boot code that starts right after the disk label in
marcel [Fri, 12 Sep 2014 04:15:35 +0000 (04:15 +0000)]
Be compatible with boot code that starts right after the disk label in
the second sector by only clearing the amount of bytes needed for the
disklabel in the second sector. Previously we were clearing exactly 1
sector worth of bytes and as such writing over boot code that may have
been there.
Since we do support more than 8 partitions, make sure to set all fields
in d_partitions. For the first 8 partitions this is unneeded, but for
partitioons 9 and up this compensates for the fact that we don't clear
an entire sector anymore.
Obviously, one cannot use more than 8 partitions when using boot code
that starts right after the disk label.

Relevant GRNs:
107879 - Employ unused bytes after the disklabel in the second sector.
189500 - Revert the part of change 107879 that employs the unused bytes
 after the disklabel in the 2nd sector for boot code.

Obtained from: Juniper Networks, Inc.
MFC after: 3 days

9 years agoFix checksum calculation:
marcel [Fri, 12 Sep 2014 03:54:16 +0000 (03:54 +0000)]
Fix checksum calculation:
1.  Iterate over all partitions counted in the label, which can be more
    than the number of partitions given to mkimg(1).
2.  Start the checksum from the beginning of the label; not the beginning
    of the bootarea.

Tested with bsdlabel(8).

MFC after: 3 days

10 years agoAttach the ISO to an ahci-cd emulated device. The
rodrigc [Fri, 12 Sep 2014 02:38:10 +0000 (02:38 +0000)]
Attach the ISO to an ahci-cd emulated device.  The
ISO will appear to be mounted on a /dev/cd device
instead of /dev/vtbd.  This is similar to how other
virtualization environments handle mounting ISO images.

Reviewed by: neel

10 years agoFix minor syntax error
allanjude [Fri, 12 Sep 2014 00:55:42 +0000 (00:55 +0000)]
Fix minor syntax error

Submitted by: bjk
Approved by: bcr (mentor)
Sponsored by: ScaleEngine Inc.

10 years agoImprove markup and language throughout the ctl.conf man page
allanjude [Fri, 12 Sep 2014 00:08:19 +0000 (00:08 +0000)]
Improve markup and language throughout the ctl.conf man page

Reviewed by: trasz
Approved by: bcr (mentor)
Sponsored by: ScaleEngine Inc.

10 years agoAdd support for Extended INQUIRY Data (0x86) VPD page.
mav [Thu, 11 Sep 2014 22:40:11 +0000 (22:40 +0000)]
Add support for Extended INQUIRY Data (0x86) VPD page.

10 years agoAdd device name used in geom_map verbose output. This helps when using
sbruno [Thu, 11 Sep 2014 22:39:27 +0000 (22:39 +0000)]
Add device name used in geom_map verbose output.  This helps when using
geom_map with multiple flash/spi devices.

Phabric:  https://reviews.freebsd.org/D766
Reviewed by: adrian
MFC after: 2 weeks

10 years agoInitialize 'bc_rdonly' to the right value.
neel [Thu, 11 Sep 2014 21:15:20 +0000 (21:15 +0000)]
Initialize 'bc_rdonly' to the right value.

Note that independent of this change a readonly disk file would still be
opened O_RDONLY and protected from writes by the guest.

Reviewed by: grehan

10 years agoRevisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and
asomers [Thu, 11 Sep 2014 20:21:03 +0000 (20:21 +0000)]
Revisions 264905 and 266860 added a "int fib" argument to ifa_ifwithnet and
ifa_ifwithdstaddr. For the sake of backwards compatibility, the new
arguments were added to new functions named ifa_ifwithnet_fib and
ifa_ifwithdstaddr_fib, while the old functions became wrappers around the
new ones that passed RT_ALL_FIBS for the fib argument. However, the
backwards compatibility is not desired for FreeBSD 11, because there are
numerous other incompatible changes to the ifnet(9) API. We therefore
decided to remove it from head but leave it in place for stable/9 and
stable/10. In addition, this commit adds the fib argument to
ifa_ifwithbroadaddr for consistency's sake.

sys/sys/param.h
Increment __FreeBSD_version

sys/net/if.c
sys/net/if_var.h
sys/net/route.c
Add fibnum argument to ifa_ifwithbroadaddr, and remove the _fib
versions of ifa_ifwithdstaddr, ifa_ifwithnet, and ifa_ifwithroute.

sys/net/route.c
sys/net/rtsock.c
sys/netinet/in_pcb.c
sys/netinet/ip_options.c
sys/netinet/ip_output.c
sys/netinet6/nd6.c
Fixup calls of modified functions.

share/man/man9/ifnet.9
Document changed API.

CR: https://reviews.freebsd.org/D458
MFC after: Never
Sponsored by: Spectra Logic

10 years agoDon't blindly assume the target agreed to transition to Full Feature Phase;
trasz [Thu, 11 Sep 2014 20:01:57 +0000 (20:01 +0000)]
Don't blindly assume the target agreed to transition to Full Feature Phase;
if we got a Login Response PDU without the "T" bit set, try again with
an empty request.  This fixes interoperability with COMSTAR.

Reviewed by: mav@
Tested by: mav@
MFC after: 1 week

10 years agoFix typo.
trasz [Thu, 11 Sep 2014 19:54:30 +0000 (19:54 +0000)]
Fix typo.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoUpdate motd, clarifying the information and adding pointers to other
wblock [Thu, 11 Sep 2014 18:24:16 +0000 (18:24 +0000)]
Update motd, clarifying the information and adding pointers to other
resources.

MFC after: 3 days

10 years agoAdd clang patch corresponding to r271432
emaste [Thu, 11 Sep 2014 18:20:49 +0000 (18:20 +0000)]
Add clang patch corresponding to r271432

10 years agoMerge upstream Clang rev 205331 debuginfo crash fix:
emaste [Thu, 11 Sep 2014 18:19:08 +0000 (18:19 +0000)]
Merge upstream Clang rev 205331 debuginfo crash fix:

    Debug info: fix a crash when emitting IndirectFieldDecls, which were
    previously not handled at all.
    rdar://problem/16348575

MFC after: 1 week
Sponsored by: DARPA, AFRL

10 years agoAdd Reset Manager driver. This driver provides generic way to reset
br [Thu, 11 Sep 2014 18:12:28 +0000 (18:12 +0000)]
Add Reset Manager driver. This driver provides generic way to reset
and provides sysctl tunables for enable/disable FPGA<->HPS bridges.

Sponsored by: DARPA, AFRL

10 years agoPersist vdev_resilver_txg changes to avoid panic caused by validation
smh [Thu, 11 Sep 2014 16:21:51 +0000 (16:21 +0000)]
Persist vdev_resilver_txg changes to avoid panic caused by validation
vs a vdev_resilver_txg value from a previous resilver.

MFC after: 1 week

10 years agoAdd const qualifier to in6_addrhash() function.
ae [Thu, 11 Sep 2014 13:18:41 +0000 (13:18 +0000)]
Add const qualifier to in6_addrhash() function.
Add in6ifa_ifwithaddr() function. It is similar to ifa_ifwithaddr,
but does fast lookup in the hash of inet6 addresses.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

10 years ago* use M_ZERO flag with malloc instead of explicit zeroing.
ae [Thu, 11 Sep 2014 12:54:17 +0000 (12:54 +0000)]
* use M_ZERO flag with malloc instead of explicit zeroing.
* remove MULTI_SCOPE ifdef.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

10 years agoIntroduce new scope related functions.
ae [Thu, 11 Sep 2014 12:33:37 +0000 (12:33 +0000)]
Introduce new scope related functions.

* new macro to remove magic number - IPV6_ADDR_SCOPES_COUNT;
* sa6_checkzone() - this function checks sockaddr_in6 structure
  for correctness of sin6_scope_id. It also can fill correct
  value sometimes.
* in6_getscopezone() - this function returns scope zone id for
  specified interface and scope.
* in6_getlinkifnet() - this function returns struct ifnet for
  corresponding zone id of link-local scope.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

10 years ago- Add $netif_ipexpand_max to specify the upper limit for the number of
hrs [Thu, 11 Sep 2014 12:30:29 +0000 (12:30 +0000)]
- Add $netif_ipexpand_max to specify the upper limit for the number of
  addresses generated by an address range specification.  The default
  value is 2048.  This can be increased by setting $netif_ipexpand_max
  in rc.conf.

- Fix warning messages when an address range spec exceeds the upper limit.

PR: 186841

10 years agoRename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the
andrew [Thu, 11 Sep 2014 10:53:57 +0000 (10:53 +0000)]
Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the
other architectures with this function.

Submitted by: Svatopluk Kraus <onwahe at gmail.com>
Submitted by: Michal Meloun <meloun at miracle.cz>

10 years ago* constify argument of in6_addrscope();
ae [Thu, 11 Sep 2014 10:27:59 +0000 (10:27 +0000)]
* constify argument of in6_addrscope();
* use IN6_IS_ADDR_XXX() macro instead of hardcoded values;
* for multicast addresses just return scope value, the only exception
  is addresses with 0x0F scope value (RFC 4291 p2.7.0);

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

10 years agoAdd new a M_START() mbuf macro that returns a pointer to the start of
rwatson [Thu, 11 Sep 2014 07:16:15 +0000 (07:16 +0000)]
Add new a M_START() mbuf macro that returns a pointer to the start of
an mbuf's storage (internal or external).

Add a new M_SIZE() mbuf macro that returns the size of an mbuf's
storage (internal or external).

These contrast with m_data and m_len, which are with respect to data
in the buffer, rather than the buffer itself.

Rewrite M_LEADINGSPACE() and M_TRAILINGSPACE() in terms of M_START()
and M_SIZE().

This is done as we currently have many instances of using mbuf flags
to generate pointers or lengths for internal storage in header and
regular mbufs, as well as to external storage. Rather than replicate
this logic throughout the network stack, centralising the
implementation will make it easier for us to refine mbuf storage.
This should also help reduce bugs by limiting the amount of
mbuf-type-specific pointer arithmetic.  Followup changes will
propagate use of the macros throughout the stack.

M_SIZE() conflicts with one macro in the Chelsio driver; rename that
macro in a slightly unsatisfying way to eliminate the collision.

MFC after: 3 days
Obtained from: jeff (with enhancements)
Sponsored by: EMC / Isilon Storage Division
Reviewed by: bz, glebius, np
Differential Revision: https://reviews.freebsd.org/D753

10 years agoSince r270929 raw sockets expect network byte order.
glebius [Thu, 11 Sep 2014 05:48:39 +0000 (05:48 +0000)]
Since r270929 raw sockets expect network byte order.

Submitted by: avg

10 years agoUpdate a stale comment.
alc [Thu, 11 Sep 2014 03:16:57 +0000 (03:16 +0000)]
Update a stale comment.

10 years agoUse the linker to perform relocations in the SUNW_dof section rather than
markj [Thu, 11 Sep 2014 01:04:56 +0000 (01:04 +0000)]
Use the linker to perform relocations in the SUNW_dof section rather than
doing them in drti during startup. This fixes a number of problems with
using USDT probes in stripped executables and shared libraries, and with
USDT probes in static functions.

Reviewed by: rpaulo
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
Phabric:  D751

10 years agoFix a bug which could break extended attributes in a dump output.
hrs [Wed, 10 Sep 2014 22:37:20 +0000 (22:37 +0000)]
Fix a bug which could break extended attributes in a dump output.
This occurred when a file was >892kB long and had a large data (>1kB)
in the extended attributes.

Reported by: Masashi Toriumi
Reviewed by: mckusick

10 years agoFix header output when -P is specified and (ncpus - 1) != maxid.
hrs [Wed, 10 Sep 2014 22:34:08 +0000 (22:34 +0000)]
Fix header output when -P is specified and (ncpus - 1) != maxid.

Reported by: Hiroaki Shimizu
PR: 152738

10 years agoMFamd64: Use initializecpu() to set various model-specific registers on
jhb [Wed, 10 Sep 2014 21:37:47 +0000 (21:37 +0000)]
MFamd64: Use initializecpu() to set various model-specific registers on
AP startup and AP resume (it was already used for BSP startup and BSP
resume).
- Split code to do one-time probing of cache properties out of
  initializecpu() and into initializecpucache().  This is called once on
  the BSP during boot.
- Move enable_sse() into initializecpu().
- Call initializecpu() for AP startup instead of enable_sse() and
  manually frobbing MSR_EFER to enable PG_NX.
- Call initializecpu() when an AP resumes.  In theory this will now
  properly re-enable PG_NX in MSR_EFER when resuming a PAE kernel on
  APs.

10 years agoTo workaround an errata on certain Pentium Pro CPUs, i386 disables
jhb [Wed, 10 Sep 2014 21:25:54 +0000 (21:25 +0000)]
To workaround an errata on certain Pentium Pro CPUs, i386 disables
the local APIC in initializecpu() and re-enables it if the APIC code
decides to use the local APIC after all.  Rework this workaround
slightly so that initializecpu() won't re-disable the local APIC if
it is called after the APIC code re-enables the local APIC.

10 years agoExtend UNMAP blacklist on all STEC SSD models.
mav [Wed, 10 Sep 2014 21:24:15 +0000 (21:24 +0000)]
Extend UNMAP blacklist on all STEC SSD models.

None of existing STEC devices need UNMAP or even support it well, having
many limitations and even hanging sometimes executing those commands.
New devices that may use UNMAP going to be released under HGST name.

MFC after: 3 days

10 years agoAdd support for calling pcibios routines from the
imp [Wed, 10 Sep 2014 21:07:00 +0000 (21:07 +0000)]
Add support for calling pcibios routines from the
bootloader. Implement the following routines:
pcibios-device-count count the number of instances of a devid
pcibios-read-config read pci config space
pcibios-write-config write pci config space
pcibios-find-devclass find the nth device with a given devclass
pcibios-find-device find the nth device with a given devid
pcibios-locator convert bus device function ti pcibios locator
These commands are thin wrappers over their PCI BIOS 2.1 counterparts. More
informaiton, such as it is, can be found in the standard.

Export a nunmber of pcibios.X variables into the environment to report
what the PCI IDENTIFY command returned.

Also implmenet a new command line primitive (pci-device-count), but don't
include it by default just yet, since it depends on the recently added
words and any errors here can render a system unbootable.

This is intended to allow the boot loader to do special things based
on the hardware it finds. This could be have special settings that are
optimized for the specific cards, or even loading special drivers. It
goes without saying that writing to pci config space should not be
done without a just cause and a sound mind.

Sponsored by: Netflix

10 years agoMove code to set various MSRs on AMD cpus out of printcpuinfo() and
jhb [Wed, 10 Sep 2014 21:04:44 +0000 (21:04 +0000)]
Move code to set various MSRs on AMD cpus out of printcpuinfo() and
into initalizecpu() instead.

10 years agoAdd PCI ID for Promise TX8660 8-port 3Gbps HBA.
mav [Wed, 10 Sep 2014 19:53:31 +0000 (19:53 +0000)]
Add PCI ID for Promise TX8660 8-port 3Gbps HBA.

This device reports RAID subclass, but appears to be AHCI compatible.

Submitted by: Yuri Perejilin <yuri@rivera.ru>
MFC after: 1 week