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#ifndef _SYS_FIBRE_CHANNEL_IMPL_FCAL_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SYS_FIBRE_CHANNEL_IMPL_FCAL_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include <sys/note.h>
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Loop Initilization Identifier values
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LID_LISM 0x1101
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LID_LIFA 0x1102
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LID_LIPA 0x1103
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LID_LIHA 0x1104
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LID_LISA 0x1105
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LID_LIRP 0x1106
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LID_LILP 0x1107
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * lilp_magic definitions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAGIC_LISM 0x01
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAGIC_LIFA 0x02
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAGIC_LIPA 0x03
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAGIC_LIHA 0x04
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAGIC_LISA 0x05
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAGIC_LIRP 0x06
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define MAGIC_LILP 0x07
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * PLDA timers (in seconds)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PLDA_R_A_TOV 2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PLDA_RR_TOV 2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Note that my_alpa field is of 16 bit size. The lowest significant
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * byte contains the real ALPA. The highest significant bits are
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * used to indicate if the LBIT was set during Loop Initialization.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If the NL_Ports on the loop participate in the LIRP and LILP dance
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * as part of Loop Initialization then the presence of an F_Port can
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * be detected by checking for the presence of AL_PA '0x00' in the AL_PA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * list (That does not however guarantee if there is a violating NL_Port
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * trying to grab AL_PA value of '0x00').
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Some FCAs may be capable of notifying if the L_BIT was set in the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * AL_PA bit map. The host should then perform an IMPLICIT LOGO and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * execute a PLOGI before sending any other command.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define LILP_LBIT_SET 0x100 /* Login Required */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct fc_lilpmap {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint16_t lilp_magic;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint16_t lilp_myalpa;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t lilp_length;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uchar_t lilp_alpalist[127];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} fc_lilpmap_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#if !defined(__lint)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte_NOTE(SCHEME_PROTECTS_DATA("unique per request", fc_lilpmap))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* __lint */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SYS_FIBRE_CHANNEL_IMPL_FCAL_H */