summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2016-12-23 18:25:43 +0000
committerken <ken@FreeBSD.org>2016-12-23 18:25:43 +0000
commitf69f62bc7b78f054e04361614b5abf9a4445758a (patch)
tree7f5248fce06826133bba66d563454c76223dd748
parentd6d354cea80b3245fa5ba3268222d6765c9b957a (diff)
downloadFreeBSD-src-f69f62bc7b78f054e04361614b5abf9a4445758a.zip
FreeBSD-src-f69f62bc7b78f054e04361614b5abf9a4445758a.tar.gz
MFC, r310338:
------------------------------------------------------------------------ r310338 | ken | 2016-12-20 14:17:07 -0700 (Tue, 20 Dec 2016) | 37 lines Turn on FC-Tape by default in the isp(4) driver. FC-Tape provides additional link level error recovery, and is highly recommended for tape devices. It will only be turned on for a given target if the target supports it. Without this setting, we default to whatever FC-Tape setting is in NVRAM on the card. This can be overridden by setting the following loader tunable, for example for isp0: hint.isp.0.nofctape=1 sys/conf/options: Add a new kernel config option, ISP_FCTAPE_OFF, that defaults the FC-Tape configuration to off. sys/dev/isp/isp_pci.c: If ISP_FCTAPE_OFF is defined, turn off FC-Tape. Otherwise, turn it on if the card supports it. share/man/man4/isp.4: Add a description of FC-Tape to the isp(4) man page. Add descriptions of the fctape and nofctape options, as well as the ISP_FCTAPE_OFF kernel configuration option. Add the ispfw module and kernel drivers to the suggested configurations at the top of the man page so that users are less likely to leave it out. The driver works well with the included firmware, but may not work at all with whatever firmware the user has flashed on their card. Sponsored by: Spectra Logic ------------------------------------------------------------------------ Sponsored by: Spectra Logic
-rw-r--r--share/man/man4/isp.442
-rw-r--r--sys/conf/options1
-rw-r--r--sys/dev/isp/isp_pci.c7
3 files changed, 48 insertions, 2 deletions
diff --git a/share/man/man4/isp.4 b/share/man/man4/isp.4
index da6b776..f48dc80 100644
--- a/share/man/man4/isp.4
+++ b/share/man/man4/isp.4
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 9, 2015
+.Dd December 20, 2016
.Dt ISP 4
.Os
.Sh NAME
@@ -39,13 +39,15 @@ kernel configuration file:
.Bd -ragged -offset indent
.Cd "device scbus"
.Cd "device isp"
+.Cd "device ispfw"
.Ed
.Pp
Alternatively, to load the driver as a
-module at boot time, place the following line in
+module at boot time, place the following lines in
.Xr loader.conf 5 :
.Bd -literal -offset indent
isp_load="YES"
+ispfw_load="YES"
.Ed
.Sh DESCRIPTION
This driver provides access to
@@ -62,6 +64,30 @@ Fibre Channel supports initiator and target modes of FCP SCSI profile,
utilizing Class 3 and Class 2 (2200 and later) connections.
Support is available for Public and Private loops, Point-to-Point
and Fabric connections.
+.Pp
+FC-Tape is supported on 4Gb (2400) and newer controllers.
+FC-Tape is highly recommended for connections to tape drives that support
+it.
+It encompasses four elements from the the T-10 FCP-4 specification:
+.Bl -bullet -offset indent
+.It
+Precise Delivery of Commands
+.It
+Confirmed Completion of FCP I/O Operations
+.It
+Retransmission of Unsuccessfully Transmitted IUs
+.It
+Task Retry Identification
+.El
+.Pp
+Together these features allow for link level error recovery with tape
+devices.
+Without it, an initiator cannot, for instance, tell whether a tape write
+command that has timed out resulted in all, part or none of the data going to
+the tape drive.
+FC-Tape is automatically enabled when connecting controller that supports
+it to a target that supports it.
+It may be disabled using configuration and hint options described below.
.Sh FIRMWARE
Firmware loading is supported if the
.Xr ispfw 4
@@ -120,6 +146,13 @@ Target mode support for Fibre Channel adapters may be enabled with the
.Cd options ISP_TARGET_MODE
.Pp
option.
+.Pp
+To disable FC-Tape, use the following configuration option:
+.Pp
+.Cd options ISP_FCTAPE_OFF
+.Pp
+Note that even if the ISP_FCTAPE_OFF option is used, it may be overridden
+by the fctape hint described below.
.Sh BOOT OPTIONS
The following options are switchable by setting values in
.Pa /boot/device.hints .
@@ -169,6 +202,11 @@ A hint value for a driver debug level (see the file
for the values.
.It Va hint.isp.0.vports
A hint to create specified number of additional virtual ports.
+.It Va hint.isp.0.nofctape
+Set this to 1 to disable FC-Tape operation on the given isp instance.
+.It Va hint.isp.0.fctape
+Set this to 1 to enable FC-Tape operation on the given isp instance for
+targets that support it.
.El
.Sh SYSCTL OPTIONS
.Bl -tag -width indent
diff --git a/sys/conf/options b/sys/conf/options
index 52f0288..3fa7d3b 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -381,6 +381,7 @@ ISP_TARGET_MODE opt_isp.h
ISP_FW_CRASH_DUMP opt_isp.h
ISP_DEFAULT_ROLES opt_isp.h
ISP_INTERNAL_TARGET opt_isp.h
+ISP_FCTAPE_OFF opt_isp.h
# Options used only in dev/iscsi
ISCSI_INITIATOR_DEBUG opt_iscsi_initiator.h
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c
index 4532155..b0acd96 100644
--- a/sys/dev/isp/isp_pci.c
+++ b/sys/dev/isp/isp_pci.c
@@ -598,11 +598,18 @@ isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp)
}
}
+#ifdef ISP_FCTAPE_OFF
+ isp->isp_confopts |= ISP_CFG_NOFCTAPE;
+#else
+ isp->isp_confopts |= ISP_CFG_FCTAPE;
+#endif
+
tval = 0;
snprintf(name, sizeof(name), "%snofctape", prefix);
(void) resource_int_value(device_get_name(dev), device_get_unit(dev),
name, &tval);
if (tval) {
+ isp->isp_confopts &= ~ISP_CFG_FCTAPE;
isp->isp_confopts |= ISP_CFG_NOFCTAPE;
}
OpenPOWER on IntegriCloud