1 /* sbni.h: definitions for a Granch SBNI12 driver, version 5.0.0
2 * Written 2001 Denis I.Timofeev (timofeev@granch.ru)
3 * This file is distributed under the GNU GPL
16 /* We don't have official vendor id yet... */
17 #define SBNI_PCI_VENDOR 0x55
18 #define SBNI_PCI_DEVICE 0x9f
23 #define SBNI_IO_EXTENT 4
52 /* fields in frame header */
53 #define FRAME_ACK_MASK (unsigned short)0x7000
54 #define FRAME_LEN_MASK (unsigned short)0x03FF
55 #define FRAME_FIRST (unsigned short)0x8000
56 #define FRAME_RETRY (unsigned short)0x0800
58 #define FRAME_SENT_BAD (unsigned short)0x4000
59 #define FRAME_SENT_OK (unsigned short)0x3000
65 FL_NEED_RESEND
= 0x02,
69 #ifdef CONFIG_SBNI_MULTILINE
77 DEFAULT_IOBASEADDR
= 0x210,
78 DEFAULT_INTERRUPTNUMBER
= 5,
80 DEFAULT_FRAME_LEN
= 1012
83 #define DEF_RXL_DELTA -1
88 #define SBNI_MIN_LEN 60 /* Shortest Ethernet frame without FCS */
89 #define SBNI_MAX_FRAME 1023
90 #define ETHER_MAX_LEN 1518
92 #define SBNI_TIMEOUT (HZ/10)
94 #define TR_ERROR_COUNT 32
95 #define CHANGE_LEVEL_START_TICKS 4
97 #define SBNI_MAX_NUM_CARDS 16
99 /* internal SBNI-specific statistics */
100 struct sbni_in_stats
{
105 u32 resend_tx_number
;
108 /* SBNI ioctl params */
109 #define SIOCDEVGETINSTATS SIOCDEVPRIVATE
110 #define SIOCDEVRESINSTATS SIOCDEVPRIVATE+1
111 #define SIOCDEVGHWSTATE SIOCDEVPRIVATE+2
112 #define SIOCDEVSHWSTATE SIOCDEVPRIVATE+3
113 #define SIOCDEVENSLAVE SIOCDEVPRIVATE+4
114 #define SIOCDEVEMANSIPATE SIOCDEVPRIVATE+5
117 /* data packet for SIOCDEVGHWSTATE/SIOCDEVSHWSTATE ioctl requests */
129 #define CRC32(c,crc) (crc32tab[((size_t)(crc) ^ (c)) & 0xff] ^ (((crc) >> 8) & 0x00FFFFFF))
130 /* CRC generator 0xEDB88320 */
131 /* CRC remainder 0x2144DF1C */
132 /* CRC initial value 0x00000000 */
133 #define CRC32_REMAINDER 0x2144DF1C
134 #define CRC32_INITIAL 0x00000000
This page took 0.033413 seconds and 5 git commands to generate.