/*
* 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
* 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 (c) 2004-2011 Emulex. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _EMLXS_OS_H
#define _EMLXS_OS_H
#ifdef __cplusplus
extern "C" {
#endif
/* Symbolic Node Name interface */
/*
* DRIVER LEVEL FEATURES
*/
/* #define IDLE_TIMER Not yet - untested */
/*
* OS LEVEL FEATURES
*/
#ifdef S11
#define MSI_SUPPORT
#ifdef EMLXS_I386
#endif /* i386 */
#endif /* S11 */
/*
* SUBFEATURES
*/
#ifdef SFCT_SUPPORT
#endif /* SFCT_SUPPORT */
#ifndef EMLXS_MODREV
#define EMLXS_MODREV 0
#endif /* EMLXS_MODREV */
#ifndef EMLXS_MODREVX
#define EMLXS_MODREVX 0
#endif /* EMLXS_MODREVX */
/* Create combined definition */
#define S10S11
#endif /* S10 or S11 */
#include <sys/autoconf.h>
#include <sys/ethernet.h>
#include <vm/seg_kmem.h>
#ifdef S11
#else /* !S11 */
/*
* Capabilities linked list entry offsets
*/
/*
* Capability identifier values
*/
/*
* PCI power management (PM) capability entry offsets
*/
/*
*/
/*
* PCI Express capability registers in PCI configuration space relative to
* the PCI Express Capability structure.
*/
/*
* PCI-Express Enhanced Capabilities Link Entry Bit Offsets
*/
/*
* PCI-Express Enhanced Capability Identifier Values
*/
/* Endpoint Association */
#endif /* S11 */
#include <emlxs_hbaapi.h>
#ifdef FMA_SUPPORT
#endif /* FMA_SUPPORT */
#ifdef S11
/* ULP header files */
#else /* !S11 */
/* ULP header files */
#endif /* S11 */
#ifndef FC_HBA_PORTSPEED_8GBIT
#endif /* FC_HBA_PORTSPEED_8GBIT */
#ifndef FP_DEFAULT_SID
#endif /* FP_DEFAULT_SID */
#ifndef FP_DEFAULT_DID
#endif /* FP_DEFAULT_DID */
#ifdef MSI_SUPPORT
extern int ddi_intr_get_supported_types();
#endif /* MSI_SUPPORT */
#ifndef MODSYM_SUPPORT
#endif /* MODSYM_SUPPORT */
/* S11 flag for dma_attr_flags for ddi_dma_attr_t */
#ifndef DDI_DMA_RELAXED_ORDERING
#endif /* DDI_DMA_RELAXED_ORDERING */
#ifdef FMA_SUPPORT
/* FMA Support */
extern void ddi_fm_acc_err_clear();
#endif /* FMA_SUPPORT */
#ifdef EMLXS_SPARC
#define EMLXS_BIG_ENDIAN
#endif /* EMLXS_SPARC */
#ifdef EMLXS_I386
#define EMLXS_LITTLE_ENDIAN
#endif /* EMLXS_I386 */
/* Solaris 8 does not define this */
#ifndef TASKQ_DYNAMIC
#endif /* TASKQ_DYNAMIC */
#ifdef _LP64
#else
#endif /* _LP64 */
#ifndef FC_STATE_8GBIT_SPEED
/* This was obtained from OpenSolaris */
#endif /* FC_STATE_8GBIT_SPEED */
#ifndef BURSTSIZE
#define BURSTSIZE
#ifdef _LP64
#else
#endif /* _LP64 */
#endif /* BURSTSIZE */
#ifndef TRUE
#endif /* TRUE */
#ifndef FALSE
#define FALSE 0
#endif /* FALSE */
#define DMA_READ_WRITE 0
#define EMLXS_MPDATA_SYNC(h, a, b, c) \
if (h) { \
(void) ddi_dma_sync((ddi_dma_handle_t)(h), \
}
#define EMLXS_INUMBER 0
#define EMLXS_MSI_INUMBER 0
/*
* Register indices in PCI configuration space.
*/
/* index */
/* index */
/* regs index */
/* index */
/* index */
#define PCI_CFG_RINDEX 0
/* Tokens < EMLXS_UB_TOKEN_OFFSET are reserved for ELS response oxids */
typedef struct emlxs_ub_priv
{
void *port;
void *bpl_data_handle;
void *bpl_dma_handle;
typedef struct emlxs_unsol_buf
{
/* of unsol_buf hdr */
/* of unsol_buf hdr */
/* this pool */
/* pool */
/* in pool */
/* destruction */
/* buffers */
/* reserved buffers */
/* in pool */
/* in pool */
/* structs */
#ifndef FC_REASON_NONE
#define FC_REASON_NONE 0
#endif /* FC_REASON_NONE */
#ifndef FC_ACTION_NONE
#define FC_ACTION_NONE 0
#endif /* FC_ACTION_NONE */
/*
* emlx status translation table
*/
typedef struct emlxs_xlat_err
{
typedef struct emlxs_table
{
/* PATCH MASK DEFINES */
/* ULP Patches: */
/* This patch enables the driver to auto respond to unsolicited LOGO's */
/* This is needed because ULP is sometimes doesn't reply itself */
/* This patch enables the driver to auto respond to unsolicited PRLI's */
/* This is needed because ULP is known to panic sometimes */
/* This patch enables the driver to auto respond to unsolicited PRLO's */
/* This is needed because ULP is known to panic sometimes */
/* This patch enables the driver to fail pkt abort requests */
/* This patch enables the driver to generate an RSCN for unsolicited PRLO's */
/* and LOGO's */
/* Sun Disk Array Patches: */
/* This patch enables the driver to fix a residual underrun issue with */
/* check conditions */
/* This patch enables the driver to fix a residual underrun issue with */
/* SCSI inquiry commands */
ULP_PATCH5 | ULP_PATCH6 | \
#ifdef __cplusplus
}
#endif
#endif /* _EMLXS_OS_H */