Remove residual xpt_release_device() call left after r272406 cleanup.

Excessive release here could trigger use-after-free condition and kernel
panic on LUN 0 disconnect.

MFC after:	1 week
Various fixes for wl(4):
- Don't recurse driver mutex.
- Don't hold driver mutex across fubyte/subyte.
- Replace fubyte/subyte loops with copyin/copyout calls.
- Use relatively sane locking in wl_ioctl().
- Use bus space accessors instead of in*()/out*().
- Use callout(9) instead of timeout(9).
- Stop watchdog timer in detach and don't hold mutex across
  bus_teardown_intr().
- Use device_printf() and if_printf().
- De-spl().

Tested by:	no one
Lock spic(4) and mark it MPSAFE:
- Add a per-softc mutex as a driver lock.
- Use callout(9) instead of timeout(9).
- Set softc pointer in si_drv1 of cdev instead of looking softc
  up via devclass in cdev methods.

Tested by:	no one
Lock the scsi_low code and the drivers which use it along with other
related cleanups:
- Require each driver to initalize a mutex in the scsi_low_softc that
  is shared with the scsi_low code.  This mutex is used for CAM SIMs,
  timers, and interrupt handlers.
- Replace the osdep function switch with direct calls to the relevant
  CAM functions and direct manipulation of timers via callout(9).
- Collapse the CAM-specific scsi_low_osdep_interface substructure
  directly into scsi_low_softc.
- Use bus_*() instead of bus_space_*().
- Return BUS_PROBE_DEFAULT from probe routines instead of 0.
- No need to zero softcs.
- Pass 0ul and ~0ul instead of 0 and ~0 to bus_alloc_resource().
- Spell "dettach" as "detach".
- Remove unused 'dvname' variables.
- De-spl().

Tested by:	no one
Back our r274750 until discussions on proper fix are over.
Clamp too-large hwpmc callchaindepth to the maximum

If the depth requested by the user is too large, it's better to provide
the maximum than the smaller default.

Sponsored by:	The FreeBSD Foundation
Recommit r274750.
Use canonical __PIC__ flag

It is automatically set when -fPIC is passed to the compiler.

Reviewed by:	dim, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1179
Fix the powerpc64 build.

Pointy-hat to:	me
X-MFC-with:	r274735
Fix smbfs to not zero out statfs f_flags field. Previously, this
made getmntinfo() return empty flags for smbfs filesystems when
called with MNT_WAIT. It's not visible with mount(8), since it uses
MNT_NOWAIT, but broke autounmount(8) operation.

PR:		195161
Differential Revision:	https://reviews.freebsd.org/D1194
Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Partially reconstruct Active/Standby clusting.

In this mode one head is in Active state, supporting all commands, while
another is in Standby state, supporting only minimal LUN discovery subset.

It is still incomplete since Standby state requires reservation support,
which is impossible to do right without having interlink between heads.
But it allows to run some basic experiments.
Log errors for absent LUNs too.

MFC after:	1 week
Fix build for certain MIPS kernels hiding an unused variable under #ifndef.
Reduce race between LUN destruction and request arrival.

MFC after:	1 week
Remove bunch of unused lun variables.

MFC after:	1 week
Add missing error checking for kernel_port_{add,remove}().  Both can fail
for reasons yet unknown; don't make it increment cumulated_error as a kind
of temporary workaround.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Simply remove the tmp dir before creating the symlink. We are doing
chroots all over the place, so there is bound to be a stale file lying
around in there (in my case samba lock files from creating accounts). If
we don't do that, the symlink later will fail.
Close race between cfiscsi_offline() and new connection arrival.

Incoming connection should be either rejected or accepted and terminated.
Document use of wildcards (*) and ampersands (&) in autofs map files.

Differential Revision:	https://reviews.freebsd.org/D1199
Reviewed by:	wblock@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Fix error handling.

MFC after:	1 month
Coverity CID:	1249768
Sponsored by:	The FreeBSD Foundation