emlxs_sdapi.h revision 825277341c15b6b0d2c4b8b622ae7b1d2bdc0390
/*
* 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 2009 Emulex. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _EMLXS_SDAPI_H
#define _EMLXS_SDAPI_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Although information in this file can be used by app, libdfc or driver,
* its purpose is for communication between app and libdfc.
* Its content come from the SAN Diag API Specification.
*/
/* Define for refering SCSI_IO_LATENCY */
#define SD_SCSI_IO_LATENCY_TYPE 0x01
/* Masks for ELS Commands */
#define SD_ELS_SUBCATEGORY_PLOGI_RCV 0x01
#define SD_ELS_SUBCATEGORY_PRLO_RCV 0x02
#define SD_ELS_SUBCATEGORY_ADISC_RCV 0x04
#define SD_ELS_SUBCATEGORY_LSRJT_RCV 0x08
#define SD_ELS_SUBCATEGORY_LOGO_RCV 0x10
#define SD_ELS_SUBCATEGORY_RSCN_RCV 0x20
/* Masks for Fabric events */
#define SD_FABRIC_SUBCATEGORY_FABRIC_BUSY 0x01
#define SD_FABRIC_SUBCATEGORY_PORT_BUSY 0x02
#define SD_FABRIC_SUBCATEGORY_FCPRDCHKERR 0x04
/* Masks for SCSI events */
#define SD_SCSI_SUBCATEGORY_QFULL 0x0001
#define SD_SCSI_SUBCATEGORY_DEVBSY 0x0002
#define SD_SCSI_SUBCATEGORY_CHECKCONDITION 0x0004
#define SD_SCSI_SUBCATEGORY_LUNRESET 0x0008
#define SD_SCSI_SUBCATEGORY_TGTRESET 0x0010
#define SD_SCSI_SUBCATEGORY_BUSRESET 0x0020
#define SD_SCSI_SUBCATEGORY_VARQUEDEPTH 0x0040
/* Masks for Board Events */
#define SD_BOARD_SUBCATEGORY_PORTINTERR 0x01
#define SD_BOARD_SUBCATEGORY_LINKATTE 0x02
/* Masks for Adapter Events */
#define SD_ADAPTER_SUBCATEGORY_ARRIVAL 0x01
#define SD_ADAPTER_SUBCATEGORY_DEPARTURE 0x02
/* Struct to hold SCSI IO Latency statistics per bucket */
struct SD_time_stats_v0 {
};
/* Struct per target for SCSI IO Latency */
struct SD_IO_Latency_Response {
/* Size of array depends on range size */
};
/* Return Codes */
enum SD_RETURN_CODES {
};
#define SD_SEARCH_LINEAR 0x01
#define SD_SEARCH_POWER_2 0x02
extern uint32_t DFC_SD_Get_Granularity(void);
void *arg);
void *buff);
#define SD_REG_ELS_EVENT 0x01
#define SD_REG_FABRIC_EVENT 0x02
#define SD_REG_SCSI_EVENT 0x04
#define SD_REG_BOARD_EVENT 0x08
#define SD_REG_ADAPTER_EVENT 0x10
/* Generic Payload */
struct sd_event {
void *sd_evt_payload;
};
struct sd_els_event_details_v0 {
void *sd_elsevt_payload;
};
struct sd_plogi_rcv_v0 {
};
struct sd_prlo_rcv_v0 {
};
struct sd_lsrjt_rcv_v0 {
};
struct sd_adisc_rcv_v0 {
};
#define SD_FABRIC_SUBCATEGORY_VALID_MASK (\
struct sd_fabric_event_details_v0 {
void *sd_fabric_evt_payload;
};
struct sd_pbsy_rcv_v0 {
};
struct sd_fcprdchkerr_v0 {
};
#define SD_SCSI_SUBCATEGORY_VALID_MASK (\
struct sd_scsi_event_details_v0 {
void *sd_scsi_evt_payload;
};
struct sd_scsi_generic_v0 {
};
struct sd_scsi_checkcond_v0 {
};
struct sd_scsi_varquedepth_v0 {
};
/* Prototype for callback */
void *context,
/* Register for event */
void *context,
sd_callback *func);
/* Deregister a event */
#ifdef __cplusplus
}
#endif
#endif /* _EMLXS_SDAPI_H */