194080 Commits

Author SHA1 Message Date
hselasky
9a9c7f1310 MFC r257206:
Fix a deadlock when trying to power off a USB device. The deadlock
happens because the code in question is trying to modify the parent
USB port registers outside the USB explore thread.

Approved by:	re (glebius)
2013-10-30 08:05:39 +00:00
andre
82fad41b08 MFC r256920:
The TCP delayed ACK logic isn't aware of LRO passing up large aggregated
  segments thinking it received only one segment. This causes it to enable
  the delay the ACK for 100ms to wait for another segment which may never
  come because all the data was received already.

  Doing delayed ACK for LRO segments is bogus for two reasons: a) it pushes
  us further away from acking every other packet; b) it introduces additional
  delay in responding to the sender.  The latter is especially bad because it
  is in the nature of LRO to aggregated all segments of a burst with no more
  coming until an ACK is sent back.

  Change the delayed ACK logic to detect LRO segments by being larger than
  the MSS for this connection and issuing an immediate ACK for them to keep
  the ACK clock ticking without interruption.

  Reported by:  julian, cperciva
  Tested by:    cperciva
  Reviewed by:  lstewart

Approved by:    re (glebius)
2013-10-29 21:00:54 +00:00
dumbbell
0d7fc2d687 MFC r256771:
drm/radeon: radeonkms depends on firmware(9)

Submitted by:	tijl@
Approved by:	re (kib)
2013-10-29 19:50:40 +00:00
bdrewery
46ae5525e3 MFC r257151:
Document /var/cache/pkg into hier(7) which pkg(8) uses.

Approved by:	bapt
Approved by:	re (glebius)
2013-10-29 18:37:38 +00:00
bdrewery
7046958142 MFC: r256770,r257142,r257145,r257146,r257147,r257148,
r257149,r257150,r257158,r257159,r257164,r257168,
     r257193

  - Support checking signature for pkg bootstrap from remote
    and for 'pkg add ./pkg.txz'

  - Be verbose on where pkg is being bootstrapped from.

  - Add support for reading configuration files from /etc/pkg.
    For now only /etc/pkg/FreeBSD.conf is supported.

  - Add test package signing key fingerprint into /etc/keys/pkg/trusted.

  - Disable fingerprint checking by default for now as the official
    packages are not yet signed.

Approved by:	bapt
Approved by:	re (glebius)
2013-10-29 18:36:44 +00:00
trasz
2d60d1851a MFC r257061:
Don't spin with mutex hold when there is not enough room in the send socket
buffer.  While here, make the code flow somewhat nicer.

Thanks to mav@ for tracking it down.

Approved by:	re (glebius)
2013-10-29 14:07:42 +00:00
melifaro
c259ad5c52 MFC r256624:
Fix long-standing issue with incorrect radix mask calculation.

Usual symptoms are messages like
rn_delete: inconsistent annotation
rn_addmask: mask impossibly already in tree
routing daemon constantly deleting IPv6 default route
or inability to flush/delete particular prefix in ipfw table.

Changes:
* Assume 32 bytes as maximum radix key length
* Remove rn_init()
* Statically allocate rn_ones/rn_zeroes
* Make separate mask tree for each "normal" tree instead of system
global one
* Remove "optimization" on masks reusage and key zeroying
* Change rn_addmask() arguments to accept tree pointer (no users in base)

MFC changes:
* keep rn_init()
* create global mask tree, protected with mutex, for old rn_addmask
users (currently 0 in base)
* Add new rn_addmask_r() function (rn_addmask in head) with additional
argument to accept tree pointer

PR:		kern/182851, kern/169206, kern/135476, kern/134531
Found by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
Reviewed by:	glebius (previous versions)
Sponsored by:	Yandex LLC
Approved by:	re (glebius)
2013-10-29 12:53:23 +00:00
bdrewery
b8f1640fa0 MFC r257051:
Add support for using "pkg+http://" for the PACKAGESITE.

  pkg 1.2 is adding this support as well. This should help
  lessen the confusion on why the default SRV PACKAGESITE
  does not load in a browser.

Approved by:	bapt
Approved by:	re (glebius)
2013-10-29 12:25:22 +00:00
smh
7fcf8773f4 MFC r257109:
Add clang-CC and CC to list of hints allowing clang to identify its operating
mode as c++ instead of defaulting to c for the binary names CC and clang-CC.

This fixes builds that use cmake which automatically sets CXX to
/usr/bin/CC by default.

