1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #ifndef TARGETOS_H
17 #define TARGETOS_H
18
19
20
21 #define PCI_VENDOR_ID_SK 0x1148
22 #define PCI_DEVICE_ID_SK_FP 0x4000
23
24
25
26
27
28 #define FDDI_MAC_HDR_LEN 13
29
30 #define FDDI_RII 0x01
31 #define FDDI_RCF_DIR_BIT 0x80
32 #define FDDI_RCF_LEN_MASK 0x1f
33 #define FDDI_RCF_BROADCAST 0x8000
34 #define FDDI_RCF_LIMITED_BROADCAST 0xA000
35 #define FDDI_RCF_FRAME2K 0x20
36 #define FDDI_RCF_FRAME4K 0x30
37
38
39
40 #undef ADDR
41
42 #include <asm/io.h>
43 #include <linux/netdevice.h>
44 #include <linux/fddidevice.h>
45 #include <linux/skbuff.h>
46 #include <linux/pci.h>
47
48
49 #undef ADDR
50 #ifdef MEM_MAPPED_IO
51 #define ADDR(a) (smc->hw.iop+(a))
52 #else
53 #define ADDR(a) (((a)>>7) ? (outp(smc->hw.iop+B0_RAP,(a)>>7), (smc->hw.iop+( ((a)&0x7F) | ((a)>>7 ? 0x80:0)) )) : (smc->hw.iop+(((a)&0x7F)|((a)>>7 ? 0x80:0))))
54 #endif
55
56 #include "hwmtm.h"
57
58 #define TRUE 1
59 #define FALSE 0
60
61
62
63 #define FDDI_TRACE(string, arg1, arg2, arg3)
64 #ifdef PCI
65 #define NDD_TRACE(string, arg1, arg2, arg3)
66 #endif
67 #define SMT_PAGESIZE PAGE_SIZE
68
69
70
71
72
73 #define TICKS_PER_SECOND HZ
74 #define SMC_VERSION 1
75
76
77
78
79
80 #define NO_ADDRESS 0xffe0
81 #define SKFP_MAX_NUM_BOARDS 8
82
83 #define SK_BUS_TYPE_PCI 0
84 #define SK_BUS_TYPE_EISA 1
85
86 #define FP_IO_LEN 256
87
88 #define u8 unsigned char
89 #define u16 unsigned short
90 #define u32 unsigned int
91
92 #define MAX_TX_QUEUE_LEN 20
93 #define MAX_FRAME_SIZE 4550
94
95 #define RX_LOW_WATERMARK NUM_RECEIVE_BUFFERS / 2
96 #define TX_LOW_WATERMARK NUM_TRANSMIT_BUFFERS - 2
97
98
99
100
101 #include <linux/sockios.h>
102
103 #define SKFPIOCTL SIOCDEVPRIVATE
104
105 struct s_skfp_ioctl {
106 unsigned short cmd;
107 unsigned short len;
108 unsigned char __user *data;
109 };
110
111
112
113
114 #define SKFP_GET_STATS 0x05
115 #define SKFP_CLR_STATS 0x06
116
117
118 struct s_smt_os {
119 struct net_device *dev;
120 struct net_device *next_module;
121 u32 bus_type;
122 struct pci_dev pdev;
123
124 unsigned long base_addr;
125 unsigned char factory_mac_addr[8];
126 ulong SharedMemSize;
127 ulong SharedMemHeap;
128 void* SharedMemAddr;
129 dma_addr_t SharedMemDMA;
130
131 ulong QueueSkb;
132 struct sk_buff_head SendSkbQueue;
133
134 ulong MaxFrameSize;
135 u8 ResetRequested;
136
137
138 struct fddi_statistics MacStat;
139
140
141
142
143
144 unsigned char *LocalRxBuffer;
145 dma_addr_t LocalRxBufferDMA;
146
147
148 u_long smc_version ;
149
150
151 struct hw_modul hwm ;
152
153
154 spinlock_t DriverLock;
155
156 };
157
158 typedef struct s_smt_os skfddi_priv;
159
160 #endif