Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Dec 2016 18:29:10 +0000 (UTC)
From:      "Kenneth D. Merry" <ken@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r310484 - in stable/10: share/man/man4 sys/conf sys/dev/isp
Message-ID:  <201612231829.uBNITA0V071850@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ken
Date: Fri Dec 23 18:29:10 2016
New Revision: 310484
URL: https://svnweb.freebsd.org/changeset/base/310484

Log:
  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

Modified:
  stable/10/share/man/man4/isp.4
  stable/10/sys/conf/options
  stable/10/sys/dev/isp/isp_pci.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/isp.4
==============================================================================
--- stable/10/share/man/man4/isp.4	Fri Dec 23 18:25:43 2016	(r310483)
+++ stable/10/share/man/man4/isp.4	Fri Dec 23 18:29:10 2016	(r310484)
@@ -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 tar
 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 ad
 .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 (s
 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

Modified: stable/10/sys/conf/options
==============================================================================
--- stable/10/sys/conf/options	Fri Dec 23 18:25:43 2016	(r310483)
+++ stable/10/sys/conf/options	Fri Dec 23 18:29:10 2016	(r310484)
@@ -374,6 +374,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

Modified: stable/10/sys/dev/isp/isp_pci.c
==============================================================================
--- stable/10/sys/dev/isp/isp_pci.c	Fri Dec 23 18:25:43 2016	(r310483)
+++ stable/10/sys/dev/isp/isp_pci.c	Fri Dec 23 18:29:10 2016	(r310484)
@@ -598,11 +598,18 @@ isp_get_specific_options(device_t dev, i
 		}
 	}
 
+#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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612231829.uBNITA0V071850>