fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
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 *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
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 *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Generic Fibre Channel Library definitions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * I18N message number ranges
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This file: 19500 - 19999
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Shared common messages: 1 - 1999
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _GFC_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _GFC_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Put your include files here
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/types.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/fibre-channel/fcio.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/sunmdi.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/scsi/generic/inquiry.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * sys/fc4/fcio.h includes sys/fc4/fcal_linkapp.h. The following #define
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * keeps from actually including the contents of sys/fc4/fcal_linkapp.h
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * since that file contains the same structure definitions as sys/fc4/fcio.h.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SYS_FC4_FCAL_LINKAPP_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/fc4/fcio.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Defines */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define WWN_S_LEN 17 /* NULL terminated string */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define WWN_SIZE 8
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAX_HBA_PORT 256
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Constants used by g_wwn_in_dev_list() */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MATCH_NODE_WWN 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MATCH_PORT_WWN 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The masks defined below are for the Fibre channel transport and FCAs.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Mask names starting with FC4 are for the non-fabric fibre channel driver
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * stack and those starting with FC are for the fabric fibre channel driver
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * stack.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The transport values are represented in the low order 16 bits and FCA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * values represented in the high order 16 bits.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The notation used is as shown below :
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * (starting from the low order byte)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Byte 1 - holds the non-fabric FC transport driver defines
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Byte 2 - holds the fabric FC transport driver defines
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Byte 3 - holds the non-fabric FC FCA defines
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Byte 4 - holds the fabric FC FCA defines
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Recognized Transport categories */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC4_SF_XPORT 0x00000001
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC4_IFP_XPORT 0x00000002
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_GEN_XPORT 0x00000100
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Transport masks */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC4_XPORT_MASK 0x000000FF
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_XPORT_MASK 0x0000FF00
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define XPORT_MASK (FC_XPORT_MASK | FC4_XPORT_MASK)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Recognized Fibre Channel Adapters */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC4_SOCAL_FCA 0x00010000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC4_PCI_FCA 0x00020000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_PCI_FCA 0x02000000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* FCA masks */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC4_FCA_MASK 0x00FF0000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_FCA_MASK 0xFF000000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FCA_MASK (FC_FCA_MASK | FC4_FCA_MASK)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Disk ports
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_B 0x00
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_A 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_PORT_A 0x00
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define FC_PORT_B 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_A_B 0x02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Constants used by g_set_port_state() */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_OFFLINE 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_ONLINE 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Constants used by g_loopback_mode() */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NO_LPBACK 0x00
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define EXT_LPBACK 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define INT_LPBACK 0x02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Constants for port state */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_CONNECTED 0x00
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_NOTCONNECTED 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Extended pathinfo node states */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MDI_PATHINFO_STATE_TRANSIENT 0x00010000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MDI_PATHINFO_STATE_USER_DISABLE 0x00100000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MDI_PATHINFO_STATE_DRV_DISABLE 0x00200000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MDI_PATHINFO_STATE_DRV_DISABLE_TRANSIENT 0x00400000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MDI_PATHINFO_STATE_MASK 0x0000FFFF
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MDI_PATHINFO_EXT_STATE_MASK 0xFFF00000
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Error inq dtype for g_get_dev_list partial failure.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * choose E0 since Solaris has #define DTYPE_MASK 0x1F.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GFC_ERR_INQ_DTYPE (0xFF & ~DTYPE_MASK)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Exported Variables */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern uchar_t g_switch_to_alpa[];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern uchar_t g_sf_alpa_to_switch[];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Exported Structures */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Device Map */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct al_rls {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char driver_path[MAXNAMELEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint_t al_ha;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct rls_payload payload;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct al_rls *next;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} AL_rls;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Multi path list */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestruct dlist {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *dev_path;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *logical_path;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct dlist *multipath;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct dlist *next;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct dlist *prev;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte};
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Individual drive state */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct g_disk_state_struct {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint_t num_blocks; /* Capacity */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char physical_path[MAXNAMELEN]; /* First one found */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct dlist *multipath_list;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char node_wwn_s[WWN_S_LEN]; /* NULL terminated str */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int persistent_reserv_flag;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int persistent_active, persistent_registered;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int d_state_flags[2]; /* Disk state */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int port_a_valid; /* If disk state is valid */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int port_b_valid; /* If disk state is valid */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char port_a_wwn_s[WWN_S_LEN]; /* NULL terminated string */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char port_b_wwn_s[WWN_S_LEN]; /* NULL terminated string */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} G_disk_state;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct hotplug_disk_list {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct dlist *seslist;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct dlist *dlhead;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char box_name[33];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char dev_name[MAXPATHLEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char node_wwn_s[17];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int tid;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int slot;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int f_flag; /* Front flag */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int dev_type;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int dev_location; /* device in A5000 or not */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int busy_flag;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int reserve_flag;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct hotplug_disk_list *next;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct hotplug_disk_list *prev;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} Hotplug_Devlist;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct l_inquiry_inq_2 {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_2_reladdr : 1, /* relative addressing */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_wbus32 : 1, /* 32 bit wide data xfers */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_wbus16 : 1, /* 16 bit wide data xfers */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_sync : 1, /* synchronous data xfers */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_linked : 1, /* linked commands */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_res1 : 1, /* reserved */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_cmdque : 1, /* command queueing */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_sftre : 1; /* Soft Reset option */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} L_inq_2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct l_inquiry_inq_3 {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_3_reladdr : 1, /* relative addressing */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_SIP_2 : 3, /* Interlocked Protocol */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_3_linked : 1, /* linked commands */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_trandis : 1, /* Transfer Disable */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_3_cmdque : 1, /* command queueing */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_SIP_3 : 1; /* Interlocked Protocol */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} L_inq_3;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct l_inquiry_struct {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * byte 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Bits 7-5 are the Peripheral Device Qualifier
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Bits 4-0 are the Peripheral Device Type
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_dtype;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* byte 1 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_rmb : 1, /* removable media */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_qual : 7; /* device type qualifier */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* byte 2 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_iso : 2, /* ISO version */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_ecma : 3, /* ECMA version */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_ansi : 3; /* ANSI version */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* byte 3 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define inq_aerc inq_aenc /* SCSI-3 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_aenc : 1, /* async event notification cap. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_trmiop : 1, /* supports TERMINATE I/O PROC msg */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_normaca : 1, /* Normal ACA Supported */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte : 1, /* reserved */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_rdf : 4; /* response data format */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* bytes 4-7 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_len; /* additional length */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t : 8; /* reserved */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t : 2, /* reserved */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_port : 1, /* Only defined when dual_p set */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_dual_p : 1, /* Dual Port */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_mchngr : 1, /* Medium Changer */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte inq_SIP_1 : 3; /* Interlocked Protocol */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte union {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte L_inq_2 inq_2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte L_inq_3 inq_3;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } ui;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* bytes 8-35 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_vid[8]; /* vendor ID */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_pid[16]; /* product ID */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_revision[4]; /* product revision level */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Bytes 36-55 are vendor-specific parameter bytes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* SSA specific definitions */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* bytes 36 - 39 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define inq_ven_specific_1 inq_firmware_rev
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_firmware_rev[4]; /* firmware revision level */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* bytes 40 - 51 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_serial[12]; /* serial number, not used any more */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* bytes 52-53 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_res2[2];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* byte 54, 55 */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_ssa_ports; /* number of ports */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_ssa_tgts; /* number of targets */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Bytes 56-95 are reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_res3[40];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 96 to 'n' are vendor-specific parameter bytes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_box_name[32];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t inq_avu[256];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} L_inquiry;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct wwn_list_struct {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *logical_path;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *physical_path;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char node_wwn_s[WWN_S_LEN]; /* NULL terminated string */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t w_node_wwn[WWN_SIZE];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char port_wwn_s[WWN_S_LEN]; /* NULL terminated string */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t device_type; /* disk or tape (Peripheral Device Type) */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct wwn_list_struct *wwn_prev;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct wwn_list_struct *wwn_next;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} WWN_list;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* HBA port list */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct portlist {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int hbacnt;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char *physpath[MAX_HBA_PORT];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} portlist_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* union for capturing sf and fp strucures */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef union gfc_port_dev_u {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sf_al_addr_pair_t priv_port; /* private loop */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte fc_port_dev_t pub_port; /* fabric/public loop */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} gfc_port_dev_ut;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* FC device sturcure with topology */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct gfc_port_dev_info {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint32_t port_topology;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte gfc_port_dev_ut gfc_port_dev;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} gfc_port_dev_info_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* strucure for FC map */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct gfc_map {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte int count;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte gfc_port_dev_info_t *dev_addr;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte gfc_port_dev_info_t hba_addr;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} gfc_map_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* g_dev_map_init related declaration */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef void *gfc_dev_t; /* opaque type for map device */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef void *gfc_prop_t; /* opaque type for map device property */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAP_FORMAT_STANDARD 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAP_FORMAT_LILP 0x00000001
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAP_XPORT_PROP_ONLY 0x00000010
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* property name for g_dev_prop_lookup */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_WWN_PROP "port-wwn"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define NODE_WWN_PROP "node-wwn"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define INQ_DTYPE_PROP "inq-dtype"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PORT_ADDR_PROP "port-addr"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define HARD_ADDR_PROP "hard-addr"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* property type for g_dev_prop_next */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GFC_PROP_TYPE_BOOLEAN 0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GFC_PROP_TYPE_INT 1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GFC_PROP_TYPE_STRING 2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GFC_PROP_TYPE_BYTES 3
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define GFC_PROP_TYPE_UNKNOWN 4
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct mp_pathinfo {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mdi_pathinfo_state_t path_state;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char path_class[MAXNAMELEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char path_hba[MAXPATHLEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char path_dev[MAXPATHLEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte char path_addr[MAXNAMELEN];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} mp_pathinfo_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* structure for mpxio pathlist */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct mp_pathlist {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint_t path_count;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mp_pathinfo_t *path_info;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} mp_pathlist_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Prototypes of Exported functions which are defined in libg_fc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * They are all CONTRACT PRIVATE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if defined(__STDC__)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_start(char *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_stop(char *, struct wwn_list_struct *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_force_lip(char *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_forcelip_all(struct hotplug_disk_list *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_free_multipath(struct dlist *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_free_wwn_list(struct wwn_list_struct **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_map(char *, gfc_map_t *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_lilp_map(char *, gfc_map_t *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_inq_dtype(char *, la_wwn_t, uchar_t *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_list(char *, fc_port_dev_t **, int *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_wwn_in_dev_list(char *, la_wwn_t, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_dev_or_bus_phys_name(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_errString(int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_inquiry(char *, L_inquiry *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_serial_number(char *, uchar_t *, size_t *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_limited_map(char *, struct lilpmap *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_multipath(char *, struct dlist **,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct wwn_list_struct *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_nexus_path(char *, char **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_physical_name_from_link(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_physical_name(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_wwn(char *, uchar_t *, uchar_t *, int *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_wwn_list(struct wwn_list_struct **, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_i18n_catopen(void);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_offline_drive(struct dlist *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_online_drive(struct dlist *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_rdls(char *, struct al_rls **, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern uint_t g_get_path_type(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_host_params(char *, fc_port_dev_t *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_port_offline(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_port_online(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_port_path(char *, portlist_t *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_free_portlist(portlist_t *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_loopback_mode(char *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_port_state(char *, int *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_fca_port_topology(char *, uint32_t *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_login(char *, la_wwn_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_logout(char *, la_wwn_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_pathlist(char *, struct mp_pathlist *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_failover(char *, char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* g_dev_map_init related routines. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_dev_t g_dev_map_init(char *, int *, int);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_dev_map_fini(gfc_dev_t);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_map_topology(gfc_dev_t, uint_t *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_dev_t g_get_first_dev(gfc_dev_t, int *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_dev_t g_get_next_dev(gfc_dev_t, int *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_prop_lookup_bytes(gfc_dev_t, const char *, int *,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_prop_lookup_ints(gfc_dev_t, const char *, int **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_prop_lookup_strings(gfc_dev_t, const char *, char **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_prop_t g_get_first_dev_prop(gfc_dev_t, int *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_prop_t g_get_next_dev_prop(gfc_prop_t, int *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_dev_prop_name(gfc_prop_t, int *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_prop_type(gfc_prop_t, int *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_prop_bytes(gfc_prop_t, int *, uchar_t **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_prop_ints(gfc_prop_t, int **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_prop_strings(gfc_prop_t, char **);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_path_disable(char *, char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_path_enable(char *, char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_path_disable_all(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_path_enable_all(char *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_get_path_state(char *, char *, int *, int *);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#else /* __STDC__ */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_start();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_stop();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_force_lip();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_forcelip_all();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_free_multipath();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_free_wwn_list();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_inq_dtype();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_list();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_wwn_in_dev_list();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_map();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_lilp_map();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_dev_or_bus_phys_name();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_errString();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_inquiry();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_serial_number();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_limited_map();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_multipath();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_nexus_path();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_wwn_list();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_offline_drive();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_online_drive();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_physical_name();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_physical_name_from_link();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_wwn();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_i18n_catopen();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_rdls();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern uint_t g_get_path_type();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_host_params();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_port_offline();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_port_online();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_port_path();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_free_portlist();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_loopback_mode();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_port_state();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_fca_port_topology();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_login();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_logout();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_pathlist();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_failover();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* g_dev_map_init related routines. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_dev_t g_dev_map_init();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern void g_dev_map_fini();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_map_topology();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_dev_t g_get_first_dev();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_dev_t g_get_next_dev();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_prop_lookup_bytes();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_prop_lookup_ints();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_dev_prop_lookup_strings();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_prop_t g_get_first_dev_prop();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern gfc_prop_t g_get_next_dev_prop();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern char *g_get_dev_prop_name();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_prop_type();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_prop_bytes();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_prop_ints();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_get_dev_prop_strings();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_path_disable();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_path_enable();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_path_disable_all();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_path_enable_all();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern int g_stms_get_path_state();
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* __STDC__ */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _GFC_H */