PR:		bin/182442
Approved by:	re (glebius)
2013-10-29 11:36:31 +00:00
glebius
60686beab7 Merge r256824 from head:
Provide a working example line for an interface with 1 address running
  with CARP.

  Currently, we've got a problem that interface isn't IFF_UP at the time
  we assign it a redundant address, and the latter gets stuck in INIT state.
  Additional SIOCSIFFLAGS from ifconfig(8) kicks it to a working state.

  A proper fix is kernel side and appeared to be non-trivial, not to be
  checked in before 10.0-RELEASE.

  Submitted by:   Ole Myhre <ole.myhre dataoppdrag.no>

Approved by:	re (kib)
2013-10-29 09:24:39 +00:00
glebius
5d5c0c1a43 Merge r256537 from head:
Make getutxent(3) more robust against bad utx.log files. Whenever we read
  zeroes, don't stop processing the file, but read until its end or valid
  data.

  In collaboration with:	ed

Approved by:	re (kib)
2013-10-29 09:23:51 +00:00
kib
492a1ca90c MFC r256848:
Use plain register read for waiting of the reset completion
notification, to avoid gt_lock recursion.

Approved by:	re (glebius)
2013-10-29 07:35:19 +00:00
kib
aaa21934ba MFC r256847:
Print more useful information about the transfer that trigger the assertion.

Approved by:	re (glebius)
2013-10-29 07:33:55 +00:00
bapt
22acce6ad4 MFC: r256968, r256971, r256978
Improve SRV records support for the pkg(8) bootstrap:
- order srv records by priorities
- for all entries of the same priority, order randomly respect the weight
- select the port where to fetch from respect the port provided in the SRV
record

Allow to bootstrap by doing pkg add ./a/path/to/a/pkg_package.txz

Approved by:	re (glebius)
2013-10-29 07:33:53 +00:00
nwhitehorn
e5d79eff87 MFC r256777-256779,256788:
Add driver for POWER hypervisor interpartition ethernet.

Approved by:	re (glebius)
2013-10-28 23:47:52 +00:00
cperciva
6fe3b99530 MFC r257129:
Remove time and date stamps from svn* binaries, in order to make the
  builds reproducible.

Approved by:	re (glebius)
2013-10-28 22:49:11 +00:00
grehan
2f628a2240 MFC r257078
Fix panic in the tap driver when a tap and vmnet interface were
  created after each other e.g.

   ifconfig tap0
   ifconfig vmnet0
   <panic>

  Appears to be a cut'n'paste error from the tap code to the vmnet
  code where the name string wasn't updated in the call to make_dev().

Approved by:  re (glebius)
2013-10-28 22:41:36 +00:00
delphij
b1f939cc2d MFC r257007:
Update driver to version 10.0.664.0.

Many thanks to Emulex for their continued support of FreeBSD.

Submitted by:	Venkata Duvvuru <VenkatKumar.Duvvuru Emulex Com>
Approved by:	re (glebius)
2013-10-26 19:02:39 +00:00
gjb
b5d80767c9 Update stable/10 to BETA2 as part of the 10.0-RELEASE cycle.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2013-10-26 15:10:58 +00:00
cperciva
cf504dd159 MFC r256646, r256767, r257038:
When installing updates, install new directories first and remove old
  directories last.

  Allow ~ in file names so libtool droppings in contrib don't break updates.
  It has happened twice now, and is likely to happen again.

  Be more selective when filtering for lib*.so.N files.  These are deleted
  at the end of the upgrade process, after warning users to upgrade any
  3rd party software (e.g., from the ports tree) which might link to the
  libraries being removed.

Approved by:	re (gjb)
Errata Notice:	FreeBSD-EN-13:04.freebsd-update
2013-10-26 08:34:35 +00:00
gjb
2074bdb75a MFC r257079:
Fix build host pollution by avoiding calling 'uname -srp' to
 determine values for 'VERSION'.

Approved by:	re (glebius)
2013-10-25 21:27:35 +00:00
grehan
c26ecf0555 MFC r256926, r257005
r256926
  Fix AHCI ATAPI emulation when backed with /dev/cd0

  - remove assumption that the backing file/device had
    512-byte sectors
  - fix incorrect iovec size variable that would result
    in a buffer overrun when an o/s issued an i/o request
    with more s/g elements than the blockif api

r257005
  Export the block size capability to guests.
  - Use #defines for capability bits
  - Export the VTBLK_F_BLK_SIZE capability
  - Fix bug in calculating capacity: it is in
    512-byte units, not the underlying sector size

  This allows virtio-blk to have backing devices
  with non 512-byte sector sizes e.g. /dev/cd0, and
  4K-block harddrives.

