]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoRefactor the VAP transmit path code into a utility function that both
adrian [Sun, 28 Jul 2013 04:53:00 +0000 (04:53 +0000)]
Refactor the VAP transmit path code into a utility function that both
the normal and the mesh transmit paths can use.

The API is a bit horrible because it both consumes the mbuf and frees
the node reference regardless of whether it succeeds or not.
It's a hold-over from how the code behaves; it'd be nice to have it
not free the node reference / mbuf if TX fails and let the caller
decide what to do.

10 years agoDTrace: re-apply r249426 now that the underlying issues have been solved.
pfg [Sun, 28 Jul 2013 01:02:17 +0000 (01:02 +0000)]
DTrace: re-apply r249426 now that the underlying issues have been solved.

Merge change from illumos:

3519 DTrace fails to resolve const types from fbt
3520 dtrace internal error -- token type 316 is not a valid D
     compilation token
3521 clean up dtrace unit tests

Illumos Revision: e98f46c

Reference:
https://www.illumos.org/issues/3519
https://www.illumos.org/issues/3520
https://www.illumos.org/issues/3521

Tested by: Fabian Keil
Obtained from: Illumos
MFC after: 1 month

10 years agoDTrace: re-merge remainder of r249367 (original from Illumos).
pfg [Sun, 28 Jul 2013 00:45:20 +0000 (00:45 +0000)]
DTrace: re-merge remainder of r249367 (original from Illumos).

Bring back some important fixes from Illumos:

3022 DTrace: keys should not affect the sort order when sorting by value
3023 it should be possible to dereference dynamic variables
3024 D integer narrowing needs some work

We particularly avoid the LD_NOLAZYLOAD changes that Illumos made
as those don't apply to FreeBSD and were causing problems in
interactive mode.

Illumos Revision: 13758:23432da34147

Reference:

https://www.illumos.org/issues/3022
https://www.illumos.org/issues/3023
https://www.illumos.org/issues/3024

MFC after: 1 month
Tested by: markj

10 years agoSynchronize device cache on close only if there were some write operations.
mav [Sat, 27 Jul 2013 22:44:55 +0000 (22:44 +0000)]
Synchronize device cache on close only if there were some write operations.
While these operations are not really needed otherwise, at least for SCSI
they may cause extra errors if some other initiator holds write exclusive
reservation on the LUN (SYNCHRONIZE CACHE handled as "write" operation).

10 years agoProvide some examples for watchdogd usage.
alfred [Sat, 27 Jul 2013 22:23:32 +0000 (22:23 +0000)]
Provide some examples for watchdogd usage.

10 years agoOops, revert unwanted part of r253721.
mav [Sat, 27 Jul 2013 22:21:10 +0000 (22:21 +0000)]
Oops, revert unwanted part of r253721.

10 years agoDetect unsupported PREVENT ALLOW MEDIUM REMOVAL and SYNCHRONIZE CACHE(10)
mav [Sat, 27 Jul 2013 22:19:34 +0000 (22:19 +0000)]
Detect unsupported PREVENT ALLOW MEDIUM REMOVAL and SYNCHRONIZE CACHE(10)
to not spam devices with useless commands and logs with errors.

10 years agoUse kern_ioctl() rather than ioctl() for testing the FBT provider, since the
markj [Sat, 27 Jul 2013 21:31:48 +0000 (21:31 +0000)]
Use kern_ioctl() rather than ioctl() for testing the FBT provider, since the
latter doesn't exist in FreeBSD. All the tests under fbtprovider pass now.

10 years agoFix watchdog pretimeout.
alfred [Sat, 27 Jul 2013 20:47:01 +0000 (20:47 +0000)]
Fix watchdog pretimeout.

The original API calls for pow2ns, however the new APIs from
Linux call for seconds.

We need to be able to convert to/from 2^Nns to seconds in both
userland and kernel to fix this and properly compare units.

10 years agoPut in commented-out version of beastie menu commands
kientzle [Sat, 27 Jul 2013 18:19:28 +0000 (18:19 +0000)]
Put in commented-out version of beastie menu commands
so that non-i386 users can easily experiment with this.

10 years agoInstall Forth infrastructure along with ubldr.
kientzle [Sat, 27 Jul 2013 18:18:46 +0000 (18:18 +0000)]
Install Forth infrastructure along with ubldr.

Note:  loader.rc is installed as loader.rc.sample
so that by default, none of this is actually used.

10 years agoupdate ciss debugger command to iterate over multiple raid controllers up to
sbruno [Sat, 27 Jul 2013 17:20:43 +0000 (17:20 +0000)]
update ciss debugger command to iterate over multiple raid controllers up to
max controllers supported

PR: kern/179932
Reviewed by: Markus Gebert <markus.gebert@hostpoint.ch>
MFC after: 2 weeks
Sponsored by: Yahoo! Inc.

10 years agoMFgem r251960: re-check the mgt device object for the requested page
kib [Sat, 27 Jul 2013 16:44:37 +0000 (16:44 +0000)]
MFgem r251960: re-check the mgt device object for the requested page
after the object was relocked.

Tested by: dumbbell
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoThe pmap_qenter() and pmap_qremove() perform TLB invalidation on its
kib [Sat, 27 Jul 2013 16:42:29 +0000 (16:42 +0000)]
The pmap_qenter() and pmap_qremove() perform TLB invalidation on its
own, no need to call pmap_invalidate_range() one more time.

