Fix whitespace issue.

Approved by:	das (mentor, implicit)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240865 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
* ld80/s_expl.c:
  . Fix the threshold for expl(x) where |x| is small.
  . Also update the previously incorrect comment to match the
    new threshold.

* ld128/s_expl.c:
  . Re-order logic in exceptional cases to match the logic used in
    other long double functions.
  . Fix the threshold for expl(x) where is |x| is small.
  . Also update the previously incorrect comment to match the
    new threshold.

Submitted by:	bde
Approved by:	das (mentor)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240866 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add TRIM support.

The code builds a map of regions that were freed. On every write the
code consults the map and eventually removes ranges that were freed
before, but are now overwritten.

Freed blocks are not TRIMed immediately. There is a tunable that defines
how many txg we should wait with TRIMming freed blocks (64 by default).

There is a low priority thread that TRIMs ranges when the time comes.
During TRIM we keep in-flight ranges on a list to detect colliding
writes - we have to delay writes that collide with in-flight TRIMs in
case something will be reordered and write will reached the disk before
the TRIM. We don't have to do the same for in-flight writes, as
colliding writes just remove ranges to TRIM.

Sponsored by:	multiplay.co.uk

This work includes some important fixes and some improvements obtained
from the zfsonlinux project, including TRIMming entire vdevs on pool
create/add/attach and on pool import for spare and cache vdevs.

Obtained from:	zfsonlinux
Submitted by:	Etienne Dechamps <etienne.dechamps@ovh.net>


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240868 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Clean up the bcm2835 initarm. It is now identical to the other ARMv6 copies

Tested by:	Alexander Yerenkow


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240869 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
It is possible to recursively destroy snapshots even if the snapshot
doesn't exist on a dataset we are starting from. For example if we
have the following configuration:

	tank
	tank/foo
	tank/foo@snap
	tank/bar
	tank/bar@snap

We can execute:

	# zfs destroy -t tank@snap

eventhough tank@snap doesn't exit.

Unfortunately it is not possible to do the same with recursive rename:

	# zfs rename -r tank@snap tank@pans
	cannot open 'tank@snap': dataset does not exist

...until now. This change allows to recursively rename snapshots even if
snapshot doesn't exist on the starting dataset.

Sponsored by:	rsync.net
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This patch fixes a nit in the em, lem, and igb driver statistics.  Increment
adapter->dropped_pkts instead of if_ierrors because if_ierrors is
overwritten by hw stats collection.

Submitted by:	Andrew Boyer <aboyer@averesystems.com>
Reviewed by:	Jack F Vogel <jfv@freebsd.org>
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240879 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Partial revert of r239963:

The following change caused rpc.lockd to exit after startup:
____

libtirpc: be sure to free cl_netid and cl_tp

When creating a client with clnt_tli_create, it uses strdup to copy
strings for these fields if nconf is passed in. clnt_dg_destroy frees
these strings already. Make sure clnt_vc_destroy frees them in the
same way.
____

MFC after:	3 days
Reported by:	David Wolfskill
Tested by:	David Wolfskill


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240880 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revert r240850 and remove redundant NULL check before free(3).
free(3) handles NULL parameter fine.

Reviewed by:	kib, Garrett Cooper


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240881 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
In (eventual) preparation for supporting disabling the whole 11n/software
retry path - add some code to make it obvious (to me!) how to disable
the software tx path.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240882 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Prepare for software retransmission of non-aggregate frames but ensure
it's disabled.

The previous commit to enable CLRDMASK setting didn't do it at all
correctly for non-aggregate sessions - so the CLRDMASK bit would be
cleared and never re-set.

* move ath_tx_update_clrdmask() to be called by functions that setup
  descriptors and queue frames to the hardware, rather than scattered
  everywhere.

* Force CLRDMASK to be set on all non-aggregate session frames being
  transmitted.

* Use ath_tx_normal_comp() now on non-aggregate sessoin frames
  that are queued via ath_tx_xmit_normal().  That way the TID hwq is
  updated and they can trigger (eventual) filter frame queue resets
  and software retransmits.

There's still a bit more work to do in this area to reverse the silly
short-sightedness on my part, however it's likely going to be better
to fix this now than just reverting the patch.

Thanks to people on the freebsd-wireless@ mailing list for promptly
pointing this out.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240883 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix panic caused by wrong pointer dereference, left after pin sense rewrite
at r230551.

Also while there, make sense polling use reported for each node separately
instead of reporting accumulated total status.

Submitted by:	Barbara <barbara.freebsd@gmail.com> (1)
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240884 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Document ipv6 hook, present there for ages.

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


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240885 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Minor man page cleanup -- fix grammar, markup fixes, and start each
sentence on a new line.

Approved by:	hrs (mentor)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240887 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
DWC OTG host mode improvements:
 - Make HSIC selection dynamic.
 - Make LOW speed USB devices work through HIGH speed USB HUB.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240890 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make sure moused is exiting as quick as possible after that the
umsX character device returns a read error. Update devd.conf rules
to use "DEVFS" events which are generated after that the umsX
character device node has been created/destroyed, and then there
should be no need for moused to wait up to 10 seconds for umsX to
be ready. Opening umsX should not fail except if the kernel is low
on memory. In that case the user can replug the USB mouse or use
"usbconfig" to reset the device. In case of USB mouse devices,
moused should neither retry to open its character device,
once the first read error has happened. This is an indication
of device detach.

MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240891 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Permit table to be used as IPv6 address.

Reported by:	Serhiy Popov <sergiuspso@ukr.net>
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240892 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Whitespace fixes

MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240893 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Debugging output fixes:

* use the correct frame status - although the completion descriptor is
  the _last_ in the frame/aggregate, the status is currently stored in
  the _first_ buffer.

* Print out ath_buf specific fields once, not per descriptor in an ath_buf.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240895 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Migrate the ath(4) KTR logging to use an ATH_KTR() macro.

This should eventually be unified with ATH_DEBUG() so I can get both
from one macro; that may take some time.

Add some new probes for TX and TX completion.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240899 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Specify MTX_RECURSE for the controller's io_lock.  Without it, tws(4)
immediately panics on boot with INVARIANTS enabled.  The driver already
clearly expects to be able to recurse on this mutex - the main I/O
is always recursing on this lock.

Reported and tested by:  Mike Tancsa <mike at sentex dot net>
MFC after: 1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@240900 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f