]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
10 years agoFix OpenSSL NULL pointer deference vulnerability.
delphij [Tue, 13 May 2014 23:19:16 +0000 (23:19 +0000)]
Fix OpenSSL NULL pointer deference vulnerability.

Obtained from: OpenBSD
Security: FreeBSD-SA-14:09.openssl
Security: CVE-2014-0198

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

10 years agoDocument r265922, mrsas(4) merge.
gjb [Tue, 13 May 2014 22:43:02 +0000 (22:43 +0000)]
Document r265922, mrsas(4) merge.

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC of tzdata2014c
edwin [Tue, 13 May 2014 22:35:06 +0000 (22:35 +0000)]
MFC of tzdata2014c

- Egypt will go into DST in 15 May 2014

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

10 years agoMFC r257162, r257175
ian [Tue, 13 May 2014 19:12:53 +0000 (19:12 +0000)]
MFC r257162, r257175

  The old trap.h (then trap_aim.h) actually had trap ID codes for Book-E CPUs.
  Use it universally. Book-E traps may also need revisiting due to the
  introduction of fixed-offset traps and the deprecation of IVORs in POWER
  ISA 2.06, but that's very much an issue for another day.

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

10 years agoMFC r257111, r257144, r257157, r257183
ian [Tue, 13 May 2014 19:09:00 +0000 (19:09 +0000)]
MFC r257111, r257144, r257157, r257183

  Test UARTs physical address instead of virtual.

  Be a bit more flexible in how we find the console from the properties on
  /chosen, following the list of allowed console properties in ePAPR. Also
  do not require that stdin be defined and equal to stdout: stdin is
  nonstandard (for ePAPR) and console in an unexpected place is after all
  better than no console.

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

10 years agoMFC r257115, r257116, r257117
ian [Tue, 13 May 2014 18:24:02 +0000 (18:24 +0000)]
MFC r257115, r257116, r257117

 Remove dead and duplicated code.

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

10 years agoMFC r257114, r257118
ian [Tue, 13 May 2014 18:14:31 +0000 (18:14 +0000)]
MFC r257114, r257118

  Use common OFW root code to set up fdtbus. This is an almost purely
  negative diff that should improve reliability somewhat. There should be
  no differences in behavior -- please report any that crop up. This has been
  tested on ARM and PPC systems.

  Make sure to get the right node when looking up #interrupt-cells.

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

10 years agoMFC r257093:
ian [Tue, 13 May 2014 18:08:15 +0000 (18:08 +0000)]
MFC r257093:

  Be a little more suspicious of thermal sensors, which can have single
  crazy readings occasionally. One wild reading should not be enough to
  trigger a shutdown, so instead wait for several concerning readings in
  a row.

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

10 years agoMFC r256994, r257016, r257055, r257059, r257060, r257075
ian [Tue, 13 May 2014 18:06:26 +0000 (18:06 +0000)]
MFC r256994, r257016, r257055, r257059, r257060, r257075

  Add two new interfaces to ofw_bus:
  - ofw_bus_map_intr()
    Maps an (iparent, IRQ) tuple to a system-global interrupt number in some
    platform dependent way. This is meant to be implemented as a replacement
    for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus
    hierarchy.
  - ofw_bus_config_intr()
    Configures an interrupt (previously mapped) based on firmware sense flags.
    This replaces manual interpretation of the sense field in bus drivers and
    will, in a follow-up, allow that interpretation to be redirected to the PIC
    drivers where it belongs. This will eventually replace the tables in
    /sys/dev/fdt/fdt_ARCH.c

  The PowerPC/AIM code has been converted to use these globally, with an
  implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming
  OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly
  be integrated into pic_if.m and bounced through nexus into the PIC tree.

  Factor out MI portions of the PowerPC nexus device into /sys/dev/ofw. The
  sparc64 driver will be modified to use this shortly.

  Allow PIC drivers to translate firmware sense codes for themselves. This
  is designed to replace the tables in dev/fdt/fdt_ARCH.c, but will not
  happen quite yet.

  Do not map IRQs twice. This fixes PowerPC/FDT systems with multiple PICs,
  which would try to treat the previously-mapped interrupts from
  fdt_decode_intr() as interrupt line numbers on the same parent PIC.

  Remove some of the code required for supporting ssm(4) on SPARC in favor
  of a more PowerPC/FDT-focused design. Whenever SPARC64 is integrated
  into this rework, this should be (trivially) revisited.

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

10 years agoMFC r256973, r256974
ian [Tue, 13 May 2014 18:00:41 +0000 (18:00 +0000)]
MFC r256973, r256974

 If the device tree directly contains the timebase frequency, use it. This
 property is required by ePAPR, but maintain the fallback to bus-frequency
 for compatibility.  Allow 32 or 64 bits.

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

10 years agoMFC r256932, r256938, r256966, r256953, r256967, r256969, r257015:
ian [Tue, 13 May 2014 17:59:17 +0000 (17:59 +0000)]
MFC r256932, r256938, r256966, r256953, r256967, r256969, r257015:

  Add a new function (OF_getencprop()) that undoes the transformation applied
  by encode-int. Specifically, it takes a set of 32-bit cell values and
  changes them to host byte order. Most non-string instances of OF_getprop()
  should be using this function, which is a no-op on big-endian platforms.

  Use the new function all over the place.

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

10 years agoMFC r256901, r256914 (by nwhitehorn):
ian [Tue, 13 May 2014 17:18:48 +0000 (17:18 +0000)]
MFC r256901, r256914 (by nwhitehorn):

  Catch up on 6 years of improvements in Open Firmware nexus devices by
  importing the sparc64 one. At least 90% of this code is MI and will be
  moved into /sys/dev/ofw at some point in the future.

  Ignore registers on devices where the reg property is malformed. Issue a
  warning if this happens under bootverbose. This prevents some
  strange-looking entries in dmesg for SMU devices on Apple G5 systems.

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

