]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoMake gcc happy by initialising the variable only set in a couple of
bz [Sat, 20 Sep 2014 08:18:48 +0000 (08:18 +0000)]
Make gcc happy by initialising the variable only set in a couple of
case statements without a default.

MFC after: 2 days
X-MFC with: r271871

9 years agoDon't install /etc/rc.d/ftp-proxy unless MK_PF == yes
ngie [Sat, 20 Sep 2014 06:34:34 +0000 (06:34 +0000)]
Don't install /etc/rc.d/ftp-proxy unless MK_PF == yes

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoDon't install /etc/rc.d/rwho unless MK_RCMDS == yes
ngie [Sat, 20 Sep 2014 06:05:24 +0000 (06:05 +0000)]
Don't install /etc/rc.d/rwho unless MK_RCMDS == yes

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoSort the optional rc.d scripts by their knobs
ngie [Sat, 20 Sep 2014 05:49:15 +0000 (05:49 +0000)]
Sort the optional rc.d scripts by their knobs

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd some more KTR events to help debugging.
neel [Sat, 20 Sep 2014 05:13:03 +0000 (05:13 +0000)]
Add some more KTR events to help debugging.

9 years agoMSR_KGSBASE is no longer saved and restored from the guest MSR save area. This
neel [Sat, 20 Sep 2014 05:12:34 +0000 (05:12 +0000)]
MSR_KGSBASE is no longer saved and restored from the guest MSR save area. This
behavior was changed in r271888 so update the comment block to reflect this.

MSR_KGSBASE is accessible from the guest without triggering a VM-exit. The
permission bitmap for MSR_KGSBASE is modified by vmx_msr_guest_init() so get
rid of redundant code in vmx_vminit().

9 years agoPopulate the device info string with _PXM (proximity domain) information.
adrian [Sat, 20 Sep 2014 04:31:12 +0000 (04:31 +0000)]
Populate the device info string with _PXM (proximity domain) information.

This is primarily useful for debugging right now - it'll show up in
devinfo.

Reviewed by: jhb

9 years agoRestructure the MSR handling so it is entirely handled by processor-specific
neel [Sat, 20 Sep 2014 02:35:21 +0000 (02:35 +0000)]
Restructure the MSR handling so it is entirely handled by processor-specific
code. There are only a handful of MSRs common between the two so there isn't
too much duplicate functionality.

The VT-x code has the following types of MSRs:

- MSRs that are unconditionally saved/restored on every guest/host context
  switch (e.g., MSR_GSBASE).

- MSRs that are restored to guest values on entry to vmx_run() and saved
  before returning. This is an optimization for MSRs that are not used in
  host kernel context (e.g., MSR_KGSBASE).

- MSRs that are emulated and every access by the guest causes a trap into
  the hypervisor (e.g., MSR_IA32_MISC_ENABLE).

Reviewed by: grehan

9 years agoFix up the EDMA RX setup path to correctly initialise and reset the RX FIFO.
adrian [Sat, 20 Sep 2014 01:22:17 +0000 (01:22 +0000)]
Fix up the EDMA RX setup path to correctly initialise and reset the RX FIFO.

The original code was .. well, slightly more than incorrect.

It showed up as stalled RX queues if the NIC needed to be frequently
reinitialised (eg during scans.)

This is inspired by work done by Matt Dillon over at the DragonflyBSD
project.

So:

* track when EDMA RX has been stopped and when the MAC has been reset;
* re-initialise the ring only after a reset;
* track whether RX has been stopped/started - just for debugging now;
* don't bother with the RX EOL stuff for EDMA - we don't need the
  interrupt at all.  We also don't need to disable/enable the interrupt
  or start DMA - once new frames are pushed into the ring via the
  normal RX path, it'll just restart RX DMA on its own.

Tested:

* AR9380, STA mode
* AR9380, AP mode
* AR9485, STA mode
* AR9462, STA mode

9 years agoQuieten the AR9300 HAL attach a little - the setupXTxDesc method
adrian [Sat, 20 Sep 2014 01:18:36 +0000 (01:18 +0000)]
Quieten the AR9300 HAL attach a little - the setupXTxDesc method
is only called during attach now.

