/**/ /***************************************************************************/ /** **/ /** © 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:26:42 by OpenVMS SDL EV3-3 */ /* Source: 22-AUG-2005 16:11:30 $1$DGA7274:[LIB_H.SRC]STDTDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $STDTDEF ***/ #ifndef __STDTDEF_LOADED #define __STDTDEF_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 /*+ */ /* STDT - SCSI Target Descriptor Table */ /* */ /* There is one STDT per target. The STDT contains the SCSI information */ /* for each SCSI target. STDT's are created during the configuration of */ /* the SCSI bus. */ /* */ /* This structure is read accessable to the class driver and readable and */ /* writeable by the PORT driver. */ /* */ /* ***NOTE1:**** New STDT 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. */ /*- */ #define STDT$C_VERSION 6 /*COMPATIBLE VERSION NUMBER. */ #define STDT$M_DFLG_RENEGOTIATE_SYNC 0x1 #define STDT$M_DFLG_CLASS_REQ_SDTR 0x2 #define STDT$M_DFLG_SUPPRESS_SDTR 0x4 #define STDT$K_SCDT_HASH_SIZE 8 /* Size of SCDT_HASH_TABLE. */ #define STDT$K_SCDT_HASH_BITBASE 0 /* Start bit of hash mask. */ #define STDT$K_SCDT_HASH_BITCNT 3 /* Number of bits in hash mask. */ #define STDT$K_SCDT_HASH_BITMASK 7 /* Bit mask for the hash value. */ #define STDT$M_CNF_PENDING 0x1 #define STDT$M_CLASS_UNITS_PAUSED 0x2 #define STDT$M_UNTESTED_PRLI 0x4 #define STDT$M_TARGET_RESET_IP 0x8 #define STDT$M_PRLO_IND_IP 0x10 #define STDT$M_KEEP_NO_LUNS 0x20 #define STDT$C_SPAREQ 10 #define STDT$C_SPAREL 20 #define STDT$C_SPAREW 40 #define STDT$C_SPAREB 80 #define STDT$C_LENGTH 512 /* Length of STDT */ #ifdef __cplusplus /* Define structure prototypes */ struct _mbd; struct _fccd; struct _tqe; struct _spdt; struct _scdt; struct _fkb; struct _kpb; #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 _stdt { #pragma __nomember_alignment void *stdt$ps_hash_flink; /*I STDT hash list forward link */ void *stdt$ps_hash_blink; /*I STDT hash list backward link */ unsigned short int stdt$w_size; /*I Standard pool header - data structure size. */ unsigned char stdt$b_type; /*I Standard pool header - data structure type. */ unsigned char stdt$b_subtype; /*I Standard pool header - data structure subtype. */ /* */ /* Target Specific Information */ /* */ unsigned int stdt$is_target_id; /*I ID (bit#) of this SCSI target. */ __union { unsigned int stdt$is_scsi_id_num; /*I ID (number) of this SCSI target. */ unsigned __int64 stdt$q_scsi_id_num; /*I ID (number) of SCSI target for wide devices. */ } stdt$r_scsi_id_overlay; /*I */ /*I */ unsigned int stdt$is_reqack_offset; /*S reqack offset for sync IO */ unsigned int stdt$is_transfer_period; /*S m*4 nanoseconds */ unsigned int stdt$is_xferpd_data; /*S Port transfer period data */ unsigned int stdt$is_fast_data; /*S Port fast SCSI data (port specific) */ unsigned int stdt$is_wide; /*S Flag set enables WIDE data transfer mode. */ unsigned int stdt$is_bus_width; /*S Width of WIDE bus (8, 16, 32). */ __union { unsigned int stdt$is_dipl_flags; /*S Flags manipulated at DIPL. */ __struct { unsigned stdt$v_dflg_renegotiate_sync : 1; /* Re-negotiate asynchronous/synchronous operation. */ unsigned stdt$v_dflg_class_req_sdtr : 1; /* Class driver has requested SDTR. */ unsigned stdt$v_dflg_suppress_sdtr : 1; /* Class driver is suppressing SDTR. */ unsigned stdt$v_fill_4_ : 5; } stdt$r_fill_1_; } stdt$r_fill_0_; unsigned int stdt$is_requested_reqack_offset; /*S ack offset requested by class driver for sync IO */ unsigned int stdt$is_requested_xfer_period; /*S transfer period requested by class driver for synch IO */ /* */ /* Performance and sanity counters */ /* */ unsigned int stdt$is_scdt_count; /*F Count of SCDTs associated with this STDT. */ unsigned int stdt$is_dev_io_count; /*F Outstanding device queue I/O count for the target */ unsigned int stdt$is_port_io_count; /*F Outstanding port queue I/O count for the target */ unsigned int stdt$is_total_io_count; /*F Outstanding total I/O count for the target */ unsigned int stdt$is_reset_cnt; /*S Count of bus resets. */ /* */ /* Hash table for the SCDTs */ /* */ /* Number of bits in the hash value. */ /* Starting position of those bits. */ void *stdt$ps_scdt_hash_table [8]; /*F SCDT hash table. */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __int64 stdt$q_identity; /*F Identity quadword */ #pragma __nomember_alignment unsigned int stdt$l_status; /*F Target/ID/FC-LA status */ unsigned int stdt$l_hash_index; /*F Hash index of this STDT's root STDT */ /*F in the SPDT's STDT hash table */ /* */ /* PGADRIVER needs more room in the STDT than the stock structure allowed. I've */ /* overlaid the port-specific extension which was already here with PGADRIVER */ /* specific data and created a symbol to define the number of long */ /* */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __union { /*F Port specific space that may be used for any purpose. */ /* Save starting port-specific offset */ #pragma __nomember_alignment __struct { unsigned __int64 stdt$q_suspended_time; /*F Low longword of time when suspended */ /*F High longword of time when suspended */ int stdt$l_prli_status; /*F PRLI status of this FC-LA */ int stdt$l_prli_retries; /*F PRLI retries left */ struct _mbd *stdt$ps_prli_rsp_mbd; /*F Pointer to PRLI response MBD */ struct _fccd *stdt$ps_prli_fccd; /*F Pointer to PRLI FCCD */ int stdt$l_suspensions; /*F Number of reasons to stay suspended */ int stdt$l_suspended_commands; /*F Number of suspensions due to command status */ int stdt$l_target_resets; /*F Number of Target Resets issued */ struct _tqe *stdt$ps_queue_full_tqe; /*F Pointer to TQE used for QUEUE FULL recovery */ __union { int stdt$l_flags; __struct { unsigned stdt$v_cnf_pending : 1; /*F Boolean: pending an ELS confirmation? */ unsigned stdt$v_class_units_paused : 1; /*F Boolean: class driver units paused? */ unsigned stdt$v_untested_prli : 1; /*F Boolean: PRLI issued but untested? */ unsigned stdt$v_target_reset_ip : 1; /*F Boolean: Target Reset in progress? */ unsigned stdt$v_prlo_ind_ip : 1; /*F Boolean: PRLO Indication in progress? */ unsigned stdt$v_keep_no_luns : 1; /*F Boolean: Keep even if LUN count goes to 0 */ unsigned stdt$v_fill_5_ : 2; } stdt$r_fill_3_; } stdt$r_fill_2_; char stdt$b_fill [4]; /*F Fill out out to an integral number of quadwords */ } stdt$r_pga_port_specific; /* Save ending port-specific offset */ __union { /* Bliss complains about the duplicate definitions of size symbols for */ /* each of the following arrays. Until I can figure out how to work */ /* around that we'll get by with the one symbol which is actually */ /* referenced in checked-in code. There's no way that I know of to */ /* get SDL to skip some of it's input stream for specific languages, */ /* ("iflanguage" doesn't seem to work within an aggregate) */ /* PORT_SPECIFIC byte dimension #PORT_SPECIFIC_BYTES; */ /* PORT_SPECIFIC word dimension #PORT_SPECIFIC_WORDS; */ int stdt$is_port_specific [12]; /* PORT_SPECIFIC longword dimension #PORT_SPECIFIC_LONGS; */ /* PORT_SPECIFIC quadword dimension #PORT_SPECIFIC_QUADS; */ } stdt$r_port_specific_arrays; } stdt$r_port_specific_overlay; /*F End of port specific space that may be used for any purpose */ /* */ /* The following fields are reserved to Digital OpenVMS/Alpha development. */ /* They are not normally used in released code, so are available for test */ /* and debug code - however, the developer assumes responsibility for */ /* ensuring that the fields are available to the port driver being worked */ /* on at the time of use */ /* */ int stdt$is_rsvd_long [5]; /*F Port-independent symbols */ /* These fields are newly defined in Ruby (V7.3-1). Since we don't have */ /* the option of forcing 3rd-party class driver recompiles in a dash */ /* release, they are being added to the tail of the structure; it would */ /* be a good idea to move them to before the port-specific overlays in */ /* the next dot release */ struct _spdt *stdt$ps_spdt; /*F Pointer to this STDT's SPDT */ struct _scdt *stdt$ps_first_scdt; /*F First SCDT on which to to try to start I/O */ struct _stdt *stdt$ps_stdt_link; /*F Link to next STDT connected to same SPDT */ /* Note that the following fields are not marked with "F" to indicate that they are */ /* synchronized with the fork spinlock - this is because they are synchronized with */ /* the credit semaphore independent of spinlock context; however, there is an implicit */ /* assumption that the credit semaphore is acquired & released at fork IPL */ #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif void *stdt$ps_credit_wqfl; /* First SCDRP on credit wait queue */ #pragma __nomember_alignment void *stdt$ps_credit_wqbl; /* Last SCDRP on credit wait queue */ __int64 stdt$q_credit_io_count; /* Number of SCDRPs on credit wait queue */ __int64 stdt$q_drain_to_divisor; /* Divisor used to calculate the number of */ /* active requests to drain to after seeing */ /* a new Queue Full */ unsigned __int64 stdt$q_credit_lock; /* Queue Full field semaphore */ __int64 stdt$q_low_depth_recovery; /* Number of active requests below which the */ /* driver will perform a time, rather than load, */ /* based Queue Full recovery */ unsigned __int64 stdt$q_lock_cpu; /* CPU which currently owns semaphore */ __int64 stdt$q_probation; /* Boolean telling whether or not the active */ /* queue depth is currently being tested with a */ /* probationary I/O */ __int64 stdt$q_credit_limit; /* Maximum number of I/Os which will be issued */ /* without waiting for a request to complete */ __int64 stdt$q_credit_available; /* Number of credits currently available */ __int64 stdt$q_queue_fulls; /* New (non-latent) Queue Fulls seen on this target */ __union { /*F Target-specific sequence used to order requests on retry */ unsigned int stdt$l_sequence; /*F Longword (but quadword aligned) sequence (treat as read-only) */ unsigned __int64 stdt$q_sequence; /*F Quadword sequence, always the one which is incremented */ } stdt$r_sequence_overlay; /*F End overlay */ __int64 stdt$q_fp_dev_io_count; /*P Number of FastPath requests active on the target */ __int64 stdt$q_fp_credits; /*P Number of credits to be freed by the FastPath fork thread */ struct _fkb *stdt$ps_fp_credit_fkb; /*F Pointer to FKB used by successful FastPath requests to free credits */ int stdt$l_illegal_frames; /*F Illegal Frame error counter */ int stdt$l_sequence_timeouts; /*F Sequence Timeout counter */ unsigned int stdt$l_pause_fc_la; /*F Incremented on all calls to pga$pause_fc_la and decremented in */ /*F in pga$resume_fc_la if it is nonzero. If pga$resume_fc_la see */ /*F that it is non-zero, it decrements it and resumes the stdt. */ /* Port WWID (X-19) */ unsigned __int64 stdt$q_port_wwid; /* Node WWID (X-19) */ unsigned __int64 stdt$q_node_wwid; /* Pointer to initialization WWID_TID (X-19) */ void *stdt$ps_initial_wwid_tid; /* Pointer to associated WWID_TID (X-19) */ void *stdt$ps_wwid_tid; /* Pointer to the next STDT associated with this STDT's WTID (X-19) */ struct _stdt *stdt$ps_next_wtid_stdt; /* Number of STDT/WTID configuration failures (X-19) */ unsigned __int64 stdt$q_wtid_stat_fail_cnt; /* Last STDT/WTID configuration failure status code (X-19) */ unsigned __int64 stdt$q_last_wtid_stat; /* Number of times a NULL WTID was detected during IO processing (X-19) */ unsigned __int64 stdt$q_wtid_null_cnt; /* WWID_TID allocation failure counter (X-19) */ __int64 stdt$q_wtid_alloc_fail; /* Pointer to Inquiry Server KPB - FibreChannel only (X-20) */ struct _kpb *stdt$ps_inquiry_kpb; /* Normal Path IO approved but not yet in-flight (X-20) */ __int64 stdt$q_io_approved; /* Fast Path IO approved but not yet in-flight (X-20) */ __int64 stdt$q_fp_io_approved; /* Initial sequence timeout timestamp (X-20) */ __int64 stdt$q_init_seq_timeout_time; /* Last sequence timeout timestamp (X-20) */ __int64 stdt$q_last_seq_timeout_time; /* Sequence timeouts in the monitored sequence timeout window (X-20) */ int stdt$l_seq_timeouts_in_window; /* Spares fields for future growth (X-20/X-21) */ /* Number of spare quadwords */ char stdt$b_fill_6_ [4]; #if !defined(__NOBASEALIGN_SUPPORT) && !defined(__cplusplus) /* If using pre DECC V4.0 or C++ */ #pragma __nomember_alignment __quadword #else #pragma __nomember_alignment #endif __union { #pragma __nomember_alignment unsigned __int64 stdt$q_spareq [10]; unsigned int stdt$l_sparel [20]; unsigned short int stdt$w_sparew [40]; unsigned char stdt$b_spareb [80]; } stdt$r_rsvd1; /* */ /* Define the length of this structure. */ /* */ } STDT; #if !defined(__VAXC) #define stdt$is_scsi_id_num stdt$r_scsi_id_overlay.stdt$is_scsi_id_num #define stdt$q_scsi_id_num stdt$r_scsi_id_overlay.stdt$q_scsi_id_num #define stdt$is_dipl_flags stdt$r_fill_0_.stdt$is_dipl_flags #define stdt$v_dflg_renegotiate_sync stdt$r_fill_0_.stdt$r_fill_1_.stdt$v_dflg_renegotiate_sync #define stdt$v_dflg_class_req_sdtr stdt$r_fill_0_.stdt$r_fill_1_.stdt$v_dflg_class_req_sdtr #define stdt$v_dflg_suppress_sdtr stdt$r_fill_0_.stdt$r_fill_1_.stdt$v_dflg_suppress_sdtr #define stdt$r_pga_port_specific stdt$r_port_specific_overlay.stdt$r_pga_port_specific #define stdt$q_suspended_time stdt$r_pga_port_specific.stdt$q_suspended_time #define stdt$l_prli_status stdt$r_pga_port_specific.stdt$l_prli_status #define stdt$l_prli_retries stdt$r_pga_port_specific.stdt$l_prli_retries #define stdt$ps_prli_rsp_mbd stdt$r_pga_port_specific.stdt$ps_prli_rsp_mbd #define stdt$ps_prli_fccd stdt$r_pga_port_specific.stdt$ps_prli_fccd #define stdt$l_suspensions stdt$r_pga_port_specific.stdt$l_suspensions #define stdt$l_suspended_commands stdt$r_pga_port_specific.stdt$l_suspended_commands #define stdt$l_target_resets stdt$r_pga_port_specific.stdt$l_target_resets #define stdt$ps_queue_full_tqe stdt$r_pga_port_specific.stdt$ps_queue_full_tqe #define stdt$l_flags stdt$r_pga_port_specific.stdt$r_fill_2_.stdt$l_flags #define stdt$v_cnf_pending stdt$r_pga_port_specific.stdt$r_fill_2_.stdt$r_fill_3_.stdt$v_cnf_pending #define stdt$v_class_units_paused stdt$r_pga_port_specific.stdt$r_fill_2_.stdt$r_fill_3_.stdt$v_class_units_paused #define stdt$v_untested_prli stdt$r_pga_port_specific.stdt$r_fill_2_.stdt$r_fill_3_.stdt$v_untested_prli #define stdt$v_target_reset_ip stdt$r_pga_port_specific.stdt$r_fill_2_.stdt$r_fill_3_.stdt$v_target_reset_ip #define stdt$v_prlo_ind_ip stdt$r_pga_port_specific.stdt$r_fill_2_.stdt$r_fill_3_.stdt$v_prlo_ind_ip #define stdt$v_keep_no_luns stdt$r_pga_port_specific.stdt$r_fill_2_.stdt$r_fill_3_.stdt$v_keep_no_luns #define stdt$r_port_specific_arrays stdt$r_port_specific_overlay.stdt$r_port_specific_arrays #define stdt$is_port_specific stdt$r_port_specific_arrays.stdt$is_port_specific #define stdt$l_sequence stdt$r_sequence_overlay.stdt$l_sequence #define stdt$q_sequence stdt$r_sequence_overlay.stdt$q_sequence #define stdt$q_spareq stdt$r_rsvd1.stdt$q_spareq #define stdt$l_sparel stdt$r_rsvd1.stdt$l_sparel #define stdt$w_sparew stdt$r_rsvd1.stdt$w_sparew #define stdt$b_spareb stdt$r_rsvd1.stdt$b_spareb #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 /* __STDTDEF_LOADED */