Approved by:  re (glebius)
2013-10-25 18:39:01 +00:00
kib
47b928f216 MFC r256504:
Add a sysctl kern.disallow_high_osrel which disables executing the
images compiled on the world with higher major version number than the
high version number of the booted kernel.  Default to disable.

Approved by:	re (glebius)
2013-10-25 16:36:16 +00:00
kib
3056ea94bb MFC r256502:
Similar to debug.iosize_max_clamp sysctl, introduce
devfs_iosize_max_clamp sysctl, which allows/disables SSIZE_MAX-sized
i/o requests on the devfs files.

Approved by:	re (glebius)
2013-10-25 16:33:24 +00:00
kib
f2cf20f78f MFC r256501:
Remove two instances of ARGSUSED comment, and wrap lines nearby the
code that is to be changed.

Approved by:	re (glebius)
2013-10-25 16:31:28 +00:00
tijl
19e284f651 MFC r256925:
Add a dummy statement to the beginning of the pthread_cleanup_pop() macro
to allow a call of the macro to be labelled as in:

label:
  pthread_cleanup_pop();

Reviewed by:	imp
Approved by:	re (glebius)
2013-10-25 13:27:55 +00:00
hselasky
04fdff3ee1 MFC r256750:
Improve XHCI stability. When a command timeout happens, the command
should be aborted else the command queue can stop. Refer to section
"4.6.1.2" of the XHCI specification.

Approved by:	re (glebius)
2013-10-25 10:20:19 +00:00
smh
43cd197a0d MFC r256889:
Use the vdev's ashift to calculate the supported min block size passed to
zio_compress_data(..) when compressing l2arc buffers.

This eliminates L2ARC I/O errors, which resulted in very poor performance on
vdev's configured with block size greater than 512b due to compression
assuming a smaller min block size than the vdev supports.

Approved by:	re (glebius)
2013-10-24 15:21:20 +00:00
bdrewery
0fb83d0f20 MFC r256842:
Fix 'make delete-old-libs' and 'make check-libs' to delete .debug
  files created by WITH_DEBUG_FILES. Also cleanup .symbols files from
  the period between r244236 when .symbols were supported and r251512
  when they were renamed to .debug.

  Only propose to delete a .debug file if the corresponding library
  itself was deleted already.

Approved by:	bapt
Approved by:	re (glebius)
2013-10-24 11:35:50 +00:00
mav
c896ef2ccc MFC r256552:
Unify periph invalidation and destruction reporting.
Print message containing device model and serial number on invalidation.

Approved by:	re (hrs)
2013-10-24 10:33:31 +00:00
mav
5411f6951e MFC r256533:
Unhide "Serial Number" lines from bootverbose.  That information may
be useful for system administration to have in hard copy (in logs) if
one of several devices suddenly dies.

Approved by:	re (hrs)
2013-10-24 10:31:02 +00:00
hselasky
f15d281428 MFC r256500:
Add new USB ID.

PR:		usb/182936
Approved by:	re (Xin LI)
Obtainedrom:
2013-10-24 07:43:35 +00:00
hselasky
110ec3f7e3 MFC r256548:
Correct programming of XXX_MAXP register. This register is 16-bit wide
and not 8-bit. Fix support for isochronous transfers in USB host mode.
Fix a whitespace while at it.

PR:		usb/181987
Approved by:	re (Xin Li)
2013-10-24 07:38:32 +00:00
delphij
be939ca962 MFC r256833:
Drop cm_lock before calling mapper_close, which in turn could call
_citrus_mapper_close again and result in a deadlock otherwise.

This is similar to NetBSD PR/24023 (fixed in their r1.5 of this file).

PR:		bin/182994
Submitted by:	Fabian Keil <fk fabiankeil de>
Approved by:	re (hrs)
2013-10-24 05:01:49 +00:00
bdrewery
817f3323c4 MFC r256450:
Rename libbsdyml to libyaml, make private, and bump
  SHLIB_MAJOR to 1.0

Approved by:	bapt
Approved by:	re (glebius)
2013-10-23 18:07:07 +00:00
brooks
caa64dbe94 MFC r256687:
Upgrade to the latest version of mtree from NetBSD.  This revision
re-removes the printing of size for non-regular files, supports
type-less root (.) entries as seen in a couple ports, and corrects a bug
in -N that caused expanded Subversion $FreeBSD$ strings in comments to
be processed as /etc/group entries.

Includes one trivial portability fix (including <stdint.h> in three
files) that has been committed upstream.