Noted by: alc
MFC after: 1 week

10 years agoAt some point after stable/7 the ACPI and ISA interfaces to the IPMI controller
sbruno [Sat, 27 Jul 2013 16:32:34 +0000 (16:32 +0000)]
At some point after stable/7 the ACPI and ISA interfaces to the IPMI controller
no longer have the parent in the device tree.  This causes the identify
function in ipmi_isa.c to attempt to probe and poke at the ISA IPMI interface

Move the check for ipmi_attached out of the ipmi_isa_attach function and into
the ipmi_isa_identify function.  Remove the check of the device tree for
ipmi devices attached.

This probing appears to make Broadcom management firmware on Dell machines
crash and emit NMI EISA warnings at various times requiring power cycles
of the machines to restore.

Bump MAX_TIMEOUT to 6 seconds as a hack for super slow IPMI interfaces that
need longer to respond to our intial probes on startup.

Tested on Dell R410, R510, R815, HP DL160G6

This is MFC candidate for 9.2R

Reviewed by: peter
MFC after: 2 weeks
Sponsored by: Yahoo! Inc.

10 years ago- Set the System Identifier in the Primary Volume Descriptor to FreeBSD
marius [Sat, 27 Jul 2013 15:28:31 +0000 (15:28 +0000)]
- Set the System Identifier in the Primary Volume Descriptor to FreeBSD
  rather than NetBSD.
- Correctly set the Expiration Time in the Primary Volume Descriptor;
  according to ISO 9660 8.4.26.1 unspecified date and time are denoted
  by the digit 0 in RBP 1 to 16 but the number 0 in RBP 17. [1]
- Merge iso9660_rrip.c rev. 1.11 from NetBSD: name_len should be read
  as unsigned byte. [2]
  Note: This is according to ISO 9660 9.1.10.
- Rock Ridge TF entries should use a length of 5, because after the 4
  bytes of generic SUSP header there is one byte of flags. See typedef
  of ISO_RRIP_TF in iso9660_rrip.h. [1]

Submitted by: Thomas Schmitt [1]
Obtained from: NetBSD [2]
MFC after: 3 days

10 years agoIntroduce 3 seconds timeout on `graid stop` command (mostly with -f flag).
mav [Sat, 27 Jul 2013 15:02:19 +0000 (15:02 +0000)]
Introduce 3 seconds timeout on `graid stop` command (mostly with -f flag).
Since completion waiting goes in g_event thread, it may cause GEOM deadlock
if consumer on top (for example, ZFS) uses g_event thread for closing.

10 years agoImplement some function tracing.
adrian [Sat, 27 Jul 2013 14:58:23 +0000 (14:58 +0000)]
Implement some function tracing.

Submitted by: Cedric GROSS <cg@cgross.info>

10 years agoDisplay a string instead of a numeric code in the linkdnrc sysctl.
np [Sat, 27 Jul 2013 07:43:43 +0000 (07:43 +0000)]
Display a string instead of a numeric code in the linkdnrc sysctl.

Submitted by: gnn@

10 years agoExpand the list of devices claimed by cxgbe(4).
np [Sat, 27 Jul 2013 00:53:07 +0000 (00:53 +0000)]
Expand the list of devices claimed by cxgbe(4).

10 years agoImprove page LRU quality and simplify the logic.
jeff [Fri, 26 Jul 2013 23:22:05 +0000 (23:22 +0000)]
Improve page LRU quality and simplify the logic.

 - Don't short-circuit aging tests for unmapped objects.  This biases
   against unmapped file pages and transient mappings.
 - Always honor PGA_REFERENCED.  We can now use this after soft busying
   to lazily restart the LRU.
 - Don't transition directly from active to cached bypassing the inactive
   queue.  This frees recently used data much too early.
 - Rename actcount to act_delta to be more consistent with use and meaning.

Reviewed by: kib, alc
Sponsored by: EMC / Isilon Storage Division

10 years agoFix Denial of Service vulnerability in named(8). [13:07]
delphij [Fri, 26 Jul 2013 22:40:17 +0000 (22:40 +0000)]
Fix Denial of Service vulnerability in named(8). [13:07]

Security: CVE-2013-4854
Security: FreeBSD-SA-13:07.bind
Approved by: so

10 years agoAdd support for packet-sniffing tracers to cxgbe(4). This works with
np [Fri, 26 Jul 2013 22:04:11 +0000 (22:04 +0000)]
Add support for packet-sniffing tracers to cxgbe(4).  This works with
all T4 and T5 based cards and is useful for analyzing TSO, LRO, TOE, and
for general purpose monitoring without tapping any cxgbe or cxl ifnet
directly.

Tracers on the T4/T5 chips provide access to Ethernet frames exactly as
they were received from or transmitted on the wire.  On transmit, a
tracer will capture a frame after TSO segmentation, hw VLAN tag
insertion, hw L3 & L4 checksum insertion, etc.  It will also capture
frames generated by the TCP offload engine (TOE traffic is normally
invisible to the kernel).  On receive, a tracer will capture a frame
before hw VLAN extraction, runt filtering, other badness filtering,
before the steering/drop/L2-rewrite filters or the TOE have had a go at
it, and of course before sw LRO in the driver.

