MFC r273178: Update vt(4) for UEFI defaults and special keys

  vt(4) is the default console for UEFI boot [1], and the bitmapped
  kern.vt.spclkeys sysctl has been replaced with individual kern.vt.kbd_*
  enable sysctls.

PR:		193710


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273294 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273219: Do nothing in vt_upgrade if there is no vt driver

  Previously, if no drivers attached at boot we would panic with
  "vtbuf_fill_locked begin.tp_row 0 must be < screen height 0".

PR:		192248


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273296 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r271975:
 Improvements to asmc(4):

 1. changed the code so that 2**16 keys are supported
 2. changed the number of possible fans in a system from 2 to 6
 3. added write support for some fan sysctls
 4. added a new sysctl which shows the ID of the fan
 5. added four more apple models with their temperature keys
 6. changed the maxnumber of temperature keys from 36 to 80
 7. replaced several fixed buf sizes to sizeof buf

 Obtained from:	     Denis Ahrens denis at h3q.com


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273302 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r271073:
  Do not blindly announce 1000baseT half-duplex capability in
  autonegotiation.  Some controllers like cgem(4) do not support
  half-duplex at gigabit speeds.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273305 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r271395 (by trasz):
Make sure we handle less than zero timeouts in iSCSI initiator and target
in a reasonable way.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273307 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r271718 (by bdrewery): Correct a comment


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273308 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272597: Fix length of Extended INQUIRY Data VPD page.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273309 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272613:
Add support for MaxBurstLength and Expected Data transfer Length parameters.

Before this change target could send R2T request for write transfer of any
size, that could violate iSCSI RFC, which allows initiator to limit maximum
R2T size by negotiating MaxBurstLength connection parameter.

Also report an error in case of write underflow, when initiator provides
less data than initiator expects.  Previously in such case our target
sent R2T request for non-existing data, violating the RFC, and confusing
some initiators.  SCSI specs don't explicitly define how write underflows
should be handled and there are different oppinions, but reporting error
is hopefully better then violating iSCSI RFC with unpredictable results.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273310 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272734:
Add support for WRITE ATOMIC (16) command and report SBC-4 compliance.

Atomic writes are only supported for ZVOLs in "dev" mode.  In other cases
atomicity can not be guarantied and so the command is blocked.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273311 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272748:
Implement software (mode page) and hardware (config) write protection.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273312 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272812: Make iSCSI connection close somewhat less aggressive.

It allows to push out some final data from the send queue to the socket
before its close.  In particular, it increases chances for logout response
to be delivered to the initiator.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273313 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272893:
Store persistent reservation keys as uint64_t instead of uint8_t[8].

This allows to simplify the code and save 512KB of RAM per LUN (8%)
by removing no longer needed "registered" keys flags.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272911:
Make ctld start even if some LUNs are unable to open backing storage.

Such LUNs will be visible to initiators, but return "not ready" status
on media access commands.  If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272935:  Mark CTL frontend's CAM driver as CAM_PERIPH_DRV_EARLY.

Target mode operation does not depend on the initiator mode scan process.
This change allows the target driver to attach earlier and receive some
async events (like AC_CONTRACT) that could be lost otherwise.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273316 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272938:  Filter out duplicate AC_PATH_REGISTERED async events.

Queued async events handling in CAM opened race, that may lead to duplicate
AC_PATH_REGISTERED events delivery during boot.  That was not happening
before r272935 because the driver was initialized later.  After that change
it started create duplicate ports in CTL.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273317 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272939:  Shorten frontend name.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272947: Give physical and virtual ports numbers some more meaning.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273319 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r272978: Improve and document `ctladm portlist` subcommand.

Make this subcommand less FC-specific, reporting target and port addresses
in more generic way.  Also make it report list of connected initiators in
unified way, working for both FC and iSCSI, and potentially others.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273008: Remove stale comments.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@273321 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273029:
Report physical block size for file-backed LUNs, using vattr.va_blocksize.


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