Approved by:	re (glebius)
2013-10-23 17:59:17 +00:00
jmg
8f0de93313 MFC r256773:
Enable the automatic creation of a certificate (if one does not exists)
and enable the usage by sendmail if sendmail is enabled.

Reviewed by:    gshapiro
Approved by:	re (gjb)
2013-10-23 16:55:20 +00:00
gjb
11a75eb166 Revert r256944, which does not quite get the src/ directory correct.
Discussed with:	cperciva
Approved by:	re (implicit)
Pointyhat:	gjb
2013-10-22 23:37:54 +00:00
cperciva
3f78c32610 MFC r256921:
Thou shalt not leak build host state into the system being compiled.

Approved by:	re (gjb)
2013-10-22 21:53:32 +00:00
cperciva
287864b1a7 MFC r256775,r256776:
Add support for "first boot" rc.d scripts.

  Document this new functionality in rc.conf(5) and rc(8).

  Bump __FreeBSD_version so that ports can make use of this.

Approved by:	re (gjb)
2013-10-22 16:09:44 +00:00
hrs
bb4ca793bf MFC 256716,256835:
- Fix jail_parallel_start="YES".
- Fix ip[46].addr when interface parameter is not defined.
- Fix a bug which prevented jails from starting when $jail_conf was used and
  no jail name was specified.
- Display error messages when start/stop fails.

Approved by:	re (glebius)
2013-10-22 06:02:40 +00:00
neel
b31f0060b5 MFC r256645.
Add a new capability, VM_CAP_ENABLE_INVPCID, that can be enabled to expose
'invpcid' instruction to the guest. Currently bhyve will try to enable this
capability unconditionally if it is available.

Consolidate code in bhyve to set the capabilities so it is no longer
duplicated in BSP and AP bringup.

Add a sysctl 'vm.pmap.invpcid_works' to display whether the 'invpcid'
instruction is available.

Approved by:	re (hrs)
2013-10-22 00:58:51 +00:00
andreast
44f5357aec MFC: 256555
Move the resource allocation from the ata_*_probe section to the ata_*_attach
section. This prevents a boot crash on nearly all iMacs and PowerMacs/Books.

The allocation in the probe section was working before because ata_probe was
returning 0 which did not invoke a second DEVICE_PROBE. Now it returns
a BUS_PROBE_DEFAULT which can invoke a second DEVICE_PROBE which results in
a "failed to reserve resource" exit.

PR:	powerpc/182978
Approved by:	re(gjb)
2013-10-21 19:11:15 +00:00
np
71c5e06ccc MFC r256470:
Update krping to the latest upstream code.  Move all the FreeBSD
specific parts to krping_dev.c, which leaves the other files as
close to their upstream versions as possible.

Approved by:	re (glebius)
2013-10-21 06:31:56 +00:00
gibbs
82b4688a67 MFC 256813:
The Xen userland event channel driver isn't complete.  Disabled it
from the kernel build until it is ready.

sys/conf/files:
	Remove the entry for xen/evtchn/evtchn_dev.c so it is not included
	in any kernel builds.

Noticed by:	smh
Approved by:	re (hrs)
------------------------------------------------------------------------
2013-10-21 04:00:23 +00:00
np
8ac41f6ae6 MFC r256467:
Delete all of the old RDMA code (except krping, which was switched to
use sys/ofed some time back).  This has been sitting around as dead code
in the tree for a very long time.

Approved by:	re (hrs)
2013-10-21 01:15:05 +00:00
np
01cd6364a8 MFC r256694, r256713, r256714.
r256694:
iw_cxgbe: iWARP driver for Chelsio T4/T5 chips.  This is a straight port
of the iw_cxgb4 found in OFED distributions.

r256713:
iw_cxgbe should have a dependency on t4nex.

r256714:
Fix typo in previous commit.

Approved by:	re (hrs)
2013-10-21 01:10:37 +00:00
alfred
514a2c2eaa Fix resource free.
The order of releasing resources in mlxen was wrong, which caused
panic on reload of the module.

MFC: 256682

Submitted by:	Shahar Klein (shahark at mellanox.com)
Approved by:	 re
2013-10-20 21:21:50 +00:00
np
b36ea75245 MFC r256477:
cxgbe(4): Store the log2 of the # of doorbells per BAR2 page for both
ingress and egress queues, and for both T4 and T5.  These values are
used by the T4/T5 iWARP driver.

Approved by:	re (glebius)
2013-10-20 16:45:01 +00:00
np
6de0bdec97 MFC r256459.
cxgbe(4): Update T4 and T5 firmwares to 1.9.12.0

Approved by:	re (glebius)
2013-10-20 15:24:44 +00:00