There are 4 tracers on a chip.  A tracer can trace only in one direction
(tx or rx).  For now cxgbetool will set up tracers to capture the first
128B of every transmitted or received frame on a given port.  This is a
small subset of what the hardware can do.  A pseudo ifnet with the same
name as the nexus driver (t4nex0 or t5nex0) will be created for tracing.
The data delivered to this ifnet is an additional copy made inside the
chip.  Normal delivery to cxgbe<n> or cxl<n> will be made as usual.

/* watch cxl0, which is the first port hanging off t5nex0. */
# cxgbetool t5nex0 tracer 0 tx0  (watch what cxl0 is transmitting)
# cxgbetool t5nex0 tracer 1 rx0  (watch what cxl0 is receiving)
# cxgbetool t5nex0 tracer list
# tcpdump -i t5nex0   <== all that cxl0 sees and puts on the wire

If you were doing TSO, a tcpdump on cxl0 may have shown you ~64K
"frames" with no L3/L4 checksum but this will show you the frames that
were actually transmitted.

/* all done */
# cxgbetool t5nex0 tracer 0 disable
# cxgbetool t5nex0 tracer 1 disable
# cxgbetool t5nex0 tracer list
# ifconfig t5nex0 destroy

10 years agoMerge ACPICA 20130725.
jkim [Fri, 26 Jul 2013 21:34:09 +0000 (21:34 +0000)]
Merge ACPICA 20130725.

10 years agoMake the BSD-licensed patch the default.
pfg [Fri, 26 Jul 2013 21:25:18 +0000 (21:25 +0000)]
Make the BSD-licensed patch the default.

The BSD-licensed patch(1) command has matured and it's behaviour
can be considered equivalent to the older version of GNU patch
in the tree.

The switch has been extensively tested [1] and only two ports
presented regressions, which have since been fixed.

For convenience a new WITH_GNU_PATCH option is available,
but it will likely be removed in the near future.

PR: 176313
Approved by: portmgr

10 years agoReserve room for ioctls that aren't in this copy of the driver yet.
np [Fri, 26 Jul 2013 20:54:33 +0000 (20:54 +0000)]
Reserve room for ioctls that aren't in this copy of the driver yet.

10 years agoBreak out the static, global LACP debug options into a per-lagg unit
adrian [Fri, 26 Jul 2013 19:41:13 +0000 (19:41 +0000)]
Break out the static, global LACP debug options into a per-lagg unit
sysctl tree.

* Create a net.link.lagg.X.lacp node
* Add a debug node under that for tx_test and rx_test
* Add lacp_strict_mode, defaulting to 1

tx_test and rx_test are still a bitmap of unit numbers for now.
At some point it would be nice to create child nodes of the lagg bundle
for each sub-interface, and then populate those with various knobs
and statistics.

Sponsored by: Netflix

10 years ago - Use kmem_malloc rather than kmem_alloc() for GDT/LDT/tss allocations etc.
jeff [Fri, 26 Jul 2013 19:06:14 +0000 (19:06 +0000)]
 - Use kmem_malloc rather than kmem_alloc() for GDT/LDT/tss allocations etc.
   This eliminates some unusual uses of that API in favor of more typical
   uses of kmem_malloc().

Discussed with: kib/alc
Tested by: pho
Sponsored by: EMC / Isilon Storage Division

10 years agoImplement certificate verification, and many other SSL-related
des [Fri, 26 Jul 2013 15:53:43 +0000 (15:53 +0000)]
Implement certificate verification, and many other SSL-related
imrovements; complete details in the PR.

PR: kern/175514
Submitted by: Michael Gmelin <freebsd@grem.de>
MFC after: 1 week

10 years agofix UPDATING entry in r253677
avg [Fri, 26 Jul 2013 14:43:38 +0000 (14:43 +0000)]
fix UPDATING entry in r253677

MFC after: 3 weeks
X-MFC with: r253677

10 years agoStyle issue in r253661.
pfg [Fri, 26 Jul 2013 14:37:23 +0000 (14:37 +0000)]
Style issue in r253661.

Pointed out by: avg
MFC after: 1 month

10 years agomake path matching in devfs rules consistent and sane (and safer)
avg [Fri, 26 Jul 2013 14:25:58 +0000 (14:25 +0000)]
make path matching in devfs rules consistent and sane (and safer)

Before this change path matching had the following features:
- for device nodes the patterns were matched against full path
- in the above case '/' in a path could be matched by a wildcard
- for directories and links only the last component was matched

So, for example, a pattern like 're*' could match the following entries:
- re0 device
- responder/u0 device
- zvol/recpool directory

Although it was possible to work around this behavior (once it was spotted
and understood), it was very confusing and contrary to documentation.

Now we always match a full path for all types of devfs entries (devices,
directories, links) and a '/' has to be matched explicitly.
This behavior follows the shell globbing rules.

This change is originally developed by Jaakko Heinonen.
Many thanks!

PR: kern/122838
Submitted by: jh
MFC after: 4 weeks

10 years ago- Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4.
marius [Fri, 26 Jul 2013 14:23:25 +0000 (14:23 +0000)]
- Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4.
  Introduce $BASEBITSDIR for clarity and in order to avoid repeating this
  mistake in the future. Fixing this ensures that we pick up the newly built
  boot code and loader native to the target, which is especially relevant
  when cross-building release images.
- It is pointless to specify an endianess for ISO 9660 images so strip that.

MFC after: 3 days

