Polish INQUIRY command fields validation.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271940 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Report proper errors codes for unsupported SERVICE ACTION values.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't report unsupported FUA_NV bit set in READ/WRITE commands as error.

While this bit is obsolete in SBC-3, SBC-2 allowed to silently ignore it.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271942 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
svn revisions r269964 and r269963 seemed to have impaired small memory
footprint systems(32M/64M) and didn't leave enough free memory to load modules
when it was setting up page tables that for sizes that are never used on
these smallish boards.

Set kmem_zmax to PAGE_SIZE on these smaller systems (< 128M) to keep this
from happening. Verified on mips32 h/w.

PR:             193465
Submitted by:   delphij
Reviewed by:    adrian


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271944 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Simplify legacy reservation handling.  Drop it on I_T nexus loss.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271945 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Improve transmit sending offload, TSO, algorithm in general.

The current TSO limitation feature only takes the total number of
bytes in an mbuf chain into account and does not limit by the number
of mbufs in a chain. Some kinds of hardware is limited by two
factors. One is the fragment length and the second is the fragment
count. Both of these limits need to be taken into account when doing
TSO. Else some kinds of hardware might have to drop completely valid
mbuf chains because they cannot loaded into the given hardware's DMA
engine. The new way of doing TSO limitation has been made backwards
compatible as input from other FreeBSD developers and will use
defaults for values not set.

Reviewed by:	adrian, rmacklem
Sponsored by:	Mellanox Technologies
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271946 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix UNMAP stuck if the last block descriptor in the list is empty.

MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271949 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Register /usr/tests/lib/libproc to fix build.

Missed in r271937, reviewed in D710.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271950 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't try to continue aborted commands if status was not set.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271951 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Some XHCI hardware requires dropping the endpoint context before
adding it again.

MFC after:	3 days
Submitted by:	Kohji Okuno <okuno.kohji@jp.panasonic.com>


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271953 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Deny ANCHOR flag set without UNMAP flag set in WRITE SAME commands.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271954 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix read overrun handling, broken by using wrong variable.

MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271957 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The new naming scheme for keymap files for use with vt(4) introduced a
collision for "no" as a country code with "NO" meaning "do not load any
keymap" (which also has been the default value in etc/defaults/rc.conf
for a long time).

The result of this collision is, that "kbdcontrol -l no" will load the
Norwegian keymap, while "keymap=no" in rc.conf was interpreted as the
lower case spelling of "NO" meaning "no keyboard" (and "no.kbd" was not
loaded).

Fix this by matching only the upper-case spelling "NO" in rc.d/syscons
when deciding whether to load a keymap file.

This will lead to "no.kbd" being loaded, if the until now valid (but
non-default) spelling "no" was used in an individual rc.conf file to mean
"no keyboard". But all alternatives I could think of introduce a larger
violation of POLA ...

Reported by:    Gyrd Thane Lange (gyrd-se at thanelange.no)
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271958 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Pretend that we support BYTCHK=1 in WRITE AND VERIFY command.

Technically that is not true, but since we don't implement VERIFY there
at all, doing only WRITE part, this is a minor sin.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271959 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add missing mlinks for section 9.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271960 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Convert from timeout(9) to callout(9).


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271963 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for QCOW version 1. Version 2 is partially implemented.
And because of that, it's entirely disabled for now. Both versions
are similar enough that a single header definition works for both
of them. The only "diverting" side-effect is that the union of the
two is larger than the official V1 header.

What this means for our V1 support is that we can't put the L1 table
adjacent to the V1 header (i.e. at offset 0x30 in the file), unless
we revert to hackery and klugery. Let's not. Instead, we align the L1
table at the cluster boundary. This is in line with the V2 layout and
perfectly ok for V1 anyway (ok -- as far as I've seen so far).
Due to the alignment, our V1 image seems to be 1 cluster larger than
the V1 image created by qemu-img (on average).

Compression of the clusters is not supported at this time.

MFC after:	2 months


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update the unit tests to include the QCOW (version 1) format.
This is a good safety net for when V2 is added.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271966 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Don't echo '# $FreeBSD$' as the first line into the .uu file.  Keyword
substitution applies to this file, including the echo command. Avoid
the match (and substitution) by breaking the string up into 3 parts.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@271968 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
ipv6 address for test.hosts.dots in wrong byte order.

Approved by:	glebius (mentor)
Obtained from:	ipfilter CVS repo (r1.11), netbsd CVS repo (r1.5)


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