fcio.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _FCIO_H
#define _FCIO_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* ioctl definitions
*/
/*
* New ioctl definitions
*/
/*
* IOCTLs to handle T11's FC-HBA library
*/
/*
* Fixed diag_codes for FCIO_DIAG. These is supported by all FCAs.
* No FCA should define ioctls in this range.
*/
/* cmd_flags for FCIO_LINK_STATUS ioctl */
#define FCIO_CFLAGS_RLS_DEST_NPORT 0x0000
#define FCIO_CFLAGS_RLS_DEST_FPORT 0x0001
/*
* Note about fc_port_dev_t structure : The dev_did.priv_lilp_posit field will
* return the lilp map position of the port for diagnostics to use.
* It is important to note that dev_did.priv_lilp_posit field will only have
* valid loop position for Private Loop devices ONLY and the value
* contained in this field for other topologies will be undetermined.
*/
typedef struct fc_port_dev {
#if defined(_SYSCALL32)
#pragma pack(4)
#endif
typedef struct fc_port_dev32 {
#pragma pack()
#endif
#endif /* _SYSCALL32 */
typedef struct fc_port_dev fc_ns_map_entry_t;
/*
* fcio_xfer definitions
*/
#define FCIO_XFER_NONE 0x00
#define FCIO_XFER_READ 0x01
#define FCIO_XFER_WRITE 0x02
typedef struct fcio {
int fcio_errno; /* FC internal error code */
} fcio_t;
/*
* T11 FC-HBA exchange structures
*/
#define FC_HBA_LIST_VERSION 1
typedef struct fc_hba_list {
#define FC_HBA_NPIV_PORT_LIST_VERSION 1
typedef struct fc_hba_npiv_port_list {
#define FC_HBA_NPIV_ATTRIBUTES_VERSION 1
typedef struct fc_hba_npiv_attributes {
#define FC_HBA_PORT_NPIV_ATTRIBUTES_VERSION 1
typedef struct fc_hba_port_npiv_attributes {
int npivflag;
#define FC_HBA_SINGLE_VERSION 1
typedef struct fc_hba_single {
char hbaPath[MAXPATHLEN];
#define FC_HBA_ADAPTER_ATTRIBUTES_VERSION 1
typedef struct fc_hba_adapter_attributes {
char Manufacturer[64];
char SerialNumber[64];
char Model[256];
char ModelDescription[256];
char NodeSymbolicName[256];
char HardwareVersion[256];
char DriverVersion[256];
char OptionROMVersion[256];
char FirmwareVersion[256];
char DriverName[256];
#if defined(_SYSCALL32)
#pragma pack(4)
#endif
typedef struct fc_hba_adapter_attributes32 {
char Manufacturer[64];
char SerialNumber[64];
char Model[256];
char ModelDescription[256];
char NodeSymbolicName[256];
char HardwareVersion[256];
char DriverVersion[256];
char OptionROMVersion[256];
char FirmwareVersion[256];
char DriverName[256];
#pragma pack()
#endif
#endif /* defined(_SYSCALL32) */
#define FC_HBA_PORT_ATTRIBUTES_VERSION 1
typedef struct fc_hba_port_attributes {
char PortSymbolicName[256];
#if defined(_SYSCALL32)
#pragma pack(4)
#endif
typedef struct fc_hba_port_attributes32 {
char PortSymbolicName[256];
#pragma pack()
#endif
#endif /* defined(_SYSCALL32) */
#define FC_HBA_ADAPTER_PORT_STATS_VERSION 1
typedef struct fc_hba_adapter_port_stats {
/*
* Constant values derived from T11 FC-HBA
*/
#define FC_HBA_PORTTYPE_FLPORT 7
#if defined(_SYSCALL32)
/*
* 32 bit varient of fcio_t; to be used
* only in the driver and NOT applications
*/
struct fcio32 {
int fcio_errno; /* FC internal error code */
};
#if !defined(__lint)
#endif /* __lint */
#endif /* _SYSCALL32 */
#if !defined(__lint)
#endif /* __lint */
#ifdef __cplusplus
}
#endif
#endif /* _FCIO_H */