10 years agoEnsure that makefs.h is included when using ufs_bswap.h so the FFS_EI macro
marius [Fri, 26 Jul 2013 14:22:03 +0000 (14:22 +0000)]
Ensure that makefs.h is included when using ufs_bswap.h so the FFS_EI macro
is picked up when defined. Previously, ffs_subr.c was always built without
support for opposite endianess as it doesn't include makefs.h on its own.

MFC after: 3 days

10 years agoRegenerate usb.conf
hselasky [Fri, 26 Jul 2013 10:25:18 +0000 (10:25 +0000)]
Regenerate usb.conf

MFC after: 1 week

10 years agoAssume that all Apple products using interface class 255, subclass 253
hselasky [Fri, 26 Jul 2013 09:58:56 +0000 (09:58 +0000)]
Assume that all Apple products using interface class 255, subclass 253
and protocol 1 are USB ethernet adapters. This avoids keeping and updating
the product list every now and then. This patch will add support for the
USB ethernet interface found in the IPAD.

MFC after: 1 week

10 years agoRemove define and documentation for vm_pageout_algorithm missed in r253587
zont [Fri, 26 Jul 2013 02:00:06 +0000 (02:00 +0000)]
Remove define and documentation for vm_pageout_algorithm missed in r253587

10 years agoFix a segfault in ctfmerge due to a bug in gcc.
pfg [Fri, 26 Jul 2013 00:28:19 +0000 (00:28 +0000)]
Fix a segfault in ctfmerge due to a bug in gcc.

GCC can generate bogus dwarf attributes with DW_AT_byte_size
set to 0xFFFFFFFF.
The issue was originaly detected in NetBSD but it has been
adapted for portability and to avoid compiler warnings.

Reference:
https://www.illumos.org/issues/3776

Obtained from: NetBSD
MFC after: 1 month

10 years agoDocument the sbinuptime() and getsbinuptime() functions introduced in
brooks [Thu, 25 Jul 2013 20:53:15 +0000 (20:53 +0000)]
Document the sbinuptime() and getsbinuptime() functions introduced in
r247452.

Sponsored by: DARPA, AFRL

10 years agosh: Remove an incorrect comment.
jilles [Thu, 25 Jul 2013 20:50:35 +0000 (20:50 +0000)]
sh: Remove an incorrect comment.

10 years agosh: Remove #define MKINIT.
jilles [Thu, 25 Jul 2013 19:48:15 +0000 (19:48 +0000)]
sh: Remove #define MKINIT.

MKINIT only served for the removed mkinit. Many variables can be static now.

10 years agoext2fs: Return EINVAL for negative uio_offset as in UFS.
pfg [Thu, 25 Jul 2013 19:37:49 +0000 (19:37 +0000)]
ext2fs: Return EINVAL for negative uio_offset as in UFS.

While here drop old comment that doesn't really apply.

MFC after: 1 month
Discussed with: gleb

10 years agoEnhance the description of NOTE_TRACK:
jhb [Thu, 25 Jul 2013 19:34:24 +0000 (19:34 +0000)]
Enhance the description of NOTE_TRACK:
- NOTE_TRACK has never triggered a NOTE_TRACK event from the parent pid.
  If NOTE_FORK is set, the listener will get a NOTE_FORK event from
  the parent pid, but not a separate NOTE_TRACK event.
- Explicitly note that the event added to monitor the child process
  preserves the fflags from the original event.
- Move the description of NOTE_TRACKERR under NOTE_TRACK as it is not a
  bit for the user to set (which is what this list pupports to be).
  Also, explicitly note that if an error occurs, the NOTE_CHILD event
  will not be generated.

MFC after: 1 week

10 years agoFix typo.
adrian [Thu, 25 Jul 2013 19:10:23 +0000 (19:10 +0000)]
Fix typo.

Sponsored by: Netflix

10 years agoSet the device description after we call uart_probe(). In uart_probe()
marcel [Thu, 25 Jul 2013 16:57:27 +0000 (16:57 +0000)]
Set the device description after we call uart_probe(). In uart_probe()
we call device-specific probe functions, which can (and typically will)
set the device description based on low-level device probe information.
In the end we never actually used the device description that we so
carefully maintained in the PCI match table. By setting the device
description after we call uart_probe(), we'll print the more user-
friendly description by default.

10 years agoAvoid trashing IP fragments:
jhb [Thu, 25 Jul 2013 16:34:34 +0000 (16:34 +0000)]
Avoid trashing IP fragments:
- Only enable UDP/TCP hardware checksums if CSUM_UDP or CSUM_TCP is set.
- Only enable IP hardware checksums if CSUM_IP is set.

PR: kern/180430
Submitted by: Meny Yossefi <menyy@mellanox.com>
MFC after: 1 week

10 years agoext2fs: Drop a check that wan't supposed to be in r253651.
pfg [Thu, 25 Jul 2013 16:04:55 +0000 (16:04 +0000)]
ext2fs: Drop a check that wan't supposed to be in r253651.

MFC after: 1 month

10 years agoext2fs: Don't assume that on-disk format of a directory is the same
pfg [Thu, 25 Jul 2013 15:34:20 +0000 (15:34 +0000)]
ext2fs: Don't assume that on-disk format of a directory is the same
as in <sys/dirent.h>

ext2_readdir() has always been very fs specific and different
with respect to its ufs_ counterpart. Recent changes from UFS
have made it possible to share more closely the implementation.

