From owner-svn-src-stable@freebsd.org Wed Apr 4 18:06:53 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9E62F532EC; Wed, 4 Apr 2018 18:06:53 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5182768CF0; Wed, 4 Apr 2018 18:06:53 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B5E41730F; Wed, 4 Apr 2018 18:06:53 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w34I6rOI084565; Wed, 4 Apr 2018 18:06:53 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w34I6qQU084556; Wed, 4 Apr 2018 18:06:52 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201804041806.w34I6qQU084556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Wed, 4 Apr 2018 18:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332040 - in stable/11: share/man/man4 sys/amd64/conf sys/conf sys/dev/ocs_fc sys/modules sys/modules/ocs_fc X-SVN-Group: stable-11 X-SVN-Commit-Author: ken X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/amd64/conf sys/conf sys/dev/ocs_fc sys/modules sys/modules/ocs_fc X-SVN-Commit-Revision: 332040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2018 18:06:53 -0000 Author: ken Date: Wed Apr 4 18:06:52 2018 New Revision: 332040 URL: https://svnweb.freebsd.org/changeset/base/332040 Log: MFC r331766, r331768: ------------------------------------------------------------------------ r331766 | ken | 2018-03-30 09:28:25 -0600 (Fri, 30 Mar 2018) | 25 lines Bring in the Broadcom/Emulex Fibre Channel driver, ocs_fc(4). The ocs_fc(4) driver supports the following hardware: Emulex 16/8G FC GEN 5 HBAS LPe15004 FC Host Bus Adapters LPe160XX FC Host Bus Adapters Emulex 32/16G FC GEN 6 HBAS LPe3100X FC Host Bus Adapters LPe3200X FC Host Bus Adapters The driver supports target and initiator mode, and also supports FC-Tape. Note that the driver only currently works on little endian platforms. It is only included in the module build for amd64 and i386, and in GENERIC on amd64 only. Submitted by: Ram Kishore Vegesna Reviewed by: mav Relnotes: yes Sponsored by: Broadcom Differential Revision: https://reviews.freebsd.org/D11423 ------------------------------------------------------------------------ r331768 | cem | 2018-03-30 10:44:54 -0600 (Fri, 30 Mar 2018) | 9 lines ocs_fc(4): Fix GCC build (-Wredundant-decls) These objects are defined earlier in the same file; an extern declaration after definition is redundant. Broken in r331766 (introduction of ocs_fc(4)). Sponsored by: Dell EMC Isilon ------------------------------------------------------------------------ Differential Revision: https://reviews.freebsd.org/D11423 Relnotes: yes Added: stable/11/share/man/man4/ocs_fc.4 - copied unchanged from r331766, head/share/man/man4/ocs_fc.4 stable/11/sys/dev/ocs_fc/ - copied from r331766, head/sys/dev/ocs_fc/ stable/11/sys/modules/ocs_fc/ - copied from r331766, head/sys/modules/ocs_fc/ Modified: stable/11/share/man/man4/Makefile stable/11/sys/amd64/conf/GENERIC stable/11/sys/conf/files stable/11/sys/dev/ocs_fc/sli4.c stable/11/sys/modules/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/Makefile ============================================================================== --- stable/11/share/man/man4/Makefile Wed Apr 4 17:45:05 2018 (r332039) +++ stable/11/share/man/man4/Makefile Wed Apr 4 18:06:52 2018 (r332040) @@ -402,6 +402,7 @@ MAN= aac.4 \ ${_nvram2env.4} \ ${_nxge.4} \ oce.4 \ + ocs_fc.4\ ohci.4 \ orm.4 \ ow.4 \ Copied: stable/11/share/man/man4/ocs_fc.4 (from r331766, head/share/man/man4/ocs_fc.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man4/ocs_fc.4 Wed Apr 4 18:06:52 2018 (r332040, copy of r331766, head/share/man/man4/ocs_fc.4) @@ -0,0 +1,194 @@ +.\" Copyright (c) 2017 Broadcom. All rights reserved. +.\" The term "Broadcom" refers to Broadcom Limited and/or its subsidiaries. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright notice, +.\" this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright notice, +.\" this list of conditions and the following disclaimer in the documentation +.\" and/or other materials provided with the distribution. +.\" +.\" 3. Neither the name of the copyright holder nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 30, 2018 +.Dt OCS_FC 4 +.Os +.Sh NAME +.Nm ocs_fc +.Nd "Device driver for Emulex Fibre Channel Host Adapters" +.Sh SYNOPSIS +To compile this driver into the kernel, add this line to the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ocs_fc" +.Ed +.Pp +To load the driver as a module at boot, add this line to +.Xr loader.conf 5 : +.Bd -literal -offset indent +ocs_fc_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides access to Fibre Channel SCSI devices. +.Pp +The +.Nm +driver supports initiator and target modes. +Support is available for Arbitrated loops, Point-to-Point, +and Fabric connections. +FC-Tape is highly recommended for connections to tape drives that support +it. +FC-Tape includes four elements from 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 link level error recovery, 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 both the controller and target support it. + +.Sh HARDWARE +The +.Nm +driver supports these Fibre Channel adapters: +.Bl -tag -width xxxxxx -offset indent +.It Emulex 16/8G FC GEN 5 HBAS +.Bd -literal -offset indent +LPe15004 FC Host Bus Adapters +LPe160XX FC Host Bus Adapters +.Ed +.It Emulex 32/16G FC GEN 6 HBAS +.Bd -literal -offset indent +LPe3100X FC Host Bus Adapters +LPe3200X FC Host Bus Adapters +.Ed +.El +.Sh UPDATING FIRMWARE +Adapter firmware updates are persistent. +.Pp +Firmware can be updated by following these steps: +.Bl -enum +.It +Copy this code to a +.Pa Makefile : +.Bd -literal -offset indent +KMOD=ocsflash +FIRMWS=imagename.grp:ocsflash +\&.include +.Ed +.It +Replace +.Pa imagename +with the name of the GRP file. +.It +Copy the +.Pa Makefile +and GRP file to a local directory +.It +Execute +.Cm make +and copy the generated +.Pa ocsflash.ko +file to +.Pa /lib/modules +.It +.Cm sysctl dev.ocs_fc..fw_upgrade=ocsflash +.It +Check kernel messages regarding status of the operation +.It +Reboot the machine +.El +.Pp +.Sh BOOT OPTIONS +Options are controlled by setting values in +.Pa /boot/device.hints . +.Pp +They are: +.Bl -tag -width indent +.It Va hint.ocs_fc.N.initiator +Enable initiator functionality. +Default 1 (enabled), 0 to disable. +.It Va hint.ocs_fc.N.target +Enable target functionality. +Default 1 (enabled), 0 to disable. +.It Va hint.ocs_fc.N.topology +Topology: 0 for Auto, 1 for NPort only, 2 for Loop only. +.It Va hint.ocs_fc.N.speed +Link speed in megabits per second. +Possible values include: +0 Auto-speed negotiation (default), 4000 (4GFC), 8000 (8GFC), 16000 (16GFC). +.El +.Sh SYSCTL OPTIONS +.Bl -tag -width indent +.It Va dev.ocs_fc.N.port_state +Port state (read/write). +Valid values are +.Li online +and +.Li offline . +.It Va dev.ocs_fc.N.wwpn +World Wide Port Name (read/write). +.It Va dev.ocs_fc.N.wwnn +World Wide Node Name (read/write). +.It Va dev.ocs_fc.N.fwrev +Firmware revision (read-only). +.It Va dev.ocs_fc.N.sn +Adapter serial number (read-only). +.It Va dev.ocs_fc.N.configured_speed +Configured Port Speed (read/write). +Valid values are: +0 Auto-speed negotiation (default), 4000 (4GFC), 8000 (8GFC), 16000 (16GFC). +.It Va dev.ocs_fc.N.configured_topology +Configured Port Topology (read/write). +Valid values are: +0-Auto; 1-NPort; 2-Loop. +.It Va dev.ocs_fc.N.current_speed +Current Port Speed (read-only). +.It Va dev.ocs_fc.N.current_topology +Current Port Topology (read-only). +.El +.Sh SUPPORT +For general information and support, +go to the Broadcom website at: +.Pa http://www.broadcom.com/ +or E-Mail at +.Pa ocs-driver-team.pdl@broadcom.com. +.Sh SEE ALSO +.Xr ifconfig 8 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Broadcom. Modified: stable/11/sys/amd64/conf/GENERIC ============================================================================== --- stable/11/sys/amd64/conf/GENERIC Wed Apr 4 17:45:05 2018 (r332039) +++ stable/11/sys/amd64/conf/GENERIC Wed Apr 4 18:06:52 2018 (r332040) @@ -130,6 +130,7 @@ device adw # Advansys wide SCSI adapters device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. device bt # Buslogic/Mylex MultiMaster SCSI adapters device isci # Intel C600 SAS controller +device ocs_fc # Emulex FC adapters # ATA/SCSI peripherals device scbus # SCSI bus (required for ATA/SCSI) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Wed Apr 4 17:45:05 2018 (r332039) +++ stable/11/sys/conf/files Wed Apr 4 18:06:52 2018 (r332040) @@ -2498,6 +2498,27 @@ dev/oce/oce_mbox.c optional oce pci dev/oce/oce_queue.c optional oce pci dev/oce/oce_sysctl.c optional oce pci dev/oce/oce_util.c optional oce pci +dev/ocs_fc/ocs_pci.c optional ocs_fc pci +dev/ocs_fc/ocs_ioctl.c optional ocs_fc pci +dev/ocs_fc/ocs_os.c optional ocs_fc pci +dev/ocs_fc/ocs_utils.c optional ocs_fc pci +dev/ocs_fc/ocs_hw.c optional ocs_fc pci +dev/ocs_fc/ocs_hw_queues.c optional ocs_fc pci +dev/ocs_fc/sli4.c optional ocs_fc pci +dev/ocs_fc/ocs_sm.c optional ocs_fc pci +dev/ocs_fc/ocs_device.c optional ocs_fc pci +dev/ocs_fc/ocs_xport.c optional ocs_fc pci +dev/ocs_fc/ocs_domain.c optional ocs_fc pci +dev/ocs_fc/ocs_sport.c optional ocs_fc pci +dev/ocs_fc/ocs_els.c optional ocs_fc pci +dev/ocs_fc/ocs_fabric.c optional ocs_fc pci +dev/ocs_fc/ocs_io.c optional ocs_fc pci +dev/ocs_fc/ocs_node.c optional ocs_fc pci +dev/ocs_fc/ocs_scsi.c optional ocs_fc pci +dev/ocs_fc/ocs_unsol.c optional ocs_fc pci +dev/ocs_fc/ocs_ddump.c optional ocs_fc pci +dev/ocs_fc/ocs_mgmt.c optional ocs_fc pci +dev/ocs_fc/ocs_cam.c optional ocs_fc pci dev/ofw/ofw_bus_if.m optional fdt dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_fdt.c optional fdt Modified: stable/11/sys/dev/ocs_fc/sli4.c ============================================================================== --- head/sys/dev/ocs_fc/sli4.c Fri Mar 30 15:28:25 2018 (r331766) +++ stable/11/sys/dev/ocs_fc/sli4.c Wed Apr 4 18:06:52 2018 (r332040) @@ -5758,9 +5758,6 @@ int32_t sli_link_is_configurable(sli4_t *sli) /* vim: set noexpandtab textwidth=120: */ -extern const char *SLI_QNAME[]; -extern const sli4_reg_t regmap[SLI4_REG_MAX][SLI4_MAX_IF_TYPES]; - /** * @ingroup sli_fc * @brief Write an FCOE_WQ_CREATE command. Modified: stable/11/sys/modules/Makefile ============================================================================== --- stable/11/sys/modules/Makefile Wed Apr 4 17:45:05 2018 (r332039) +++ stable/11/sys/modules/Makefile Wed Apr 4 18:06:52 2018 (r332040) @@ -294,6 +294,7 @@ SUBDIR= \ ${_nvram} \ ${_nxge} \ oce \ + ${_ocs_fc} \ otus \ ${_otusfw} \ ow \ @@ -609,6 +610,7 @@ _lio= lio .endif _nctgpio= nctgpio _ndis= ndis +_ocs_fc= ocs_fc _pccard= pccard .if ${MK_OFED} != "no" || defined(ALL_MODULES) _rdma= rdma