162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *      FarSync X21 driver for Linux
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci *      Actually sync driver for X.21, V.35 and V.24 on FarSync T-series cards
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci *      Copyright (C) 2001 FarSite Communications Ltd.
862306a36Sopenharmony_ci *      www.farsite.co.uk
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci *      Author: R.J.Dunlop      <bob.dunlop@farsite.co.uk>
1162306a36Sopenharmony_ci *
1262306a36Sopenharmony_ci *      For the most part this file only contains structures and information
1362306a36Sopenharmony_ci *      that is visible to applications outside the driver. Shared memory
1462306a36Sopenharmony_ci *      layout etc is internal to the driver and described within farsync.c.
1562306a36Sopenharmony_ci *      Overlap exists in that the values used for some fields within the
1662306a36Sopenharmony_ci *      ioctl interface extend into the cards firmware interface so values in
1762306a36Sopenharmony_ci *      this file may not be changed arbitrarily.
1862306a36Sopenharmony_ci */
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci/*      What's in a name
2162306a36Sopenharmony_ci *
2262306a36Sopenharmony_ci *      The project name for this driver is Oscar. The driver is intended to be
2362306a36Sopenharmony_ci *      used with the FarSite T-Series cards (T2P & T4P) running in the high
2462306a36Sopenharmony_ci *      speed frame shifter mode. This is sometimes referred to as X.21 mode
2562306a36Sopenharmony_ci *      which is a complete misnomer as the card continues to support V.24 and
2662306a36Sopenharmony_ci *      V.35 as well as X.21.
2762306a36Sopenharmony_ci *
2862306a36Sopenharmony_ci *      A short common prefix is useful for routines within the driver to avoid
2962306a36Sopenharmony_ci *      conflict with other similar drivers and I chosen to use "fst_" for this
3062306a36Sopenharmony_ci *      purpose (FarSite T-series).
3162306a36Sopenharmony_ci *
3262306a36Sopenharmony_ci *      Finally the device driver needs a short network interface name. Since
3362306a36Sopenharmony_ci *      "hdlc" is already in use I've chosen the even less informative "sync"
3462306a36Sopenharmony_ci *      for the present.
3562306a36Sopenharmony_ci */
3662306a36Sopenharmony_ci#define FST_NAME                "fst"           /* In debug/info etc */
3762306a36Sopenharmony_ci#define FST_NDEV_NAME           "sync"          /* For net interface */
3862306a36Sopenharmony_ci#define FST_DEV_NAME            "farsync"       /* For misc interfaces */
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci/*      User version number
4262306a36Sopenharmony_ci *
4362306a36Sopenharmony_ci *      This version number is incremented with each official release of the
4462306a36Sopenharmony_ci *      package and is a simplified number for normal user reference.
4562306a36Sopenharmony_ci *      Individual files are tracked by the version control system and may
4662306a36Sopenharmony_ci *      have individual versions (or IDs) that move much faster than
4762306a36Sopenharmony_ci *      the release version as individual updates are tracked.
4862306a36Sopenharmony_ci */
4962306a36Sopenharmony_ci#define FST_USER_VERSION        "1.04"
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci/*      Ioctl call command values
5362306a36Sopenharmony_ci */
5462306a36Sopenharmony_ci#define FSTWRITE        (SIOCDEVPRIVATE+10)
5562306a36Sopenharmony_ci#define FSTCPURESET     (SIOCDEVPRIVATE+11)
5662306a36Sopenharmony_ci#define FSTCPURELEASE   (SIOCDEVPRIVATE+12)
5762306a36Sopenharmony_ci#define FSTGETCONF      (SIOCDEVPRIVATE+13)
5862306a36Sopenharmony_ci#define FSTSETCONF      (SIOCDEVPRIVATE+14)
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci/*      FSTWRITE
6262306a36Sopenharmony_ci *
6362306a36Sopenharmony_ci *      Used to write a block of data (firmware etc) before the card is running
6462306a36Sopenharmony_ci */
6562306a36Sopenharmony_cistruct fstioc_write {
6662306a36Sopenharmony_ci        unsigned int  size;
6762306a36Sopenharmony_ci        unsigned int  offset;
6862306a36Sopenharmony_ci	unsigned char data[];
6962306a36Sopenharmony_ci};
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci/*      FSTCPURESET and FSTCPURELEASE
7362306a36Sopenharmony_ci *
7462306a36Sopenharmony_ci *      These take no additional data.
7562306a36Sopenharmony_ci *      FSTCPURESET forces the cards CPU into a reset state and holds it there.
7662306a36Sopenharmony_ci *      FSTCPURELEASE releases the CPU from this reset state allowing it to run,
7762306a36Sopenharmony_ci *      the reset vector should be setup before this ioctl is run.
7862306a36Sopenharmony_ci */
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ci/*      FSTGETCONF and FSTSETCONF
8162306a36Sopenharmony_ci *
8262306a36Sopenharmony_ci *      Get and set a card/ports configuration.
8362306a36Sopenharmony_ci *      In order to allow selective setting of items and for the kernel to
8462306a36Sopenharmony_ci *      indicate a partial status response the first field "valid" is a bitmask
8562306a36Sopenharmony_ci *      indicating which other fields in the structure are valid.
8662306a36Sopenharmony_ci *      Many of the field names in this structure match those used in the
8762306a36Sopenharmony_ci *      firmware shared memory configuration interface and come originally from
8862306a36Sopenharmony_ci *      the NT header file Smc.h
8962306a36Sopenharmony_ci *
9062306a36Sopenharmony_ci *      When used with FSTGETCONF this structure should be zeroed before use.
9162306a36Sopenharmony_ci *      This is to allow for possible future expansion when some of the fields
9262306a36Sopenharmony_ci *      might be used to indicate a different (expanded) structure.
9362306a36Sopenharmony_ci */
9462306a36Sopenharmony_cistruct fstioc_info {
9562306a36Sopenharmony_ci        unsigned int   valid;           /* Bits of structure that are valid */
9662306a36Sopenharmony_ci        unsigned int   nports;          /* Number of serial ports */
9762306a36Sopenharmony_ci        unsigned int   type;            /* Type index of card */
9862306a36Sopenharmony_ci        unsigned int   state;           /* State of card */
9962306a36Sopenharmony_ci        unsigned int   index;           /* Index of port ioctl was issued on */
10062306a36Sopenharmony_ci        unsigned int   smcFirmwareVersion;
10162306a36Sopenharmony_ci        unsigned long  kernelVersion;   /* What Kernel version we are working with */
10262306a36Sopenharmony_ci        unsigned short lineInterface;   /* Physical interface type */
10362306a36Sopenharmony_ci        unsigned char  proto;           /* Line protocol */
10462306a36Sopenharmony_ci        unsigned char  internalClock;   /* 1 => internal clock, 0 => external */
10562306a36Sopenharmony_ci        unsigned int   lineSpeed;       /* Speed in bps */
10662306a36Sopenharmony_ci        unsigned int   v24IpSts;        /* V.24 control input status */
10762306a36Sopenharmony_ci        unsigned int   v24OpSts;        /* V.24 control output status */
10862306a36Sopenharmony_ci        unsigned short clockStatus;     /* lsb: 0=> present, 1=> absent */
10962306a36Sopenharmony_ci        unsigned short cableStatus;     /* lsb: 0=> present, 1=> absent */
11062306a36Sopenharmony_ci        unsigned short cardMode;        /* lsb: LED id mode */
11162306a36Sopenharmony_ci        unsigned short debug;           /* Debug flags */
11262306a36Sopenharmony_ci        unsigned char  transparentMode; /* Not used always 0 */
11362306a36Sopenharmony_ci        unsigned char  invertClock;     /* Invert clock feature for syncing */
11462306a36Sopenharmony_ci        unsigned char  startingSlot;    /* Time slot to use for start of tx */
11562306a36Sopenharmony_ci        unsigned char  clockSource;     /* External or internal */
11662306a36Sopenharmony_ci        unsigned char  framing;         /* E1, T1 or J1 */
11762306a36Sopenharmony_ci        unsigned char  structure;       /* unframed, double, crc4, f4, f12, */
11862306a36Sopenharmony_ci                                        /* f24 f72 */
11962306a36Sopenharmony_ci        unsigned char  interface;       /* rj48c or bnc */
12062306a36Sopenharmony_ci        unsigned char  coding;          /* hdb3 b8zs */
12162306a36Sopenharmony_ci        unsigned char  lineBuildOut;    /* 0, -7.5, -15, -22 */
12262306a36Sopenharmony_ci        unsigned char  equalizer;       /* short or lon haul settings */
12362306a36Sopenharmony_ci        unsigned char  loopMode;        /* various loopbacks */
12462306a36Sopenharmony_ci        unsigned char  range;           /* cable lengths */
12562306a36Sopenharmony_ci        unsigned char  txBufferMode;    /* tx elastic buffer depth */
12662306a36Sopenharmony_ci        unsigned char  rxBufferMode;    /* rx elastic buffer depth */
12762306a36Sopenharmony_ci        unsigned char  losThreshold;    /* Attenuation on LOS signal */
12862306a36Sopenharmony_ci        unsigned char  idleCode;        /* Value to send as idle timeslot */
12962306a36Sopenharmony_ci        unsigned int   receiveBufferDelay; /* delay thro rx buffer timeslots */
13062306a36Sopenharmony_ci        unsigned int   framingErrorCount; /* framing errors */
13162306a36Sopenharmony_ci        unsigned int   codeViolationCount; /* code violations */
13262306a36Sopenharmony_ci        unsigned int   crcErrorCount;   /* CRC errors */
13362306a36Sopenharmony_ci        int            lineAttenuation; /* in dB*/
13462306a36Sopenharmony_ci        unsigned short lossOfSignal;
13562306a36Sopenharmony_ci        unsigned short receiveRemoteAlarm;
13662306a36Sopenharmony_ci        unsigned short alarmIndicationSignal;
13762306a36Sopenharmony_ci};
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci/* "valid" bitmask */
14062306a36Sopenharmony_ci#define FSTVAL_NONE     0x00000000      /* Nothing valid (firmware not running).
14162306a36Sopenharmony_ci                                         * Slight misnomer. In fact nports,
14262306a36Sopenharmony_ci                                         * type, state and index will be set
14362306a36Sopenharmony_ci                                         * based on hardware detected.
14462306a36Sopenharmony_ci                                         */
14562306a36Sopenharmony_ci#define FSTVAL_OMODEM   0x0000001F      /* First 5 bits correspond to the
14662306a36Sopenharmony_ci                                         * output status bits defined for
14762306a36Sopenharmony_ci                                         * v24OpSts
14862306a36Sopenharmony_ci                                         */
14962306a36Sopenharmony_ci#define FSTVAL_SPEED    0x00000020      /* internalClock, lineSpeed, clockStatus
15062306a36Sopenharmony_ci                                         */
15162306a36Sopenharmony_ci#define FSTVAL_CABLE    0x00000040      /* lineInterface, cableStatus */
15262306a36Sopenharmony_ci#define FSTVAL_IMODEM   0x00000080      /* v24IpSts */
15362306a36Sopenharmony_ci#define FSTVAL_CARD     0x00000100      /* nports, type, state, index,
15462306a36Sopenharmony_ci                                         * smcFirmwareVersion
15562306a36Sopenharmony_ci                                         */
15662306a36Sopenharmony_ci#define FSTVAL_PROTO    0x00000200      /* proto */
15762306a36Sopenharmony_ci#define FSTVAL_MODE     0x00000400      /* cardMode */
15862306a36Sopenharmony_ci#define FSTVAL_PHASE    0x00000800      /* Clock phase */
15962306a36Sopenharmony_ci#define FSTVAL_TE1      0x00001000      /* T1E1 Configuration */
16062306a36Sopenharmony_ci#define FSTVAL_DEBUG    0x80000000      /* debug */
16162306a36Sopenharmony_ci#define FSTVAL_ALL      0x00001FFF      /* Note: does not include DEBUG flag */
16262306a36Sopenharmony_ci
16362306a36Sopenharmony_ci/* "type" */
16462306a36Sopenharmony_ci#define FST_TYPE_NONE   0               /* Probably should never happen */
16562306a36Sopenharmony_ci#define FST_TYPE_T2P    1               /* T2P X21 2 port card */
16662306a36Sopenharmony_ci#define FST_TYPE_T4P    2               /* T4P X21 4 port card */
16762306a36Sopenharmony_ci#define FST_TYPE_T1U    3               /* T1U X21 1 port card */
16862306a36Sopenharmony_ci#define FST_TYPE_T2U    4               /* T2U X21 2 port card */
16962306a36Sopenharmony_ci#define FST_TYPE_T4U    5               /* T4U X21 4 port card */
17062306a36Sopenharmony_ci#define FST_TYPE_TE1    6               /* T1E1 X21 1 port card */
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ci/* "family" */
17362306a36Sopenharmony_ci#define FST_FAMILY_TXP  0               /* T2P or T4P */
17462306a36Sopenharmony_ci#define FST_FAMILY_TXU  1               /* T1U or T2U or T4U */
17562306a36Sopenharmony_ci
17662306a36Sopenharmony_ci/* "state" */
17762306a36Sopenharmony_ci#define FST_UNINIT      0               /* Raw uninitialised state following
17862306a36Sopenharmony_ci                                         * system startup */
17962306a36Sopenharmony_ci#define FST_RESET       1               /* Processor held in reset state */
18062306a36Sopenharmony_ci#define FST_DOWNLOAD    2               /* Card being downloaded */
18162306a36Sopenharmony_ci#define FST_STARTING    3               /* Released following download */
18262306a36Sopenharmony_ci#define FST_RUNNING     4               /* Processor running */
18362306a36Sopenharmony_ci#define FST_BADVERSION  5               /* Bad shared memory version detected */
18462306a36Sopenharmony_ci#define FST_HALTED      6               /* Processor flagged a halt */
18562306a36Sopenharmony_ci#define FST_IFAILED     7               /* Firmware issued initialisation failed
18662306a36Sopenharmony_ci                                         * interrupt
18762306a36Sopenharmony_ci                                         */
18862306a36Sopenharmony_ci/* "lineInterface" */
18962306a36Sopenharmony_ci#define V24             1
19062306a36Sopenharmony_ci#define X21             2
19162306a36Sopenharmony_ci#define V35             3
19262306a36Sopenharmony_ci#define X21D            4
19362306a36Sopenharmony_ci#define T1              5
19462306a36Sopenharmony_ci#define E1              6
19562306a36Sopenharmony_ci#define J1              7
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ci/* "proto" */
19862306a36Sopenharmony_ci#define FST_RAW         4               /* Two way raw packets */
19962306a36Sopenharmony_ci#define FST_GEN_HDLC    5               /* Using "Generic HDLC" module */
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ci/* "internalClock" */
20262306a36Sopenharmony_ci#define INTCLK          1
20362306a36Sopenharmony_ci#define EXTCLK          0
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ci/* "v24IpSts" bitmask */
20662306a36Sopenharmony_ci#define IPSTS_CTS       0x00000001      /* Clear To Send (Indicate for X.21) */
20762306a36Sopenharmony_ci#define IPSTS_INDICATE  IPSTS_CTS
20862306a36Sopenharmony_ci#define IPSTS_DSR       0x00000002      /* Data Set Ready (T2P Port A) */
20962306a36Sopenharmony_ci#define IPSTS_DCD       0x00000004      /* Data Carrier Detect */
21062306a36Sopenharmony_ci#define IPSTS_RI        0x00000008      /* Ring Indicator (T2P Port A) */
21162306a36Sopenharmony_ci#define IPSTS_TMI       0x00000010      /* Test Mode Indicator (Not Supported)*/
21262306a36Sopenharmony_ci
21362306a36Sopenharmony_ci/* "v24OpSts" bitmask */
21462306a36Sopenharmony_ci#define OPSTS_RTS       0x00000001      /* Request To Send (Control for X.21) */
21562306a36Sopenharmony_ci#define OPSTS_CONTROL   OPSTS_RTS
21662306a36Sopenharmony_ci#define OPSTS_DTR       0x00000002      /* Data Terminal Ready */
21762306a36Sopenharmony_ci#define OPSTS_DSRS      0x00000004      /* Data Signalling Rate Select (Not
21862306a36Sopenharmony_ci                                         * Supported) */
21962306a36Sopenharmony_ci#define OPSTS_SS        0x00000008      /* Select Standby (Not Supported) */
22062306a36Sopenharmony_ci#define OPSTS_LL        0x00000010      /* Maintenance Test (Not Supported) */
22162306a36Sopenharmony_ci
22262306a36Sopenharmony_ci/* "cardMode" bitmask */
22362306a36Sopenharmony_ci#define CARD_MODE_IDENTIFY      0x0001
22462306a36Sopenharmony_ci
22562306a36Sopenharmony_ci/*
22662306a36Sopenharmony_ci * Constants for T1/E1 configuration
22762306a36Sopenharmony_ci */
22862306a36Sopenharmony_ci
22962306a36Sopenharmony_ci/*
23062306a36Sopenharmony_ci * Clock source
23162306a36Sopenharmony_ci */
23262306a36Sopenharmony_ci#define CLOCKING_SLAVE       0
23362306a36Sopenharmony_ci#define CLOCKING_MASTER      1
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_ci/*
23662306a36Sopenharmony_ci * Framing
23762306a36Sopenharmony_ci */
23862306a36Sopenharmony_ci#define FRAMING_E1           0
23962306a36Sopenharmony_ci#define FRAMING_J1           1
24062306a36Sopenharmony_ci#define FRAMING_T1           2
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ci/*
24362306a36Sopenharmony_ci * Structure
24462306a36Sopenharmony_ci */
24562306a36Sopenharmony_ci#define STRUCTURE_UNFRAMED   0
24662306a36Sopenharmony_ci#define STRUCTURE_E1_DOUBLE  1
24762306a36Sopenharmony_ci#define STRUCTURE_E1_CRC4    2
24862306a36Sopenharmony_ci#define STRUCTURE_E1_CRC4M   3
24962306a36Sopenharmony_ci#define STRUCTURE_T1_4       4
25062306a36Sopenharmony_ci#define STRUCTURE_T1_12      5
25162306a36Sopenharmony_ci#define STRUCTURE_T1_24      6
25262306a36Sopenharmony_ci#define STRUCTURE_T1_72      7
25362306a36Sopenharmony_ci
25462306a36Sopenharmony_ci/*
25562306a36Sopenharmony_ci * Interface
25662306a36Sopenharmony_ci */
25762306a36Sopenharmony_ci#define INTERFACE_RJ48C      0
25862306a36Sopenharmony_ci#define INTERFACE_BNC        1
25962306a36Sopenharmony_ci
26062306a36Sopenharmony_ci/*
26162306a36Sopenharmony_ci * Coding
26262306a36Sopenharmony_ci */
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci#define CODING_HDB3          0
26562306a36Sopenharmony_ci#define CODING_NRZ           1
26662306a36Sopenharmony_ci#define CODING_CMI           2
26762306a36Sopenharmony_ci#define CODING_CMI_HDB3      3
26862306a36Sopenharmony_ci#define CODING_CMI_B8ZS      4
26962306a36Sopenharmony_ci#define CODING_AMI           5
27062306a36Sopenharmony_ci#define CODING_AMI_ZCS       6
27162306a36Sopenharmony_ci#define CODING_B8ZS          7
27262306a36Sopenharmony_ci
27362306a36Sopenharmony_ci/*
27462306a36Sopenharmony_ci * Line Build Out
27562306a36Sopenharmony_ci */
27662306a36Sopenharmony_ci#define LBO_0dB              0
27762306a36Sopenharmony_ci#define LBO_7dB5             1
27862306a36Sopenharmony_ci#define LBO_15dB             2
27962306a36Sopenharmony_ci#define LBO_22dB5            3
28062306a36Sopenharmony_ci
28162306a36Sopenharmony_ci/*
28262306a36Sopenharmony_ci * Range for long haul t1 > 655ft
28362306a36Sopenharmony_ci */
28462306a36Sopenharmony_ci#define RANGE_0_133_FT       0
28562306a36Sopenharmony_ci#define RANGE_0_40_M         RANGE_0_133_FT
28662306a36Sopenharmony_ci#define RANGE_133_266_FT     1
28762306a36Sopenharmony_ci#define RANGE_40_81_M        RANGE_133_266_FT
28862306a36Sopenharmony_ci#define RANGE_266_399_FT     2
28962306a36Sopenharmony_ci#define RANGE_81_122_M       RANGE_266_399_FT
29062306a36Sopenharmony_ci#define RANGE_399_533_FT     3
29162306a36Sopenharmony_ci#define RANGE_122_162_M       RANGE_399_533_FT
29262306a36Sopenharmony_ci#define RANGE_533_655_FT     4
29362306a36Sopenharmony_ci#define RANGE_162_200_M      RANGE_533_655_FT
29462306a36Sopenharmony_ci/*
29562306a36Sopenharmony_ci * Receive Equaliser
29662306a36Sopenharmony_ci */
29762306a36Sopenharmony_ci#define EQUALIZER_SHORT      0
29862306a36Sopenharmony_ci#define EQUALIZER_LONG       1
29962306a36Sopenharmony_ci
30062306a36Sopenharmony_ci/*
30162306a36Sopenharmony_ci * Loop modes
30262306a36Sopenharmony_ci */
30362306a36Sopenharmony_ci#define LOOP_NONE            0
30462306a36Sopenharmony_ci#define LOOP_LOCAL           1
30562306a36Sopenharmony_ci#define LOOP_PAYLOAD_EXC_TS0 2
30662306a36Sopenharmony_ci#define LOOP_PAYLOAD_INC_TS0 3
30762306a36Sopenharmony_ci#define LOOP_REMOTE          4
30862306a36Sopenharmony_ci
30962306a36Sopenharmony_ci/*
31062306a36Sopenharmony_ci * Buffer modes
31162306a36Sopenharmony_ci */
31262306a36Sopenharmony_ci#define BUFFER_2_FRAME       0
31362306a36Sopenharmony_ci#define BUFFER_1_FRAME       1
31462306a36Sopenharmony_ci#define BUFFER_96_BIT        2
31562306a36Sopenharmony_ci#define BUFFER_NONE          3
31662306a36Sopenharmony_ci
31762306a36Sopenharmony_ci/*      Debug support
31862306a36Sopenharmony_ci *
31962306a36Sopenharmony_ci *      These should only be enabled for development kernels, production code
32062306a36Sopenharmony_ci *      should define FST_DEBUG=0 in order to exclude the code.
32162306a36Sopenharmony_ci *      Setting FST_DEBUG=1 will include all the debug code but in a disabled
32262306a36Sopenharmony_ci *      state, use the FSTSETCONF ioctl to enable specific debug actions, or
32362306a36Sopenharmony_ci *      FST_DEBUG can be set to prime the debug selection.
32462306a36Sopenharmony_ci */
32562306a36Sopenharmony_ci#define FST_DEBUG       0x0000
32662306a36Sopenharmony_ci#if FST_DEBUG
32762306a36Sopenharmony_ci
32862306a36Sopenharmony_ciextern int fst_debug_mask;              /* Bit mask of actions to debug, bits
32962306a36Sopenharmony_ci                                         * listed below. Note: Bit 0 is used
33062306a36Sopenharmony_ci                                         * to trigger the inclusion of this
33162306a36Sopenharmony_ci                                         * code, without enabling any actions.
33262306a36Sopenharmony_ci                                         */
33362306a36Sopenharmony_ci#define DBG_INIT        0x0002          /* Card detection and initialisation */
33462306a36Sopenharmony_ci#define DBG_OPEN        0x0004          /* Open and close sequences */
33562306a36Sopenharmony_ci#define DBG_PCI         0x0008          /* PCI config operations */
33662306a36Sopenharmony_ci#define DBG_IOCTL       0x0010          /* Ioctls and other config */
33762306a36Sopenharmony_ci#define DBG_INTR        0x0020          /* Interrupt routines (be careful) */
33862306a36Sopenharmony_ci#define DBG_TX          0x0040          /* Packet transmission */
33962306a36Sopenharmony_ci#define DBG_RX          0x0080          /* Packet reception */
34062306a36Sopenharmony_ci#define DBG_CMD         0x0100          /* Port command issuing */
34162306a36Sopenharmony_ci
34262306a36Sopenharmony_ci#define DBG_ASS         0xFFFF          /* Assert like statements. Code that
34362306a36Sopenharmony_ci                                         * should never be reached, if you see
34462306a36Sopenharmony_ci                                         * one of these then I've been an ass
34562306a36Sopenharmony_ci                                         */
34662306a36Sopenharmony_ci#endif  /* FST_DEBUG */
34762306a36Sopenharmony_ci
348