10 years agoMFC r256870, r256898, r256899, r256900 (by nwhitehorn):
ian [Tue, 13 May 2014 17:12:07 +0000 (17:12 +0000)]
MFC r256870, r256898, r256899, r256900 (by nwhitehorn):

 Standards-conformance and code deduplication:
  - Use bus reference phandles in place of FDT offsets as IRQ domain keys
  - Unify the identical macio/fdt/mambo OpenPIC drivers into one
  - Be more forgiving (following ePAPR) about what we need from the device
    tree to identify an OpenPIC
  - Correctly map all IRQs into an interrupt domain
  - Set IRQ_*_CONFORM for interrupts on an unknown PIC type instead of
    failing attachment for that device.

  Allow lots of interrupts (useful on multi-domain platforms) and do not
  set device_quiet() on all devices attached under nexus(4).

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

10 years agoMFC r256814, r256816, r256818, r256846, r256855, r256864 (by nwhitehorn):
ian [Tue, 13 May 2014 16:59:50 +0000 (16:59 +0000)]
MFC r256814, r256816, r256818, r256846, r256855, r256864 (by nwhitehorn):

 - Handle 2GB of ram
 - Allow the OFW interrupt mapping code to work with PCI devices not
   enumerated by Open Firmware, as in the case of FDT.
 - Provide an interface for PCI bus drivers that need some of ofw_pci's
   metadata during attach.
 - Use standard ofw_bus helpers instead of reinventing the wheel.
 - Make hard-wired TLB allocations be at minimum one page.

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

10 years agoMFC r256798: Return BUS_PROBE_NOWILDCARD from fdtbus_probe.
ian [Tue, 13 May 2014 16:52:21 +0000 (16:52 +0000)]
MFC r256798: Return BUS_PROBE_NOWILDCARD from fdtbus_probe.

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

10 years agoMFC r256792, r256793, r256799 (by nwhitehorn): Unify AIM and booke code.
ian [Tue, 13 May 2014 16:50:10 +0000 (16:50 +0000)]
MFC r256792, r256793, r256799 (by nwhitehorn): Unify AIM and booke code.

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

10 years agoMFC r264216, r265817, r265822:
kevlo [Tue, 13 May 2014 06:09:01 +0000 (06:09 +0000)]
MFC r264216, r265817, r265822:

Add man page for udplite(4).

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

10 years agoMFC r264212,r264213,r264248,r265776,r265811,r265909:
kevlo [Tue, 13 May 2014 06:05:53 +0000 (06:05 +0000)]
MFC r264212,r264213,r264248,r265776,r265811,r265909:

- Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks.
  Tested with vlc and a test suite [1].
  [1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz

  Reviewed by: jhb, glebius, adrian

- Fix a logic bug which prevented the sending of UDP packet with 0 checksum.

- Disable TX checksum offload for UDP-Lite completely. It wasn't used for
  partial checksum coverage, but even for full checksum coverage it doesn't
  work.

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

10 years agoMFC r265418
alc [Tue, 13 May 2014 05:26:43 +0000 (05:26 +0000)]
MFC r265418
  Prior to r254304, a separate function, vm_pageout_page_stats(), was used
  to periodically update the reference status of the active pages.  This
  function was called, instead of vm_pageout_scan(), when memory was not
  scarce.  The objective was to provide up to date reference status for
  active pages in case memory did become scarce and active pages needed to
  be deactivated.

  The active page queue scan performed by vm_pageout_page_stats() was
  virtually identical to that performed by vm_pageout_scan(), and so r254304
  eliminated vm_pageout_page_stats().  Instead, vm_pageout_scan() is
  called with the parameter "pass" set to zero.  The intention was that when
  pass is zero, vm_pageout_scan() would only scan the active queue.
  However, the variable page_shortage can still be greater than zero when
  memory is not scarce and vm_pageout_scan() is called with pass equal to
  zero.  Consequently, the inactive queue may be scanned and dirty pages
  laundered even though that was not intended by r254304.  This revision
  fixes that.

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

10 years agoMFC r260567
alc [Tue, 13 May 2014 05:21:54 +0000 (05:21 +0000)]
MFC r260567
  Correctly update the count of stuck pages, "addl_page_shortage", in
  vm_pageout_scan().  There were missing increments in two less common
  cases.

  Don't conflate the count of stuck pages and the pageout deficit provided
  by vm_page_alloc{,_contig}().

  Handle held pages consistently in the inactive queue scan.  In the more
  common case, we did not move the page to the tail of the queue.  Whereas,
  in the less common case, we did.  There's no particular reason to move
  the page in the less common case, so remove it.

  Perform the calculation of the page shortage for the active queue scan a
  little earlier, before the active queue lock is acquired.  The correctness
  of this calculation doesn't depend on the active queue lock being held.

  Eliminate a redundant variable, "pcount".  Use the more descriptive
  variable, "maxscan", in its place.

  Apply a few nearby style fixes, e.g., eliminate stray whitespace and
  excess parentheses.

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

10 years agoMFC r259750, r260245: Add PPS support to the am335x timer driver.
ian [Mon, 12 May 2014 22:33:22 +0000 (22:33 +0000)]
MFC r259750, r260245: Add PPS support to the am335x timer driver.

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

10 years agoMFC r259744, cleanups to move global vars into softc, use named values, etc.
ian [Mon, 12 May 2014 22:30:10 +0000 (22:30 +0000)]
MFC r259744, cleanups to move global vars into softc, use named values, etc.

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

10 years agoMFC r259739, r259743: Shorten DMTIMER_->DMT_, #define all register constants.
ian [Mon, 12 May 2014 22:25:41 +0000 (22:25 +0000)]
MFC r259739, r259743: Shorten DMTIMER_->DMT_, #define all register constants.

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

10 years agoRevert accidental commit that tagged along with an MFC commit.
ian [Mon, 12 May 2014 22:19:37 +0000 (22:19 +0000)]
Revert accidental commit that tagged along with an MFC commit.

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

10 years agoMFC r259099: Fix a small error in calculating length of DELAY().
ian [Mon, 12 May 2014 22:15:57 +0000 (22:15 +0000)]
MFC r259099: Fix a small error in calculating length of DELAY().

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

10 years agoMFC r260235: fixes to dockstar DTS source.
ian [Mon, 12 May 2014 21:40:03 +0000 (21:40 +0000)]
MFC r260235: fixes to dockstar DTS source.

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

10 years agoMFC r264822: Allow .WAIT to appear in SUBDIR= lists
ian [Mon, 12 May 2014 21:22:53 +0000 (21:22 +0000)]
MFC r264822:  Allow .WAIT to appear in SUBDIR= lists

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

10 years agoMFH (r264966): add sysctl OIDs for actual swap zone size and capacity
des [Mon, 12 May 2014 20:48:04 +0000 (20:48 +0000)]
MFH (r264966): add sysctl OIDs for actual swap zone size and capacity

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

10 years agoMFC r265285,265320:
pluknet [Mon, 12 May 2014 19:42:16 +0000 (19:42 +0000)]
MFC r265285,265320:

Documented the pget(9) system kernel interface.

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

10 years agoMFC 265555
ambrisko [Mon, 12 May 2014 17:55:24 +0000 (17:55 +0000)]
MFC 265555

dd mrsas(4) driver from LSI official support of newer MegaRAID SAS
cards.  LSI has been maintaining this driver outside of the FreeBSD
tree.  It overlaps support of ThunderBolt and Invader cards that mfi(4)
supports.  By default mfi(4) will attach to cards.  If the tunable:
hw.mfi.mrsas_enable=1
is set then mfi(4) will not probe and attach to these newer cards and
allow mrsas(4) to attach.  So by default this driver will not effect
a FreeBSD system unless mfi(4) is removed from the kernel or the
tunable is enabled.

mrsas(4) attaches disks to the CAM layer so it depends on CAM and devices
show up as /dev/daX.  mfiutil(8) does not work with mrsas.  The FreeBSD
version of MegaCli and StorCli from LSI do work with mrsas.  It appears
that StorCli only works with mrsas.  MegaCli appears to work with mfi(4)
and mrsas(4).

It would be good to add mfiutil(4) support to mrsas, emulations modes,
kernel logging, device aliases to ease the transition between mfi(4)
and mrsas(4).

Style issues should be resolved by LSI when they get committers approved.
The plan is get this driver in FreeBSD 9.3 to improve HW support.

Thanks to LSI for developing, testing and working with FreeBSD to
make this driver co-exist in FreeBSD.  This improves the overall
support of MegaRAID SAS.

Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com>
Sponsored by: LSI

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

10 years agoMFC r265703
davidcs [Mon, 12 May 2014 15:52:49 +0000 (15:52 +0000)]
MFC r265703
Modify Copyright information and other strings to reflect
Qlogic Corporation's purchase of Broadcom's NetXtreme business.
Added clean option to Makefile

Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation

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

10 years agoMFC r256690:
ae [Mon, 12 May 2014 12:04:44 +0000 (12:04 +0000)]
MFC r256690:
  Add an automatic resize support to the GEOM_PART class.

  When parent provider has been resized, the scheme specific G_PART_RESIZE
  method does an update of scheme's metadata. But all changes are not saved
  to disk, until `gpart commit` will be called.

MFC r265336:
  Add an advice what to do when partition was automatically resized.

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

10 years agoMFC r265318:
ae [Mon, 12 May 2014 10:19:31 +0000 (10:19 +0000)]
MFC r265318:
  For schemes that do an automatic partition aligning move this code to
  separate function.

MFC r265331:
  Prevent an unexpected shrinking on resizing due to alignment for MBR,
  PC98 and VTOC8 schemes.

MFC r265333:
  Add better error description for case when we are doing resize and
  scheme-specific method returns EBUSY.

MFC r265539:
  It is safe to allow shrinking, when aligned size is bigger than current.

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

10 years agoMFC r265363
truckman [Mon, 12 May 2014 04:27:10 +0000 (04:27 +0000)]
MFC r265363

Avoid unsigned integer overflow which can cause
rman_reserve_resource_bound() to return incorrect results.

Continue the initial search until the first viable region is found.

Add a comment to explain the search termination test.

PR: kern/188534
Reviewed by: jhb (previous version)

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

10 years agoMFC rev. 265260:
thomas [Sun, 11 May 2014 20:44:58 +0000 (20:44 +0000)]
MFC rev. 265260:
Add appropriate quoting to allow building with a KERNCONFDIR containing
spaces.

PR: kern/162736

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

10 years agoMFC: 263302, 264461, 264772
gnn [Sun, 11 May 2014 17:18:09 +0000 (17:18 +0000)]
MFC: 263302, 264461, 264772

 263302:
 fix mbuf leak if it does not fit in software queue

 264461:
 Commit various fixes for the SolarFlare drivers, in particular
 this set of patches fixes support for systems with > 32 cores.

 Details include

 sfxge: RXQ index (not label) comes from FW in flush done/failed events

 Change the second argument name of the efx_rxq_flush_done_ev_t and
 efx_rxq_flush_failed_ev_t prototypes to highlight that RXQ index (not label)
 comes from FW in flush done and failed events.

 sfxge: TXQ index (not label) comes from FW in flush done event

 Change the second argument name of the efx_txq_flush_done_ev_t prototype to
 highlight that TXQ index (not label) comes from FW in flush done event.

 sfxge: use TXQ type as label to support more than 32 TXQs

 There are 3 TXQs in event queue 0 and 1 TXQ (with TCP/UDP checksum offload)
 in all other event queues.

 264772:
 Check that port is started when MAC filter is set

 The MAC filter set may be called without softc_lock held in the case of
 SIOCADDMULTI and SIOCDELMULTI ioctls. The ioctl handler checks IFF_DRV_RUNNING
 flag which implies port started, but it is not guaranteed to remain.
 softc_lock shared lock can't be held in the case of these ioctls processing,
 since it results in failure where kernel complains that non-sleepable
 lock is held in sleeping thread.

 Both problems are repeatable on LAG with LACP proto bring up.

Submitted by: Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.

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

10 years agoMFH (r261913): switch default to sha512
des [Sun, 11 May 2014 14:54:17 +0000 (14:54 +0000)]
MFH (r261913): switch default to sha512
MFH (r264964): rewrite so DES still works when not the default
MFH (r262945): clean up man page

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

10 years agoMFC: r265269
brueffer [Sun, 11 May 2014 09:54:38 +0000 (09:54 +0000)]
MFC: r265269

Make the HARDWARE section ready for release notes generation; sort SEE ALSO.

Compared to the original revision, the list of supported chipsets was changed to
reflect those supported in this branch.

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

10 years agoMFC: r265264, r265270
brueffer [Sat, 10 May 2014 20:45:23 +0000 (20:45 +0000)]
MFC: r265264, r265270

Add rsu(4) and urtwn(4) to the hardware notes.

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

10 years agoMFC: r257408 by kevlo
brueffer [Sat, 10 May 2014 19:47:54 +0000 (19:47 +0000)]
MFC: r257408 by kevlo

Add manpage for urtwnfw, the Realtek RTL8188CU/RTL8192CU firmware
module.  Also fix a few nits in urtwn.4.

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

10 years agoMFC: r265263
brueffer [Sat, 10 May 2014 19:10:31 +0000 (19:10 +0000)]
MFC: r265263

Make this manpage ready for hardware notes generation, add more Xrefs and perform
general cleanup.

In particular, don't claim rsu(4) devices can be configured with hostname(1)...

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

10 years agoMFC r259126:
rpaulo [Sat, 10 May 2014 08:10:01 +0000 (08:10 +0000)]
MFC r259126:

Activate the device before attempt to access any of its registers.  Without
this change we may end up with a panic (Fatal kernel mode data abort:
'External Non-Linefetch Abort (S)') as described in
http://e2e.ti.com/support/arm/sitara_arm/f/791/t/276862.aspx.

It is now possible to bring up I2C1 and I2C2 on BBB.

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

10 years agoManually MFC 262714:
rpaulo [Sat, 10 May 2014 08:07:41 +0000 (08:07 +0000)]
Manually MFC 262714:
  Add a missing semicolong, noticed by the gnu dt compiler.

In head, the directory layout changed and we can't svn merge correctly.

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

10 years agoMFC r265275:
kib [Sat, 10 May 2014 07:53:36 +0000 (07:53 +0000)]
MFC r265275:
Overwrite the de_Name for the directories on rename to correct the dot
name.

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

10 years agoRevert bogus change in 265804 to configparser.c
rpaulo [Sat, 10 May 2014 07:26:49 +0000 (07:26 +0000)]
Revert bogus change in 265804 to configparser.c

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

10 years agoMFC r252440:
rpaulo [Sat, 10 May 2014 07:25:26 +0000 (07:25 +0000)]
MFC r252440:

    Enable the second and the third I2C controllers on Beaglebone-black.

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

10 years agoMFC r265411
davidcs [Sat, 10 May 2014 02:10:32 +0000 (02:10 +0000)]
MFC r265411
Modify Copyright information to reflect Qlogic Corporation's purchase
of Broadcom's NetXtreme business

Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation

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

10 years agoMFC r264194:
jh [Fri, 9 May 2014 15:55:45 +0000 (15:55 +0000)]
MFC r264194:

Fork a child process and wait until the process terminates when the -P
option is specified. This behavior is documented on the manual page.

PR: bin/187265

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

10 years agoMFC: r265244
brueffer [Fri, 9 May 2014 13:18:24 +0000 (13:18 +0000)]
MFC: r265244

Free resources in an error case.

CID: 1018947
Found with: Coverity Prevent(tm)

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

10 years agoMFC r265464:
delphij [Fri, 9 May 2014 07:24:39 +0000 (07:24 +0000)]
MFC r265464:

Sort .ALLSRC before concatenating files together.  This makes sure that the
file are always built the same.

(Note that Header and Localstuff must appear first and in that order, the
sorting does not affect as a coincident effect).

Submitted by: sjg

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

10 years agoMFC r265458:
delphij [Fri, 9 May 2014 07:21:32 +0000 (07:21 +0000)]
MFC r265458:
Import George Wilson's change for Illumos #4730:

4730 metaslab group taskq should be destroyed in metaslab_group_destroy()
Reviewed by: Alex Reece <alex.reece@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>

Original author: George Wilson

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

10 years agoMFC r264836 (MFV r264830):
delphij [Fri, 9 May 2014 07:17:29 +0000 (07:17 +0000)]
MFC r264836 (MFV r264830):

4745 fix AVL code misspellings

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

10 years agoMFC r264835 (MFV r264829):
delphij [Fri, 9 May 2014 07:12:31 +0000 (07:12 +0000)]
MFC r264835 (MFV r264829):

3897 zfs filesystem and snapshot limits

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

10 years agoMFC r264740:
delphij [Fri, 9 May 2014 07:07:25 +0000 (07:07 +0000)]
MFC r264740:

Use case insensitive match in portsnap.

PR: bin/186510
Submitted by: olli

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

10 years agoMFC r264671 (MFV r264668):
delphij [Fri, 9 May 2014 07:04:12 +0000 (07:04 +0000)]
MFC r264671 (MFV r264668):

4754 io issued to near-full luns even after setting noalloc threshold
4755 mg_alloc_failures is no longer needed

illumos/illumos@b6240e830b871f59c22a3918aebb3b36c872edba

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

10 years agoMFC r264669: MFV r264666:
delphij [Fri, 9 May 2014 06:56:26 +0000 (06:56 +0000)]
MFC r264669: MFV r264666:

4374 dn_free_ranges should use range_tree_t

illumos/illumos-gate@bf16b11e8deb633dd6c4296d46e92399d1582df4

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

10 years agoMFC r265732:
gjb [Fri, 9 May 2014 04:16:10 +0000 (04:16 +0000)]
MFC r265732:
  Add 9.3 to mdoc.local

Sponsored by: The FreeBSD Foundation

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

10 years agoMFC mpr(4) driver changes.
ken [Fri, 9 May 2014 03:59:12 +0000 (03:59 +0000)]
MFC mpr(4) driver changes.

This includes r265386, r265424, and r265473.

  ------------------------------------------------------------------------
  r265386 | ken | 2014-05-05 13:53:03 -0600 (Mon, 05 May 2014) | 15 lines

  Adjust #if statements inside mprsas_send_smpcmd() to more accurately
  reflect when unmapped I/O support was added.

  For FreeBSD 10, it arrived just prior to __FreeBSD_version 1000028.
  For FreeBSD 9, it arrived just prior to __FreeBSD_version 902001.

  Also, fix compiler warnings in mprsas_send_smpcmd() that happen in the
  i386 PAE build for non-unmapped I/O builds.  These were fixed in mps(4)
  in revision 241145, but didn't make it into the mpr(4) driver.  This
  change should only affect FreeBSD versions outside the above revisions,
  and thus doesn't affect head.

  Sponsored by: Spectra Logic Corporation

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265424 | ken | 2014-05-06 00:18:43 -0600 (Tue, 06 May 2014) | 33 lines

  Fix a problem with async notifications in the mpr(4) driver.

  This problem only occurs on versions of FreeBSD prior to the recent CAM
  locking changes.  (i.e. stable/9 and older versions of stable/10)  This
  change should be a no-op for head and stable/10.

  If a path isn't specified, xpt_register_async() will create a fully
  wildcarded path and acquire a lock (the XPT lock in older versions,
  and via xpt_path_lock() in newer versions) to call xpt_action() for the
  XPT_SASYNC_CB CCB.  It will then drop the lock and if the requested event
  includes AC_FOUND_DEVICE or AC_PATH_REGISTERED, it will get the caller up
  to date with any device arrivals or path registrations.

  The issue is that before the locking changes, each SIM lock would get
  acquired in turn during the EDT tree traversal process.  If a path is
  specified for xpt_register_async(), it won't acquire and drop its own lock,
  but instead expects the caller to hold its own SIM lock.  That works for
  the first part of xpt_register_async(), but causes a recursive lock
  acquisition once the EDT traversal happens and it comes to the SIM in
  question.  And it isn't possible to call xpt_action() without holding a SIM
  lock.

  The locking changes fix this by using the XPT topology lock for EDT
  traversal, so it is no longer an issue to hold the SIM lock while calling
  xpt_register_async().

  The solution for FreeBSD versions before the locking changes is to request
  notification of all device arrivals (so we pass a NULL path into
  xpt_register_async()) and then filter out the arrivals that are not ours.

  Sponsored by: Spectra Logic Corporation

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265473 | ken | 2014-05-06 16:13:38 -0600 (Tue, 06 May 2014) | 7 lines

  Change the device name for mpr(4) from /dev/mpr_N to /dev/mprN.

  This is more consistent with the existing mps(4) behavior.

  Reviewed by: Steve McConnell <stephen.mcconnell@avagotech.com>

  ------------------------------------------------------------------------

Sponsored by: LSI, Spectra Logic

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

10 years agoMFC r265231:
pfg [Fri, 9 May 2014 01:30:15 +0000 (01:30 +0000)]
MFC r265231:

gcc: fix strict alignment.

From the OpenBSD log:

x86-64 ABI requires arrays greater than 16 bytes to be aligned to
16byte boundary.  However, GCC 16-byte aligns arrays of >=16 BITS,
not BYTES.

This diff improves bug detectability for code which has local arrays
of [16 .. 127] bits:  in those cases SSP will now detect even 1-byte
overflows.

Obtained from: OpenBSD (CVS rev 1.4)

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

10 years agoMFC r265202:
pfg [Fri, 9 May 2014 01:20:39 +0000 (01:20 +0000)]
MFC r265202:
Remove some unreachable breaks in regex.

This is based on a much bigger cleanup done in Illumos.

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

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

10 years agoMerge 260488, r260508.
melifaro [Thu, 8 May 2014 21:03:31 +0000 (21:03 +0000)]
Merge 260488, r260508.

r260488:
  Split rt_newaddrmsg_fib() into two different functions.
  Adding/deleting interface addresses involves access to 3 different subsystems,
  int different parts of code. Each call can fail, so reporting successful
  operation by rtsock in the middle of the process error-prone.

  Further split routing notification API and actual rtsock calls via creating
  public-available rt_addrmsg() / rt_routemsg() functions with "private"
  rtsock_* backend.

r260508:
  Simplify inet alias handling code: if we're adding/removing alias which
  has the same prefix as some other alias on the same interface, use
  newly-added rt_addrmsg() instead of hand-rolled in_addralias_rtmsg().

  This eliminates the following rtsock messages:

  Pinned RTM_ADD for prefix (for alias addition).
  Pinned RTM_DELETE for prefix (for alias withdrawal).

  Example (got 10.0.0.1/24 on vlan4, playing with 10.0.0.2/24):

  before commit, addition:

    got message of size 116 on Fri Jan 10 14:13:15 2014
    RTM_NEWADDR: address being added to iface: len 116, metric 0, flags:
    sockaddrs: <NETMASK,IFP,IFA,BRD>
     255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255

    got message of size 192 on Fri Jan 10 14:13:15 2014
    RTM_ADD: Add Route: len 192, pid: 0, seq 0, errno 0, flags:<UP,PINNED>
    locks:  inits:
    sockaddrs: <DST,GATEWAY,NETMASK>
     10.0.0.0 10.0.0.2 (255) ffff ffff ff

  after commit, addition:

    got message of size 116 on Fri Jan 10 13:56:26 2014
    RTM_NEWADDR: address being added to iface: len 116, metric 0, flags:
    sockaddrs: <NETMASK,IFP,IFA,BRD>
     255.255.255.0 vlan4:8.0.27.c5.29.d4 14.0.0.2 14.0.0.255

  before commit, wihdrawal:

    got message of size 192 on Fri Jan 10 13:58:59 2014
    RTM_DELETE: Delete Route: len 192, pid: 0, seq 0, errno 0, flags:<UP,PINNED>
    locks:  inits:
    sockaddrs: <DST,GATEWAY,NETMASK>
     10.0.0.0 10.0.0.2 (255) ffff ffff ff

    got message of size 116 on Fri Jan 10 13:58:59 2014
    RTM_DELADDR: address being removed from iface: len 116, metric 0, flags:
    sockaddrs: <NETMASK,IFP,IFA,BRD>
     255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255

  adter commit, withdrawal:

    got message of size 116 on Fri Jan 10 14:14:11 2014
    RTM_DELADDR: address being removed from iface: len 116, metric 0, flags:
    sockaddrs: <NETMASK,IFP,IFA,BRD>
     255.255.255.0 vlan4:8.0.27.c5.29.d4 10.0.0.2 10.0.0.255

  Sending both RTM_ADD/RTM_DELETE messages to rtsock is completely wrong
  (and requires some hacks to keep prefix in route table on RTM_DELETE).

  I've tested this change with quagga (no change) and bird (*).

  bird alias handling is already broken in *BSD sysdep code, so nothing
  changes here, too.

  I'm going to MFC this change if there will be no complains about behavior
  change.

  While here, fix some style(9) bugs introduced by r260488
  (pointed by glebius and bde).

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

10 years agoMFC: r265252
rmacklem [Thu, 8 May 2014 20:52:25 +0000 (20:52 +0000)]
MFC: r265252
The new draft specification for NFSv4.0 specifies that a server
should either accept owner and owner_group strings that are just
the digits of the uid/gid or return NFS4ERR_BADOWNER.
This patch adds a sysctl vfs.nfsd.enable_stringtouid, which can
be set to enable the server w.r.t. accepting numeric string. It
also ensures that NFS4ERR_BADOWNER is returned if numeric uid/gid
strings are not enabled. This fixes the server for recent Linux
nfs4 clients that use numeric uid/gid strings by default.

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

10 years agoMerge r260379, r260460.
melifaro [Thu, 8 May 2014 20:41:39 +0000 (20:41 +0000)]
Merge r260379, r260460.

r260379:
  Partially fix IPv4 interface routes deletion in RADIX_MPATH.

  Noticed by:   Nikolay Denev <ndenev at gmail.com>

r260460:
  Constanly use RT_ALL_FIBS everywhere instead of -1.

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

10 years agoMerge r259528, r259528, r260295.
melifaro [Thu, 8 May 2014 20:27:06 +0000 (20:27 +0000)]
Merge r259528, r259528, r260295.

r259528:
  Simplify contiguous mask checking.

  Suggested by: glebius

r260228:
  Remove useless register variable modifiers.
  Do some more style(9).

r260295:
  Change semantics for rnh_lookup() function: now
  it performs exact match search, regardless of netmask existance.
  This simplifies most of rnh_lookup() consumers.

  Fix panic triggered by deleting non-existent host route.

  PR:           kern/185092
  Submitted by: Nikolay Denev <ndenev at gmail.com>

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

10 years agoMerge r260524,r260540
melifaro [Thu, 8 May 2014 19:35:12 +0000 (19:35 +0000)]
Merge r260524,r260540

r260524:
  Add -4/-6 shorthand for -finet/-finet6 in route(8) and netstat(8).

r260540:
  Bump dates in nestat(1) and route(8) man pages.
  Fix several small errors introduced by r260524.

  Suggested by: glebius

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

10 years agoMerge r258708, r258711, r260247, r261117.
melifaro [Thu, 8 May 2014 19:11:41 +0000 (19:11 +0000)]
Merge r258708, r258711, r260247, r261117.

r258708:
Check ipfw table numbers in both user and kernel space before rule addition.
Found by:       Saychik Pavel <umka@localka.net>

r258711:
Simplify O_NAT opcode handling.

r260247:
Use rnh_matchaddr instead of rnh_lookup for longest-prefix match.
rnh_lookup is effectively the same as rnh_matchaddr if called with
empy network mask.

r261117:
Reorder struct ip_fw_chain:
* move rarely-used fields down
* move uh_lock to different cacheline
* remove some usused fields

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

10 years agoMFC: r265360
brueffer [Thu, 8 May 2014 19:03:04 +0000 (19:03 +0000)]
MFC: r265360

Remove stray comma.

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

10 years agoMerge r258677.
melifaro [Thu, 8 May 2014 18:09:32 +0000 (18:09 +0000)]
Merge r258677.

Fix key lookup in ipfw(8) broken since r232865.
Print warning for IPv4 address strings which are valid in
inet_aton() but not valid in inet_pton(). (1)

Found by:       Özkan KIRIK <ozkan.kirik@gmail.com>
Submitted by:   Ian Smith <smithi@nimnet.asn.au> (1)

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

10 years agoMFC r265201
brooks [Thu, 8 May 2014 16:12:38 +0000 (16:12 +0000)]
MFC r265201

Fix a 2038 bug.

If time_t is 64-bit (i.e. isn't 32-bit) allow any value of year, not
just years less than 2038.

Don't bother fixing the underflow in the case of years before 1903.

MFC after: 1 week
Sponsored by: DARPA, AFRL

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

10 years agoMFC r260234, r260328:
mav [Thu, 8 May 2014 13:31:01 +0000 (13:31 +0000)]
MFC r260234, r260328:
Remove extra conversion to nanoseconds from ddi_get_lbolt64().

As result this uses one multiplication and shifts instead of one division
and two multiplications.

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

10 years agoMFC r264145:
mav [Thu, 8 May 2014 13:12:24 +0000 (13:12 +0000)]
MFC r264145:
Add property and sysctl to control how ZVOLs are exposed to OS.

New ZFS property volmode and sysctl vfs.zfs.vol.mode allow switching ZVOL
between three modes:
 geom -- existing fully functional behavior (default);
 dev -- exposing volumes only as raw disk device file in devfs;
 none -- not exposing volumes outside ZFS.

The "dev" mode is less functional (can't be partitioned, mounted, etc),
but it is faster, and in some scenarios with untrusted consumers safer.
It can be useful for NAS, VM block storages, etc.
The "none" mode may be convenient for backup servers, etc. that don't
need direct data access.

Due to the way ZVOL is integrated with main ZFS code, those property
and sysctl are checked only during pool import and volume creation.

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

10 years agoMFC r264086:
mav [Thu, 8 May 2014 13:10:39 +0000 (13:10 +0000)]
MFC r264086:
3580 Want zvols to return volblocksize when queried for physical block size

illumos/illumos-gate@a0b60564dfc644f4bfaef1ce26d343b44cf68bc5

It is irrelevant for FreeBSD, just reducing diff.

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

10 years agoMFC r265054:
mav [Thu, 8 May 2014 12:07:40 +0000 (12:07 +0000)]
MFC r265054:
Reduce number of opens by REOM RAID during provider taste.

Instead opening/closing provider by each of metadata classes, do it only
once in core code.  Since for SCSI disks open/close means sending some
SCSI commands to the device, this change reduces taste time.

Sponsored by: iXsystems, Inc.

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

10 years agoMFC r264313:
mav [Thu, 8 May 2014 12:04:40 +0000 (12:04 +0000)]
MFC r264313:
Do not increment bio_data in case of BIO_DELETE.

This fixes KASSERT() panic in g_io_request().

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

10 years agoMFC: r264888
rmacklem [Thu, 8 May 2014 11:59:23 +0000 (11:59 +0000)]
MFC: r264888
The PR reported that the old NFS server did not set uio_td == NULL
for the VOP_READ() call. This patch fixes both the old and new
server for this case.

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

10 years agoMFC r264853
smh [Thu, 8 May 2014 08:30:18 +0000 (08:30 +0000)]
MFC r264853

Add some new ATA defines for SATA 3.1 spec

Sponsored by: Multiplay

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

10 years agoMFC r264849 & r264883
smh [Thu, 8 May 2014 08:23:24 +0000 (08:23 +0000)]
MFC r264849 & r264883

Exposed debug.acpi.max_tasks and debug.acpi.max_threads via sysctls so their
values can be viewed.

Sponsored by: Multiplay

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

10 years agoMFC r264878
smh [Thu, 8 May 2014 08:20:23 +0000 (08:20 +0000)]
MFC r264878

Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still
insufficient on some machines

Sponsored by: Multiplay

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

10 years agoMFC r264863
smh [Thu, 8 May 2014 08:18:48 +0000 (08:18 +0000)]
MFC r264863

Add information about supported NCQ functionality to camcontrol identify.

Sponsored by: Multiplay

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

10 years agoMFC r264851
smh [Thu, 8 May 2014 08:17:12 +0000 (08:17 +0000)]
MFC r264851

Eliminated optarg global being used outside of the function which called getopt

Sponsored by: Multiplay

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

10 years agoMFC r265159:
mav [Thu, 8 May 2014 07:13:22 +0000 (07:13 +0000)]
MFC r265159:
Respect MAXIMUM TRANSFER LENGTH field of Block Limits VPD page.

Nobody yet reported disk supporting I/Os less then our MAXPHYS value, but
since we any way have code to read Block Limits VPD page, that is easy.

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

10 years agoMFC r265150:
mav [Thu, 8 May 2014 07:12:06 +0000 (07:12 +0000)]
MFC r265150:
Do not reread SCSI disk VPD pages on every device open.

Instead of rereading VPD pages on every device open, do it only on initial
device probe, and in cases when device reported via UNIT ATTENTIONs that
something has changed.  Capacity is still rereaded on every open because
it is more critical for operation and more probable to change in run time.

On my tests with Intel 530 SSDs on mps(4) HBA this change reduces time
GEOM needs to retaste the device (that includes few open/close cycles)
from ~150ms to ~30ms.

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

10 years agoMFC r264886:
mav [Thu, 8 May 2014 07:10:38 +0000 (07:10 +0000)]
MFC r264886:
Remove limits on size of READ/WRITE operations.

Instead of allocating up to 16MB or RAM at once to handle whole I/O,
allocate up to 1MB at a time, but do multiple ctl_datamove() and storage
I/Os if needed.

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

10 years agoMFC r264884:
mav [Thu, 8 May 2014 07:08:47 +0000 (07:08 +0000)]
MFC r264884:
Make CAM target CTL frontend respect SIM I/O size limitations.

If datamove size is bigger then SIM can handle, or it has more segments
then this code can handle -- split it into several CTIO requests.

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

10 years agoMFC r264880 (by trasz):
mav [Thu, 8 May 2014 07:07:51 +0000 (07:07 +0000)]
MFC r264880 (by trasz):
Modify CTL iSCSI frontend to properly handle situations where datamove
routine is called multiple times per SCSI task.

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

10 years agoMFC r264834:
mav [Thu, 8 May 2014 07:05:19 +0000 (07:05 +0000)]
MFC r264834:
Disable UNMAP support for STEC 842 SSDs.

In some unknown cases UNMAP commands make device firmware stuck.

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

10 years agoMFC r264407:
mav [Thu, 8 May 2014 07:04:13 +0000 (07:04 +0000)]
MFC r264407:
Join CTL worker threads into one process for convenience.
Report their idle state as "-".

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

10 years agoMFC r264406:
mav [Thu, 8 May 2014 07:01:54 +0000 (07:01 +0000)]
MFC r264406:
Report more readable state "-" for idle CAM scan thread.

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

10 years agoMFC r264274, r264279, r264283, r264296, r264297:
mav [Thu, 8 May 2014 07:00:45 +0000 (07:00 +0000)]
MFC r264274, r264279, r264283, r264296, r264297:
Add support for SCSI UNMAP commands to CTL.

This patch adds support for three new SCSI commands: UNMAP, WRITE SAME(10)
and WRITE SAME(16).  WRITE SAME commands support both normal write mode
and UNMAP flag.  To properly report UNMAP capabilities this patch also adds
support for reporting two new VPD pages: Block limits and Logical Block
Provisioning.

UNMAP support can be enabled per-LUN by adding "-o unmap=on" to `ctladm
create` command line or "option unmap on" to lun sections of /etc/ctl.conf.

At this moment UNMAP supported for ramdisks and device-backed block LUNs.
It was tested to work great with ZFS ZVOLs.  For file-backed LUNs UNMAP
support is unfortunately missing due to absence of respective VFS KPI.

Sponsored by:   iXsystems, Inc

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

10 years agoMFC r260509:
mav [Thu, 8 May 2014 06:55:48 +0000 (06:55 +0000)]
MFC r260509:
Replace several instances of -1 with appropriate CAM_*_WILDCARD and types.

It was equal before r259397, but for good or bad, not any more for LUNs.

This change fixes at least CAM debugging.

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

10 years agoMFC: r264845
rmacklem [Wed, 7 May 2014 22:33:36 +0000 (22:33 +0000)]
MFC: r264845
Remove an unnecessary level of indirection for an argument.
This simplifies the code and should avoid the clang sparc
port from generating an abort() call.

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

10 years agoMFC: r264842
rmacklem [Wed, 7 May 2014 22:27:03 +0000 (22:27 +0000)]
MFC: r264842
Modify the NFSv4 client's Pathconf RPC (actually a Getattr Op.)
so that it only does the RPC for names that are answered by the RPC.
Doing the RPC for other names is harmless, but unnecessary.

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

10 years agoMerge r259393 from head:
gavin [Wed, 7 May 2014 21:38:33 +0000 (21:38 +0000)]
Merge r259393 from head:

  Fix several panics when initialization of an ISA or PC-CARD device fails:

  o  Assign sc->an_dev in an_probe() (which isn't really a probe function in
     the standard newbus sense) as we may need it for printing errors.
  o  Use device_printf() rather than if_printf() in an_reset() - this is
     called from an_probe() long before the ifp structure is initialised
     in an_attach().
  o  Initialize the ifp structure early in an_attach() as we use if_printf()
     in cases where allocation of descriptors etc fails.

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

10 years agoMerge r256782 from head:
gavin [Wed, 7 May 2014 20:57:16 +0000 (20:57 +0000)]
Merge r256782 from head:

  Add 26 new device IDs to uslcom(4).  This brings us in sync with Linux
  v3.12 rc5

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

10 years agoMerge r264984
scottl [Wed, 7 May 2014 20:28:27 +0000 (20:28 +0000)]
Merge r264984

Retire smp_active.  It was racey and caused demonstrated problems with
the cpufreq code.  Replace its use with smp_started.  There's at least
one userland tool that still looks at the kern.smp.active sysctl, so
preserve it but point it to smp_started as well.

Obtained from: Netflix, Inc.

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

10 years agoMerged r262424-262425,265085
scottl [Wed, 7 May 2014 20:20:52 +0000 (20:20 +0000)]
Merged r262424-262425,265085

Add the -a option to pmcstat.  This produces a full stack track on the
sampled points.  See the man page for details on how this works.

Obtained from:  Netflix, Inc.

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

10 years agoMFC r263445 and r265385. Note that the change to ObsoleteFiles.inc in
asomers [Wed, 7 May 2014 18:49:25 +0000 (18:49 +0000)]
MFC r263445 and r265385.  Note that the change to ObsoleteFiles.inc in
r265385 does not need to be MFCed, because the obsolete files in question
were never MFCed to any stable branch.

r265385
Remove the ifconfig test added in rev 263445.  After discussion with
melifaro, we agreed that ifconfig's behavior was not a bug.  The main
motivation for bin/187551 was to partially resolve kern/187549, but we
resolved kern/187549 in a different way instead.

ObsoleteFiles.inc
etc/mtree/BSD.tests.dist
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
        Remove /usr/tests/sbin/ifconfig

r263445
Add several ATF tests that deal with multiple fibs.  They're described in
several different PRs, but the tests share some common code, so I'm
committing them together.

sbin/ifconfig/tests
sbin/ifconfig/tests/fibs_test.sh
sbin/ifconfig/tests/Makefile
sbin/ifconfig/Makefile
        Add fibs_test.sh, which regresses bin/187551

tests/sys/netinet
tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
tests/sys/netinet/Makefile
tests/sys/Makefile
        Add fibs_test.sh, which regresses kern/167947, kern/187552
        kern/187549, kern/187550, and kern/187553

etc/mtree/BSD.tests.dist
        Add newly created directories

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

10 years agoMFC r263311:
jimharris [Wed, 7 May 2014 17:20:15 +0000 (17:20 +0000)]
MFC r263311:

nvme: Allocate all MSI resources up front so that we can fall back to
INTx if necessary.

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

10 years agoMFC r263310:
jimharris [Wed, 7 May 2014 17:18:51 +0000 (17:18 +0000)]
MFC r263310:

nvme: Close hole where nvd(4) would not be notified of all nvme(4)
instances if modules loaded during boot.

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

10 years agoMFC r263303:
jimharris [Wed, 7 May 2014 17:17:16 +0000 (17:17 +0000)]
MFC r263303:

Update nvme(4) and nvd(4) man pages to clarify the differences between
their respective device nodes.

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