The EDMA TX path never calls this - only the legacy TX path does.

9 years agoQuieten the AR9300 HAL probe a bit.
adrian [Sat, 20 Sep 2014 01:17:02 +0000 (01:17 +0000)]
Quieten the AR9300 HAL probe a bit.

9 years agoDon't double-call the ar9300 stub function method.
adrian [Sat, 20 Sep 2014 01:16:41 +0000 (01:16 +0000)]
Don't double-call the ar9300 stub function method.

9 years agoExplain how to load the malo(4) firmware on boot.
gavin [Sat, 20 Sep 2014 00:19:45 +0000 (00:19 +0000)]
Explain how to load the malo(4) firmware on boot.

PR: 193653
Submitted by: Juan Ramón Molina Menor
MFC after: 3 days

9 years agoStyle (9) fixes, spaces to tabs.
smh [Fri, 19 Sep 2014 23:38:44 +0000 (23:38 +0000)]
Style (9) fixes, spaces to tabs.

Fix style issues noticed when I went to MFC r257820

MFC after: 2 days
X-MFC-With: r257820
Sponsored by: Multiplay

9 years agoFix partition alignment and image rounding when any of -P (block size),
marcel [Fri, 19 Sep 2014 23:16:02 +0000 (23:16 +0000)]
Fix partition alignment and image rounding when any of -P (block size),
-T (track size) or -H (number of heads) is given:
o   scheme_metadata() always rounded to the block size.  This is not
    always valid (e.g. vtoc8 that must have partitions start at cylinder
    boundaries).
o   The bsd and vtoc8 schemes "resized" the image to make it match the
    geometry, but since the geometry is an approximation and the size
    of the image computed from cylinders * heads * sectors is always
    smaller than the original image size, the partition information ran
    out of bounds.

The fix is to have scheme_metadata() simply pass it's arguments to the
per-scheme metadata callback, so that schemes not only know where the
metadata is to go, but also what the current block address is. It's now
up to the per-scheme callback to reserve room for metadata and to make
sure alignment and rounding is applied.

The BSD scheme now has the most elaborate alignment and rounding. Just
to make the point: partitions are aligned on block boundaries, but the
image is rounded to the next cyclinder boundary.

vtoc8 now properly has all partitions aligned (and rounded) to the
cyclinder boundary.

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

9 years agoawk: Use random(3) instead of rand(3)
pfg [Fri, 19 Sep 2014 18:24:02 +0000 (18:24 +0000)]
awk: Use random(3) instead of rand(3)

While none of them is considered even near to cryptographic
level, random(3) is a better random generator than rand(3).

Use random(3) for awk as is done in other systems.

Thanks to Chenguang Li for discussing this in the lists
and submitting the patch upstream.

PR: 193147
MFC after: 5 weeks

9 years agounistd: drop argument names from setpgrp(3) prototype.
pfg [Fri, 19 Sep 2014 18:13:56 +0000 (18:13 +0000)]
unistd: drop argument names from setpgrp(3) prototype.

They are useless and don't match the style of the header.
While here adjust the comment with tabs.

Suggested by: kevinlo

9 years agoWhen populating the dvd/packages/ directory, create
gjb [Fri, 19 Sep 2014 17:23:44 +0000 (17:23 +0000)]
When populating the dvd/packages/ directory, create
a symlink to All/pkg-*.txz in the Latest/ directory.

This allows 'pkg bootstrap' to work out-of-box if
the REPOS_DIR environment is properly set.

Tested on: stable/10@r271848
MFC after: 3 days
X-MFC-10.1: yes
Sponsored by: The FreeBSD Foundation

9 years agoReference the test case "packs" to fix warnings
rodrigc [Fri, 19 Sep 2014 17:18:27 +0000 (17:18 +0000)]
Reference the test case "packs" to fix warnings

Put the various atf_tc_pack_t variables generated by ATF_TC to use in
the macros_h_test.c file so that we prevent some build warnings (and
thus some build errors) with clang and -Wunused.