MFUFS r252438:
Always start parsing at DIRBLKSIZ aligned offset, skip first entries if
uio_offset is not DIRBLKSIZ aligned. Return EINVAL if buffer is too
small for single entry.

Preallocate buffer for cookies.

Skip entries with zero inode number.

Reviewed by: gleb, Zheng Liu
MFC after: 1 month

10 years agosh: Remove mkinit.
jilles [Thu, 25 Jul 2013 15:08:41 +0000 (15:08 +0000)]
sh: Remove mkinit.

Replace the RESET blocks with regular functions and a reset() function that
calls them all.

This code generation tool is unusual and does not appear to provide much
benefit. I do not think isolating the knowledge about which modules need to
be reset is worth an almost 500-line build tool and wider scope for
variables used by the reset functions.

Also, relying on reset functions is often wrong: the cleanup should be done
in exception handlers so that no stale state remains after 'command eval'
and the like.

10 years agosh: Remove output.c's reset() handler.
jilles [Thu, 25 Jul 2013 13:09:17 +0000 (13:09 +0000)]
sh: Remove output.c's reset() handler.

These cleanup operations are not needed because they are already performed
after an optimized command substitution (whether there was an error or not).

10 years agoDecode some bits defined in AHCI 1.3.1 Device Sleep Technical Proposal.
mav [Thu, 25 Jul 2013 10:29:40 +0000 (10:29 +0000)]
Decode some bits defined in AHCI 1.3.1 Device Sleep Technical Proposal.
For now this is only conmetics to report HBA capabilities (Haswell?).

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

10 years agoMatch function definition to declaration and call-site.
uqs [Thu, 25 Jul 2013 09:30:00 +0000 (09:30 +0000)]
Match function definition to declaration and call-site.

SVN r95378 refactored ahc_9005_subdevinfo_valid out into a separate
function but swapped the vendor/subvendor and device/subdevice pairs of
the parameters.

Found by: Coverity Prevent, CID 744931
Reviewed by: gibbs

10 years agosnd_ds1(4): Fix order of arguments for stereo/16bit mode
uqs [Thu, 25 Jul 2013 09:29:48 +0000 (09:29 +0000)]
snd_ds1(4): Fix order of arguments for stereo/16bit mode

This function is called 4 times in this file, with swapped parameter
ordering. Fix the function definition instead of all the call sites.
16bit/stereo or 8bit/mono playback is unaffected and was probably
working fine before, this should fix 16bit/mono and 8bit/stereo
playback.

Found by: Coverity Scan, CID 1006688

10 years agoAdd missing NULL check after malloc(M_NOWAIT).
mav [Thu, 25 Jul 2013 09:12:46 +0000 (09:12 +0000)]
Add missing NULL check after malloc(M_NOWAIT).

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

10 years agoFollowing r222950, revert unintentional change cls -> class in argument name
mav [Thu, 25 Jul 2013 08:41:22 +0000 (08:41 +0000)]
Following r222950, revert unintentional change cls -> class in argument name
in r245264.  Aside from non-uniformity, that again confused C++ compilers.

10 years agoAdd ieee80211_add_{qos,wpa,rsn}() functions since they are needed by an
rpaulo [Thu, 25 Jul 2013 06:23:26 +0000 (06:23 +0000)]
Add ieee80211_add_{qos,wpa,rsn}() functions since they are needed by an
OpenBSD driver that is being ported to FreeBSD.

Reviewed by: adrian

10 years agoBump __FreeBSD_version for the addition of libusb's pkgconf files.
rpaulo [Thu, 25 Jul 2013 03:55:50 +0000 (03:55 +0000)]
Bump __FreeBSD_version for the addition of libusb's pkgconf files.

10 years agoAdd pkgconf files for libusb.
rpaulo [Thu, 25 Jul 2013 03:54:08 +0000 (03:54 +0000)]
Add pkgconf files for libusb.

Reviewed by: hselasky

10 years agoClear entire map structure including locks so that the
kientzle [Thu, 25 Jul 2013 03:48:37 +0000 (03:48 +0000)]
Clear entire map structure including locks so that the
locks don't accidentally appear to have been already
initialized.

In particular, this fixes a consistent kernel crash on
armv6 with:
  panic: lock "vm map (user)" 0xc09cc050 already initialized
that appeared with r251709.

PR: arm/180820

10 years agoRevert ROOTDEVNAME change from previous commit.
rpaulo [Thu, 25 Jul 2013 03:44:12 +0000 (03:44 +0000)]
Revert ROOTDEVNAME change from previous commit.

10 years agoEnable modules for the BeagleBone and for the Raspberry Pi.
rpaulo [Thu, 25 Jul 2013 03:31:27 +0000 (03:31 +0000)]
Enable modules for the BeagleBone and for the Raspberry Pi.

10 years agoUse VMFS_OPTIMAL_SPACE instead of VMFS_ALIGNED_SPACE in shm_map().
jhb [Wed, 24 Jul 2013 20:34:25 +0000 (20:34 +0000)]
Use VMFS_OPTIMAL_SPACE instead of VMFS_ALIGNED_SPACE in shm_map().

10 years agofuse: revert kernel_header update.
pfg [Wed, 24 Jul 2013 20:21:29 +0000 (20:21 +0000)]
fuse: revert kernel_header update.

It seems to be causing problems due to the lack of the new features.

Found by: bapt
Pointed hat: pfg

