Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux
File: synclink.h
/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* SyncLink Multiprotocol Serial Adapter Driver
[2] Fix | Delete
*
[3] Fix | Delete
* $Id: synclink.h,v 3.14 2006/07/17 20:15:43 paulkf Exp $
[4] Fix | Delete
*
[5] Fix | Delete
* Copyright (C) 1998-2000 by Microgate Corporation
[6] Fix | Delete
*
[7] Fix | Delete
* Redistribution of this file is permitted under
[8] Fix | Delete
* the terms of the GNU Public License (GPL)
[9] Fix | Delete
*/
[10] Fix | Delete
[11] Fix | Delete
#ifndef _SYNCLINK_H_
[12] Fix | Delete
#define _SYNCLINK_H_
[13] Fix | Delete
#define SYNCLINK_H_VERSION 3.6
[14] Fix | Delete
[15] Fix | Delete
#include <linux/types.h>
[16] Fix | Delete
[17] Fix | Delete
#define BIT0 0x0001
[18] Fix | Delete
#define BIT1 0x0002
[19] Fix | Delete
#define BIT2 0x0004
[20] Fix | Delete
#define BIT3 0x0008
[21] Fix | Delete
#define BIT4 0x0010
[22] Fix | Delete
#define BIT5 0x0020
[23] Fix | Delete
#define BIT6 0x0040
[24] Fix | Delete
#define BIT7 0x0080
[25] Fix | Delete
#define BIT8 0x0100
[26] Fix | Delete
#define BIT9 0x0200
[27] Fix | Delete
#define BIT10 0x0400
[28] Fix | Delete
#define BIT11 0x0800
[29] Fix | Delete
#define BIT12 0x1000
[30] Fix | Delete
#define BIT13 0x2000
[31] Fix | Delete
#define BIT14 0x4000
[32] Fix | Delete
#define BIT15 0x8000
[33] Fix | Delete
#define BIT16 0x00010000
[34] Fix | Delete
#define BIT17 0x00020000
[35] Fix | Delete
#define BIT18 0x00040000
[36] Fix | Delete
#define BIT19 0x00080000
[37] Fix | Delete
#define BIT20 0x00100000
[38] Fix | Delete
#define BIT21 0x00200000
[39] Fix | Delete
#define BIT22 0x00400000
[40] Fix | Delete
#define BIT23 0x00800000
[41] Fix | Delete
#define BIT24 0x01000000
[42] Fix | Delete
#define BIT25 0x02000000
[43] Fix | Delete
#define BIT26 0x04000000
[44] Fix | Delete
#define BIT27 0x08000000
[45] Fix | Delete
#define BIT28 0x10000000
[46] Fix | Delete
#define BIT29 0x20000000
[47] Fix | Delete
#define BIT30 0x40000000
[48] Fix | Delete
#define BIT31 0x80000000
[49] Fix | Delete
[50] Fix | Delete
[51] Fix | Delete
#define HDLC_MAX_FRAME_SIZE 65535
[52] Fix | Delete
#define MAX_ASYNC_TRANSMIT 4096
[53] Fix | Delete
#define MAX_ASYNC_BUFFER_SIZE 4096
[54] Fix | Delete
[55] Fix | Delete
#define ASYNC_PARITY_NONE 0
[56] Fix | Delete
#define ASYNC_PARITY_EVEN 1
[57] Fix | Delete
#define ASYNC_PARITY_ODD 2
[58] Fix | Delete
#define ASYNC_PARITY_SPACE 3
[59] Fix | Delete
[60] Fix | Delete
#define HDLC_FLAG_UNDERRUN_ABORT7 0x0000
[61] Fix | Delete
#define HDLC_FLAG_UNDERRUN_ABORT15 0x0001
[62] Fix | Delete
#define HDLC_FLAG_UNDERRUN_FLAG 0x0002
[63] Fix | Delete
#define HDLC_FLAG_UNDERRUN_CRC 0x0004
[64] Fix | Delete
#define HDLC_FLAG_SHARE_ZERO 0x0010
[65] Fix | Delete
#define HDLC_FLAG_AUTO_CTS 0x0020
[66] Fix | Delete
#define HDLC_FLAG_AUTO_DCD 0x0040
[67] Fix | Delete
#define HDLC_FLAG_AUTO_RTS 0x0080
[68] Fix | Delete
#define HDLC_FLAG_RXC_DPLL 0x0100
[69] Fix | Delete
#define HDLC_FLAG_RXC_BRG 0x0200
[70] Fix | Delete
#define HDLC_FLAG_RXC_TXCPIN 0x8000
[71] Fix | Delete
#define HDLC_FLAG_RXC_RXCPIN 0x0000
[72] Fix | Delete
#define HDLC_FLAG_TXC_DPLL 0x0400
[73] Fix | Delete
#define HDLC_FLAG_TXC_BRG 0x0800
[74] Fix | Delete
#define HDLC_FLAG_TXC_TXCPIN 0x0000
[75] Fix | Delete
#define HDLC_FLAG_TXC_RXCPIN 0x0008
[76] Fix | Delete
#define HDLC_FLAG_DPLL_DIV8 0x1000
[77] Fix | Delete
#define HDLC_FLAG_DPLL_DIV16 0x2000
[78] Fix | Delete
#define HDLC_FLAG_DPLL_DIV32 0x0000
[79] Fix | Delete
#define HDLC_FLAG_HDLC_LOOPMODE 0x4000
[80] Fix | Delete
[81] Fix | Delete
#define HDLC_CRC_NONE 0
[82] Fix | Delete
#define HDLC_CRC_16_CCITT 1
[83] Fix | Delete
#define HDLC_CRC_32_CCITT 2
[84] Fix | Delete
#define HDLC_CRC_MASK 0x00ff
[85] Fix | Delete
#define HDLC_CRC_RETURN_EX 0x8000
[86] Fix | Delete
[87] Fix | Delete
#define RX_OK 0
[88] Fix | Delete
#define RX_CRC_ERROR 1
[89] Fix | Delete
[90] Fix | Delete
#define HDLC_TXIDLE_FLAGS 0
[91] Fix | Delete
#define HDLC_TXIDLE_ALT_ZEROS_ONES 1
[92] Fix | Delete
#define HDLC_TXIDLE_ZEROS 2
[93] Fix | Delete
#define HDLC_TXIDLE_ONES 3
[94] Fix | Delete
#define HDLC_TXIDLE_ALT_MARK_SPACE 4
[95] Fix | Delete
#define HDLC_TXIDLE_SPACE 5
[96] Fix | Delete
#define HDLC_TXIDLE_MARK 6
[97] Fix | Delete
#define HDLC_TXIDLE_CUSTOM_8 0x10000000
[98] Fix | Delete
#define HDLC_TXIDLE_CUSTOM_16 0x20000000
[99] Fix | Delete
[100] Fix | Delete
#define HDLC_ENCODING_NRZ 0
[101] Fix | Delete
#define HDLC_ENCODING_NRZB 1
[102] Fix | Delete
#define HDLC_ENCODING_NRZI_MARK 2
[103] Fix | Delete
#define HDLC_ENCODING_NRZI_SPACE 3
[104] Fix | Delete
#define HDLC_ENCODING_NRZI HDLC_ENCODING_NRZI_SPACE
[105] Fix | Delete
#define HDLC_ENCODING_BIPHASE_MARK 4
[106] Fix | Delete
#define HDLC_ENCODING_BIPHASE_SPACE 5
[107] Fix | Delete
#define HDLC_ENCODING_BIPHASE_LEVEL 6
[108] Fix | Delete
#define HDLC_ENCODING_DIFF_BIPHASE_LEVEL 7
[109] Fix | Delete
[110] Fix | Delete
#define HDLC_PREAMBLE_LENGTH_8BITS 0
[111] Fix | Delete
#define HDLC_PREAMBLE_LENGTH_16BITS 1
[112] Fix | Delete
#define HDLC_PREAMBLE_LENGTH_32BITS 2
[113] Fix | Delete
#define HDLC_PREAMBLE_LENGTH_64BITS 3
[114] Fix | Delete
[115] Fix | Delete
#define HDLC_PREAMBLE_PATTERN_NONE 0
[116] Fix | Delete
#define HDLC_PREAMBLE_PATTERN_ZEROS 1
[117] Fix | Delete
#define HDLC_PREAMBLE_PATTERN_FLAGS 2
[118] Fix | Delete
#define HDLC_PREAMBLE_PATTERN_10 3
[119] Fix | Delete
#define HDLC_PREAMBLE_PATTERN_01 4
[120] Fix | Delete
#define HDLC_PREAMBLE_PATTERN_ONES 5
[121] Fix | Delete
[122] Fix | Delete
#define MGSL_MODE_ASYNC 1
[123] Fix | Delete
#define MGSL_MODE_HDLC 2
[124] Fix | Delete
#define MGSL_MODE_MONOSYNC 3
[125] Fix | Delete
#define MGSL_MODE_BISYNC 4
[126] Fix | Delete
#define MGSL_MODE_RAW 6
[127] Fix | Delete
#define MGSL_MODE_BASE_CLOCK 7
[128] Fix | Delete
#define MGSL_MODE_XSYNC 8
[129] Fix | Delete
[130] Fix | Delete
#define MGSL_BUS_TYPE_ISA 1
[131] Fix | Delete
#define MGSL_BUS_TYPE_EISA 2
[132] Fix | Delete
#define MGSL_BUS_TYPE_PCI 5
[133] Fix | Delete
[134] Fix | Delete
#define MGSL_INTERFACE_MASK 0xf
[135] Fix | Delete
#define MGSL_INTERFACE_DISABLE 0
[136] Fix | Delete
#define MGSL_INTERFACE_RS232 1
[137] Fix | Delete
#define MGSL_INTERFACE_V35 2
[138] Fix | Delete
#define MGSL_INTERFACE_RS422 3
[139] Fix | Delete
#define MGSL_INTERFACE_RTS_EN 0x10
[140] Fix | Delete
#define MGSL_INTERFACE_LL 0x20
[141] Fix | Delete
#define MGSL_INTERFACE_RL 0x40
[142] Fix | Delete
#define MGSL_INTERFACE_MSB_FIRST 0x80
[143] Fix | Delete
[144] Fix | Delete
typedef struct _MGSL_PARAMS
[145] Fix | Delete
{
[146] Fix | Delete
/* Common */
[147] Fix | Delete
[148] Fix | Delete
unsigned long mode; /* Asynchronous or HDLC */
[149] Fix | Delete
unsigned char loopback; /* internal loopback mode */
[150] Fix | Delete
[151] Fix | Delete
/* HDLC Only */
[152] Fix | Delete
[153] Fix | Delete
unsigned short flags;
[154] Fix | Delete
unsigned char encoding; /* NRZ, NRZI, etc. */
[155] Fix | Delete
unsigned long clock_speed; /* external clock speed in bits per second */
[156] Fix | Delete
unsigned char addr_filter; /* receive HDLC address filter, 0xFF = disable */
[157] Fix | Delete
unsigned short crc_type; /* None, CRC16-CCITT, or CRC32-CCITT */
[158] Fix | Delete
unsigned char preamble_length;
[159] Fix | Delete
unsigned char preamble;
[160] Fix | Delete
[161] Fix | Delete
/* Async Only */
[162] Fix | Delete
[163] Fix | Delete
unsigned long data_rate; /* bits per second */
[164] Fix | Delete
unsigned char data_bits; /* 7 or 8 data bits */
[165] Fix | Delete
unsigned char stop_bits; /* 1 or 2 stop bits */
[166] Fix | Delete
unsigned char parity; /* none, even, or odd */
[167] Fix | Delete
[168] Fix | Delete
} MGSL_PARAMS, *PMGSL_PARAMS;
[169] Fix | Delete
[170] Fix | Delete
#define MICROGATE_VENDOR_ID 0x13c0
[171] Fix | Delete
#define SYNCLINK_DEVICE_ID 0x0010
[172] Fix | Delete
#define MGSCC_DEVICE_ID 0x0020
[173] Fix | Delete
#define SYNCLINK_SCA_DEVICE_ID 0x0030
[174] Fix | Delete
#define SYNCLINK_GT_DEVICE_ID 0x0070
[175] Fix | Delete
#define SYNCLINK_GT4_DEVICE_ID 0x0080
[176] Fix | Delete
#define SYNCLINK_AC_DEVICE_ID 0x0090
[177] Fix | Delete
#define SYNCLINK_GT2_DEVICE_ID 0x00A0
[178] Fix | Delete
#define MGSL_MAX_SERIAL_NUMBER 30
[179] Fix | Delete
[180] Fix | Delete
/*
[181] Fix | Delete
** device diagnostics status
[182] Fix | Delete
*/
[183] Fix | Delete
[184] Fix | Delete
#define DiagStatus_OK 0
[185] Fix | Delete
#define DiagStatus_AddressFailure 1
[186] Fix | Delete
#define DiagStatus_AddressConflict 2
[187] Fix | Delete
#define DiagStatus_IrqFailure 3
[188] Fix | Delete
#define DiagStatus_IrqConflict 4
[189] Fix | Delete
#define DiagStatus_DmaFailure 5
[190] Fix | Delete
#define DiagStatus_DmaConflict 6
[191] Fix | Delete
#define DiagStatus_PciAdapterNotFound 7
[192] Fix | Delete
#define DiagStatus_CantAssignPciResources 8
[193] Fix | Delete
#define DiagStatus_CantAssignPciMemAddr 9
[194] Fix | Delete
#define DiagStatus_CantAssignPciIoAddr 10
[195] Fix | Delete
#define DiagStatus_CantAssignPciIrq 11
[196] Fix | Delete
#define DiagStatus_MemoryError 12
[197] Fix | Delete
[198] Fix | Delete
#define SerialSignal_DCD 0x01 /* Data Carrier Detect */
[199] Fix | Delete
#define SerialSignal_TXD 0x02 /* Transmit Data */
[200] Fix | Delete
#define SerialSignal_RI 0x04 /* Ring Indicator */
[201] Fix | Delete
#define SerialSignal_RXD 0x08 /* Receive Data */
[202] Fix | Delete
#define SerialSignal_CTS 0x10 /* Clear to Send */
[203] Fix | Delete
#define SerialSignal_RTS 0x20 /* Request to Send */
[204] Fix | Delete
#define SerialSignal_DSR 0x40 /* Data Set Ready */
[205] Fix | Delete
#define SerialSignal_DTR 0x80 /* Data Terminal Ready */
[206] Fix | Delete
[207] Fix | Delete
[208] Fix | Delete
/*
[209] Fix | Delete
* Counters of the input lines (CTS, DSR, RI, CD) interrupts
[210] Fix | Delete
*/
[211] Fix | Delete
struct mgsl_icount {
[212] Fix | Delete
__u32 cts, dsr, rng, dcd, tx, rx;
[213] Fix | Delete
__u32 frame, parity, overrun, brk;
[214] Fix | Delete
__u32 buf_overrun;
[215] Fix | Delete
__u32 txok;
[216] Fix | Delete
__u32 txunder;
[217] Fix | Delete
__u32 txabort;
[218] Fix | Delete
__u32 txtimeout;
[219] Fix | Delete
__u32 rxshort;
[220] Fix | Delete
__u32 rxlong;
[221] Fix | Delete
__u32 rxabort;
[222] Fix | Delete
__u32 rxover;
[223] Fix | Delete
__u32 rxcrc;
[224] Fix | Delete
__u32 rxok;
[225] Fix | Delete
__u32 exithunt;
[226] Fix | Delete
__u32 rxidle;
[227] Fix | Delete
};
[228] Fix | Delete
[229] Fix | Delete
struct gpio_desc {
[230] Fix | Delete
__u32 state;
[231] Fix | Delete
__u32 smask;
[232] Fix | Delete
__u32 dir;
[233] Fix | Delete
__u32 dmask;
[234] Fix | Delete
};
[235] Fix | Delete
[236] Fix | Delete
#define DEBUG_LEVEL_DATA 1
[237] Fix | Delete
#define DEBUG_LEVEL_ERROR 2
[238] Fix | Delete
#define DEBUG_LEVEL_INFO 3
[239] Fix | Delete
#define DEBUG_LEVEL_BH 4
[240] Fix | Delete
#define DEBUG_LEVEL_ISR 5
[241] Fix | Delete
[242] Fix | Delete
/*
[243] Fix | Delete
** Event bit flags for use with MgslWaitEvent
[244] Fix | Delete
*/
[245] Fix | Delete
[246] Fix | Delete
#define MgslEvent_DsrActive 0x0001
[247] Fix | Delete
#define MgslEvent_DsrInactive 0x0002
[248] Fix | Delete
#define MgslEvent_Dsr 0x0003
[249] Fix | Delete
#define MgslEvent_CtsActive 0x0004
[250] Fix | Delete
#define MgslEvent_CtsInactive 0x0008
[251] Fix | Delete
#define MgslEvent_Cts 0x000c
[252] Fix | Delete
#define MgslEvent_DcdActive 0x0010
[253] Fix | Delete
#define MgslEvent_DcdInactive 0x0020
[254] Fix | Delete
#define MgslEvent_Dcd 0x0030
[255] Fix | Delete
#define MgslEvent_RiActive 0x0040
[256] Fix | Delete
#define MgslEvent_RiInactive 0x0080
[257] Fix | Delete
#define MgslEvent_Ri 0x00c0
[258] Fix | Delete
#define MgslEvent_ExitHuntMode 0x0100
[259] Fix | Delete
#define MgslEvent_IdleReceived 0x0200
[260] Fix | Delete
[261] Fix | Delete
/* Private IOCTL codes:
[262] Fix | Delete
*
[263] Fix | Delete
* MGSL_IOCSPARAMS set MGSL_PARAMS structure values
[264] Fix | Delete
* MGSL_IOCGPARAMS get current MGSL_PARAMS structure values
[265] Fix | Delete
* MGSL_IOCSTXIDLE set current transmit idle mode
[266] Fix | Delete
* MGSL_IOCGTXIDLE get current transmit idle mode
[267] Fix | Delete
* MGSL_IOCTXENABLE enable or disable transmitter
[268] Fix | Delete
* MGSL_IOCRXENABLE enable or disable receiver
[269] Fix | Delete
* MGSL_IOCTXABORT abort transmitting frame (HDLC)
[270] Fix | Delete
* MGSL_IOCGSTATS return current statistics
[271] Fix | Delete
* MGSL_IOCWAITEVENT wait for specified event to occur
[272] Fix | Delete
* MGSL_LOOPTXDONE transmit in HDLC LoopMode done
[273] Fix | Delete
* MGSL_IOCSIF set the serial interface type
[274] Fix | Delete
* MGSL_IOCGIF get the serial interface type
[275] Fix | Delete
*/
[276] Fix | Delete
#define MGSL_MAGIC_IOC 'm'
[277] Fix | Delete
#define MGSL_IOCSPARAMS _IOW(MGSL_MAGIC_IOC,0,struct _MGSL_PARAMS)
[278] Fix | Delete
#define MGSL_IOCGPARAMS _IOR(MGSL_MAGIC_IOC,1,struct _MGSL_PARAMS)
[279] Fix | Delete
#define MGSL_IOCSTXIDLE _IO(MGSL_MAGIC_IOC,2)
[280] Fix | Delete
#define MGSL_IOCGTXIDLE _IO(MGSL_MAGIC_IOC,3)
[281] Fix | Delete
#define MGSL_IOCTXENABLE _IO(MGSL_MAGIC_IOC,4)
[282] Fix | Delete
#define MGSL_IOCRXENABLE _IO(MGSL_MAGIC_IOC,5)
[283] Fix | Delete
#define MGSL_IOCTXABORT _IO(MGSL_MAGIC_IOC,6)
[284] Fix | Delete
#define MGSL_IOCGSTATS _IO(MGSL_MAGIC_IOC,7)
[285] Fix | Delete
#define MGSL_IOCWAITEVENT _IOWR(MGSL_MAGIC_IOC,8,int)
[286] Fix | Delete
#define MGSL_IOCCLRMODCOUNT _IO(MGSL_MAGIC_IOC,15)
[287] Fix | Delete
#define MGSL_IOCLOOPTXDONE _IO(MGSL_MAGIC_IOC,9)
[288] Fix | Delete
#define MGSL_IOCSIF _IO(MGSL_MAGIC_IOC,10)
[289] Fix | Delete
#define MGSL_IOCGIF _IO(MGSL_MAGIC_IOC,11)
[290] Fix | Delete
#define MGSL_IOCSGPIO _IOW(MGSL_MAGIC_IOC,16,struct gpio_desc)
[291] Fix | Delete
#define MGSL_IOCGGPIO _IOR(MGSL_MAGIC_IOC,17,struct gpio_desc)
[292] Fix | Delete
#define MGSL_IOCWAITGPIO _IOWR(MGSL_MAGIC_IOC,18,struct gpio_desc)
[293] Fix | Delete
#define MGSL_IOCSXSYNC _IO(MGSL_MAGIC_IOC, 19)
[294] Fix | Delete
#define MGSL_IOCGXSYNC _IO(MGSL_MAGIC_IOC, 20)
[295] Fix | Delete
#define MGSL_IOCSXCTRL _IO(MGSL_MAGIC_IOC, 21)
[296] Fix | Delete
#define MGSL_IOCGXCTRL _IO(MGSL_MAGIC_IOC, 22)
[297] Fix | Delete
[298] Fix | Delete
[299] Fix | Delete
#endif /* _SYNCLINK_H_ */
[300] Fix | Delete
[301] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function