]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
10 years agoMFC: r247264
marius [Tue, 18 Jun 2013 15:06:02 +0000 (15:06 +0000)]
MFC: r247264

Turn off fast posting for the ISP2100- I'd forgotten that it actually
might have been enabled for them- now that we use all 32 bits of handle.
Fast Posting doesn't pass the full 32 bits.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251946 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r242823
marius [Tue, 18 Jun 2013 15:02:53 +0000 (15:02 +0000)]
MFC: r242823

Give panic format string to pacify clang warning.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251944 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251373
marius [Tue, 18 Jun 2013 15:00:20 +0000 (15:00 +0000)]
MFC: r251373

Flag isp(4) as supporting unmapped I/O; all necessary conversion actually
already has been done as part of r246713 (MFC'ed to stable/9 in r251874).

git-svn-id: svn://svn.freebsd.org/base/stable/9@251943 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248712:
scottl [Tue, 18 Jun 2013 14:46:42 +0000 (14:46 +0000)]
MFC r248712:

Do not pass unmapped buffers to drivers that cannot handle them

Submitted by: kan, mav
Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251942 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251116
marius [Tue, 18 Jun 2013 14:40:21 +0000 (14:40 +0000)]
MFC: r251116

Allow unmapped I/O via aacd(4). It shouldn't be too hard to add the
same support for aacp(4), I'm lacking the necessary hardware for
testing, though.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r247165
marius [Tue, 18 Jun 2013 14:35:09 +0000 (14:35 +0000)]
MFC: r247165

Fix command timeout caused by data underrun during fetching ATAPI sense
data, introduced by r246713 (MFC'ed to stable/9 in r251874). There are two
places where ata_request is filled in ATA_CAM: ata_cam_begin_transaction()
and ata_cam_request_sense(). In the first case DMA should be done for
addresses from the CCB. In second case, DMA should be done to the different
address, the address of the sense buffer inside the CCB structure itself.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251940 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r248804
marius [Tue, 18 Jun 2013 14:20:14 +0000 (14:20 +0000)]
MFC: r248804

deferal -> deferral

MFC: r248891

Pass correct parameter to CTR5() in bus_dmamap_load_uio.

MFC: r248892

Do not add 1 to nsegs before passing to CTR5(), since nsegs
has already been incremented before these calls.

MFC: r248893

Add CTR5() to bus_dmamap_load_ccb, similar to other bus_dmamap_load_*
functions.

MFC: r248896

Add bus_dmamap_load_bio for non-CAM disk drivers that wish to enable
unmapped I/O.

MFC: r249025

Add support for XPT_CONT_TARGET_IO CCBs in _bus_dmamap_load_ccb().

Declare CCB types in their respective switch blocks.

MFC: r249538

Some compilers issue a warning when wider integer is casted to narrow
pointer.  Supposedly shut down the warning by casting through
uintptr_t.

MFC: r251221

Move an assertion to the right spot; only bus_dmamap_load_mbuf(9)
requires a pkthdr being present but that's not the case for either
_bus_dmamap_load_mbuf_sg() or bus_dmamap_load_mbuf_sg(9).

git-svn-id: svn://svn.freebsd.org/base/stable/9@251939 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248583 (by kib):
mav [Tue, 18 Jun 2013 13:38:10 +0000 (13:38 +0000)]
MFC r248583 (by kib):
Fix twa(4) after the r246713.  The driver copies data around to
satisfy some alignment restrictions.  Do not set TW_OSLI_REQ_FLAGS_CCB
flag for mapped data, pass the csio->data_ptr in the req->data.

Do not put the ccb pointer into req->data ever, ccb is stored in
req->orig_req already.

Submitted by: Shuichi KITAGUCHI <ki@hh.iij4u.or.jp>
PR: kern/177020

git-svn-id: svn://svn.freebsd.org/base/stable/9@251938 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242827 (by rdivacky):
mav [Tue, 18 Jun 2013 13:36:15 +0000 (13:36 +0000)]
MFC r242827 (by rdivacky):
Give tw_osl_dbg_printf format string to pacify clang warning.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251937 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r228526 (by kevlo):
mav [Tue, 18 Jun 2013 13:34:37 +0000 (13:34 +0000)]
MFC r228526 (by kevlo):
s/timout/timeout

git-svn-id: svn://svn.freebsd.org/base/stable/9@251936 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251616:
mav [Tue, 18 Jun 2013 09:47:56 +0000 (09:47 +0000)]
MFC r251616:
Don't update provider properties and don't set DISKFLAG_OPEN if d_open()
disk method call returned error.  GEOM considers devices in such case as
still closed, and won't call symmetric d_close() for them.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251931 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249974:
mav [Tue, 18 Jun 2013 09:44:55 +0000 (09:44 +0000)]
MFC r249974:
Return "descr" field alike to "Intel RAID1 volume" for GEOM RAID to make
it look better in bsdinstall.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251929 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249193 (by trasz):
mav [Tue, 18 Jun 2013 09:42:43 +0000 (09:42 +0000)]
MFC r249193 (by trasz):
Make it possible to submit FLUSH bios through geom_dev strategy.  This
is required for CTL to work with device-backed LUNs.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251927 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248722:
mav [Tue, 18 Jun 2013 09:39:52 +0000 (09:39 +0000)]
MFC r248722:
geom_slice.c and its consumers like GEOM_LABEL are not touching the data
unless hotspots are used.  Pass G_PF_ACCEPT_UNMAPPED flag through except
such rare cases (obsolete GEOM_SUNLABEL and GEOM_BSD).

git-svn-id: svn://svn.freebsd.org/base/stable/9@251925 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248721:
mav [Tue, 18 Jun 2013 09:37:44 +0000 (09:37 +0000)]
MFC r248721:
GEOM NOP does not touch the data, so pass G_PF_ACCEPT_UNMAPPED flag through.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251924 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248720:
mav [Tue, 18 Jun 2013 09:34:36 +0000 (09:34 +0000)]
MFC r248720:
Remove extra bio_data and bio_length copying to child request after calling
g_clone_bio(), that already copied them.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251922 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248696:
mav [Tue, 18 Jun 2013 09:31:06 +0000 (09:31 +0000)]
MFC r248696:
Make GEOM MULTIPATH to report unmapped bio support if underling path report
it.  GEOM MULTIPATH itself never touches the data and so transparent.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251921 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248596 (by kib):
mav [Tue, 18 Jun 2013 09:29:30 +0000 (09:29 +0000)]
MFC r248596 (by kib):
Correct the page count when excess length is trimmed from the bio.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251920 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248295 (by pjd):
mav [Tue, 18 Jun 2013 09:26:01 +0000 (09:26 +0000)]
MFC r248295 (by pjd):
We don't need buffer to handle BIO_DELETE, so don't check buffer size for it.
This fixes handling BIO_DELETE larger than MAXPHYS.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251918 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMissed mergeinfo for r251916.
mav [Tue, 18 Jun 2013 09:23:03 +0000 (09:23 +0000)]
Missed mergeinfo for r251916.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251917 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248068 (by sbruno):
mav [Tue, 18 Jun 2013 09:21:21 +0000 (09:21 +0000)]
MFC r248068 (by sbruno):
Add legacy support to geom raid to create a /dev/arX device for support
of upgrading older machines using ataraid(4) to newer releases.

This optional parameter is controlled via kern.geom.raid.legacy_aliases
and will create a /dev/ar0 device that will point at /dev/raid/r0 for
example.

Tested on Dell SC 1425 DDF-1 format software raid controllers installing from
stable/7 and upgrading to stable/9 without having to adjust /etc/fstab

git-svn-id: svn://svn.freebsd.org/base/stable/9@251916 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFix a bug that allowed a tracing process (e.g. gdb) to write
des [Tue, 18 Jun 2013 07:04:19 +0000 (07:04 +0000)]
Fix a bug that allowed a tracing process (e.g. gdb) to write
to a memory-mapped file in the traced process's address space
even if neither the traced process nor the tracing process had
write access to that file.

Security: CVE-2013-2171
Security: FreeBSD-SA-13:06.mmap
Approved by: so

git-svn-id: svn://svn.freebsd.org/base/stable/9@251902 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r248825, 248775
scottl [Tue, 18 Jun 2013 05:37:06 +0000 (05:37 +0000)]
MFC r248825, 248775

Add unmapped i/o support for the mps and isci drivers.

Submitted by: mav, jimharris
Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251899 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMerge the second part of the unmapped I/O changes. This enables the
scottl [Tue, 18 Jun 2013 05:21:40 +0000 (05:21 +0000)]
Merge the second part of the unmapped I/O changes.  This enables the
infrastructure in the block layer and UFS filesystem as well as a few
drivers.  The list of MFC revisions is long, so I won't quote changelogs.

r248508,248510,248511,248512,248514,248515,248516,248517,248518,
248519,248520,248521,248550,248568,248789,248790,249032,250936

Submitted by: kib
Approved by: kib
Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251897 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoFix typos in the last revision. Thanks to Andrey Chernov for his kind
scottl [Tue, 18 Jun 2013 04:11:16 +0000 (04:11 +0000)]
Fix typos in the last revision.  Thanks to Andrey Chernov for his kind
patience.

Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251893 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251349:
delphij [Tue, 18 Jun 2013 04:05:37 +0000 (04:05 +0000)]
MFC r251349:

Fix a typo: XPORT_SPI should be tested against transport, nor protocol.

Submitted by: Sascha Wildner <swildner dragonflybsd org>
Reviewed by: mjacob

git-svn-id: svn://svn.freebsd.org/base/stable/9@251891 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251187:
delphij [Tue, 18 Jun 2013 04:03:12 +0000 (04:03 +0000)]
MFC r251187:

Explicitly use a pair of parentheses to ensure correct evaluation
ordering for bitwise operation.

Submitted by: swildner (DragonFly)

git-svn-id: svn://svn.freebsd.org/base/stable/9@251889 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoCatch up to the changes from r251874. This isn't an MFC because the
scottl [Tue, 18 Jun 2013 03:34:08 +0000 (03:34 +0000)]
Catch up to the changes from r251874.  This isn't an MFC because the
amd(4) driver no longer exists in FreeBSD 10.

Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251888 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoBig MFC of the physbio changes necessary for unmapped I/O. These changes
scottl [Tue, 18 Jun 2013 00:36:53 +0000 (00:36 +0000)]
Big MFC of the physbio changes necessary for unmapped I/O.  These changes
have been in production at Netflix for several months with significant
success.

MFC r246713:

Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c.  It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code.  The MD busdma is then given a chance to do any final processing
in the complete() callback.

MFC r249538:
Some compilers issue a warning when wider integer is casted to narrow
pointer.  Supposedly shut down the warning by casting through
uintptr_t.

MFC r251479:
Simplify the checking of flags for cam_periph_mapmem().  This gets rid of
a lot of code redundancy and grossness at very minor expense.

MFC r251837:
MFC r251842:
Add infrastructure for doing compatibility shims, as has been sorely
needed for the last 10 years.  Far too much of the internal API is
exposed, and every small adjustment causes applications to stop working.
To kick this off, bump the API version to 0x17 as should have been done
with r246713, but add shims to compensate.  Thanks to the shims, there
should be no visible change in application behavior.

Submitted by: kib, jeffr
Approved by: kib
Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251874 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244575:
scottl [Mon, 17 Jun 2013 23:21:18 +0000 (23:21 +0000)]
MFC r244575:
The manpage states that bus_dmamap_create(9) returns ENOMEM if it can't
allocate a map or mapping resources.  That seems to imply that any memory
allocations it does must use M_NOWAIT and check for NULL.

MFC 246158:
Use pmap_kextract() instead of inlining the page table walk.
Remove the comment referencing non-existing code.

Submitted by: kib, cognet
Approved by: marius
Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251873 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244414:
scottl [Mon, 17 Jun 2013 21:41:14 +0000 (21:41 +0000)]
MFC r244414:
Properly implement pmap_[get|set]_memattr

MFC r244466:
Create an architecture-agnostic buffer pool manager that uses uma(9) to
manage a set of power-of-2 sized buffers for bus_dmamem_alloc().

MFC r244471:
Busdma enhancements, especially for managing small uncacheable buffers.

MFC r244743:
Use C comments instead of C++ comments.

MFC r244474:
We want to build subr_busdma_bufalloc.c on arm.

Submitted by: cognet
Approved by: marius
Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251871 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240177:
scottl [Mon, 17 Jun 2013 20:40:16 +0000 (20:40 +0000)]
MFC r240177:

Dynamically allocate the S/G lists passed to callback routines rather than
allocating them on the stack of various bus_dmamap_load*() functions.  The
S/G lists are stored in the DMA tags.  This matches the implementation on
all other platforms.

Submitted by: jhb
Approved by: marius, adrian
Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251868 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r236991:
scottl [Mon, 17 Jun 2013 20:26:19 +0000 (20:26 +0000)]
MFC r236991:

Final whitespace trim.

Submitted by: imp
Approved by: marius
Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251866 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249252:
ae [Mon, 17 Jun 2013 20:17:56 +0000 (20:17 +0000)]
MFC r249252:
  Remove reference to the nonexistent sysctl node net.inet6.mld.stats.
  Also add cross reference to the icmp6(4).

  PR: 177696

git-svn-id: svn://svn.freebsd.org/base/stable/9@251864 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251689
brooks [Mon, 17 Jun 2013 19:54:47 +0000 (19:54 +0000)]
MFC r251689

Be more agressive about bootstrapping ctfmerge and ctfconvert so
builds from existing releases have a chance of working properly when
WITH_CLANG_IS_CC is enabled.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251861 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r242465:
scottl [Mon, 17 Jun 2013 19:45:27 +0000 (19:45 +0000)]
MFC r242465:
Free the dma map -after- it's checked, not before. Or you'll be
potentially referencing already-freed memory.

MFC r242466:
Drop this from 500 to 128, to save a little space on memory constrained
platforms.

Submitted by: adrian
Obtained from: Netflix

git-svn-id: svn://svn.freebsd.org/base/stable/9@251860 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: 248848
gnn [Mon, 17 Jun 2013 15:42:21 +0000 (15:42 +0000)]
MFC: 248848

Commit a patch that fixes a problem in the #pragma statement when searching
for and loading dependent modules.  This addresses a bug seen with
io.d where it was being doubly included.

PR: 171678
Submitted by:  Mark Johnston

git-svn-id: svn://svn.freebsd.org/base/stable/9@251857 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251659:
mav [Mon, 17 Jun 2013 14:59:23 +0000 (14:59 +0000)]
MFC r251659:
Use CAM_DIR_NONE for requests without data.
Wrong values there confuse some drivers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251852 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251661:
mav [Mon, 17 Jun 2013 14:55:02 +0000 (14:55 +0000)]
MFC r251661:
Replicate r242422 from ata(4) to mvs(4):
Only four specific ATA PIO commands transfer several sectors per DRQ block
(interrupt).  All other ATA PIO commands transfer one sector or 512 bytes
at one time.  Hardcode these exceptions in mvs(4).
This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`.
Also it fixes timeout of DOWNLOAD_MICROCODE on `camcontrol fwdownload`.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251850 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251654, r251664:
mav [Mon, 17 Jun 2013 14:52:39 +0000 (14:52 +0000)]
MFC r251654, r251664:
Make CAM return and GEOM DISK pass through new GEOM::lunid attribute.

SPC-4 specification states that serial number may be property of device,
but not a specific logical unit.  People reported about FC storages using
serial number in that way, making it unusable for purposes of LUN multipath
detection.  SPC-4 states that designators associated with logical unit from
the VPD page 83h "Device Identification" should be used for that purpose.
Report first of them in the new attribute in such preference order: NAA,
EUI-64, T10 and SCSI name string.

While there, make GEOM DISK properly report GEOM::ident in XML output also
using d_getattr() method, if available.  This fixes serial numbers reporting
for SCSI disks in `geom disk list` output and confxml.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251849 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250298, r250301:
mav [Mon, 17 Jun 2013 14:41:39 +0000 (14:41 +0000)]
MFC r250298, r250301:
Fix byte order of ATA WWN when converting it to SCSI LUN ID.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251847 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249205:
mav [Mon, 17 Jun 2013 14:21:31 +0000 (14:21 +0000)]
MFC r249205:
Replicate r245306 from SCSI to ATA.  The problem didn't appear so far,
covered by multilevel freeze mechanism, but it is better to be safe.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251846 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251563:
gjb [Mon, 17 Jun 2013 10:14:08 +0000 (10:14 +0000)]
MFC r251563:
 Add freebsd-update.conf(5) to OptionalObsoleteFiles.inc

PR: 179437
Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@251841 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251284:
kib [Mon, 17 Jun 2013 07:12:34 +0000 (07:12 +0000)]
MFC r251284:
Unify the code of check_deferred_signal() for all architectures.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251834 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250013 (by davidxu):
kib [Mon, 17 Jun 2013 07:11:17 +0000 (07:11 +0000)]
MFC r250013 (by davidxu):
Remove extra code for SA_RESETHAND, it is not needed because kernel has
already done this.

Approved by: davidxu

git-svn-id: svn://svn.freebsd.org/base/stable/9@251833 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251322:
kib [Mon, 17 Jun 2013 06:21:42 +0000 (06:21 +0000)]
MFC r251322:
Instead of yielding, pause for 1 tick when donating the current thread
time to the owner of the vnode lock while iterating over the free vnode
list.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251832 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251600:
yongari [Mon, 17 Jun 2013 04:40:27 +0000 (04:40 +0000)]
MFC r251600:
  Avoid unnecessary controller reinitialization by checking driver
  running state.  fxp(4) requires controller reinitialization for the
  following cases.
   o RX lockup condition on i82557
   o promiscuous mode change
   o multicast filter change
   o WOL configuration
   o TSO/VLAN hardware tagging/checksum offloading configuration
   o MAC reprogramming after speed/duplex/flow-control resolution
   o Any events that result in MAC reprogramming(link UP/DOWN,
     remote link partner's restart of auto-negotiation etc)
   o Microcode loading/unloading
  Apart from above cases which come from hardware limitation, upper
  stack also blindly reinitializes controller whenever an IP address
  is assigned. After r194573, fxp(4) no longer needs to reinitialize
  the controller to program multicast filter after upping the
  interface. So keeping track of driver running state should remove
  all unnecessary controller reinitializations.

  This change will also address endless controller reinitialization
  triggered by dhclient(8).

git-svn-id: svn://svn.freebsd.org/base/stable/9@251829 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250746 and r250805:
hrs [Sun, 16 Jun 2013 18:59:07 +0000 (18:59 +0000)]
MFC r250746 and r250805:

- Update the release notes to DocBook 4.5 XML to build with the
  updated documentation tree
- Fix build after doc/projects/xml-tools integration.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251816 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRemove obsolete translations.
hrs [Sun, 16 Jun 2013 18:32:02 +0000 (18:32 +0000)]
Remove obsolete translations.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251814 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r245177,r245346,r246283,r251650:
hrs [Sun, 16 Jun 2013 18:27:53 +0000 (18:27 +0000)]
MFC r245177,r245346,r246283,r251650:

- Set WITHOUT_SVN=yes for textproc/docproj.
- Add CHECKSUM.* support in Makefile.
- Use ln -fs to create a symlink.
- Remove pkgadd for docports.
- Use WITHOUT_JADETEX=yes instead of WITH_JADETEX=no.
- Add {WORLD,KERNEL}_FLAGS to [BTWK]MAKE.
- Use makefs(8) and gpart(8) for sparc64 ISO image.
- Add publisher option to makefs(8).
- Add missing copyright notice.
- ISO 9660 specification allows only "d-characters" and "a-characters"
  in the Volume Descriptor (section 7.4).  In short, uppercase
  alphanumeric + some symbols only.  While the makefs utility automatically
  converts the characters, $LABEL should be consistent in the scripts.

These fix a specification violation in 9.X iso9660 images, and cdrtools
dependency and endianness issue for sparc64 release media.  The label is
now in uppercase letters only in all platforms.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251812 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251580:
hrs [Sun, 16 Jun 2013 07:18:07 +0000 (07:18 +0000)]
MFC r251580:

- Add file system type number (vfc_typenum) in the list.  This is useful
  for debugging when changing vfs.typenumhash configuration.
- Refactor fmt_flags().

git-svn-id: svn://svn.freebsd.org/base/stable/9@251802 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251677:
pfg [Sun, 16 Jun 2013 00:59:24 +0000 (00:59 +0000)]
MFC r251677:

Relax some unnecessary unsigned type changes in ext2fs.

While the changes in r245820 are in line with the ext2 spec,
the code derived from UFS can use negative values so it is
better to relax some types to keep them as they were, and
somewhat more similar to UFS. While here clean some casts.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251798 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251490:
trociny [Sat, 15 Jun 2013 08:06:22 +0000 (08:06 +0000)]
MFC r251490:

Properly set curvnet context in lagg_port_setlladdr() task handler.

Reported by: Nikos Vassiliadis <nvass gmx.com>
Submitted by: zec
Tested by: Nikos Vassiliadis <nvass gmx.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@251779 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 250220:
jhb [Fri, 14 Jun 2013 21:56:10 +0000 (21:56 +0000)]
MFC 250220:
Fix FIONREAD on regular files.  The computed result was being ignored and
it was being passed down to VOP_IOCTL() where it promptly resulted in
ENOTTY due to a missing else for the past 8 years.  While here, use a
shared vnode lock while fetching the current file's size.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251762 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 250053:
jhb [Fri, 14 Jun 2013 20:32:33 +0000 (20:32 +0000)]
MFC 250053:
Only cleanup CMI-related state on detach if the system supports CMI.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251759 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244090, r250945
ghelmer [Fri, 14 Jun 2013 18:56:37 +0000 (18:56 +0000)]
MFC r244090, r250945

Changes to resolve races in bpfread() and catchpacket() that, at worst,
cause kernel panics.

Add a flag to the bpf descriptor to indicate whether the hold buffer
is in use. In bpfread(), set the "hold buffer in use" flag before
dropping the descriptor lock during the call to bpf_uiomove().
Everywhere else the hold buffer is used or changed, wait while
the hold buffer is in use by bpfread(). Add a KASSERT in bpfread()
after re-acquiring the descriptor lock to assist uncovering any
additional hold buffer races.

While waiting for the bpf hold buffer to become idle, check
the return value from mtx_sleep() and exit bpfread() on
errors such as EINTR.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251756 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 249767:
jhb [Fri, 14 Jun 2013 18:30:43 +0000 (18:30 +0000)]
MFC 249767:
- Some BIOSes use an Extended IRQ resource descriptor in _PRS for a link
  that uses non-ISA IRQs but use a plain IRQ resource in _CRS.  However,
  a non-ISA IRQ can't fit into a plain IRQ resource.  If we encounter a
  link like this, build the resource buffer from _PRS instead of _CRS.
- Set the correct size of the end tag in a resource buffer.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251754 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMerge a missing part of 235613 to add the new dirs to mtree.
jhb [Fri, 14 Jun 2013 15:58:24 +0000 (15:58 +0000)]
Merge a missing part of 235613 to add the new dirs to mtree.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251747 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251562, r251612:
pfg [Fri, 14 Jun 2013 03:58:52 +0000 (03:58 +0000)]
MFC r251562, r251612:

Miscellaneous cleanups for ext2fs:

- e2fs_bpg and e2fs_isize are always unsigned.

- s/file system/filesystem/g (from ffs r96755)

git-svn-id: svn://svn.freebsd.org/base/stable/9@251731 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251561:
pfg [Fri, 14 Jun 2013 02:51:03 +0000 (02:51 +0000)]
MFC r251561:

libstand: Reset the seek pointer in ext2fs as done in UFS.

Reset the seek pointer to 0 when a file is successfully opened,
since otherwise the initial seek offset will contain the directory
offset of the filesystem block that contained its directory entry.
This bug was mostly harmless because typically the directory is
less than one filesystem block in size so the offset would be zero.
It did however generally break loading a kernel from the (large)
kernel compile directory.

Also reset the seek pointer when a new inode is opened in read_inode(),
though this is not actually necessary now because all callers set
it afterwards.

PR: 177328
Submitted by: Eric van Gyzen
Reviewed by: iedowse

git-svn-id: svn://svn.freebsd.org/base/stable/9@251726 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 228990,243232,243233:
hrs [Fri, 14 Jun 2013 02:21:32 +0000 (02:21 +0000)]
MFC 228990,243232,243233:

Overhaul of route6d(8):

- Use queue(3) for linked-list.
- Use a consistent naming scheme for struct members.
- Use ANSI C style function declaration.
- Add check of RTM_VERSION mismatch.
- Increase the number of retry for NET_RT_DUMP from 5 to 15.
- Use 2001:db8:: as an example instead of deprecated 3ffe:: address block.
- Add check for connected routes.
- Add support of RTM_IFANNOUNCE for dyanmically-added/removed interfaces.
- Add support of *, ?, and [ in the interface list.
- Add -P number to specify route flag which will never expire.
- Add -Q number to specify route flag which route6d will add to routes via RIP.
- Add -p pidfile to specify the process ID file.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251724 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r227183,r229905,r250432,r250451,r250882:
eadler [Thu, 13 Jun 2013 21:06:17 +0000 (21:06 +0000)]
MFC r227183,r229905,r250432,r250451,r250882:

- Add missing static keywords to split(1)

- Fix warning when compiling with gcc46:
 error: variable 'defname' set but not use

- Implement 'split -d' which allows a numeric suffix instead of an
alphabetic one.

- Bump .Dd for recent content change.
Avoid signed overflow in error handling code.

PR: bin/116209

git-svn-id: svn://svn.freebsd.org/base/stable/9@251711 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 249766: Use a higher TTL (128) for DHCP packets.
jhb [Thu, 13 Jun 2013 21:02:44 +0000 (21:02 +0000)]
MFC 249766: Use a higher TTL (128) for DHCP packets.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251707 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250462:
eadler [Thu, 13 Jun 2013 20:46:29 +0000 (20:46 +0000)]
MFC r250462:
Add option to lockf to avoid creating a file if it does not exist.

PR: bin/170775

git-svn-id: svn://svn.freebsd.org/base/stable/9@251704 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251109:
eadler [Thu, 13 Jun 2013 20:40:39 +0000 (20:40 +0000)]
MFC r251109:
Add support for tethering on the iPhone 4S

PR: usb/179078

git-svn-id: svn://svn.freebsd.org/base/stable/9@251701 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 249315:
jhb [Thu, 13 Jun 2013 20:29:06 +0000 (20:29 +0000)]
MFC 249315:
Proxy allocation requests for the PCI ROM BAR from child devices similar
to how the VGA bus driver currently proxies allocation requests for other
PCI BARs.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251700 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 249263: Fix a potential socket leak in the NFS server.
jhb [Thu, 13 Jun 2013 19:25:36 +0000 (19:25 +0000)]
MFC 249263: Fix a potential socket leak in the NFS server.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251698 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: 235380,235454,235455,235456,235457,235613,235614,235628,236567,
gnn [Thu, 13 Jun 2013 18:47:53 +0000 (18:47 +0000)]
MFC: 235380,235454,235455,235456,235457,235613,235614,235628,236567,
     238125,238535,238660,238979,239972

Bring all changes to the DTrace Toolkit into FreeBSD 9.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251697 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250407:
brooks [Thu, 13 Jun 2013 17:13:15 +0000 (17:13 +0000)]
MFC r250407:

Remove duplicated copies of various NetBSD compatibility shims used by
makefs and use libnetbsd, contrib/mtree, and contrib/mknod instead.

Sponsored by: DARPA, AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/9@251688 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoBump __FreeBSD_version to bound boostrapping of ctfmerge which was fixed
brooks [Thu, 13 Jun 2013 15:45:54 +0000 (15:45 +0000)]
Bump __FreeBSD_version to bound boostrapping of ctfmerge which was fixed
in r249243.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251687 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r244224, r248753
emaste [Thu, 13 Jun 2013 14:38:29 +0000 (14:38 +0000)]
MFC r244224, r248753

  Minor refactoring prior to .symbols file changes

  - Combine .if x and .if !x using .else
  - Separate out beforelinking dependency
  - Add comments to clarify .if nesting

  Always define and use PROGNAME

  This avoids having separate cases in the install rule for PROGNAME set
  and not set.  This is a minor cleanup in advance of further support for
  standalone debug files.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251686 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251089
rmacklem [Wed, 12 Jun 2013 23:13:42 +0000 (23:13 +0000)]
MFC: r251089
Add a patch analygous to r248567, r248581, r251079 to the
old NFS client to avoid the panic reported in the PR by
doing the vnode_pager_setsize() call after unlocking the mutex.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251671 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251396
asomers [Wed, 12 Jun 2013 22:19:49 +0000 (22:19 +0000)]
MFC r251396

sys/dev/mps/mps.c
sys/dev/mps/mps_user.c
        Fix uninitialized memory reference in mps_read_config_page.  It was
        referencing a field (params->hdr.Ext.ExtPageType) that would only be
        set when reading an Extended config page.  The symptom was that
        MPSIO_READ_CFG_PAGE ioctls would randomly fail with
        MPI2_IOCSTATUS_CONFIG_INVALID_PAGE errors.  The solution is to
        determine whether an extended or an ordinary config page is requested
        by looking at the PageType field, which should be available regardless.

        Similarly, mps_user_read_extcfg_header and mps_user_read_extcfg_page,
        which call mps_read_config_page, had to be fixed to always set the
        PageType field.  They were implicitly assuming that
        mps_read_config_page always operated on Extended pages.

Reviewed by: ken
Approved by: ken (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@251670 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250662
asomers [Wed, 12 Jun 2013 21:41:09 +0000 (21:41 +0000)]
MFC r250662

sbin/camcontrol/camcontrol.c
If an expander returns 0x00 (no device attached) in the ATTACHED DEVICE
field of the SMP DISCOVER response, ignore the value of ATTACHED SAS
ADDRESS, because it is invalid.  Some expanders zero out the address
when the attached device is removed, but others do not.  Section
9.4.3.10 of the SAS Protocol Layer 2 revision 04b does not require them
to do so.

Approved by: ken (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@251669 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: 236567
gnn [Wed, 12 Jun 2013 20:08:30 +0000 (20:08 +0000)]
MFC: 236567

Integrate a fix for a very odd signal delivery problem found
by Bryan Cantril and others in the Solaris/Illumos version of DTrace.

Obtained from: https://www.illumos.org/issues/789

git-svn-id: svn://svn.freebsd.org/base/stable/9@251666 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250617
asomers [Wed, 12 Jun 2013 19:04:08 +0000 (19:04 +0000)]
MFC r250617

etc/rc.d/syslogd
Add netif as a requirement of syslogd to get lo0 up.  Currently, this
doesn't affect the rc order, because mountcritremote already depends on
netif.

Reviewed by: eadler
Approved by: ken (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@251663 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r240403 (obrien):
gjb [Wed, 12 Jun 2013 13:17:43 +0000 (13:17 +0000)]
MFC r240403 (obrien):
  Not all Pmake derivatives silently handle empty shell output, so ensure
  there is something for make(1) to consume.  Bmake gives output such as:
  "warning: Couldn't read shell's output for "/bin/sh -c true"

Approved by: kib (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@251653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251431:
dim [Wed, 12 Jun 2013 07:04:27 +0000 (07:04 +0000)]
MFC r251431:

Pull in r183297 from upstream llvm trunk:

  PR15662: Optimized debug info produces out of order function
  parameters

  When a function is inlined we lazily construct the variables
  representing the function's parameters. After that, we add any
  remaining unused parameters.

  If the function doesn't use all the parameters, or uses them out of
  order, then the DWARF would produce them in that order, producing a
  parameter order that doesn't match the source.

  This fix causes us to always keep the arg variables at the start of
  the variable list & in the original order from the source.

Reported by: avg

git-svn-id: svn://svn.freebsd.org/base/stable/9@251645 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250626:
delphij [Wed, 12 Jun 2013 00:33:30 +0000 (00:33 +0000)]
MFC r250626:

Add less to rescue build.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251642 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC NFS FHA changes 249592 and 249596:
ken [Tue, 11 Jun 2013 23:19:02 +0000 (23:19 +0000)]
MFC NFS FHA changes 249592 and 249596:

  ------------------------------------------------------------------------
  r249592 | ken | 2013-04-17 15:00:22 -0600 (Wed, 17 Apr 2013) | 180 lines

  Revamp the old NFS server's File Handle Affinity (FHA) code so that
  it will work with either the old or new server.

  The FHA code keeps a cache of currently active file handles for
  NFSv2 and v3 requests, so that read and write requests for the same
  file are directed to the same group of threads (reads) or thread
  (writes).  It does not currently work for NFSv4 requests.  They are
  more complex, and will take more work to support.

  This improves read-ahead performance, especially with ZFS, if the
  FHA tuning parameters are configured appropriately.  Without the
  FHA code, concurrent reads that are part of a sequential read from
  a file will be directed to separate NFS threads.  This has the
  effect of confusing the ZFS zfetch (prefetch) code and makes
  sequential reads significantly slower with clients like Linux that
  do a lot of prefetching.

  The FHA code has also been updated to direct write requests to nearby
  file offsets to the same thread in the same way it batches reads,
  and the FHA code will now also send writes to multiple threads when
  needed.

  This improves sequential write performance in ZFS, because writes
  to a file are now more ordered.  Since NFS writes (generally
  less than 64K) are smaller than the typical ZFS record size
  (usually 128K), out of order NFS writes to the same block can
  trigger a read in ZFS.  Sending them down the same thread increases
  the odds of their being in order.

  In order for multiple write threads per file in the FHA code to be
  useful, writes in the NFS server have been changed to use a LK_SHARED
  vnode lock, and upgrade that to LK_EXCLUSIVE if the filesystem
  doesn't allow multiple writers to a file at once.  ZFS is currently
  the only filesystem that allows multiple writers to a file, because
  it has internal file range locking.  This change does not affect the
  NFSv4 code.

  This improves random write performance to a single file in ZFS, since
  we can now have multiple writers inside ZFS at one time.

  I have changed the default tuning parameters to a 22 bit (4MB)
  window size (from 256K) and unlimited commands per thread as a
  result of my benchmarking with ZFS.

  The FHA code has been updated to allow configuring the tuning
  parameters from loader tunable variables in addition to sysctl
  variables.  The read offset window calculation has been slightly
  modified as well.  Instead of having separate bins, each file
  handle has a rolling window of bin_shift size.  This minimizes
  glitches in throughput when shifting from one bin to another.

  sys/conf/files:
   Add nfs_fha_new.c and nfs_fha_old.c.  Compile nfs_fha.c
   when either the old or the new NFS server is built.

  sys/fs/nfs/nfsport.h,
  sys/fs/nfs/nfs_commonport.c:
   Bring in changes from Rick Macklem to newnfs_realign that
   allow it to operate in blocking (M_WAITOK) or non-blocking
   (M_NOWAIT) mode.

  sys/fs/nfs/nfs_commonsubs.c,
  sys/fs/nfs/nfs_var.h:
   Bring in a change from Rick Macklem to allow telling
   nfsm_dissect() whether or not to wait for mallocs.

  sys/fs/nfs/nfsm_subs.h:
   Bring in changes from Rick Macklem to create a new
   nfsm_dissect_nonblock() inline function and
   NFSM_DISSECT_NONBLOCK() macro.

  sys/fs/nfs/nfs_commonkrpc.c,
  sys/fs/nfsclient/nfs_clkrpc.c:
   Add the malloc wait flag to a newnfs_realign() call.

  sys/fs/nfsserver/nfs_nfsdkrpc.c:
   Setup the new NFS server's RPC thread pool so that it will
   call the FHA code.

   Add the malloc flag argument to newnfs_realign().

   Unstaticize newnfs_nfsv3_procid[] so that we can use it in
   the FHA code.

  sys/fs/nfsserver/nfs_nfsdsocket.c:
   In nfsrvd_dorpc(), add NFSPROC_WRITE to the list of RPC types
   that use the LK_SHARED lock type.

  sys/fs/nfsserver/nfs_nfsdport.c:
   In nfsd_fhtovp(), if we're starting a write, check to see
   whether the underlying filesystem supports shared writes.
   If not, upgrade the lock type from LK_SHARED to LK_EXCLUSIVE.

  sys/nfsserver/nfs_fha.c:
   Remove all code that is specific to the NFS server
   implementation.  Anything that is server-specific is now
   accessed through a callback supplied by that server's FHA
   shim in the new softc.

   There are now separate sysctls and tunables for the FHA
   implementations for the old and new NFS servers.  The new
   NFS server has its tunables under vfs.nfsd.fha, the old
   NFS server's tunables are under vfs.nfsrv.fha as before.

   In fha_extract_info(), use callouts for all server-specific
   code.  Getting file handles and offsets is now done in the
   individual server's shim module.

   In fha_hash_entry_choose_thread(), change the way we decide
   whether two reads are in proximity to each other.
   Previously, the calculation was a simple shift operation to
   see whether the offsets were in the same power of 2 bucket.
   The issue was that there would be a bucket (and therefore
   thread) transition, even if the reads were in close
   proximity.  When there is a thread transition, reads wind
   up going somewhat out of order, and ZFS gets confused.

   The new calculation simply tries to see whether the offsets
   are within 1 << bin_shift of each other.  If they are, the
   reads will be sent to the same thread.

   The effect of this change is that for sequential reads, if
   the client doesn't exceed the max_reqs_per_nfsd parameter
   and the bin_shift is set to a reasonable value (22, or
   4MB works well in my tests), the reads in any sequential
   stream will largely be confined to a single thread.

   Change fha_assign() so that it takes a softc argument.  It
   is now called from the individual server's shim code, which
   will pass in the softc.

   Change fhe_stats_sysctl() so that it takes a softc
   parameter.  It is now called from the individual server's
   shim code.  Add the current offset to the list of things
   printed out about each active thread.

   Change the num_reads and num_writes counters in the
   fha_hash_entry structure to 32-bit values, and rename them
   num_rw and num_exclusive, respectively, to reflect their
   changed usage.

   Add an enable sysctl and tunable that allows the user to
   disable the FHA code (when vfs.XXX.fha.enable = 0).  This
   is useful for before/after performance comparisons.

  nfs_fha.h:
   Move most structure definitions out of nfs_fha.c and into
   the header file, so that the individual server shims can
   see them.

   Change the default bin_shift to 22 (4MB) instead of 18
   (256K).  Allow unlimited commands per thread.

  sys/nfsserver/nfs_fha_old.c,
  sys/nfsserver/nfs_fha_old.h,
  sys/fs/nfsserver/nfs_fha_new.c,
  sys/fs/nfsserver/nfs_fha_new.h:
   Add shims for the old and new NFS servers to interface with
   the FHA code, and callbacks for the

   The shims contain all of the code and definitions that are
   specific to the NFS servers.

   They setup the server-specific callbacks and set the server
   name for the sysctl and loader tunable variables.

  sys/nfsserver/nfs_srvkrpc.c:
   Configure the RPC code to call fhaold_assign() instead of
   fha_assign().

  sys/modules/nfsd/Makefile:
   Add nfs_fha.c and nfs_fha_new.c.

  sys/modules/nfsserver/Makefile:
   Add nfs_fha_old.c.

  Reviewed by: rmacklem
  Sponsored by: Spectra Logic

  ------------------------------------------------------------------------
  r249596 | ken | 2013-04-17 16:42:43 -0600 (Wed, 17 Apr 2013) | 7 lines

  Move the NFS FHA (File Handle Affinity) code from sys/nfsserver to
  sys/nfs, since it is now shared by the two NFS servers.

  Suggested by: rmacklem
  Sponsored by: Spectra Logic
  ------------------------------------------------------------------------

Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/9@251641 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251249, r251251, r251252, r\182512, r251254 and r251515:
hselasky [Tue, 11 Jun 2013 06:18:51 +0000 (06:18 +0000)]
MFC r251249, r251251, r251252, r\182512, r251254 and r251515:
Correct XHCI DMA descriptor programming.
Correct maximum IRQ rate.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251614 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251424:
brooks [Mon, 10 Jun 2013 23:09:45 +0000 (23:09 +0000)]
MFC r251424:

New install flags were merged to 9-STABLE and will appear in
FreeBSD-9.2.

Sponsored by: DARPA, AFRL
Submitted by: ru

git-svn-id: svn://svn.freebsd.org/base/stable/9@251611 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251324:
kib [Mon, 10 Jun 2013 04:12:48 +0000 (04:12 +0000)]
MFC r251324:
Assert that interrupts are enabled in the trap handlers on x86 before
calling generic code to deliver signals.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251594 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251283:
kib [Mon, 10 Jun 2013 04:09:14 +0000 (04:09 +0000)]
MFC r251283:
MFamd64: when printing the trap information, show the %esp value.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r251591:
kib [Mon, 10 Jun 2013 04:05:18 +0000 (04:05 +0000)]
MFC r251591:
The vm_page lock is not needed around the call to vm_page_insert().

git-svn-id: svn://svn.freebsd.org/base/stable/9@251592 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r247221:
markj [Sun, 9 Jun 2013 17:47:01 +0000 (17:47 +0000)]
MFC r247221:
Merge part of r1712 from elftoolchain, making it possible to resize ELF
sections and indirectly change the layout of an ELF file when
ELF_F_LAYOUT is not set.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251582 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251159
marius [Sun, 9 Jun 2013 13:58:37 +0000 (13:58 +0000)]
MFC: r251159

- Checking for spurious interrupts is only necessary when using INTx.
  Actually, this may be further optimized for controller variants
  supporting one-shot MSIs but I'm lacking the necessary hardware for
  testing.
- Add some missing synchronization of the statistics and status DMA
  maps.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251574 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251146 (partial)
marius [Sun, 9 Jun 2013 13:50:14 +0000 (13:50 +0000)]
MFC: r251146 (partial)

- Do not supply arguments as pointers to bce_get_{pg,rx}_buf() that are not
  altered or actually needed there any longer.
- Honor errors passed to the DMA mapping callbacks.
- In bce_get_rx_buf(), do not reserve stack space for more DMA segments
  than actually necessary.
- In bce_rx_intr(), remove a pointless check for an empty mbuf pointer
  which can only happen in case of a severe programming error. Moreover,
  recovering from that situation would require way more actions with header
  splitting enabled (which it is by default).
- Fix VLAN tagging in the RX path; do not attach the VLAN tag twice if the
  firmware has been told to keep it. [1]

Obtained from: OpenBSD [1]

git-svn-id: svn://svn.freebsd.org/base/stable/9@251573 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251402 (partial)
marius [Sun, 9 Jun 2013 13:24:16 +0000 (13:24 +0000)]
MFC: r251402 (partial)

Handle/mark/nuke unused arguments.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251572 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251394
marius [Sun, 9 Jun 2013 13:17:52 +0000 (13:17 +0000)]
MFC: r251394

CAM_DEV_QFREEZE handling should only be done on request submission but
neither on completion nor by SIM drivers in the first place. This issue
has been revealed by r249466.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251142
marius [Sun, 9 Jun 2013 12:55:44 +0000 (12:55 +0000)]
MFC: r251142

- As a follow-up to r247565 (MFC'ed to stable/9 in r248036), make firmware
  images that do not require patching at runtime actually const.
- Remove pointless softc members by employing the corresponding constants
  directly.
- Remove pointless returns.
- Remove unnecessary inclusion of opt_device_polling.h.
- Replace an outdated and now bogus comment in bce_tick() with the
  appropriate one.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251570 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251133
marius [Sun, 9 Jun 2013 12:51:42 +0000 (12:51 +0000)]
MFC: r251133

- Merge from r249476: Ensure that PCI bus BUS_GET_DMA_TAG() method sees
  the actual PCI device which makes the request for DMA tag, instead of
  some descendant of the PCI device, by creating a pass-through trampoline.
- Sprinkle const on tables.
- Use NULL instead of 0 for pointers.
- Take advantage of nitems().

git-svn-id: svn://svn.freebsd.org/base/stable/9@251569 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251115
marius [Sun, 9 Jun 2013 12:46:41 +0000 (12:46 +0000)]
MFC: r251115

- Remove pointless returns.
- Make cm_data a void pointer and cm_flags unsigned as appropriate.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251568 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r249213 (partial)
marius [Sun, 9 Jun 2013 12:39:21 +0000 (12:39 +0000)]
MFC: r249213 (partial)

- Remove unused headers from the SRCS of some modules.
- Use __FBSDID.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251567 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250939:
markj [Sat, 8 Jun 2013 15:48:01 +0000 (15:48 +0000)]
MFC r250939:
Correct the description of the -a option: rtsol(d) -a will in fact send out
router solicitations on multiple interfaces.

MFC r251059:
- Fix wording.
- Improve the descriptions in the FILES section.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251536 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r250941:
markj [Sat, 8 Jun 2013 15:46:42 +0000 (15:46 +0000)]
MFC r250941:
Include descriptions of the flags and fields printed when dumping the IPv6
prefix list.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251534 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r235647 for newsyslog (by gleb):
markj [Sat, 8 Jun 2013 15:45:01 +0000 (15:45 +0000)]
MFC r235647 for newsyslog (by gleb):
Hide DIR definition by making it an opaque struct typedef.

Introduce dirfd() libc exported symbol replacing macro with same name,
preserve _dirfd() macro for internal use.

Replace dirp->dd_fd with dirfd() call. Avoid using dirfd as variable
name to prevent shadowing global symbol.

MFC r250545:
Some filesystems (NFS in particular) do not fill out the d_type field when
returning directory entries through readdir(3). In this case we need to
obtain the file type ourselves; otherwise newsyslog -t will not be able to
find archived log files and will fail to both delete old log files and to
do interval-based rotations properly.

MFC r251240:
We want to stat the archived log file rather than the logfile itself.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251532 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r251368, r251382: Match the options of the kernel.
obrien [Fri, 7 Jun 2013 19:02:32 +0000 (19:02 +0000)]
MFC: r251368, r251382: Match the options of the kernel.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251504 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249895:
smh [Fri, 7 Jun 2013 14:23:11 +0000 (14:23 +0000)]
MFC r249895:
Add Host Protected Area (HPA) support to camcontrol

MFC r249904:
mdoc: remove superfluous paragraph macro.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251498 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249115:
smh [Fri, 7 Jun 2013 14:10:18 +0000 (14:10 +0000)]
MFC r249115:
Adds security command to camcontrol which provides the ability to secure erase
SSD's

MFC r249153: (included in r251494)
mdoc: remove superfluous paragraph macro.

git-svn-id: svn://svn.freebsd.org/base/stable/9@251497 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f