fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ioctl definitions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * New ioctl definitions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_LOGI_PARAMS (FCIO_SUB_CMD + 0x07)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_RESET_HARD_CORE (FCIO_SUB_CMD + 0x14)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_HOST_PARAMS (FCIO_SUB_CMD + 0x18)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * IOCTLs to handle T11's FC-HBA library
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_ADAPTER_ATTRIBUTES (FCIO_SUB_CMD + 0x1E)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_OTHER_ADAPTER_PORTS (FCIO_SUB_CMD + 0x1F)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_ADAPTER_PORT_ATTRIBUTES (FCIO_SUB_CMD + 0x20)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_DISCOVERED_PORT_ATTRIBUTES (FCIO_SUB_CMD + 0x21)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_PORT_ATTRIBUTES (FCIO_SUB_CMD + 0x22)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_ADAPTER_PORT_STATS (FCIO_SUB_CMD + 0x23)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_ADAPTER_PORT_NPIV_ATTRIBUTES (FCIO_SUB_CMD + 0x24)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_CREATE_NPIV_PORT (FCIO_SUB_CMD + 0x25)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_NPIV_ATTRIBUTES (FCIO_SUB_CMD + 0x26)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_DISCOVERED_NPIV_ATTRIBUTES (FCIO_SUB_CMD + 0x27)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_GET_NPIV_PORT_LIST (FCIO_SUB_CMD + 0x28)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_DELETE_NPIV_PORT (FCIO_SUB_CMD + 0x29)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_NPIV_GET_ADAPTER_ATTRIBUTES (FCIO_SUB_CMD + 0x2a)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Fixed diag_codes for FCIO_DIAG. These is supported by all FCAs.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * No FCA should define ioctls in this range.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_DIAG_PORT_DISABLE (FCIO_SUB_CMD + 0x80)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_DIAG_PORT_ENABLE (FCIO_SUB_CMD + 0x81)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* cmd_flags for FCIO_LINK_STATUS ioctl */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Note about fc_port_dev_t structure : The dev_did.priv_lilp_posit field will
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * return the lilp map position of the port for diagnostics to use.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * It is important to note that dev_did.priv_lilp_posit field will only have
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * valid loop position for Private Loop devices ONLY and the value
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * contained in this field for other topologies will be undetermined.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_portid_t dev_did; /* Destination Identifier */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_portid_t dev_did; /* Destination Identifier */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SYSCALL32 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fcio_xfer definitions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCIO_XFER_RW (FCIO_XFER_READ | FCIO_XFER_WRITE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint16_t fcio_cmd_flags; /* command specific flags */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * T11 FC-HBA exchange structures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t version; /* Set to FC_HBA_LIST_VERSION */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char hbaPaths[1][MAXPATHLEN]; /* numAdapters long */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t version; /* Set to FC_HBA_SINGLE_VERSION */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t version; /* Set to FC_HBA_ADAPTER_ATTRIBUTES_VERSION */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t version; /* Set to FC_HBA_ADAPTER_ATTRIBUTES_VERSION */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* defined(_SYSCALL32) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t version; /* FC_HBA_PORT_ATTRIBUTES_VERSION */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t version; /* FC_HBA_PORT_ATTRIBUTES_VERSION */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* defined(_SYSCALL32) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t version; /* FC_HBA_ADAPTER_PORT_STATS_VERSION */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Constant values derived from T11 FC-HBA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTTYPE_NOTPRESENT 3 /* Not present */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTTYPE_NLPORT 6 /* Public Loop */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTTYPE_EPORT 9 /* Fabric expansion port */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTTYPE_GPORT 10 /* Generic Fabric Port */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTTYPE_LPORT 20 /* Private Loop */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTTYPE_PTP 21 /* Point to Point */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTSTATE_ONLINE 2 /* Operational */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTSTATE_OFFLINE 3 /* User Offline */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTSTATE_BYPASSED 4 /* Bypassed */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTSTATE_DIAGNOSTICS 5 /* In diagnostics mode */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTSTATE_LINKDOWN 6 /* Link Down */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_HBA_PORTSTATE_LOOPBACK 8 /* Loopback */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 32 bit varient of fcio_t; to be used
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * only in the driver and NOT applications
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint16_t fcio_cmd_flags; /* command specific flags */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte size32_t fcio_alen; /* Auxillary buffer length */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if !defined(__lint)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", fcio32))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* __lint */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SYSCALL32 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if !defined(__lint)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", fcio fc_port_dev))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* __lint */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _FCIO_H */