History log of /freebsd-current/usr.sbin/ctladm/ctladm.c
Revision Date Author Comments
# f3811735 15-May-2024 Pierre Pronchery <pierre@freebsdfoundation.org>

ctladm: fix resource leak

The str variable in cctl_nvlist_end_element() does not get free()'d when
converted to an integer value. (name is "trtype")

Reported by: Coverity Scan
Coverity ID: 1545039
Sponsored by: The FreeBSD Foundation

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1237


# 17c907dd 02-May-2024 John Baldwin <jhb@FreeBSD.org>

ctladm: Add nvterminate command to drop active NVMeoF associations

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44729


# 4f9fa31c 02-May-2024 John Baldwin <jhb@FreeBSD.org>

ctladm: Add nvlist command to list active NVMeoF associations

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44728


# 5fd68977 02-May-2024 John Baldwin <jhb@FreeBSD.org>

ctladm: Permit creating nvmf ports

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44727


# 352cf4a6 02-May-2024 John Baldwin <jhb@FreeBSD.org>

ctl: Avoid an upcast for calling ctl_scsi_path_string

Change the first argument of ctl_scsi_path_string to be the embedded
header structure instead of the union. Currently union ctl_io and
struct ctl_scsiio have the same alignment, but this changes on i386 if
a new union member is added that contains a uint64_t member (such as
an embedded struct nvme_command for NVMeoF). In that case, union
ctl_io requires stronger alignment, so the upcast from struct
ctl_scsiio to union ctl_io in ctl_scsi_sense_sbuf raises an increasing
alignment warning on i386.

Avoid the warning by passing struct ctl_io_hdr as the first argument
to ctl_scsi_path_string instead.

Reviewed by: imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D44716


# afd0c206 02-May-2024 John Baldwin <jhb@FreeBSD.org>

ctladm: Use nitems() in a few more places

Sponsored by: Chelsio Communications

Differential Revision: https://reviews.freebsd.org/D45017


# 2f8ea2f6 07-Nov-2023 Elyes Haouas <ehaouas@noos.fr>

ctladm: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0])

Pull Request: https://github.com/freebsd/freebsd-src/pull/888
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>


# 0f3210b3 27-Dec-2023 John Baldwin <jhb@FreeBSD.org>

ctladm: Only autoload cfiscsi.ko for iSCSI-specific commands

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42935


# e8d83548 27-Dec-2023 John Baldwin <jhb@FreeBSD.org>

ctladm: Fix a typo and add a FALLTHROUGH annotation

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42934


# 4d65a7c6 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.sbin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# fcdcfa21 03-Dec-2022 Alexander Motin <mav@FreeBSD.org>

Missed chunk of 0acc026dda9e.


# 5244006f 11-Aug-2022 Alexander Motin <mav@FreeBSD.org>

ctladm: Fix typo in command line help.

MFC after: 1 week


# dbcf7598 29-May-2020 Alexander Motin <mav@FreeBSD.org>

Report STATUS_QUEUED/SENT in `ctladm dumpooa` output.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.


# 1f03d0ba 21-Dec-2018 Alexander Motin <mav@FreeBSD.org>

Fix passing wrong variables to nvlist_destroy() after r333446.

Reported by: Alexander Fedorov (IT-Grad.ru)
MFC after: 5 days


# 8951f055 09-May-2018 Marcelo Araujo <araujo@FreeBSD.org>

Rework CTL frontend & backend options to use nv(3), allow creating multiple
ioctl frontend ports.

This revision introduces two changes to CTL:
- Changes the way options are passed to CTL_LUN_REQ and CTL_PORT_REQ ioctls.
Removes ctl_be_arg structure and associated logic and replaces it with
nv(3)-based logic for passing in and out arguments.
- Allows creating multiple ioctl frontend ports using either ctladm(8) or
ctld(8).
New frontend ports are represented by /dev/cam/ctl<pp>.<vp> nodes, eg /dev/cam/ctl5.3.
Those device nodes respond only to CTL_IO ioctl.

New command-line options for ctladm:
# creates new ioctl frontend port with using free pp and vp=0
ctladm port -c
# creates new ioctl frontend port with pp=10 and vp=0
ctladm port -c -O pp=10
# creates new ioctl frontend port with pp=11 and vp=12
ctladm port -c -O pp=11 -O vp=12
# removes port with number 4 (it's a "targ_port" number, not pp number)
ctladm port -r -p 4

