r341413 imp Dec. 2, 2018, 11:13 p.m.
Eliminage redundant spaces and nvmecontrol at start of all the usage
strings. Update the usage printing code to add them back when
presenting to the user. Allow multi-line usage messages and print
proper leading spaces for lines starting with a space.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403
ViewVC
r341412 imp Dec. 2, 2018, 11:12 p.m.
Provide a usage() function that takes a struct nvme_function pointer
and produces a usage mssage. Eliminate all now-redundant usage
functions. Propigate the new argument through the program as needed.
Use common routine to print usage.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403
ViewVC
r341411 imp Dec. 2, 2018, 11:12 p.m.
If the dispatched function doesn't exit, then we get can get a
spurious function not found message. They all do exit, but this is a
little cleaner.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403
ViewVC
r341410 imp Dec. 2, 2018, 11:12 p.m.
These are all hgst/wdc specific, so move them into the wdc.c to live
with the wdc command.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403
ViewVC
r341409 imp Dec. 2, 2018, 11:12 p.m.
For the upcoming move of vendor specific code into vendor specific
files, make the common logpage routines global and move them to
nvmecontrol.h.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403
ViewVC
r341408 imp Dec. 2, 2018, 11:12 p.m.
Move logpage function def to header. Convert all the logpage_function
elements to elements of the linker set. Leave them all in logpage.c
for the moment.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403
ViewVC
r341407 imp Dec. 2, 2018, 11:10 p.m.
More commands will be added to nvmecontrol. Also, there will be a few
more vendor commands (some of which may need to remain private to
companies writing them). The first step on that journey is to move to
using linker sets to dispatch commands. The next step will be using
dlopen to bring in the .so's that have the command that might need
to remain private for seamless integration.

Similar changes to this will be needed for vendor specific log pages.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D18403
ViewVC
r341406 gonzo Dec. 2, 2018, 9:58 p.m.
Add generic implementation for bus_deactivate_resource method. Without
it bus_release_resource fails with "Failed to release active resource"
message

MFC after:	1 week
ViewVC
r341405 andreast Dec. 2, 2018, 7:36 p.m.
Reviewed by:	manu@
ViewVC
r341404 andreast Dec. 2, 2018, 7:35 p.m.
Reviewed by:	manu@
ViewVC
r341402 kib Dec. 2, 2018, 6:30 p.m.
Reported by:	C Turt <ecturt@gmail.com>
Reviewed by:	alc, markj
admbug:		781
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
ViewVC
r341400 kib Dec. 2, 2018, 1:29 p.m.
The object size is set in the dsp_mmap_single() which provides the
range limit by vm_fault().

Reported by:	C Turt <ecturt@gmail.com>
Reviewed by:	alc, markj
admbug:		781
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
ViewVC
r341399 kib Dec. 2, 2018, 1:27 p.m.
Reported by:	C Turt <ecturt@gmail.com>
Reviewed by:	alc, markj
Tested by:	pho
admbug:		781
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
ViewVC
r341398 kib Dec. 2, 2018, 1:16 p.m.
The type represents byte offset in the vm_object_t data space, which
does not span negative offsets in FreeBSD VM.  The change matches byte
offset signess with the unsignedness of the vm_pindex_t which
represents the type of the page indexes in the objects.

This allows to remove the UOFF_TO_IDX() macro which was used when we
have to forcibly interpret the type as unsigned anyway.  Also it fixes
a lot of implicit bugs in the device drivers d_mmap methods.

Reviewed by:	alc, markj (previous version)
Tested by:	pho
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
ViewVC
r341397 kib Dec. 2, 2018, 12:53 p.m.
Discussed with:	mckusick
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
ViewVC