1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * FarSync X21 driver for Linux 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Actually sync driver for X.21, V.35 and V.24 on FarSync T-series cards 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * Copyright (C) 2001 FarSite Communications Ltd. 8*4882a593Smuzhiyun * www.farsite.co.uk 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * Author: R.J.Dunlop <bob.dunlop@farsite.co.uk> 11*4882a593Smuzhiyun * 12*4882a593Smuzhiyun * For the most part this file only contains structures and information 13*4882a593Smuzhiyun * that is visible to applications outside the driver. Shared memory 14*4882a593Smuzhiyun * layout etc is internal to the driver and described within farsync.c. 15*4882a593Smuzhiyun * Overlap exists in that the values used for some fields within the 16*4882a593Smuzhiyun * ioctl interface extend into the cards firmware interface so values in 17*4882a593Smuzhiyun * this file may not be changed arbitrarily. 18*4882a593Smuzhiyun */ 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun /* What's in a name 21*4882a593Smuzhiyun * 22*4882a593Smuzhiyun * The project name for this driver is Oscar. The driver is intended to be 23*4882a593Smuzhiyun * used with the FarSite T-Series cards (T2P & T4P) running in the high 24*4882a593Smuzhiyun * speed frame shifter mode. This is sometimes referred to as X.21 mode 25*4882a593Smuzhiyun * which is a complete misnomer as the card continues to support V.24 and 26*4882a593Smuzhiyun * V.35 as well as X.21. 27*4882a593Smuzhiyun * 28*4882a593Smuzhiyun * A short common prefix is useful for routines within the driver to avoid 29*4882a593Smuzhiyun * conflict with other similar drivers and I chosen to use "fst_" for this 30*4882a593Smuzhiyun * purpose (FarSite T-series). 31*4882a593Smuzhiyun * 32*4882a593Smuzhiyun * Finally the device driver needs a short network interface name. Since 33*4882a593Smuzhiyun * "hdlc" is already in use I've chosen the even less informative "sync" 34*4882a593Smuzhiyun * for the present. 35*4882a593Smuzhiyun */ 36*4882a593Smuzhiyun #define FST_NAME "fst" /* In debug/info etc */ 37*4882a593Smuzhiyun #define FST_NDEV_NAME "sync" /* For net interface */ 38*4882a593Smuzhiyun #define FST_DEV_NAME "farsync" /* For misc interfaces */ 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun /* User version number 42*4882a593Smuzhiyun * 43*4882a593Smuzhiyun * This version number is incremented with each official release of the 44*4882a593Smuzhiyun * package and is a simplified number for normal user reference. 45*4882a593Smuzhiyun * Individual files are tracked by the version control system and may 46*4882a593Smuzhiyun * have individual versions (or IDs) that move much faster than the 47*4882a593Smuzhiyun * the release version as individual updates are tracked. 48*4882a593Smuzhiyun */ 49*4882a593Smuzhiyun #define FST_USER_VERSION "1.04" 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun /* Ioctl call command values 53*4882a593Smuzhiyun */ 54*4882a593Smuzhiyun #define FSTWRITE (SIOCDEVPRIVATE+10) 55*4882a593Smuzhiyun #define FSTCPURESET (SIOCDEVPRIVATE+11) 56*4882a593Smuzhiyun #define FSTCPURELEASE (SIOCDEVPRIVATE+12) 57*4882a593Smuzhiyun #define FSTGETCONF (SIOCDEVPRIVATE+13) 58*4882a593Smuzhiyun #define FSTSETCONF (SIOCDEVPRIVATE+14) 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun /* FSTWRITE 62*4882a593Smuzhiyun * 63*4882a593Smuzhiyun * Used to write a block of data (firmware etc) before the card is running 64*4882a593Smuzhiyun */ 65*4882a593Smuzhiyun struct fstioc_write { 66*4882a593Smuzhiyun unsigned int size; 67*4882a593Smuzhiyun unsigned int offset; 68*4882a593Smuzhiyun unsigned char data[]; 69*4882a593Smuzhiyun }; 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun /* FSTCPURESET and FSTCPURELEASE 73*4882a593Smuzhiyun * 74*4882a593Smuzhiyun * These take no additional data. 75*4882a593Smuzhiyun * FSTCPURESET forces the cards CPU into a reset state and holds it there. 76*4882a593Smuzhiyun * FSTCPURELEASE releases the CPU from this reset state allowing it to run, 77*4882a593Smuzhiyun * the reset vector should be setup before this ioctl is run. 78*4882a593Smuzhiyun */ 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun /* FSTGETCONF and FSTSETCONF 81*4882a593Smuzhiyun * 82*4882a593Smuzhiyun * Get and set a card/ports configuration. 83*4882a593Smuzhiyun * In order to allow selective setting of items and for the kernel to 84*4882a593Smuzhiyun * indicate a partial status response the first field "valid" is a bitmask 85*4882a593Smuzhiyun * indicating which other fields in the structure are valid. 86*4882a593Smuzhiyun * Many of the field names in this structure match those used in the 87*4882a593Smuzhiyun * firmware shared memory configuration interface and come originally from 88*4882a593Smuzhiyun * the NT header file Smc.h 89*4882a593Smuzhiyun * 90*4882a593Smuzhiyun * When used with FSTGETCONF this structure should be zeroed before use. 91*4882a593Smuzhiyun * This is to allow for possible future expansion when some of the fields 92*4882a593Smuzhiyun * might be used to indicate a different (expanded) structure. 93*4882a593Smuzhiyun */ 94*4882a593Smuzhiyun struct fstioc_info { 95*4882a593Smuzhiyun unsigned int valid; /* Bits of structure that are valid */ 96*4882a593Smuzhiyun unsigned int nports; /* Number of serial ports */ 97*4882a593Smuzhiyun unsigned int type; /* Type index of card */ 98*4882a593Smuzhiyun unsigned int state; /* State of card */ 99*4882a593Smuzhiyun unsigned int index; /* Index of port ioctl was issued on */ 100*4882a593Smuzhiyun unsigned int smcFirmwareVersion; 101*4882a593Smuzhiyun unsigned long kernelVersion; /* What Kernel version we are working with */ 102*4882a593Smuzhiyun unsigned short lineInterface; /* Physical interface type */ 103*4882a593Smuzhiyun unsigned char proto; /* Line protocol */ 104*4882a593Smuzhiyun unsigned char internalClock; /* 1 => internal clock, 0 => external */ 105*4882a593Smuzhiyun unsigned int lineSpeed; /* Speed in bps */ 106*4882a593Smuzhiyun unsigned int v24IpSts; /* V.24 control input status */ 107*4882a593Smuzhiyun unsigned int v24OpSts; /* V.24 control output status */ 108*4882a593Smuzhiyun unsigned short clockStatus; /* lsb: 0=> present, 1=> absent */ 109*4882a593Smuzhiyun unsigned short cableStatus; /* lsb: 0=> present, 1=> absent */ 110*4882a593Smuzhiyun unsigned short cardMode; /* lsb: LED id mode */ 111*4882a593Smuzhiyun unsigned short debug; /* Debug flags */ 112*4882a593Smuzhiyun unsigned char transparentMode; /* Not used always 0 */ 113*4882a593Smuzhiyun unsigned char invertClock; /* Invert clock feature for syncing */ 114*4882a593Smuzhiyun unsigned char startingSlot; /* Time slot to use for start of tx */ 115*4882a593Smuzhiyun unsigned char clockSource; /* External or internal */ 116*4882a593Smuzhiyun unsigned char framing; /* E1, T1 or J1 */ 117*4882a593Smuzhiyun unsigned char structure; /* unframed, double, crc4, f4, f12, */ 118*4882a593Smuzhiyun /* f24 f72 */ 119*4882a593Smuzhiyun unsigned char interface; /* rj48c or bnc */ 120*4882a593Smuzhiyun unsigned char coding; /* hdb3 b8zs */ 121*4882a593Smuzhiyun unsigned char lineBuildOut; /* 0, -7.5, -15, -22 */ 122*4882a593Smuzhiyun unsigned char equalizer; /* short or lon haul settings */ 123*4882a593Smuzhiyun unsigned char loopMode; /* various loopbacks */ 124*4882a593Smuzhiyun unsigned char range; /* cable lengths */ 125*4882a593Smuzhiyun unsigned char txBufferMode; /* tx elastic buffer depth */ 126*4882a593Smuzhiyun unsigned char rxBufferMode; /* rx elastic buffer depth */ 127*4882a593Smuzhiyun unsigned char losThreshold; /* Attenuation on LOS signal */ 128*4882a593Smuzhiyun unsigned char idleCode; /* Value to send as idle timeslot */ 129*4882a593Smuzhiyun unsigned int receiveBufferDelay; /* delay thro rx buffer timeslots */ 130*4882a593Smuzhiyun unsigned int framingErrorCount; /* framing errors */ 131*4882a593Smuzhiyun unsigned int codeViolationCount; /* code violations */ 132*4882a593Smuzhiyun unsigned int crcErrorCount; /* CRC errors */ 133*4882a593Smuzhiyun int lineAttenuation; /* in dB*/ 134*4882a593Smuzhiyun unsigned short lossOfSignal; 135*4882a593Smuzhiyun unsigned short receiveRemoteAlarm; 136*4882a593Smuzhiyun unsigned short alarmIndicationSignal; 137*4882a593Smuzhiyun }; 138*4882a593Smuzhiyun 139*4882a593Smuzhiyun /* "valid" bitmask */ 140*4882a593Smuzhiyun #define FSTVAL_NONE 0x00000000 /* Nothing valid (firmware not running). 141*4882a593Smuzhiyun * Slight misnomer. In fact nports, 142*4882a593Smuzhiyun * type, state and index will be set 143*4882a593Smuzhiyun * based on hardware detected. 144*4882a593Smuzhiyun */ 145*4882a593Smuzhiyun #define FSTVAL_OMODEM 0x0000001F /* First 5 bits correspond to the 146*4882a593Smuzhiyun * output status bits defined for 147*4882a593Smuzhiyun * v24OpSts 148*4882a593Smuzhiyun */ 149*4882a593Smuzhiyun #define FSTVAL_SPEED 0x00000020 /* internalClock, lineSpeed, clockStatus 150*4882a593Smuzhiyun */ 151*4882a593Smuzhiyun #define FSTVAL_CABLE 0x00000040 /* lineInterface, cableStatus */ 152*4882a593Smuzhiyun #define FSTVAL_IMODEM 0x00000080 /* v24IpSts */ 153*4882a593Smuzhiyun #define FSTVAL_CARD 0x00000100 /* nports, type, state, index, 154*4882a593Smuzhiyun * smcFirmwareVersion 155*4882a593Smuzhiyun */ 156*4882a593Smuzhiyun #define FSTVAL_PROTO 0x00000200 /* proto */ 157*4882a593Smuzhiyun #define FSTVAL_MODE 0x00000400 /* cardMode */ 158*4882a593Smuzhiyun #define FSTVAL_PHASE 0x00000800 /* Clock phase */ 159*4882a593Smuzhiyun #define FSTVAL_TE1 0x00001000 /* T1E1 Configuration */ 160*4882a593Smuzhiyun #define FSTVAL_DEBUG 0x80000000 /* debug */ 161*4882a593Smuzhiyun #define FSTVAL_ALL 0x00001FFF /* Note: does not include DEBUG flag */ 162*4882a593Smuzhiyun 163*4882a593Smuzhiyun /* "type" */ 164*4882a593Smuzhiyun #define FST_TYPE_NONE 0 /* Probably should never happen */ 165*4882a593Smuzhiyun #define FST_TYPE_T2P 1 /* T2P X21 2 port card */ 166*4882a593Smuzhiyun #define FST_TYPE_T4P 2 /* T4P X21 4 port card */ 167*4882a593Smuzhiyun #define FST_TYPE_T1U 3 /* T1U X21 1 port card */ 168*4882a593Smuzhiyun #define FST_TYPE_T2U 4 /* T2U X21 2 port card */ 169*4882a593Smuzhiyun #define FST_TYPE_T4U 5 /* T4U X21 4 port card */ 170*4882a593Smuzhiyun #define FST_TYPE_TE1 6 /* T1E1 X21 1 port card */ 171*4882a593Smuzhiyun 172*4882a593Smuzhiyun /* "family" */ 173*4882a593Smuzhiyun #define FST_FAMILY_TXP 0 /* T2P or T4P */ 174*4882a593Smuzhiyun #define FST_FAMILY_TXU 1 /* T1U or T2U or T4U */ 175*4882a593Smuzhiyun 176*4882a593Smuzhiyun /* "state" */ 177*4882a593Smuzhiyun #define FST_UNINIT 0 /* Raw uninitialised state following 178*4882a593Smuzhiyun * system startup */ 179*4882a593Smuzhiyun #define FST_RESET 1 /* Processor held in reset state */ 180*4882a593Smuzhiyun #define FST_DOWNLOAD 2 /* Card being downloaded */ 181*4882a593Smuzhiyun #define FST_STARTING 3 /* Released following download */ 182*4882a593Smuzhiyun #define FST_RUNNING 4 /* Processor running */ 183*4882a593Smuzhiyun #define FST_BADVERSION 5 /* Bad shared memory version detected */ 184*4882a593Smuzhiyun #define FST_HALTED 6 /* Processor flagged a halt */ 185*4882a593Smuzhiyun #define FST_IFAILED 7 /* Firmware issued initialisation failed 186*4882a593Smuzhiyun * interrupt 187*4882a593Smuzhiyun */ 188*4882a593Smuzhiyun /* "lineInterface" */ 189*4882a593Smuzhiyun #define V24 1 190*4882a593Smuzhiyun #define X21 2 191*4882a593Smuzhiyun #define V35 3 192*4882a593Smuzhiyun #define X21D 4 193*4882a593Smuzhiyun #define T1 5 194*4882a593Smuzhiyun #define E1 6 195*4882a593Smuzhiyun #define J1 7 196*4882a593Smuzhiyun 197*4882a593Smuzhiyun /* "proto" */ 198*4882a593Smuzhiyun #define FST_RAW 4 /* Two way raw packets */ 199*4882a593Smuzhiyun #define FST_GEN_HDLC 5 /* Using "Generic HDLC" module */ 200*4882a593Smuzhiyun 201*4882a593Smuzhiyun /* "internalClock" */ 202*4882a593Smuzhiyun #define INTCLK 1 203*4882a593Smuzhiyun #define EXTCLK 0 204*4882a593Smuzhiyun 205*4882a593Smuzhiyun /* "v24IpSts" bitmask */ 206*4882a593Smuzhiyun #define IPSTS_CTS 0x00000001 /* Clear To Send (Indicate for X.21) */ 207*4882a593Smuzhiyun #define IPSTS_INDICATE IPSTS_CTS 208*4882a593Smuzhiyun #define IPSTS_DSR 0x00000002 /* Data Set Ready (T2P Port A) */ 209*4882a593Smuzhiyun #define IPSTS_DCD 0x00000004 /* Data Carrier Detect */ 210*4882a593Smuzhiyun #define IPSTS_RI 0x00000008 /* Ring Indicator (T2P Port A) */ 211*4882a593Smuzhiyun #define IPSTS_TMI 0x00000010 /* Test Mode Indicator (Not Supported)*/ 212*4882a593Smuzhiyun 213*4882a593Smuzhiyun /* "v24OpSts" bitmask */ 214*4882a593Smuzhiyun #define OPSTS_RTS 0x00000001 /* Request To Send (Control for X.21) */ 215*4882a593Smuzhiyun #define OPSTS_CONTROL OPSTS_RTS 216*4882a593Smuzhiyun #define OPSTS_DTR 0x00000002 /* Data Terminal Ready */ 217*4882a593Smuzhiyun #define OPSTS_DSRS 0x00000004 /* Data Signalling Rate Select (Not 218*4882a593Smuzhiyun * Supported) */ 219*4882a593Smuzhiyun #define OPSTS_SS 0x00000008 /* Select Standby (Not Supported) */ 220*4882a593Smuzhiyun #define OPSTS_LL 0x00000010 /* Maintenance Test (Not Supported) */ 221*4882a593Smuzhiyun 222*4882a593Smuzhiyun /* "cardMode" bitmask */ 223*4882a593Smuzhiyun #define CARD_MODE_IDENTIFY 0x0001 224*4882a593Smuzhiyun 225*4882a593Smuzhiyun /* 226*4882a593Smuzhiyun * Constants for T1/E1 configuration 227*4882a593Smuzhiyun */ 228*4882a593Smuzhiyun 229*4882a593Smuzhiyun /* 230*4882a593Smuzhiyun * Clock source 231*4882a593Smuzhiyun */ 232*4882a593Smuzhiyun #define CLOCKING_SLAVE 0 233*4882a593Smuzhiyun #define CLOCKING_MASTER 1 234*4882a593Smuzhiyun 235*4882a593Smuzhiyun /* 236*4882a593Smuzhiyun * Framing 237*4882a593Smuzhiyun */ 238*4882a593Smuzhiyun #define FRAMING_E1 0 239*4882a593Smuzhiyun #define FRAMING_J1 1 240*4882a593Smuzhiyun #define FRAMING_T1 2 241*4882a593Smuzhiyun 242*4882a593Smuzhiyun /* 243*4882a593Smuzhiyun * Structure 244*4882a593Smuzhiyun */ 245*4882a593Smuzhiyun #define STRUCTURE_UNFRAMED 0 246*4882a593Smuzhiyun #define STRUCTURE_E1_DOUBLE 1 247*4882a593Smuzhiyun #define STRUCTURE_E1_CRC4 2 248*4882a593Smuzhiyun #define STRUCTURE_E1_CRC4M 3 249*4882a593Smuzhiyun #define STRUCTURE_T1_4 4 250*4882a593Smuzhiyun #define STRUCTURE_T1_12 5 251*4882a593Smuzhiyun #define STRUCTURE_T1_24 6 252*4882a593Smuzhiyun #define STRUCTURE_T1_72 7 253*4882a593Smuzhiyun 254*4882a593Smuzhiyun /* 255*4882a593Smuzhiyun * Interface 256*4882a593Smuzhiyun */ 257*4882a593Smuzhiyun #define INTERFACE_RJ48C 0 258*4882a593Smuzhiyun #define INTERFACE_BNC 1 259*4882a593Smuzhiyun 260*4882a593Smuzhiyun /* 261*4882a593Smuzhiyun * Coding 262*4882a593Smuzhiyun */ 263*4882a593Smuzhiyun 264*4882a593Smuzhiyun #define CODING_HDB3 0 265*4882a593Smuzhiyun #define CODING_NRZ 1 266*4882a593Smuzhiyun #define CODING_CMI 2 267*4882a593Smuzhiyun #define CODING_CMI_HDB3 3 268*4882a593Smuzhiyun #define CODING_CMI_B8ZS 4 269*4882a593Smuzhiyun #define CODING_AMI 5 270*4882a593Smuzhiyun #define CODING_AMI_ZCS 6 271*4882a593Smuzhiyun #define CODING_B8ZS 7 272*4882a593Smuzhiyun 273*4882a593Smuzhiyun /* 274*4882a593Smuzhiyun * Line Build Out 275*4882a593Smuzhiyun */ 276*4882a593Smuzhiyun #define LBO_0dB 0 277*4882a593Smuzhiyun #define LBO_7dB5 1 278*4882a593Smuzhiyun #define LBO_15dB 2 279*4882a593Smuzhiyun #define LBO_22dB5 3 280*4882a593Smuzhiyun 281*4882a593Smuzhiyun /* 282*4882a593Smuzhiyun * Range for long haul t1 > 655ft 283*4882a593Smuzhiyun */ 284*4882a593Smuzhiyun #define RANGE_0_133_FT 0 285*4882a593Smuzhiyun #define RANGE_0_40_M RANGE_0_133_FT 286*4882a593Smuzhiyun #define RANGE_133_266_FT 1 287*4882a593Smuzhiyun #define RANGE_40_81_M RANGE_133_266_FT 288*4882a593Smuzhiyun #define RANGE_266_399_FT 2 289*4882a593Smuzhiyun #define RANGE_81_122_M RANGE_266_399_FT 290*4882a593Smuzhiyun #define RANGE_399_533_FT 3 291*4882a593Smuzhiyun #define RANGE_122_162_M RANGE_399_533_FT 292*4882a593Smuzhiyun #define RANGE_533_655_FT 4 293*4882a593Smuzhiyun #define RANGE_162_200_M RANGE_533_655_FT 294*4882a593Smuzhiyun /* 295*4882a593Smuzhiyun * Receive Equaliser 296*4882a593Smuzhiyun */ 297*4882a593Smuzhiyun #define EQUALIZER_SHORT 0 298*4882a593Smuzhiyun #define EQUALIZER_LONG 1 299*4882a593Smuzhiyun 300*4882a593Smuzhiyun /* 301*4882a593Smuzhiyun * Loop modes 302*4882a593Smuzhiyun */ 303*4882a593Smuzhiyun #define LOOP_NONE 0 304*4882a593Smuzhiyun #define LOOP_LOCAL 1 305*4882a593Smuzhiyun #define LOOP_PAYLOAD_EXC_TS0 2 306*4882a593Smuzhiyun #define LOOP_PAYLOAD_INC_TS0 3 307*4882a593Smuzhiyun #define LOOP_REMOTE 4 308*4882a593Smuzhiyun 309*4882a593Smuzhiyun /* 310*4882a593Smuzhiyun * Buffer modes 311*4882a593Smuzhiyun */ 312*4882a593Smuzhiyun #define BUFFER_2_FRAME 0 313*4882a593Smuzhiyun #define BUFFER_1_FRAME 1 314*4882a593Smuzhiyun #define BUFFER_96_BIT 2 315*4882a593Smuzhiyun #define BUFFER_NONE 3 316*4882a593Smuzhiyun 317*4882a593Smuzhiyun /* Debug support 318*4882a593Smuzhiyun * 319*4882a593Smuzhiyun * These should only be enabled for development kernels, production code 320*4882a593Smuzhiyun * should define FST_DEBUG=0 in order to exclude the code. 321*4882a593Smuzhiyun * Setting FST_DEBUG=1 will include all the debug code but in a disabled 322*4882a593Smuzhiyun * state, use the FSTSETCONF ioctl to enable specific debug actions, or 323*4882a593Smuzhiyun * FST_DEBUG can be set to prime the debug selection. 324*4882a593Smuzhiyun */ 325*4882a593Smuzhiyun #define FST_DEBUG 0x0000 326*4882a593Smuzhiyun #if FST_DEBUG 327*4882a593Smuzhiyun 328*4882a593Smuzhiyun extern int fst_debug_mask; /* Bit mask of actions to debug, bits 329*4882a593Smuzhiyun * listed below. Note: Bit 0 is used 330*4882a593Smuzhiyun * to trigger the inclusion of this 331*4882a593Smuzhiyun * code, without enabling any actions. 332*4882a593Smuzhiyun */ 333*4882a593Smuzhiyun #define DBG_INIT 0x0002 /* Card detection and initialisation */ 334*4882a593Smuzhiyun #define DBG_OPEN 0x0004 /* Open and close sequences */ 335*4882a593Smuzhiyun #define DBG_PCI 0x0008 /* PCI config operations */ 336*4882a593Smuzhiyun #define DBG_IOCTL 0x0010 /* Ioctls and other config */ 337*4882a593Smuzhiyun #define DBG_INTR 0x0020 /* Interrupt routines (be careful) */ 338*4882a593Smuzhiyun #define DBG_TX 0x0040 /* Packet transmission */ 339*4882a593Smuzhiyun #define DBG_RX 0x0080 /* Packet reception */ 340*4882a593Smuzhiyun #define DBG_CMD 0x0100 /* Port command issuing */ 341*4882a593Smuzhiyun 342*4882a593Smuzhiyun #define DBG_ASS 0xFFFF /* Assert like statements. Code that 343*4882a593Smuzhiyun * should never be reached, if you see 344*4882a593Smuzhiyun * one of these then I've been an ass 345*4882a593Smuzhiyun */ 346*4882a593Smuzhiyun #endif /* FST_DEBUG */ 347*4882a593Smuzhiyun 348