New syntax for ctl.conf:
target ... {
port ioctl/<pp>
...
}

target ... {
port ioctl/<pp>/<vp>
...

Note: Most of this work was made by jceel@, thank you.

Submitted by: jceel
Reworked by: myself
Reviewed by: mav (earlier versions and recently during the rework)
Obtained from: FreeNAS and TrueOS
Relnotes: Yes
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D9299


# 8e7cd863 22-Aug-2017 Benno Rice <benno@FreeBSD.org>

Correct typo in usage string.

Submitted by: peterpakos (GitHub username)
MFC after: 1 day


# 653e7d63 29-Mar-2017 Enji Cooper <ngie@FreeBSD.org>

Split iscsi(4) ctl frontend off of ctl(4) as cfiscsi(4)

The goal of this work is to remove the explicit dependency for ctl(4)
on iscsi(4), so end-users without iscsi(4) support in the kernel can
use ctl(4) for its other functions.

This allows those without iscsi(4) support built into the kernel to use
ctl(4) as a test mechanism. As a sidenote, this was possible around the
10.0-RELEASE period, but made impossible for end-users without iscsi(4)
between 10.0-RELEASE and 11.0-RELEASE.

Automatically load cfiscsi(4) from ctladm(8) and ctld(8) for backwards
compatibility with previously releases. The automatic loading feature is
compiled into the beforementioned tools if MK_ISCSI == yes when building
world.

Add a manpage for cfiscsi(4) and refer to it in ctl(4).

Differential Revision: D10099
MFC after: 2 months
Relnotes: yes
Reviewed by: mav, trasz
Sponsored by: Dell EMC Isilon


# ced34748 27-Mar-2017 Enji Cooper <ngie@FreeBSD.org>

ctldadm: sort #includes per style(9)

- Only include sys/types.h or sys/param.h, not both.
- Sort alphabetically.

MFC after: 3 days
Sponsored by: Dell EMC Isilon


# 97b84d34 24-Aug-2016 Navdeep Parhar <np@FreeBSD.org>

Make the iSCSI parameter negotiation more flexible.

Decouple the send and receive limits on the amount of data in a single
iSCSI PDU. MaxRecvDataSegmentLength is declarative, not negotiated, and
is direction-specific so there is no reason for both ends to limit
themselves to the same min(initiator, target) value in both directions.

Allow iSCSI drivers to report their send, receive, first burst, and max
burst limits explicitly instead of using hardcoded values or trying to
derive all of them from the receive limit (which was the only limit
reported by the drivers prior to this change).

Display the send and receive limits separately in the userspace iSCSI
utilities.

Reviewed by: jpaetzel@ (earlier version), trasz@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D7279


# 31c2b422 05-Jun-2016 Edward Tomasz Napierala <trasz@FreeBSD.org>

Remove duplicated semicolons.

MFC after: 1 month


# 4e5408f1 05-Jun-2016 Edward Tomasz Napierala <trasz@FreeBSD.org>

Report negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v"
and "ctladm islist -v" outputs.

MFC after: 1 month


# b5635ba0 01-May-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

usr.sbin: minor spelling fixes on comments.

No functional change.


# 9c887a4f 26-Sep-2015 Alexander Motin <mav@FreeBSD.org>

Remove some duplicate, legacy, dead and questionable code.


# fb606eba 10-Sep-2015 Alexander Motin <mav@FreeBSD.org>

Remove unused target and initiator IDs.


# a3977bea 06-Sep-2015 Alexander Motin <mav@FreeBSD.org>

Allow LUN options modification via CTL_LUNREQ_MODIFY.

Not all changes take effect, but that is a different question.


# 3b6077ae 04-Sep-2015 Alexander Motin <mav@FreeBSD.org>

Addition to r287455.


# 2f444d15 15-Aug-2015 Alexander Motin <mav@FreeBSD.org>

Drop "internal" CTL frontend.

Its idea was to be a simple initiator and execute several commands from
kernel level, but FreeBSD never had consumer for that functionality,
while its implementation polluted many unrelated places..


# dac54212 17-Jul-2015 Baptiste Daroussin <bapt@FreeBSD.org>

make ctdladm(8) return 0 is everything was ok.

retval is used to test the return of XML_Parse function which is ok if 1 is
returned and retval it directly returned to the main function and used as an
exit value.

if all the parsing part is done reset retval to 0 so that the command return 0
if everything ok

Differential Revision: https://reviews.freebsd.org/D3102
Reviewed by: trasz
MFC after: 3 days
Sponsored by: gandi.net


# 07b49a3e 06-Feb-2015 Edward Tomasz Napierala <trasz@FreeBSD.org>

Make it possible to set (via ctl.conf(5)) and query (via ctladm islist -v)
target iSCSI offload. Add mechanism to query maximum receive data segment
size supported by chosen hardware offload module, and use it in ctld(8)
to determine the value to advertise to the other side.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation


# b56a6368 06-Feb-2015 Edward Tomasz Napierala <trasz@FreeBSD.org>

Make "ctladm islist" ignore unknown elements, so the old version
continues to work with newer kernel.

Other ctladm(8) "*list" subcommands seem to already handle it in
a reasonable way.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation


# 6b31e130 03-Feb-2015 Alexander Motin <mav@FreeBSD.org>

Bring some more order into iSCSI portal group tags support.

While ctld(8) still does not allow multiple portal groups per target
to be configured, kernel should now be able to handle it.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.


# 920c6cba 01-Feb-2015 Alexander Motin <mav@FreeBSD.org>

CTL LUN mapping rewrite.

Replace iSCSI-specific LUN mapping mechanism with new one, working for any
ports. By default all ports are created without LUN mapping, exposing all
CTL LUNs as before. But, if needed, LUN mapping can be manually set on
per-port basis via ctladm. For its iSCSI ports ctld does it via ioctl(2).
The next step will be to teach ctld to work with FibreChannel ports also.

Respecting additional flexibility of the new mechanism, ctl.conf now allows
alternative syntax for LUN definition. LUNs can now be defined in global
context, and then referenced from targets by unique name, as needed. It
allows same LUN to be exposed several times via multiple targets.

While there, increase limit for LUNs per target in ctld from 256 to 1024.
Some initiators do not support LUNs above 255, but that is not our problem.

Discussed with: trasz
MFC after: 2 weeks
Relnotes: yes
Sponsored by: iXsystems, Inc.


# 83c25ce7 20-Dec-2014 Alexander Motin <mav@FreeBSD.org>

Report initiator id in portlist XML in more formalized way.

MFC after: 3 days


# fcb263a5 20-Dec-2014 Alexander Motin <mav@FreeBSD.org>

Report XML parsing errors.

MFC after: 3 days


# 2bd28269 22-Oct-2014 Edward Tomasz Napierala <trasz@FreeBSD.org>

Whitespace fixes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation


# 555e99a3 12-Oct-2014 Alexander Motin <mav@FreeBSD.org>

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.

MFC after: 1 week


# 19720f41 10-Oct-2014 Alexander Motin <mav@FreeBSD.org>

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.


# 1e5a8b8f 07-Jul-2014 Alexander Motin <mav@FreeBSD.org>

Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command.


# 28450b3b 05-Jul-2014 Alexander Motin <mav@FreeBSD.org>

Fix minor copy-paste bug in r268284.


# 92782c33 04-Jul-2014 Alexander Motin <mav@FreeBSD.org>

Introduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.

Leave old CTL_GET_PORT_LIST in place so far. Garbage-collect it later.


# abec6193 30-Oct-2013 Edward Tomasz Napierala <trasz@FreeBSD.org>

Rename '-h' option to '-p', and use "portal" instead of "host" or "address",
in order to be consistent with iSCSI terminology. Besides, calling the
option '-h' was just wrong.

This changes usage for newly added iscsictl(8), and two newly added
subcommands to ctladm(8). This breaks POLA between CURRENT and 10,
but since 10.0 has not been released yet, it's still ok to do.

MFC after: 3 days
Discussed with: re (glebius)
Sponsored by: FreeBSD Foundation


# bd32ec06 08-Oct-2013 Edward Tomasz Napierala <trasz@FreeBSD.org>

Fix two off-by-ones.

Coverity CID: 1087999, 1011375
Approved by: re (glebius)
Sponsored by: FreeBSD Foundation


# 846c5adb 08-Oct-2013 Edward Tomasz Napierala <trasz@FreeBSD.org>

Fix incorrect use of sizeof().

Coverity CID: 1011303
Approved by: re (glebius)
Sponsored by: FreeBSD Foundation


# 009ea47e 14-Sep-2013 Edward Tomasz Napierala <trasz@FreeBSD.org>

Bring in the new iSCSI target and initiator.

Reviewed by: ken (parts)
Approved by: re (delphij)
Sponsored by: FreeBSD Foundation


# 4343d321 10-May-2013 Jaakko Heinonen <jh@FreeBSD.org>

Check the return value of sbuf_finish().

MFC after: 1 week


# 57cdcaa6 10-Apr-2013 Edward Tomasz Napierala <trasz@FreeBSD.org>

Make ctladm(8) try to load ctl.ko kernel module if needed.

Reviewed by: ken


# bf70bece 19-Oct-2012 Ed Schouten <ed@FreeBSD.org>

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


# b0c39ce9 05-Aug-2012 Dimitry Andric <dim@FreeBSD.org>

In usr.sbin/ctladm/ctladm.c, function cctl_error_inject(), initialize
the 'retval' variable to zero, to avoid returning garbage in several
cases.

This fixes the following clang 3.2 warnings:

usr.sbin/ctladm/ctladm.c:1234:6: error: variable 'retval' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (ioctl(fd, CTL_ERROR_INJECT, &err_desc) == -1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usr.sbin/ctladm/ctladm.c:1243:10: note: uninitialized use occurs here
return (retval);
^~~~~~
usr.sbin/ctladm/ctladm.c:1234:2: note: remove the 'if' if its condition is always true
if (ioctl(fd, CTL_ERROR_INJECT, &err_desc) == -1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usr.sbin/ctladm/ctladm.c:1161:7: error: variable 'retval' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (ioctl(fd, CTL_ERROR_INJECT_DELETE, &err_desc) == -1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usr.sbin/ctladm/ctladm.c:1243:10: note: uninitialized use occurs here
return (retval);
^~~~~~
usr.sbin/ctladm/ctladm.c:1161:3: note: remove the 'if' if its condition is always true
if (ioctl(fd, CTL_ERROR_INJECT_DELETE, &err_desc) == -1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usr.sbin/ctladm/ctladm.c:1029:12: note: initialize the variable 'retval' to silence this warning
int retval;
^
= 0

MFC after: 1 week


# c0fc04b3 19-Jun-2012 Eitan Adler <eadler@FreeBSD.org>

Remove variables which are initialized but never used thereafter reported by gcc46 warning

Approved by: cperciva
MFC After: 3 days


# 81177295 06-Mar-2012 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add LUN resizing to CTL. Also make it possible to explicitly set
size when creating file-backed or device-backed LUN.

Reviewed by: ken (earlier version)
Sponsored by: The FreeBSD Foundation


# 130f4520 11-Jan-2012 Kenneth D. Merry <ken@FreeBSD.org>

Add the CAM Target Layer (CTL).

CTL is a disk and processor device emulation subsystem originally written
for Copan Systems under Linux starting in 2003. It has been shipping in
Copan (now SGI) products since 2005.

It was ported to FreeBSD in 2008, and thanks to an agreement between SGI
(who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is
available under a BSD-style license. The intent behind the agreement was
that Spectra would work to get CTL into the FreeBSD tree.

Some CTL features:

- Disk and processor device emulation.
- Tagged queueing
- SCSI task attribute support (ordered, head of queue, simple tags)
- SCSI implicit command ordering support. (e.g. if a read follows a mode
select, the read will be blocked until the mode select completes.)
- Full task management support (abort, LUN reset, target reset, etc.)
- Support for multiple ports
- Support for multiple simultaneous initiators
- Support for multiple simultaneous backing stores
- Persistent reservation support
- Mode sense/select support
- Error injection support
- High Availability support (1)
- All I/O handled in-kernel, no userland context switch overhead.

(1) HA Support is just an API stub, and needs much more to be fully
functional.

ctl.c: The core of CTL. Command handlers and processing,
character driver, and HA support are here.

ctl.h: Basic function declarations and data structures.

ctl_backend.c,
ctl_backend.h: The basic CTL backend API.

ctl_backend_block.c,
ctl_backend_block.h: The block and file backend. This allows for using
a disk or a file as the backing store for a LUN.
Multiple threads are started to do I/O to the
backing device, primarily because the VFS API
requires that to get any concurrency.

ctl_backend_ramdisk.c: A "fake" ramdisk backend. It only allocates a
small amount of memory to act as a source and sink
for reads and writes from an initiator. Therefore
it cannot be used for any real data, but it can be
used to test for throughput. It can also be used
to test initiators' support for extremely large LUNs.

ctl_cmd_table.c: This is a table with all 256 possible SCSI opcodes,
and command handler functions defined for supported
opcodes.

ctl_debug.h: Debugging support.

ctl_error.c,
ctl_error.h: CTL-specific wrappers around the CAM sense building
functions.

ctl_frontend.c,
ctl_frontend.h: These files define the basic CTL frontend port API.

ctl_frontend_cam_sim.c: This is a CTL frontend port that is also a CAM SIM.
This frontend allows for using CTL without any
target-capable hardware. So any LUNs you create in
CTL are visible in CAM via this port.

ctl_frontend_internal.c,
ctl_frontend_internal.h:
This is a frontend port written for Copan to do
some system-specific tasks that required sending
commands into CTL from inside the kernel. This
isn't entirely relevant to FreeBSD in general,
but can perhaps be repurposed.

ctl_ha.h: This is a stubbed-out High Availability API. Much
more is needed for full HA support. See the
comments in the header and the description of what
is needed in the README.ctl.txt file for more
details.

ctl_io.h: This defines most of the core CTL I/O structures.
union ctl_io is conceptually very similar to CAM's
union ccb.

ctl_ioctl.h: This defines all ioctls available through the CTL
character device, and the data structures needed
for those ioctls.

ctl_mem_pool.c,
ctl_mem_pool.h: Generic memory pool implementation used by the
internal frontend.

ctl_private.h: Private data structres (e.g. CTL softc) and
function prototypes. This also includes the SCSI
vendor and product names used by CTL.

ctl_scsi_all.c,
ctl_scsi_all.h: CTL wrappers around CAM sense printing functions.

ctl_ser_table.c: Command serialization table. This defines what
happens when one type of command is followed by
another type of command.

ctl_util.c,
ctl_util.h: CTL utility functions, primarily designed to be
used from userland. See ctladm for the primary
consumer of these functions. These include CDB
building functions.

scsi_ctl.c: CAM target peripheral driver and CTL frontend port.
This is the path into CTL for commands from
target-capable hardware/SIMs.

README.ctl.txt: CTL code features, roadmap, to-do list.

usr.sbin/Makefile: Add ctladm.

ctladm/Makefile,
ctladm/ctladm.8,
ctladm/ctladm.c,
ctladm/ctladm.h,
ctladm/util.c: ctladm(8) is the CTL management utility.
It fills a role similar to camcontrol(8).
It allow configuring LUNs, issuing commands,
injecting errors and various other control
functions.

usr.bin/Makefile: Add ctlstat.

ctlstat/Makefile
ctlstat/ctlstat.8,
ctlstat/ctlstat.c: ctlstat(8) fills a role similar to iostat(8).
It reports I/O statistics for CTL.

sys/conf/files: Add CTL files.

sys/conf/NOTES: Add device ctl.

sys/cam/scsi_all.h: To conform to more recent specs, the inquiry CDB
length field is now 2 bytes long.

Add several mode page definitions for CTL.

sys/cam/scsi_all.c: Handle the new 2 byte inquiry length.

sys/dev/ciss/ciss.c,
sys/dev/ata/atapi-cam.c,
sys/cam/scsi/scsi_targ_bh.c,
scsi_target/scsi_cmds.c,
mlxcontrol/interface.c: Update for 2 byte inquiry length field.

scsi_da.h: Add versions of the format and rigid disk pages
that are in a more reasonable format for CTL.

amd64/conf/GENERIC,
i386/conf/GENERIC,
ia64/conf/GENERIC,
sparc64/conf/GENERIC: Add device ctl.

i386/conf/PAE: The CTL frontend SIM at least does not compile
cleanly on PAE.

Sponsored by: Copan Systems, SGI and Spectra Logic
MFC after: 1 month