ql_xioctl.h revision 93c20f2609342fd05f6625f16dfcb9348e7977f2
/*
* 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 QLogic Corporation */
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _QL_XIOCTL_H
#define _QL_XIOCTL_H
/*
* ISP2xxx Solaris Fibre Channel Adapter (FCA) driver header file.
*
* ***********************************************************************
* * **
* * NOTICE **
* * COPYRIGHT (C) 1996-2008 QLOGIC CORPORATION **
* * ALL RIGHTS RESERVED **
* * **
* ***********************************************************************
*
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <exioct.h>
/* 0xFFFFFA Mgmt Server */
#define MANAGEMENT_SERVER_LOOP_ID 0xfe
#define MANAGEMENT_SERVER_24XX_LOOP_ID 0x7ef
/* Returned Mailbox registers. */
typedef struct ql_mbx_ret {
} ql_mbx_ret_t;
/*
* Name type defines for use with qla2x00_scsi_passthru() and
* elsewhere when searching for name matches.
* NOTE that these defines are used both as flags and values.
*/
#define QLNT_NODE 0x01
#define QLNT_PORT 0x02
#define QLNT_PID 0x04
#define QLNT_LOOP_ID 0x08
#define QLNT_MASK 0x0F
/*
* CT information unit basic preamble.
*/
typedef struct ql_ct_iu_preamble {
#define GS_TYPE_DIR_SERVER 0xFC
/*
* Link Status Counts structure
*
* Counts are BIG ENDIAN
*/
typedef struct ql_link_stats {
/*
* Report LUN definitions.
*/
typedef struct ql_rpt_hdr {
} ql_rpt_hdr_t;
typedef struct ql_rpt_lun {
struct {
uint8_t b : 6;
} msb;
} ql_rpt_lun_t;
typedef struct ql_rpt_lun_lst {
#define INQ_DATA_SIZE 8
/*
* Flash definitions.
*/
typedef struct ql_flash_info {
/*
* Flash Description Table
*/
#define FLASH_DESC_VERSION 1
typedef struct flash_desc {
} flash_desc_t;
/* flash manufacturer id's */
/* flash id defines */
/* flash type defines */
#define FLASH_PAGE BIT_31
typedef struct ql_ledstate {
/*
* ledstate flags definitions
*/
#define LED_ACTIVE BIT_0
/*
* ledstate BeaconState definitions
*/
#define BEACON_OFF 0
/*
* ledstate LEDflags definitions
*/
#define LED_ALL_OFF 0
/*
* 24xx ledstate LEDflags definitions
*/
#define LED_YELLOW_24 BIT_2
#define LED_GREEN_24 BIT_3
#define LED_AMBER_24 BIT_4
typedef struct {
} pci_header_t;
typedef struct {
} pci_data_t;
#define PCI_HEADER0 0x55
#define PCI_HEADER1 0xAA
#define PCI_DATASIG "PCIR"
#define PCI_SECTOR_SIZE 0x200
#define PCI_CODE_X86PC 0
#define PCI_CODE_FCODE 1
#define PCI_CODE_HPPA 2
#define PCI_CODE_EFI 3
#define PCI_CODE_FW 0xfe
#define PCI_IND_LAST_IMAGE 0x80
#define SBUS_CODE_FCODE 0xf1
typedef struct ql_fcache {
} ql_fcache_t;
/* fcache types */
#define FTYPE_UNKNOWN 0
#define FTYPE_FCODE BIT_0
#define FTYPE_BIOS BIT_1
#define FTYPE_HPPA BIT_4
#define FBUFSIZE 100
/*
* Per instance XIOCTL context defintions.
*/
typedef struct ql_xioctl {
/* Driver context */
/* Adapter I/O statistics */
/* SNIA stat counters */
/* SNIA intermediate (less than 1mb) counters */
/* Adapter LED state */
/* Async event context */
void *aen_tracking_queue;
} ql_xioctl_t;
/*
* ql adapter flag defintions.
*/
#define QL_AEN_TRACKING_ENABLE BIT_0
#define QL_MGMT_SERVER_LOGIN BIT_1
/*
* Global Data in ql_xioctl.c source file.
*/
/*
* Global Function Prototypes in ql_xioctl.c source file.
*/
int ql_setup_flash(ql_adapter_state_t *);
void ql_setup_fcache(ql_adapter_state_t *);
void ql_blink_led(ql_adapter_state_t *);
void ql_fcache_rel(ql_fcache_t *);
#ifdef __cplusplus
}
#endif
#endif /* _QL_XIOCTL_H */