10 years agoper style(9):
obrien [Wed, 24 Jul 2013 18:32:15 +0000 (18:32 +0000)]
per style(9):
   Kernel include files (i.e. sys/*.h) come first; normally, include
   <sys/types.h> OR <sys/param.h>, but not both.  <sys/types.h> includes
   <sys/cdefs.h>, and it is okay to depend on that.

10 years agoFurther restrict the MAC addresses that we use for UUID generation
marcel [Wed, 24 Jul 2013 18:13:43 +0000 (18:13 +0000)]
Further restrict the MAC addresses that we use for UUID generation
to those that are universally administered. While it is possible to
add locally administered MAC addresses, it's unclear whether those
are (expected) to be more unique than random multicast MAC addresses
or not.

With many U-Boot configurations assigning fixed and non-official MAC
addresses to ethernet ports and without setting the 'X' flag, this
change may have very little value in the embedded (development)
space. Uniqueness of the universally administered addresses is non-
existent on the (H/W) bench and questionable under the (S/W) desk.
In short: this change is aimed at production environments...

10 years agoFix bug in universe where if upgrade_checks wants a new make,
sjg [Wed, 24 Jul 2013 17:55:08 +0000 (17:55 +0000)]
Fix bug in universe where if upgrade_checks wants a new make,
it gets built 16 times in parallel in the same location.
While we are at it, until we finish getting rid of fmake,
be explicit about the make we want to use, thus avoid the problem
of the temp make being the wrong version.

Reviewed by: obrien

10 years agoIn uuid_ether_add(), avoid false positives due to the limited type
marcel [Wed, 24 Jul 2013 16:22:27 +0000 (16:22 +0000)]
In uuid_ether_add(), avoid false positives due to the limited type
used to hold the sum of the bytes of the MAC address. While here,
rename the variable that holds the sum from 'c' to 'sum'.

Pointed out by: thompsa@

10 years agopatch: style fix
pfg [Wed, 24 Jul 2013 15:46:49 +0000 (15:46 +0000)]
patch: style fix

Submitted by: gogolok

10 years agoSupport setting up the iwn debug flags during probe/attach by
adrian [Wed, 24 Jul 2013 13:31:31 +0000 (13:31 +0000)]
Support setting up the iwn debug flags during probe/attach by
checking "hint.iwn.X.debug".

Submitted by: Cedric GROSS <cg@cgross.info>

10 years agoAdd new IDs for The Intel 2230 wireless NIC.
adrian [Wed, 24 Jul 2013 13:20:45 +0000 (13:20 +0000)]
Add new IDs for The Intel 2230 wireless NIC.

Submitted by: Cedric GROSS <cg@cgross.info>

10 years agozfs module: perform cleanup during shutdown in addition to module unload
avg [Wed, 24 Jul 2013 09:59:16 +0000 (09:59 +0000)]
zfs module: perform cleanup during shutdown in addition to module unload

- move init and fini code into separate functions (like it is done upstream)
- invoke fini code via shutdown_post_sync event hook

This should make zfs close its underlying devices during shutdown,
which may be important for their drivers.

MFC after: 20 days

10 years agozfsboottest: remove explicit -Werror
avg [Wed, 24 Jul 2013 09:50:44 +0000 (09:50 +0000)]
zfsboottest: remove explicit -Werror

Unfortunately sys/boot is compliled without -Werror at the moment.

MFC after: 7 days

10 years agorename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LAST
avg [Wed, 24 Jul 2013 09:45:31 +0000 (09:45 +0000)]
rename scheduler->swapper and SI_SUB_RUN_SCHEDULER->SI_SUB_LAST

Also directly call swapper() at the end of mi_startup instead of
relying on swapper being the last thing in sysinits order.

Rationale:

- "RUN_SCHEDULER" was misleading, scheduling already takes place at that stage
- "scheduler" was misleading, the function swaps in the swapped out processes
- another SYSINIT(SI_SUB_RUN_SCHEDULER, SI_ORDER_ANY) could never be
  invoked depending on its relative order with scheduler; this was not obvious
  and the bug actually used to exist

Reviewed by: kib (ealier version)
MFC after: 14 days

10 years agozfs: move vnode creation from zfs_znode_cache_constructor to zfs_znode_alloc
avg [Wed, 24 Jul 2013 09:15:59 +0000 (09:15 +0000)]
zfs: move vnode creation from zfs_znode_cache_constructor to zfs_znode_alloc

All other places where a znode is allocated do not need z_vnode at all.
These are:
- zfs_create_share_dir
- zfs_create_fs

This chnage ensures two things:
- VN_LOCK_ASHARE is not erroneously called for VFIFO vnodes
- vn_lock is called on a fully constructed vnode with correct v_ops

The change also allows to make zfs_znode_cache_constructor a normal
kmem_cache constructor again (as it is in upstream).
This allows to avoid a problem where zfs_znode_cache_destructor
may be called on un-constructed znodes.

MFC after: 17 days

10 years agonewvers.sh: add another git-svn fallback
avg [Wed, 24 Jul 2013 09:06:50 +0000 (09:06 +0000)]
newvers.sh: add another git-svn fallback

This time it is for a git mirror that stores svn revisions as
git notes, e.g. https://github.com/freebsd/freebsd

MFC after: 10 days
Sponsored by: HybridCluster

10 years agonewvers.sh: fix the fallback case of git-svn detection
avg [Wed, 24 Jul 2013 09:05:04 +0000 (09:05 +0000)]
newvers.sh: fix the fallback case of git-svn detection

MFC after: 5 days
Sponsored by: HybridCluster

10 years agoRemove duplicated parapgraph.
se [Wed, 24 Jul 2013 08:36:29 +0000 (08:36 +0000)]
Remove duplicated parapgraph.

MFC after: 3 days

10 years agoRemove unused argument from vmem_add1().
glebius [Wed, 24 Jul 2013 08:02:56 +0000 (08:02 +0000)]
Remove unused argument from vmem_add1().

Reviewed by: jeff

10 years agoSince r251709 a slab no longer use 8-bit indicies to manage items,
glebius [Wed, 24 Jul 2013 06:13:00 +0000 (06:13 +0000)]
Since r251709 a slab no longer use 8-bit indicies to manage items,
thus remove a stale comment.

Reviewed by: jeff

10 years agoDecouple the UUID generator from network interfaces by having MAC
marcel [Wed, 24 Jul 2013 04:24:21 +0000 (04:24 +0000)]
Decouple the UUID generator from network interfaces by having MAC
addresses added to the UUID generator using uuid_ether_add(). The
UUID generator keeps an arbitrary number of MAC addresses, under
the assumption that they are rarely removed (= uuid_ether_del()).
This achieves the following:
1.  It brings up closer to having the network stack as a loadable
    module.
2.  It allows the UUID generator to filter MAC addresses for best
    results (= highest chance of uniqeness).
3.  MAC addresses can come from anywhere, irrespactive of whether
    it's used for an interface or not.

A side-effect of the change is that when no MAC addresses have been
added, a random multicast MAC address is created once and re-used if
needed. Previusly, when a random MAC address was needed, it was
created for every call. Thus, a change in behaviour is introduced
for when no MAC addresses exist.

Obtained from: Juniper Networks, Inc.

10 years agoFix a bug in cp += SA_SIZE() in RTA_* loop. This could prevent
hrs [Wed, 24 Jul 2013 04:05:48 +0000 (04:05 +0000)]
Fix a bug in cp += SA_SIZE() in RTA_* loop.  This could prevent
RTA_IFP from displaying correctly in route get subcommand.

Spotted by: dim

10 years agoIncrease the size of the OFW bounce buffer to 4 pages. With this I can now run
jhibbits [Wed, 24 Jul 2013 02:01:01 +0000 (02:01 +0000)]
Increase the size of the OFW bounce buffer to 4 pages.  With this I can now run
'ofwdump -ap' on my quad G5.

MFC after: 9.2 branch

10 years ago - Remove the long obsolete 'vm_pageout_algorithm' experiment.
jeff [Wed, 24 Jul 2013 01:25:56 +0000 (01:25 +0000)]
 - Remove the long obsolete 'vm_pageout_algorithm' experiment.

Discussed with: alc
Sponsored by: EMC / Isilon Storage Division

10 years agoAdd support for emulation of the "or r/m, imm8" instruction.
neel [Tue, 23 Jul 2013 23:43:00 +0000 (23:43 +0000)]
Add support for emulation of the "or r/m, imm8" instruction.

Submitted by: Zhixiang Yu (zxyu.core@gmail.com)
Obtained from: GSoC 2013 (AHCI device emulation for bhyve)

10 years ago - Correct a stale comment. We don't have vclean() anymore. The work is
jeff [Tue, 23 Jul 2013 22:52:38 +0000 (22:52 +0000)]
 - Correct a stale comment.  We don't have vclean() anymore.  The work is
   done by vgonel() and destroy_vobject() should only be called once from
   VOP_INACTIVE().

Sponsored by: EMC / Isilon Storage Division

10 years agoFix a bug introduced in r252646 that causes a page with the PG_PTE_PAT bit set
neel [Tue, 23 Jul 2013 22:17:00 +0000 (22:17 +0000)]
Fix a bug introduced in r252646 that causes a page with the PG_PTE_PAT bit set
to be interpreted as a superpage. This is because PG_PTE_PAT is at the same
bit position in PTE as PG_PS is in a PDE.

This caused a number of regressions on amd64 systems: panic when starting
X applications, freeze during shutdown etc.

Pointy hat to: me
Tested by: gperez@entel.upc.edu, joel, dumbbell
Reviewed by: kib

10 years agowordexp(): Fix syntax validation for backslashes in single-quotes.
jilles [Tue, 23 Jul 2013 21:09:26 +0000 (21:09 +0000)]
wordexp(): Fix syntax validation for backslashes in single-quotes.

10 years agoGenerate debug data release dist sets
emaste [Tue, 23 Jul 2013 19:34:09 +0000 (19:34 +0000)]
Generate debug data release dist sets

If WITH_DEBUG_FILES is set the standalone debug data will be excluded
from each ${dist}.txz and placed in a ${dist}.debug.txz.

Submitted by: gjb
Reviewed by: brooks

10 years agotmpfs works perfectly fine with -o union -- there is no reason to exclude it
nwhitehorn [Tue, 23 Jul 2013 14:48:37 +0000 (14:48 +0000)]
tmpfs works perfectly fine with -o union -- there is no reason to exclude it
from the list of options.

10 years agoAdd the support for 802.1q and port based vlans for arswitch.
loos [Tue, 23 Jul 2013 14:24:22 +0000 (14:24 +0000)]
Add the support for 802.1q and port based vlans for arswitch.

Tested on: RB450G (standalone ar8316), RSPRO (standalone ar8316) and
TPLink MR-3220 (ar724x integrated switch).

Approved by: adrian (mentor)
Obtained from: zrouter

10 years agoRemove the large part of struct ipsecstat. Only few fields of this
ae [Tue, 23 Jul 2013 14:14:24 +0000 (14:14 +0000)]
Remove the large part of struct ipsecstat. Only few fields of this
structure is used, but they already have equal fields in the struct
newipsecstat, that was introduced with FAST_IPSEC and then was merged
together with old ipsecstat structure.

This fixes kernel stack overflow on some architectures after migration
ipsecstat to PCPU counters.

Reported by: Taku YAMAMOTO, Maciej Milewski

10 years agoFix the arswitch instability problem. It turns out that the
loos [Tue, 23 Jul 2013 14:02:38 +0000 (14:02 +0000)]
Fix the arswitch instability problem.  It turns out that the
arswitch_writereg() routine was writing the registers in the wrong order.

Revert -r241918 as the root problem is now fixed. Remove another workaround
from arswitch_ar7240.c.

Simplify and fix the code on arswitch_writephy() by using
arswitch_writereg().

While here remove a redundant declaration from arswitchvar.h.

Approved by: adrian (mentor)

10 years agoAdd a new flag (ETHERSWITCH_VID_VALID) to say what vlangroups are in use.
loos [Tue, 23 Jul 2013 13:56:38 +0000 (13:56 +0000)]
Add a new flag (ETHERSWITCH_VID_VALID) to say what vlangroups are in use.
This fix the case when etherswitch is printing the information of port 0
vlan group (in port based vlan mode) with no member ports.

Add the ETHERSWITCH_VID_VALID support to ip17x driver.

Add the ETHERSWITCH_VID_VALID support to rt8366 driver.

arswitch doesn't need to be updated as it doesn't support vlans management
yet.

Approved by: adrian (mentor)

10 years agoFix the usage error message. The valid range is up to max. vlan - 1 since vlangroups...
loos [Tue, 23 Jul 2013 13:40:26 +0000 (13:40 +0000)]
Fix the usage error message.  The valid range is up to max. vlan - 1 since vlangroups starts at 0.

Approved by: adrian (mentor)

10 years agoRemove ftp2.tr.freebsd.org, it is out of date.
gavin [Tue, 23 Jul 2013 12:20:27 +0000 (12:20 +0000)]
Remove ftp2.tr.freebsd.org, it is out of date.

MFC after: 3 days

10 years agoRevert r249590 and in case if mp_ncpus isn't initialized use MAXCPU. This
glebius [Tue, 23 Jul 2013 11:16:40 +0000 (11:16 +0000)]
Revert r249590 and in case if mp_ncpus isn't initialized use MAXCPU. This
allows us to init counter zone at early stage of boot.

Reviewed by: kib
Tested by: Lytochkin Boris <lytboris gmail.com>

10 years agoAdd constant for PPP-Max-PayLoad tag.
glebius [Tue, 23 Jul 2013 10:25:34 +0000 (10:25 +0000)]
Add constant for PPP-Max-PayLoad tag.

Submitted by: Dmitry Luhtionov <dmitryluhtionov gmail.com>

10 years agoAdd isnan() and isinf() to the global namespace in libstdc++'s <cmath>.
theraven [Tue, 23 Jul 2013 10:23:43 +0000 (10:23 +0000)]
Add isnan() and isinf() to the global namespace in libstdc++'s <cmath>.

The standard (n3242, section 17.6.1.1, paragraph 4) says that, because these are
declared as macros in the C specification (even though they are
implemented as functions in the C++ library) they should be in the global
namespace.

A surprising number of configure checks rely on this.  It was broken by recent
cleanups to math.h.

10 years agoIn pci_cfgregread() and pci_cfgregwrite(), multiplex the domain and
marcel [Tue, 23 Jul 2013 03:03:17 +0000 (03:03 +0000)]
In pci_cfgregread() and pci_cfgregwrite(), multiplex the domain and
bus number into the bus argument. The bus number occupies the least
significant 8 bits. The PCI domain occupies the most significant 24
bits.

On the Altix 350, the PCI domain is a required parameter, but
changing the prototype of the pci_cfgreg*() functions to include a
separate domain argument has wide-spread consequences across the
supported architectures. We'd be changing a known interface.

Multiplexing is an acceptable kluge to give us what we need with
manageable impact. Note that the PCI bus number fits in 8 bits,
so the multiplexing of the domain is a backward compatible change.

10 years agoIn ia64_mca_init(), don't limit the allocation of the info block to
marcel [Tue, 23 Jul 2013 02:38:23 +0000 (02:38 +0000)]
In ia64_mca_init(), don't limit the allocation of the info block to
fall within the first 256MB of memory. The origin/reason for that
limitation is not known, but it's not believed to be required for
proper initialization. What is known is that the Altix 350 does not
have physical memory at that address (by virtue of the address space
bits).

Keep the boundary at 256MB so that the info block will be covered
by a single direct-mapped translation.

While here, change the flags to M_NOWAIT to eliminate confusion. It
does not change the behaviour of contigmalloc(). What is does is
makes the flags argument explicitly say what the actual behaviour
is.