Obtained from:  atf (git 70126d013db25c72539803f19f7e00baddacdf51)

9 years agoAdd new USB IDs.
hselasky [Fri, 19 Sep 2014 16:06:54 +0000 (16:06 +0000)]
Add new USB IDs.

PR: 193775
MFC after: 1 week

9 years agoFix static kernel build with options ZFS
smh [Fri, 19 Sep 2014 13:55:28 +0000 (13:55 +0000)]
Fix static kernel build with options ZFS

This was broken by r271802.

MFC after: 1 week
X-MFC-With: r271802
Sponsored by: Multiplay

9 years agovt(4): Remove superfluous word in comment
dumbbell [Fri, 19 Sep 2014 12:38:43 +0000 (12:38 +0000)]
vt(4): Remove superfluous word in comment

Submitted by: brueffer@
MFC after: 3 days
MFC with: 271871

9 years agovt(4): Rewrite history scrolling
dumbbell [Fri, 19 Sep 2014 12:20:43 +0000 (12:20 +0000)]
vt(4): Rewrite history scrolling

It's now possible to scroll up the 500 hard-coded lines of history, not
just a fraction of them. For instance, one can reach the top of the boot
process.

Sometimes, when scrolling or when changing the screen size (by changing
the font or loading a KMS driver for instance), one could see the
history cycling (old content appeared below latest lines). This is
fixed.

Now, when the resolution changes are more lines can be shown, the
displayed area is adjusted so that, if the screen was filled with
content before, it's filled with content after as well: more history
is visible, instead of having blank lines below the previously visible
content.

MFC after: 3 days

9 years ago- Provide igb_get_counter() to return counters that are not collected,
glebius [Fri, 19 Sep 2014 11:49:41 +0000 (11:49 +0000)]
- Provide igb_get_counter() to return counters that are not collected,
  but taken from hardware.
- Mechanically convert to if_inc_counter() the rest of counters.

9 years agoFix inverted expression to report block size in mode page block descriptor.
mav [Fri, 19 Sep 2014 11:15:30 +0000 (11:15 +0000)]
Fix inverted expression to report block size in mode page block descriptor.

9 years agovt(4): Remove vt_buf->vb_dirtymask
dumbbell [Fri, 19 Sep 2014 11:02:44 +0000 (11:02 +0000)]
vt(4): Remove vt_buf->vb_dirtymask

This structure and the associated functions were unused since the
implementation of vd_bitblt_text_t callbacks.

