/**/ /***************************************************************************/ /** **/ /** © Copyright 2010, Hewlett-Packard Development Company, L.P. **/ /** **/ /** Confidential computer software. Valid license from HP and/or **/ /** its subsidiaries required for possession, use, or copying. **/ /** **/ /** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, **/ /** Computer Software Documentation, and Technical Data for Commercial **/ /** Items are licensed to the U.S. Government under vendor's standard **/ /** commercial license. **/ /** **/ /** Neither HP nor any of its subsidiaries shall be liable for technical **/ /** or editorial errors or omissions contained herein. The information **/ /** in this document is provided "as is" without warranty of any kind and **/ /** is subject to change without notice. The warranties for HP products **/ /** are set forth in the express limited warranty statements accompanying **/ /** such products. Nothing herein should be construed as constituting an **/ /** additional warranty. **/ /** **/ /***************************************************************************/ /********************************************************************************************************************************/ /* Created: 30-Mar-2010 17:37:39 by OpenVMS SDL EV3-3 */ /* Source: 28-JAN-2009 09:55:33 $1$DGA7274:[LIB_H.SRC]SPDTDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $SPDTDEF ***/ #ifndef __SPDTDEF_LOADED #define __SPDTDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /*+ */ /* SPDT - SCSI Port Descriptor Table */ /* */ /* There is one SPDT per port. The SPDT contains the SCSI port information */ /* for one SCSI port. SPDT's are created by the unit init routines */ /* of the individual port drivers. During initialization the port driver's */ /* port routine entry points are initialized in the SPDT. The class drivers */ /* execute these entry points to interact with the underlying port hardware. */ /* */ /* This structure is read accessable to the class driver and readable and */ /* writeable by the port driver. */ /* */ /* ***NOTE1:**** New SPDT fields must be entered at the end of the data structure. */ /* */ /* ***NOTE2:**** If an INCOMPATIBLE CHANGE is made to this structure bump */ /* the version number of this structure. */ /*- */ #include #define SPDT$C_VERSION 12 /* Compatible version number. */ #define SPDT$C_TYPE_PKS 1 /* SCSI KZTSA/KZPSA (SimPort) */ #define SPDT$C_TYPE_PKC 2 /* SCSI NCR 53C94 Port */ #define SPDT$C_TYPE_PKZ 3 /* SCSI KZXZA NCR 53C710 Port */ #define SPDT$C_TYPE_PKT 4 /* SCSI NCR 53C710 Port */ #define SPDT$C_TYPE_PKJ 5 /* SCSI ADAPTEC 1742A Port */ #define SPDT$C_TYPE_PKE 6 /* SCSI NCR 53C810 Port */ #define SPDT$C_TYPE_PKQ 7 /* SCSI QLogic ISP1020 Port */ #define SPDT$C_TYPE_PG 8 /* FCP port driver */ #define SPDT$C_TYPE_PKW 9 /* SCSI SYMBIOS 53C8XX Port */ #define SPDT$C_TYPE_PKA 10 /* SCSI Adaptec 7895/7899 port */ #define SPDT$C_TYPE_PKR 11 /* Ramanujan CISS controller */ #define SPDT$C_TYPE_PKM 12 /* SCSI LSI Logic 1030 Port */ #define SPDT$C_TYPE_PGQ 13 /* QLogic ISP23xx FibreChannel port */ #define SPDT$C_TYPE_DE 14 /* iSCSI port driver */ #define SPDT$C_TYPE_GSP 15 /* X-54 HPVM Guest Storage Port (AVIO) */ #define SPDT$C_TYPE_PKD 16 /* AHCI SATA controller */ #define SPDT$C_TYPE_PGA 8 #define SPDT$M_PFLG_SYNCH 0x1 #define SPDT$M_PFLG_ASYNCH 0x2 #define SPDT$M_PFLG_MAPPING_REG 0x4 #define SPDT$M_PFLG_BUF_DMA 0x8 #define SPDT$M_PFLG_DIR_DMA 0x10 #define SPDT$M_PFLG_AEN 0x20 #define SPDT$M_PFLG_LUNS 0x40 #define SPDT$M_PFLG_CMDQ 0x80 #define SPDT$M_PFLG_AUTOSENSE 0x100 #define SPDT$M_PFLG_PORT_AUTOSENSE 0x200 #define SPDT$M_PFLG_SMART_PORT 0x400 #define SPDT$M_PFLG_DIPL 0x800 #define SPDT$M_PFLG_64BIT_LUNS 0x1000 #define SPDT$M_PFLG_TRANSPORT 0xE000 #define SPDT$K_PARALLEL 0 #define SPDT$K_FIBRE_CHANNEL 1 #define SPDT$K_ISCSI 2 #define SPDT$K_SW_ISCSI 2 /* X-52 */ #define SPDT$K_HW_ISCSI 3 /* X-52 */ #define SPDT$K_SAS 4 /* X-52 */ /*F Bits 19:16 */ #define SPDT$M_PFLG_PATH_INFO 0x10000 #define SPDT$M_PFLG_MAXBCNT_OVERRIDE 0x20000 #define SPDT$M_PFLG_EXT_LUN 0x40000 #define SPDT$M_PFLG_IMP_QFULL 0x80000 #define SPDT$M_PFLG_SPL_CTX 0x100000 #define SPDT$M_PFLG_PERF_DATA 0x200000 #define SPDT$M_PFLG_GO_IO_CREDITS 0x400000 #define SPDT$M_STS_ONLINE 0x1 #define SPDT$M_STS_TIMOUT 0x2 #define SPDT$M_STS_ERLOGIP 0x4 #define SPDT$M_STS_CANCEL 0x8 #define SPDT$M_STS_POWER 0x10 #define SPDT$M_STS_BSY 0x20 #define SPDT$M_STS_FAILED 0x40 #define SPDT$M_STS_FIFOLCK 0x80 #define SPDT$M_STS_QWORK_TODO 0x100 #define SPDT$M_STS_RESET_ISSUED 0x200 #define SPDT$M_SPARE 0x400 #define SPDT$M_STS_MULTIHOST 0x800 #define SPDT$M_STS_TIMEOUT_SOON 0x1000 #define SPDT$M_STS_TIMEOUT_NOW 0x2000 #define SPDT$M_STS_SAW_TAPE 0x4000 #define SPDT$M_STS_FIRST_CONFIG 0x8000 #define SPDT$M_DIPL_RESET_IN_PROGRESS 0x1 #define SPDT$M_DIPL_RESET_FORK_INUSE 0x2 #define SPDT$M_DIPL_RESET_DETECTED_WAIT 0x4 #define SPDT$M_DIPL_STDT_SCDT 0x8 #define SPDT$M_DIPL_RESET_CU_FORK_INUSE 0x10 #define SPDT$C_VEC_START 88 /** Start of SCSI Vector Table; used by SCSIDEBUG */ #define SPDT$C_CD_ABORT_COMMAND 0 /*I Index in Class Driver vector table */ #define SPDT$C_CD_BUFFER_MAP 1 /*I Index in Class Driver vector table */ #define SPDT$C_CD_BUFFER_UNMAP 2 /*I Index in Class Driver vector table */ #define SPDT$C_CD_CMD_BUFFER_ALLOC 3 /*I Index in Class Driver vector table */ #define SPDT$C_CD_CMD_BUFFER_DEALLOC 4 /*I Index in Class Driver vector table */ #define SPDT$C_CD_CONNECT 5 /*I Index in Class Driver vector table */ #define SPDT$C_CD_CONNECTION_CHAR_GET 6 /*I Index in Class Driver vector table */ #define SPDT$C_CD_CONNECTION_CHAR_SET 7 /*I Index in Class Driver vector table */ #define SPDT$C_CD_DISCONNECT 8 /*I Index in Class Driver vector table */ #define SPDT$C_CD_QUEUE_FLUSH 9 /*I Index in Class Driver vector table */ #define SPDT$C_CD_QUEUE_FREEZE 10 /*I Index in Class Driver vector table */ #define SPDT$C_CD_QUEUE_RELEASE 11 /*I Index in Class Driver vector table */ #define SPDT$C_CD_RESET_DEVICE 12 /*I Index in Class Driver vector table */ #define SPDT$C_CD_RESET_SCSI_BUS 13 /*I Index in Class Driver vector table */ #define SPDT$C_CD_SEND_COMMAND 14 /*I Index in Class Driver vector table */ #define SPDT$C_CD_INITIAL_PROCESSING 15 /*I Index in Class Driver vector table */ #define SPDT$C_CD_GET_PATH_INFO 16 /*I Index in Class Driver vector table */ #define SPDT$C_CD_SCSIPATH_CONNECT 17 /*I Index in Class Driver vector table */ #define SPDT$C_CD_GET_PORT_WWID 18 /*I Index in Class Driver vector table */ #define SPDT$C_CD_FP_REQUEST 19 /*I Index in Class Driver vector table */ #define SPDT$C_CD_FP_SEND 20 /*I Index in Class Driver vector table */ #define SPDT$C_CD_FP_FREE_RBUN 21 /*I Index in Class Driver vector table */ #define SPDT$C_CD_CANCEL 21 /*I Index in Class Driver vector table */ #define SPDT$C_CD_VECTOR_RESERVED 22 /*I Index in Class Driver vector table */ #define SPDT$C_PK_ABORT_COMMAND 0 #define SPDT$C_PK_CMD_BUFFER_ALLOC 1 #define SPDT$C_PK_CMD_BUFFER_DEALLOC 2 #define SPDT$C_PK_CMD_WAIT_COMPLETION 3 #define SPDT$C_PK_CONNECT 4 #define SPDT$C_PK_CONNECTION_CHAR_SET 5 #define SPDT$C_PK_INIT_SPDT 6 #define SPDT$C_PK_INIT_STDT 7 #define SPDT$C_PK_NEGOTIATE_SYNCH 8 #define SPDT$C_PK_QUEUE_FLUSH 9 #define SPDT$C_PK_QUEUE_FREEZE 10 #define SPDT$C_PK_QUEUE_RELEASE 11 #define SPDT$C_PK_RESET_SCSI_BUS 12 #define SPDT$C_PK_SEND_COMMAND 13 #define SPDT$C_PK_GET_PATH_INFO 14 #define SPDT$C_PK_FP_REQUEST 15 #define SPDT$C_PK_FP_SEND 16 #define SPDT$C_PK_FP_FREE_RBUN 17 #define SPDT$C_PK_FP_CMD_WAIT_COMP 18 #define SPDT$C_PK_FP_KP_COMPLETION 19 #define SPDT$C_PK_ALLOC_POOL 20 #define SPDT$C_PK_FREE_POOL 21 #define SPDT$C_PK_SCSI_COMMAND 22 #define SPDT$C_PK_CANCEL 23 #define SPDT$C_PK_TRIGGER 24 #define SPDT$C_PK_TARGET_DISCONNECT 25 #define SPDT$C_PK_VECTOR_RESERVED 26 #define SPDT$K_STDT_HASH_SIZE 16 /* Size of STDT_HASH_TABLE. */ #define SPDT$K_STDT_HASH_BITBASE 0 /* Start bit of hash mask. */ #define SPDT$K_STDT_HASH_BITCNT 4 /* Number of bits in hash mask. */ #define SPDT$K_STDT_HASH_BITMASK 15 /* Bit mask for the hash value. */ /* */ #define SPDT$K_CMD_SLOTS 255 /* Total number of command slot allocation bits. */ #define SPDT$S_CMD_BITS 32 /* Total byte count of command slot allocation bit map. */ #define SPDT$C_PKSLENGTH 936 /* SIZE OF SPDT */ #define SPDT$C_PKCLENGTH 936 /* SIZE OF SPDT */ #define SPDT$C_PKNLENGTH 936 /* SIZE OF SPDT */ #define SPDT$S_SPDTDEF 936 /* Old size name, synonym for SPDT$S_SPDT */ #ifdef __cplusplus /* Define structure prototypes */ struct _spl; struct _adp; struct _crab; struct _cram; struct _idb; struct _ucb; struct _scdt; struct _sdbg; struct _scsi_rbun; struct _pte; struct _scdrp; #endif /* #ifdef __cplusplus */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif typedef struct _spdt { #pragma __nomember_alignment struct _spdt *spdt$l_flink; /*O Link to next SCSI SPDT */ unsigned int spdt$l_version_check; /*I Value used to check driver versions */ unsigned short int spdt$w_size; /*I Structure size in bytes */ unsigned char spdt$b_type; /*I Structure type */ unsigned char spdt$b_subtyp; /*I Structure subtype */ /* */ /* SCSI Port Identification. */ /* */ unsigned short int spdt$w_spdt_type; /*I Type of SPDT */ char spdt$t_spdtdef_align_1 [2]; unsigned int spdt$l_scsi_port_id; /*I SCSI port ID. (A..Z) */ unsigned int spdt$l_scsi_bus_id; /*I Mask value of host ID (parallel only) */ __union { unsigned int spdt$is_scsi_id_num; /*I SCSI bus ID numeric value */ unsigned __int64 spdt$q_scsi_id_num; /*I SCSI bus ID for wide devices, - */ } spdt$r_scsi_id_overlay; /*I or high SCSI ID's */ /* */ /* Define the port characteristics and status. */ /* */ __union { unsigned int spdt$l_port_flags; /*F Port specific flags. */ __struct { /*F Bits 03:00 */ unsigned spdt$v_pflg_synch : 1; /*F Supports synchronous mode. */ unsigned spdt$v_pflg_asynch : 1; /*F Supports asynchronous mode. */ unsigned spdt$v_pflg_mapping_reg : 1; /*F Supports mapping registers. */ unsigned spdt$v_pflg_buf_dma : 1; /*F Supports buffered DMA. */ /*F Bits 07:04 */ unsigned spdt$v_pflg_dir_dma : 1; /*F Supports direct DMA. */ unsigned spdt$v_pflg_aen : 1; /*F Supports Async Event Notification */ unsigned spdt$v_pflg_luns : 1; /*F Supports LUNS */ unsigned spdt$v_pflg_cmdq : 1; /*F Set if port supports command queueing. */ /*F Bits 11:08 */ unsigned spdt$v_pflg_autosense : 1; /*F Set if the port driver supports autosense. Tested by class drivers. */ unsigned spdt$v_pflg_port_autosense : 1; /*F Set if port specific hardware/software supports autosense. */ unsigned spdt$v_pflg_smart_port : 1; /*F Set if the port hardware is an intelligent SCSI adapter. */ unsigned spdt$v_pflg_dipl : 1; /*F Set if the port stalls at DIPL .vs. FORK */ /*F Bits 15:12 */ unsigned spdt$v_pflg_64bit_luns : 1; /*F Supports 64-bit LUNs. */ unsigned spdt$v_pflg_transport : 3; /*F Physical transport (parallel, FC etc) */ unsigned spdt$v_pflg_path_info : 1; /*F Accepts connects via sc$scsipath_connect */ unsigned spdt$v_pflg_maxbcnt_override : 1; /*F Port override for max byte count */ unsigned spdt$v_pflg_ext_lun : 1; /*F Supports external LUNs */ unsigned spdt$v_pflg_imp_qfull : 1; /*F Improved (over SCSI-2 Queue Manager) Queue Full handling */ /*F Bits 23:20 */ unsigned spdt$v_pflg_spl_ctx : 1; /*F Port uses Fork-Port-Dyn spinlock context model */ unsigned spdt$v_pflg_perf_data : 1; /*F Port collects performance data */ unsigned spdt$v_pflg_go_io_credits : 1; /*F Port restarts class driver for I/O credits */ unsigned spdt$v_pflg_bit_23 : 1; /*F Placeholder */ /*F Bits 27:24 */ unsigned spdt$v_pflg_bit_24 : 1; /*F Placeholder */ unsigned spdt$v_pflg_bit_25 : 1; /*F Placeholder */ unsigned spdt$v_pflg_bit_26 : 1; /*F Placeholder */ unsigned spdt$v_pflg_bit_27 : 1; /*F Placeholder */ /*F Bits 31:28 */ unsigned spdt$v_pflg_bit_28 : 1; /*F Placeholder */ unsigned spdt$v_pflg_bit_29 : 1; /*F Placeholder */ unsigned spdt$v_pflg_bit_30 : 1; /*F Placeholder */ unsigned spdt$v_pflg_bit_31 : 1; /*F Placeholder */ } spdt$r_fill_1_; } spdt$r_fill_0_; __union { unsigned int spdt$l_sts; /*F Port device status */ __struct { unsigned spdt$v_sts_online : 1; /*F Unit online (1=yes) */ unsigned spdt$v_sts_timout : 1; /*F Unit timed out (1=yes) */ unsigned spdt$v_sts_erlogip : 1; /*F Error log in progress on unit (1=yes) */ unsigned spdt$v_sts_cancel : 1; /*F Cancel I/O on unit (1=yes) */ unsigned spdt$v_sts_power : 1; /*F Power failed while unit busy (1=yes) */ unsigned spdt$v_sts_bsy : 1; /*F Unit is busy (1=yes) */ unsigned spdt$v_sts_failed : 1; /*F Port failed operation or initialization. */ unsigned spdt$v_sts_fifolck : 1; /*F N53C94 FIFO in use */ unsigned spdt$v_sts_qwork_todo : 1; /*F Set when queue manager has more work to do. */ unsigned spdt$v_sts_reset_issued : 1; /*F Set when PORT issues a reset. */ unsigned spdt$v_spare : 1; /*F placeholder for obsolete field */ unsigned spdt$v_sts_multihost : 1; /*F Multiple hosts (for SCSI clusters) */ unsigned spdt$v_sts_timeout_soon : 1; /*F I/O's to SCSI Port adapter will time out soon */ unsigned spdt$v_sts_timeout_now : 1; /*F I/O's to SCSI Port adapter are timing out now */ unsigned spdt$v_sts_saw_tape : 1; /*F At one time (and maybe now) a tape was seen */ unsigned spdt$v_sts_first_config : 1; /*F IOGEN$SCS_CONFIG has run once */ } spdt$r_fill_3_; } spdt$r_fill_2_; __union { unsigned int spdt$l_dipl_sts; /*D Port device status manipulated at DIPL */ __struct { unsigned spdt$v_dipl_reset_in_progress : 1; /*D Bus Reset in progress */ unsigned spdt$v_dipl_reset_fork_inuse : 1; /*D Bus Reset fork block in use */ unsigned spdt$v_dipl_reset_detected_wait : 1; /*D External reset wait in progress */ unsigned spdt$v_dipl_stdt_scdt : 1; /*D Deallocation of either SCDT or STDT */ unsigned spdt$v_dipl_reset_cu_fork_inuse : 1; /*D Bus Reset Cleanup fork block in use */ unsigned spdt$v_fill_8_ : 3; } spdt$r_fill_5_; } spdt$r_fill_4_; unsigned int spdt$is_flck; /*I Fork lock index */ struct _spl *spdt$l_dlck; /*I Device lock address */ unsigned char spdt$b_dipl; /*I Device IPL */ char spdt$t_spdtdef_align_2 [3]; unsigned int spdt$is_savipl; /*I Saved IPL */ unsigned short int spdt$iw_erl_type; /*I ERL$DEVICEATN type/subtype codes */ char spdt$t_spdtdef_align_3 [2]; unsigned int spdt$is_crctx_shift; /*F Counted res. size, as a shift factor */ unsigned int spdt$is_crctx_bwp_mask; /*F Counted res. size, as a BWP mask */ unsigned int spdt$is_scsi_int_msk; /*F Port-specific interrupt mask */ unsigned int spdt$l_maxbytecnt; /*I Maximum byte count for a transfer. */ unsigned int spdt$l_max_fp_bcnt; /*F Maximum byte count for a FastPath transfer. */ unsigned int spdt$l_timeout_count; /*F Counted of I/O's about to time out */ /* */ /* The SCSI Port Interface entry points follow. These entry */ /* points are fork entry points that the class driver envokes */ /* to execute port specific functions. */ /* */ /* Vectors are now also identified by a constant index so they */ /* can be referenced in a table of copied pointers, whether the */ /* pointers are longword or quadword */ /* */ __union { __struct { int (*spdt$ps_cd_abort_command)(); /*I Abort outstanding cmd. */ int (*spdt$ps_cd_buffer_map)(); /*I Map a buffer for read or write transfer */ int (*spdt$ps_cd_buffer_unmap)(); /*I Unmap a buffer */ int (*spdt$ps_cd_cmd_buffer_alloc)(); /*I Allocate a message buffer */ int (*spdt$ps_cd_cmd_buffer_dealloc)(); /*I Deallocate buffer */ int (*spdt$ps_cd_connect)(); /*I Request connection to target. */ int (*spdt$ps_cd_connection_char_get)(); /*I Get connect char. */ int (*spdt$ps_cd_connection_char_set)(); /*I Set connect char. */ int (*spdt$ps_cd_disconnect)(); /*I Break connection. */ int (*spdt$ps_cd_queue_flush)(); /*I Address of SC$FLUSH_QUEUE in the port driver. */ int (*spdt$ps_cd_queue_freeze)(); /*I Address of SC$FREEZE_QUEUE in the port driver. */ int (*spdt$ps_cd_queue_release)(); /*I Address of SC$RELEASE_QUEUE in the port driver. */ int (*spdt$ps_cd_reset_device)(); /*I Perform a device reset. */ int (*spdt$ps_cd_reset_scsi_bus)(); /*I Maintenace reset of port */ int (*spdt$ps_cd_send_command)(); /*I Start processing a SCSI command on the device. */ int (*spdt$ps_cd_initial_processing)(); /*I Perform a tolerant INQUIRY command */ int (*spdt$ps_cd_get_path_info)(); /*I Fetch target and LUN */ int (*spdt$ps_cd_scsipath_connect)(); /*I Connect using path info */ int (*spdt$ps_cd_get_port_wwid)(); /*I Request a given port's World Wide ID */ int (*spdt$ps_cd_fp_request)(); /*I Get permission to FastPath request. */ int (*spdt$ps_cd_fp_send)(); /*I Start processing a FastPath SCSI command on device. */ int (*spdt$ps_cd_fp_free_rbun)(); /*I Deallocate FastPath buffer */ int (*spdt$ps_cd_cancel)(); /*I Cancel I/O on port */ /* If you add a vector here, update the symbol used to define CD_VECTOR_RESERVED below */ int (*spdt$ps_cd_vector_reserved [9])(); /*I Reserved class driver interface vectors */ } spdt$r_cd_vectors_struct; int (*spdt$ps_cd_vectors [23])(); } spdt$r_cd_vectors_union; /* */ /* The SCSI Port Interface entry points follow. These entry */ /* points are the entry points from SCSI2COMMON and SCSI2SUBS into */ /* the port specific routines. */ /* */ __union { __struct { int (*spdt$ps_pk_abort_command)(); /*I Abort the outstanding requests. */ int (*spdt$ps_pk_cmd_buffer_alloc)(); /*I Allocate a command buffer. */ int (*spdt$ps_pk_cmd_buffer_dealloc)(); /*I Deallocate a command buffer. */ int (*spdt$ps_pk_cmd_wait_completion)(); /*I Wait for the SCSI request to complete. */ int (*spdt$ps_pk_connect)(); /*I Complete connection and SCDT initialization. */ int (*spdt$ps_pk_connection_char_set)(); /*I Finish setting the connection characteristics. */ int (*spdt$ps_pk_init_spdt)(); /*I Complete SPDT initialization. */ int (*spdt$ps_pk_init_stdt)(); /*I Complete STDT initialization. */ int (*spdt$ps_pk_negotiate_synch)(); /*I Re-negotiate the transfer mode */ int (*spdt$ps_pk_queue_flush)(); /*I Flush the device queue. */ int (*spdt$ps_pk_queue_freeze)(); /*I Freeze the device queue. */ int (*spdt$ps_pk_queue_release)(); /*I Release the device queue. */ int (*spdt$ps_pk_reset_scsi_bus)(); /*I Reset the SCSI bus. */ int (*spdt$ps_pk_send_command)(); /*I Initiate the SCSI request. */ int (*spdt$ps_pk_get_path_info)(); /*I Fetch target and LUN. */ int (*spdt$ps_pk_fp_request)(); /*I Get permission to FastPath request. */ int (*spdt$ps_pk_fp_send)(); /*I Start processing a FastPath SCSI command on device. */ int (*spdt$ps_pk_fp_free_rbun)(); /*I Deallocate FastPath buffer */ int (*spdt$ps_pk_fp_cmd_wait_comp)(); /*I Wait for the FastPath request to complete. */ void (*spdt$ps_pk_fp_kp_completion)(); /*I Complete FastPath request in KP context [X-37] */ void *(*spdt$ps_pk_alloc_pool)(); /*I Allocate non-paged pool (X-46) */ void *(*spdt$ps_pk_free_pool)(); /*I Deallocate non-paged pool (X-46) */ int (*spdt$ps_pk_scsi_command)(); /*I SCSI command (X-46) */ int (*spdt$ps_pk_cancel)(); /*I Cancel I/O on port */ int (*spdt$ps_pk_trigger)(); /*I Trigger analyzer */ /* X-46A1a */ int (*spdt$ps_pk_target_disconnect)(); /*I Disconnect a target (STDT) */ /* If you add a vector here, update the symbol used to define PK_VECTOR_RESERVED below */ /* Dimension decremented from 10 to 9 for PK_FP_COMPLETION in X-37 */ /* Dimension decremented from 9 to 6 for PK_ALLOC_POOL, PK_FREE_POOL, and */ /* PK_SCSI_COMMAND in X-46 */ /* Dimension decremented from 6 to 5 for PK_CANCEL in X-47 */ /* Dimension decremented from 5 to 4 for PK_TRIGGER in X-50 */ /* Dimension decremented from 4 to 3 for PK_TARGET_DISCONNECT in X-50/X-46A1b */ int (*spdt$ps_pk_vector_reserved [3])(); /*I Reserved port driver interface vectors */ } spdt$r_pk_vectors_struct; int (*spdt$ps_pk_vectors [27])(); } spdt$r_pk_vectors_union; /* */ /* The "runtime library" entry point interface follows. These entry */ /* points are called by the port specific driver routines to perform */ /* support functions. */ /* */ int (*spdt$ps_rl_check_cmdq_status)(); /*I Check CMDQ status processing */ int (*spdt$ps_rl_check_ondeck_blocked)(); /*I Check if ONDECK_KPB is blocked */ int (*spdt$ps_rl_cmd_slot_alloc)(); /*I Allocate a command slot */ int (*spdt$ps_rl_cmd_slot_dealloc)(); /*I Deallocate a command slot */ int (*spdt$ps_rl_create_port)(); /*I Create a new SPDT for a new SCSI port */ int (*spdt$ps_rl_pool_alloc)(); /*I Allocate non-paged pool */ int (*spdt$ps_rl_pool_alloc_physical)(); /*I Allocate non-paged pool of physically contigous memory */ int (*spdt$ps_rl_pool_dealloc)(); /*I Deallocate non-paged pool */ int (*spdt$ps_rl_init_scdrp)(); /*I Initialize SCDRP for port usage */ int (*spdt$ps_rl_timeout_setup_tqe)(); /*I Initialize port timer */ int (*spdt$ps_rl_queue_reset_dipl)(); /*I Queue device reset from DIPL */ int (*spdt$ps_rl_queue_reset_fork)(); /*I Queue device reset from FORK */ int (*spdt$ps_rl_reset_detected_dipl)(); /*I Bus reset detected from DIPL */ int (*spdt$ps_rl_reset_detected_fork)(); /*I Bus reset detected from FORK */ int (*spdt$ps_rl_reset_detected_wait)(); /*I Bus reset detected wait request */ int (*spdt$ps_rl_vector_reserved [10])(); /*I Reserved "Runtime Library" vectors */ /* */ /* Wait queues */ /* */ void *spdt$l_port_wqfl; /*F Port wait queue forward link */ void *spdt$l_port_wqbl; /*F Port wait queue backward link */ struct _fkb *spdt$l_waitqfl; /*F Listhead for fork blocks waiting */ struct _fkb *spdt$l_waitqbl; /*F For nonpaged pool */ void *spdt$ps_reset_wait_list; /*D Single-Linked-List for bus reset waiters */ /* */ /* Related Port Data Structures. */ /* */ struct _adp *spdt$l_adp; /*I Address of ADP */ struct _crab *spdt$ps_crab; /*I Address of CRAB */ struct _cram *spdt$ps_port_cram; /*I Address of CRAM */ struct _idb *spdt$l_port_idb; /*I Address of port IDB. */ struct _ucb *spdt$l_port_ucb; /*I Address of port UCB. */ struct _scdt *spdt$ps_erl_scdt; /*F SCDT address for error logging operation */ struct _sdbg *spdt$l_scsi_debug; /*F SCSIDEBUG data structure pointer */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif struct _scsi_rbun *spdt$ps_rbun_lal; /*P X-48 Listhead for available RBUNs */ #pragma __nomember_alignment unsigned int spdt$l_rbun_lal_seqnum; /*P Sequence number for RBUN_LAL */ void *spdt$ps_qman_kpb; /*F Queue manager's KPB address. */ void *spdt$ps_chip_kpb; /*S KPB address that owns the SCSI chip. */ void *spdt$ps_ondeck_kpb; /*S KPB address that is waiting for the SCSI chip. */ struct _spl *spdt$ps_spl_port; /*I Port spinlock address */ /* */ /* This TQE is used by the port driver to timeout pending disconnected IO's */ /* When this TQE expires, the timer thread will timeout expired pending IO's. */ /* */ unsigned char spdt$b_tqe [64]; /*F Timer queue entry */ unsigned int spdt$l_tqe_delay; /*F Delay time for next TQE delay. */ /* */ /* Define the reset fork block */ /* */ char spdt$t_fkb_quad_align_fill [4]; FKB spdt$r_reset_fkb; /*I Embedded quadword aligned reset fork block */ /* */ /* Define a SCSI bus-reset-cleanup fork block */ /* */ FKB spdt$r_reset_cleanup_fkb; /*I Embedded quadword aligned reset cleanup fork block */ /* */ /* Port specific DMA information. */ /* */ void *spdt$l_dma_base; /*F Base address of DMA buffer */ void *spdt$l_spte_base; /*F S0 base address of buffer */ struct _pte *spdt$l_spte_svapte; /*F SVAPTE of 1st SPTE used to double map */ unsigned int spdt$is_extmapreg; /*F Extra (guard etc.) map regs needed */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif unsigned __int64 spdt$q_read_pad_ba; /*F Bus address of black hole page */ unsigned __int64 spdt$q_write_pad_ba; /*F Bus address of erase page */ /* */ /* SCSI port event counters */ /* */ /* These counters are for events that are characteristic of the */ /* port not a connection and that don't need to be recorded on */ /* a connection by connection basis. */ /* */ #pragma __nomember_alignment unsigned int spdt$l_tarrst_cnt; /*F Count of target initiated bus resets. */ unsigned int spdt$l_retry_cnt; /*F Count of total number of retry attempts. */ unsigned int spdt$l_stray_int_cnt; /*F Count of interrupts when no owner of chan. */ unsigned int spdt$l_unexp_int_cnt; /*F Count of unexpected interrupts when chan owned. */ unsigned int spdt$l_nodiscon_cnt; /*F Count of reselections when not disconnected. */ unsigned int spdt$is_event_cnt; /*F Count number of events this interrupt. */ int spdt$is_total_io_count; /*F Total outstanding I/O count (DEVICE_QUEUE & PORT_QUEUE). */ int spdt$is_port_io_count; /*F Count of I/Os currently on all PORT_QUEUEs. */ int spdt$is_dev_io_count; /*F Count of I/Os currently on all DEVICE_QUEUEs. */ int spdt$is_queue_spins; /*F Number of loops through the queue manager. */ int spdt$is_queue_exits; /*F Number of times the queue manager has exited. */ /* */ /* STDT hash table information. */ /* */ /* Number of bits in the hash value */ /* Changed from 3 to 4 for high SCSI Id's */ /* Starting position of those bits. */ void *spdt$ps_stdt_hash_table [16]; /*F STDT hash table. */ /* Command buffer slot information. */ /* */ /* The following fields are used to manage allocation of command */ /* buffer slots, for port drivers that require that concept. */ /* */ void *spdt$ps_cmd_base; /*I Base address of CMD buffers */ struct _spdt *spdt$ps_cmd_spdt; /*I The SPDT that manages command slots */ void *spdt$ps_cmdwtfl; /*F Wait queue forward pointer */ void *spdt$ps_cmdwtbl; /*F Wait queue backward pointer */ /* Total number of command slots. */ /* Total longwords for command slot allocation bit map. */ unsigned int spdt$il_cmd_bits [8]; /*F Command slot allocation bit map. */ /* Create max bus & bus config width for - */ /* high SCSI ID's */ __union { unsigned int spdt$l_scsi_bus_widths; /*F SCSI bus width related values */ __struct { unsigned short int spdt$iw_max_bus_width; /*F Maximum supported by adapter */ unsigned short int spdt$iw_config_bus_width; /*F Maximum supported as configured */ } spdt$r_fill_7_; } spdt$r_fill_6_; /*F */ unsigned int spdt$l_scsi_auto_id; /*F SCSI ID of device for which LUN autoconfig is inhibited */ struct _spl *spdt$ps_spl_fork; /*I Fork spinlock address */ int spdt$l_fp_cdb_length; /* CDB length supported on FastPath, 0 if variable */ struct _fkb *spdt$ps_fp_kpb_fkb; /* Fork/wait block used to allocate & start FastPath KPBs */ struct _scdrp *spdt$ps_fp_kpb_wqfl; /* FastPath KPB Wait Queue forward link */ struct _scdrp *spdt$ps_fp_kpb_wqbl; /* FastPath KPB Wait Queue backward link */ /* */ /* Save some space for future expansion. Reserved to Digital, ALPHA/VMS development. */ /* */ int spdt$l_rsvd_long [3]; /*F Port specific space that may be used for any purpose. */ /* */ /* Save some space for Port specific extensions. */ /* */ int spdt$l_port_specific [3]; /*F Port specific space that may be used for any purpose. */ /* */ /* Define the length of this structure. */ /* */ void *spdt$ps_first_stdt; /*F First STDT on which to to try to start I/O */ void *spdt$ps_qdepth_table; /*F Address of a port-specific queue depth table */ int ((*(*spdt$ps_pk_intercept)))(); /*I Intercepted class driver vectors */ int ((*(*spdt$ps_cd_intercept)))(); /*I Intercepted port driver vectors */ int spdt$l_def_spl_ctx; /*I Default spinlock context */ struct _spl *spdt$ps_spl_dyn; /*I Dynamic spinlock address */ } SPDT; #if !defined(__VAXC) #define spdt$is_scsi_id_num spdt$r_scsi_id_overlay.spdt$is_scsi_id_num #define spdt$q_scsi_id_num spdt$r_scsi_id_overlay.spdt$q_scsi_id_num #define spdt$l_port_flags spdt$r_fill_0_.spdt$l_port_flags #define spdt$v_pflg_synch spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_synch #define spdt$v_pflg_asynch spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_asynch #define spdt$v_pflg_mapping_reg spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_mapping_reg #define spdt$v_pflg_buf_dma spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_buf_dma #define spdt$v_pflg_dir_dma spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_dir_dma #define spdt$v_pflg_aen spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_aen #define spdt$v_pflg_luns spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_luns #define spdt$v_pflg_cmdq spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_cmdq #define spdt$v_pflg_autosense spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_autosense #define spdt$v_pflg_port_autosense spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_port_autosense #define spdt$v_pflg_smart_port spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_smart_port #define spdt$v_pflg_dipl spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_dipl #define spdt$v_pflg_64bit_luns spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_64bit_luns #define spdt$v_pflg_transport spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_transport #define spdt$v_pflg_path_info spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_path_info #define spdt$v_pflg_maxbcnt_override spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_maxbcnt_override #define spdt$v_pflg_ext_lun spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_ext_lun #define spdt$v_pflg_imp_qfull spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_imp_qfull #define spdt$v_pflg_spl_ctx spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_spl_ctx #define spdt$v_pflg_perf_data spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_perf_data #define spdt$v_pflg_go_io_credits spdt$r_fill_0_.spdt$r_fill_1_.spdt$v_pflg_go_io_credits #define spdt$l_sts spdt$r_fill_2_.spdt$l_sts #define spdt$v_sts_online spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_online #define spdt$v_sts_timout spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_timout #define spdt$v_sts_erlogip spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_erlogip #define spdt$v_sts_cancel spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_cancel #define spdt$v_sts_power spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_power #define spdt$v_sts_bsy spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_bsy #define spdt$v_sts_failed spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_failed #define spdt$v_sts_fifolck spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_fifolck #define spdt$v_sts_qwork_todo spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_qwork_todo #define spdt$v_sts_reset_issued spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_reset_issued #define spdt$v_spare spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_spare #define spdt$v_sts_multihost spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_multihost #define spdt$v_sts_timeout_soon spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_timeout_soon #define spdt$v_sts_timeout_now spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_timeout_now #define spdt$v_sts_saw_tape spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_saw_tape #define spdt$v_sts_first_config spdt$r_fill_2_.spdt$r_fill_3_.spdt$v_sts_first_config #define spdt$l_dipl_sts spdt$r_fill_4_.spdt$l_dipl_sts #define spdt$v_dipl_reset_in_progress spdt$r_fill_4_.spdt$r_fill_5_.spdt$v_dipl_reset_in_progress #define spdt$v_dipl_reset_fork_inuse spdt$r_fill_4_.spdt$r_fill_5_.spdt$v_dipl_reset_fork_inuse #define spdt$v_dipl_reset_detected_wait spdt$r_fill_4_.spdt$r_fill_5_.spdt$v_dipl_reset_detected_wait #define spdt$v_dipl_stdt_scdt spdt$r_fill_4_.spdt$r_fill_5_.spdt$v_dipl_stdt_scdt #define spdt$v_dipl_reset_cu_fork_inuse spdt$r_fill_4_.spdt$r_fill_5_.spdt$v_dipl_reset_cu_fork_inuse #define spdt$r_cd_vectors_struct spdt$r_cd_vectors_union.spdt$r_cd_vectors_struct #define spdt$ps_cd_abort_command spdt$r_cd_vectors_struct.spdt$ps_cd_abort_command #define spdt$ps_cd_buffer_map spdt$r_cd_vectors_struct.spdt$ps_cd_buffer_map #define spdt$ps_cd_buffer_unmap spdt$r_cd_vectors_struct.spdt$ps_cd_buffer_unmap #define spdt$ps_cd_cmd_buffer_alloc spdt$r_cd_vectors_struct.spdt$ps_cd_cmd_buffer_alloc #define spdt$ps_cd_cmd_buffer_dealloc spdt$r_cd_vectors_struct.spdt$ps_cd_cmd_buffer_dealloc #define spdt$ps_cd_connect spdt$r_cd_vectors_struct.spdt$ps_cd_connect #define spdt$ps_cd_connection_char_get spdt$r_cd_vectors_struct.spdt$ps_cd_connection_char_get #define spdt$ps_cd_connection_char_set spdt$r_cd_vectors_struct.spdt$ps_cd_connection_char_set #define spdt$ps_cd_disconnect spdt$r_cd_vectors_struct.spdt$ps_cd_disconnect #define spdt$ps_cd_queue_flush spdt$r_cd_vectors_struct.spdt$ps_cd_queue_flush #define spdt$ps_cd_queue_freeze spdt$r_cd_vectors_struct.spdt$ps_cd_queue_freeze #define spdt$ps_cd_queue_release spdt$r_cd_vectors_struct.spdt$ps_cd_queue_release #define spdt$ps_cd_reset_device spdt$r_cd_vectors_struct.spdt$ps_cd_reset_device #define spdt$ps_cd_reset_scsi_bus spdt$r_cd_vectors_struct.spdt$ps_cd_reset_scsi_bus #define spdt$ps_cd_send_command spdt$r_cd_vectors_struct.spdt$ps_cd_send_command #define spdt$ps_cd_initial_processing spdt$r_cd_vectors_struct.spdt$ps_cd_initial_processing #define spdt$ps_cd_get_path_info spdt$r_cd_vectors_struct.spdt$ps_cd_get_path_info #define spdt$ps_cd_scsipath_connect spdt$r_cd_vectors_struct.spdt$ps_cd_scsipath_connect #define spdt$ps_cd_get_port_wwid spdt$r_cd_vectors_struct.spdt$ps_cd_get_port_wwid #define spdt$ps_cd_fp_request spdt$r_cd_vectors_struct.spdt$ps_cd_fp_request #define spdt$ps_cd_fp_send spdt$r_cd_vectors_struct.spdt$ps_cd_fp_send #define spdt$ps_cd_fp_free_rbun spdt$r_cd_vectors_struct.spdt$ps_cd_fp_free_rbun #define spdt$ps_cd_cancel spdt$r_cd_vectors_struct.spdt$ps_cd_cancel #define spdt$ps_cd_vectors spdt$r_cd_vectors_union.spdt$ps_cd_vectors #define spdt$r_pk_vectors_struct spdt$r_pk_vectors_union.spdt$r_pk_vectors_struct #define spdt$ps_pk_abort_command spdt$r_pk_vectors_struct.spdt$ps_pk_abort_command #define spdt$ps_pk_cmd_buffer_alloc spdt$r_pk_vectors_struct.spdt$ps_pk_cmd_buffer_alloc #define spdt$ps_pk_cmd_buffer_dealloc spdt$r_pk_vectors_struct.spdt$ps_pk_cmd_buffer_dealloc #define spdt$ps_pk_cmd_wait_completion spdt$r_pk_vectors_struct.spdt$ps_pk_cmd_wait_completion #define spdt$ps_pk_connect spdt$r_pk_vectors_struct.spdt$ps_pk_connect #define spdt$ps_pk_connection_char_set spdt$r_pk_vectors_struct.spdt$ps_pk_connection_char_set #define spdt$ps_pk_init_spdt spdt$r_pk_vectors_struct.spdt$ps_pk_init_spdt #define spdt$ps_pk_init_stdt spdt$r_pk_vectors_struct.spdt$ps_pk_init_stdt #define spdt$ps_pk_negotiate_synch spdt$r_pk_vectors_struct.spdt$ps_pk_negotiate_synch #define spdt$ps_pk_queue_flush spdt$r_pk_vectors_struct.spdt$ps_pk_queue_flush #define spdt$ps_pk_queue_freeze spdt$r_pk_vectors_struct.spdt$ps_pk_queue_freeze #define spdt$ps_pk_queue_release spdt$r_pk_vectors_struct.spdt$ps_pk_queue_release #define spdt$ps_pk_reset_scsi_bus spdt$r_pk_vectors_struct.spdt$ps_pk_reset_scsi_bus #define spdt$ps_pk_send_command spdt$r_pk_vectors_struct.spdt$ps_pk_send_command #define spdt$ps_pk_get_path_info spdt$r_pk_vectors_struct.spdt$ps_pk_get_path_info #define spdt$ps_pk_fp_request spdt$r_pk_vectors_struct.spdt$ps_pk_fp_request #define spdt$ps_pk_fp_send spdt$r_pk_vectors_struct.spdt$ps_pk_fp_send #define spdt$ps_pk_fp_free_rbun spdt$r_pk_vectors_struct.spdt$ps_pk_fp_free_rbun #define spdt$ps_pk_fp_cmd_wait_comp spdt$r_pk_vectors_struct.spdt$ps_pk_fp_cmd_wait_comp #define spdt$ps_pk_fp_kp_completion spdt$r_pk_vectors_struct.spdt$ps_pk_fp_kp_completion #define spdt$ps_pk_alloc_pool spdt$r_pk_vectors_struct.spdt$ps_pk_alloc_pool #define spdt$ps_pk_free_pool spdt$r_pk_vectors_struct.spdt$ps_pk_free_pool #define spdt$ps_pk_scsi_command spdt$r_pk_vectors_struct.spdt$ps_pk_scsi_command #define spdt$ps_pk_cancel spdt$r_pk_vectors_struct.spdt$ps_pk_cancel #define spdt$ps_pk_trigger spdt$r_pk_vectors_struct.spdt$ps_pk_trigger #define spdt$ps_pk_target_disconnect spdt$r_pk_vectors_struct.spdt$ps_pk_target_disconnect #define spdt$ps_pk_vectors spdt$r_pk_vectors_union.spdt$ps_pk_vectors #define spdt$l_scsi_bus_widths spdt$r_fill_6_.spdt$l_scsi_bus_widths #define spdt$iw_max_bus_width spdt$r_fill_6_.spdt$r_fill_7_.spdt$iw_max_bus_width #define spdt$iw_config_bus_width spdt$r_fill_6_.spdt$r_fill_7_.spdt$iw_config_bus_width #endif /* #if !defined(__VAXC) */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __SPDTDEF_LOADED */