MFC after: 3 days

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 10:39:58 +0000 (10:39 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 10:35:56 +0000 (10:35 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 10:33:23 +0000 (10:33 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMove rl(4) to dev/rl.
glebius [Fri, 19 Sep 2014 10:32:20 +0000 (10:32 +0000)]
Move rl(4) to dev/rl.

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 10:19:51 +0000 (10:19 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 10:18:14 +0000 (10:18 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 09:20:55 +0000 (09:20 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 09:20:34 +0000 (09:20 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 09:20:16 +0000 (09:20 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 09:19:49 +0000 (09:19 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 09:19:29 +0000 (09:19 +0000)]
Mechanically convert to if_inc_counter().

9 years agoRemove ifq_drops from struct ifqueue. Now queue drops are accounted in
glebius [Fri, 19 Sep 2014 09:01:19 +0000 (09:01 +0000)]
Remove ifq_drops from struct ifqueue. Now queue drops are accounted in
struct ifnet if_oqdrops.

Some netgraph modules used ifqueue w/o ifnet. Accounting of queue drops
is simply removed from them. There were no API to read this statistic.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoThis is a white-space/comment cleanup commit as a precursor for
phk [Fri, 19 Sep 2014 07:44:49 +0000 (07:44 +0000)]
This is a white-space/comment cleanup commit as a precursor for
some upcoming work on the NTP kernel PLL.

9 years agoFix cdev. It is a device node name, not a pathname.
hrs [Fri, 19 Sep 2014 07:18:45 +0000 (07:18 +0000)]
Fix cdev.  It is a device node name, not a pathname.

9 years agoIncrease errors, not queue drops, in cases the module is supplied
glebius [Fri, 19 Sep 2014 05:43:38 +0000 (05:43 +0000)]
Increase errors, not queue drops, in cases the module is supplied
with a bad packet or if mbuf allocation failes.

9 years agoRemove disabled code, that is very unlikely to be ever enabled again,
glebius [Fri, 19 Sep 2014 05:23:47 +0000 (05:23 +0000)]
Remove disabled code, that is very unlikely to be ever enabled again,
as well as the comment that explains why is it disabled.

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 05:03:11 +0000 (05:03 +0000)]
Mechanically convert to if_inc_counter().

9 years agoFix typo.
glebius [Fri, 19 Sep 2014 03:55:19 +0000 (03:55 +0000)]
Fix typo.

Submitted by: jkim

9 years agoMechanically convert to if_inc_counter().
glebius [Fri, 19 Sep 2014 03:51:26 +0000 (03:51 +0000)]
Mechanically convert to if_inc_counter().

9 years agoDon't use nvl in case of a failure.
pjd [Thu, 18 Sep 2014 22:34:52 +0000 (22:34 +0000)]
Don't use nvl in case of a failure.

Reported by: Coverity
CID: 1238922

9 years agoAllow more commands to pass persistent reservation according to SPC-4 r37.
mav [Thu, 18 Sep 2014 22:22:14 +0000 (22:22 +0000)]
Allow more commands to pass persistent reservation according to SPC-4 r37.

9 years agoFx a type from r271817; it's IFCOUNTER_* not IFNET_*.
bz [Thu, 18 Sep 2014 22:10:49 +0000 (22:10 +0000)]
Fx a type from r271817;  it's IFCOUNTER_* not IFNET_*.

9 years agoAdd support for "no Data-Out Buffer" (NDOB) flag of WRITE SAME (16) command.
mav [Thu, 18 Sep 2014 21:39:00 +0000 (21:39 +0000)]
Add support for "no Data-Out Buffer" (NDOB) flag of WRITE SAME (16) command.

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:19:21 +0000 (21:19 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:16:05 +0000 (21:16 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:14:46 +0000 (21:14 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:13:12 +0000 (21:13 +0000)]
Mechanically convert to if_inc_counter().

9 years agoRevert r270808, which were changes to common code (i40e_alloc.h).
bz [Thu, 18 Sep 2014 21:13:03 +0000 (21:13 +0000)]
Revert r270808, which were changes to common code (i40e_alloc.h).

Rather than #define-ing common code function calls to OS-dependent
ones, make the osdep versions match the common code expectations,
adjust the FreeBSD specific code to use those, and remove the
#defines.

In the FreeBSD specific code, use "i40e_mem_reserved" for the
now expected but unused argument to i40e_allocate_dma_mem().

Reviewed by: gnn, eric.joyner intel.com
MFC after: 3 days

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:11:42 +0000 (21:11 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:09:22 +0000 (21:09 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:07:05 +0000 (21:07 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:05:59 +0000 (21:05 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:03:13 +0000 (21:03 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 21:01:41 +0000 (21:01 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:59:59 +0000 (20:59 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:58:04 +0000 (20:58 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:53:02 +0000 (20:53 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:47:39 +0000 (20:47 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:44:53 +0000 (20:44 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:43:17 +0000 (20:43 +0000)]
Mechanically convert to if_inc_counter().

9 years ago- Mechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:39:23 +0000 (20:39 +0000)]
- Mechanically convert to if_inc_counter().
- Cut code that runs a counter backwards.

9 years agoRemove sys/types.h include as per style (9)
smh [Thu, 18 Sep 2014 20:38:18 +0000 (20:38 +0000)]
Remove sys/types.h include as per style (9)

SDT requries sys/param.h due to use of NULL

Reported by: Garrett
Sponsored by: Multiplay

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:35:22 +0000 (20:35 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:33:25 +0000 (20:33 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:30:47 +0000 (20:30 +0000)]
Mechanically convert to if_inc_counter().

9 years agoFix build on 32-bit machines.
glebius [Thu, 18 Sep 2014 20:29:17 +0000 (20:29 +0000)]
Fix build on 32-bit machines.

Pointy hat to: glebius

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:24:47 +0000 (20:24 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:23:34 +0000 (20:23 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:21:46 +0000 (20:21 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:18:55 +0000 (20:18 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:17:27 +0000 (20:17 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:15:53 +0000 (20:15 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:11:28 +0000 (20:11 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:09:35 +0000 (20:09 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:06:10 +0000 (20:06 +0000)]
Mechanically convert to if_inc_counter().

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 20:03:45 +0000 (20:03 +0000)]
Mechanically convert to if_inc_counter().

9 years agoAdd dtrace probe support for zfs SET_ERROR(..)
smh [Thu, 18 Sep 2014 20:00:36 +0000 (20:00 +0000)]
Add dtrace probe support for zfs SET_ERROR(..)

MFC after: 1 week
Sponsored by: Multiplay

9 years agoMechanically convert to if_inc_counter().
glebius [Thu, 18 Sep 2014 19:57:13 +0000 (19:57 +0000)]
Mechanically convert to if_inc_counter().

9 years ago- Provide if_get_counter() method for vtnet(4).
glebius [Thu, 18 Sep 2014 19:15:40 +0000 (19:15 +0000)]
- Provide if_get_counter() method for vtnet(4).
- Do not accumulate statistics on every tick.
- Accumulate statistics in vtnet_setup_stat_sysctl()
  and in vtnet_get_counter().

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoRemove debug.zfs_flags in favor of the new vfs.zfs.debug_flags.
will [Thu, 18 Sep 2014 18:46:38 +0000 (18:46 +0000)]
Remove debug.zfs_flags in favor of the new vfs.zfs.debug_flags.
Replace TUNABLE_INT with CTLFLAG_RWTUN.

Submitted by: avg (debug.zfs_flags removal), smh (TUNABLE_INT replacement)

9 years agoMake kernel to update LUN size from the backing storage on configuration
mav [Thu, 18 Sep 2014 17:39:04 +0000 (17:39 +0000)]
Make kernel to update LUN size from the backing storage on configuration
reload also if that size was not specified in the new configuration.

Previously it happened only if size was explicitly changed in config.

MFC after: 3 days

9 years agoUse 'cc' for the C compiler instead of 'gcc'.
will [Thu, 18 Sep 2014 17:37:19 +0000 (17:37 +0000)]
Use 'cc' for the C compiler instead of 'gcc'.

MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1079507 on 2014/07/24

9 years agoStart the process of cleaning up FreeBSD's firewire driver.
will [Thu, 18 Sep 2014 17:28:21 +0000 (17:28 +0000)]
Start the process of cleaning up FreeBSD's firewire driver.

sys/dev/firewire/firewire.c:
sys/dev/firewire/firewire.h:
sys/dev/firewire/firewirereg.h:
sys/dev/firewire/fwcrom.c:
sys/dev/firewire/fwdev.c:
sys/dev/firewire/fwdma.c:
sys/dev/firewire/fwmem.c:
sys/dev/firewire/fwohci.c:
sys/dev/firewire/fwohci_pci.c:
sys/dev/firewire/fwohcivar.h:
sys/dev/firewire/if_fwe.c:
sys/dev/firewire/if_fwip.c:
sys/dev/firewire/sbp.c:
sys/dev/firewire/sbp_targ.c:
Unifdef the code, removing support for DragonflyBSD
and FreeBSD prior to version 5.

Submitted by: gibbs
MFC after: 1 month
Sponsored by: Spectra Logic
MFSpectraBSD: 1081188 on 2014/08/01

9 years agoWhen updating device media size use cached cdevsw pointer.
mav [Thu, 18 Sep 2014 17:25:20 +0000 (17:25 +0000)]
When updating device media size use cached cdevsw pointer.

Using pointer from the cdev directly is dangerous since we have no reference
on it, and it may change any time.  That caused panic if device has gone.

While there, report capacity change only if it really changed.

MFC after: 3 days

9 years agoSilence noisy firewire logging.
will [Thu, 18 Sep 2014 17:22:42 +0000 (17:22 +0000)]
Silence noisy firewire logging.

MFC after: 1 month
Sponsored by: Spectra Logic
MFSpectraBSD: 974594 on 2013/08/02

9 years agounistd: move setpgrp(2) to the __BSD_VISIBLE section
pfg [Thu, 18 Sep 2014 17:18:42 +0000 (17:18 +0000)]
unistd: move setpgrp(2) to the __BSD_VISIBLE section

Our setpgrp(2) differs from the specified by POSIX, which
only has one argument, and is only meant for compatibility
with BSD.

Reference:
http://pubs.opengroup.org/onlinepubs/009695399/functions/setpgrp.html

Pointed-out in: openbsd-tech (2014-09-16)
MFC after: 6 weeks

9 years agolpr: replace setpgrp(2) with setpgid(2).
pfg [Thu, 18 Sep 2014 17:01:45 +0000 (17:01 +0000)]
lpr: replace setpgrp(2) with setpgid(2).

setpgid(2) is more portable than setpgrp(2).
The BSD variant of setpgrp is a wrapper for
setpgid(2) anyways.

MFC after: 5 weeks

9 years agoEnable ZFS debug flags to be modified via vfs.zfs.debug_flags.
will [Thu, 18 Sep 2014 16:55:41 +0000 (16:55 +0000)]
Enable ZFS debug flags to be modified via vfs.zfs.debug_flags.

This is primarily only of interest to ZFS developers, but it makes it
easier to get additional debugging.

Submitted by: gibbs
MFC after: 1 month
Sponsored by: Spectra Logic
MFSpectraBSD: 517074 on 2011/12/15 (by will), 662343 on 2013/03/20 (by gibbs)

9 years agosimple_httpd: cosmetic cleanups.
pfg [Thu, 18 Sep 2014 16:53:44 +0000 (16:53 +0000)]
simple_httpd: cosmetic cleanups.

Many tab vs space cleanups.
Use setpgid() instead of setpgrp() which is more portable,

MFC after: 5 weeks

9 years ago- Use if_get_counter() to fetch ifnet statistics.
glebius [Thu, 18 Sep 2014 16:44:28 +0000 (16:44 +0000)]
- Use if_get_counter() to fetch ifnet statistics.
- Report IFCOUNTER_OQDROPS to linprocfs. Wasn't there before.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoReorder sysctls for spa.c global tunables; add sysctl for ccw_retry_interval.
will [Thu, 18 Sep 2014 16:38:03 +0000 (16:38 +0000)]
Reorder sysctls for spa.c global tunables; add sysctl for ccw_retry_interval.

MFC after: 1 month
Sponsored by: Spectra Logic

9 years agoFix the handling of EOP in status descriptors for if_igb(4) and don't
adrian [Thu, 18 Sep 2014 16:20:17 +0000 (16:20 +0000)]
Fix the handling of EOP in status descriptors for if_igb(4) and don't
double-free mbufs.

Like ixgbe(4) chipsets, EOP is only set on the final descriptor
in a chain of descriptors.  So, to free the whole list of descriptors,
we should free the current slot _and_ the assembled list of descriptors
that make up the fragment list.

The existing code was setting discard once it saw EOP + an error status;
it then freed all the subsequent descriptors until the next EOP. That's
totally the wrong order.

9 years agoRemove a bunch of methods that are superseded by if_inc_counter().
glebius [Thu, 18 Sep 2014 16:17:20 +0000 (16:17 +0000)]
Remove a bunch of methods that are superseded by if_inc_counter().

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years ago- Use if_inc_counter() to increment various counters.
glebius [Thu, 18 Sep 2014 15:56:14 +0000 (15:56 +0000)]
- Use if_inc_counter() to increment various counters.
- Do not ever set a counter to a value. For those counters
  that we don't increment, but return directly from hardware
  create cases in if_get_counter() method.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.