Go to the documentation of this file.
27 #ifdef CONFIG_ATM_AMBASSADOR_DEBUG
28 #define DEBUG_AMBASSADOR
31 #define DEV_LABEL "amb"
33 #ifndef PCI_VENDOR_ID_MADGE
34 #define PCI_VENDOR_ID_MADGE 0x10B6
36 #ifndef PCI_VENDOR_ID_MADGE_AMBASSADOR
37 #define PCI_DEVICE_ID_MADGE_AMBASSADOR 0x1001
39 #ifndef PCI_VENDOR_ID_MADGE_AMBASSADOR_BAD
40 #define PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD 0x1002
45 #define PRINTK(severity,format,args...) \
46 printk(severity DEV_LABEL ": " format "\n" , ## args)
48 #ifdef DEBUG_AMBASSADOR
50 #define DBG_ERR 0x0001
51 #define DBG_WARN 0x0002
52 #define DBG_INFO 0x0004
53 #define DBG_INIT 0x0008
54 #define DBG_LOAD 0x0010
55 #define DBG_VCC 0x0020
56 #define DBG_QOS 0x0040
57 #define DBG_CMD 0x0080
60 #define DBG_SKB 0x0400
61 #define DBG_POOL 0x0800
62 #define DBG_IRQ 0x1000
63 #define DBG_FLOW 0x2000
64 #define DBG_REGS 0x4000
65 #define DBG_DATA 0x8000
66 #define DBG_MASK 0xffff
70 #define PRINTDB(bits,format,args...) \
71 ( (debug & (bits)) ? printk (KERN_INFO DEV_LABEL ": " format , ## args) : 1 )
72 #define PRINTDM(bits,format,args...) \
73 ( (debug & (bits)) ? printk (format , ## args) : 1 )
74 #define PRINTDE(bits,format,args...) \
75 ( (debug & (bits)) ? printk (format "\n" , ## args) : 1 )
76 #define PRINTD(bits,format,args...) \
77 ( (debug & (bits)) ? printk (KERN_INFO DEV_LABEL ": " format "\n" , ## args) : 1 )
81 #define PRINTD(bits,format,args...)
82 #define PRINTDB(bits,format,args...)
83 #define PRINTDM(bits,format,args...)
84 #define PRINTDE(bits,format,args...)
88 #define PRINTDD(bits,format,args...)
89 #define PRINTDDB(sec,fmt,args...)
90 #define PRINTDDM(sec,fmt,args...)
91 #define PRINTDDE(sec,fmt,args...)
96 #define COM_Q_ENTRIES 8
97 #define TX_Q_ENTRIES 32
98 #define RX_Q_ENTRIES 64
103 #define AMB_EXTENT 0x80
106 #define MIN_QUEUE_SIZE 2
109 #define NUM_RX_POOLS 4
112 #define MIN_RX_BUFFERS 1
115 #define MIN_PCI_LATENCY 64 // 255
118 #define NUM_VPI_BITS 0
119 #define NUM_VCI_BITS 10
123 #define RX_ERR 0x8000 // always present if there is an error (hmm)
124 #define CRC_ERR 0x4000 // AAL5 CRC error
125 #define LEN_ERR 0x2000 // overlength frame
126 #define ABORT_ERR 0x1000 // zero length field in received frame
127 #define UNUSED_ERR 0x0800 // buffer returned unused
131 #define SRB_OPEN_VC 0
147 #define SRB_CLOSE_VC 1
150 #define SRB_GET_BIA 2
155 #define SRB_GET_SUNI_STATS 3
158 #define SRB_SET_BITS_8 4
159 #define SRB_SET_BITS_16 5
160 #define SRB_SET_BITS_32 6
161 #define SRB_CLEAR_BITS_8 7
162 #define SRB_CLEAR_BITS_16 8
163 #define SRB_CLEAR_BITS_32 9
168 #define SRB_SET_16 11
169 #define SRB_SET_32 12
173 #define SRB_GET_32 13
178 #define SRB_GET_VERSION 14
183 #define SRB_FLUSH_BUFFER_Q 15
187 #define SRB_GET_DMA_SPEEDS 16
192 #define SRB_MODIFY_VC_RATE 17
196 #define SRB_MODIFY_VC_FLAGS 18
211 #define SRB_RATE_SHIFT 16
212 #define SRB_POOL_SHIFT (SRB_FLAGS_SHIFT+5)
213 #define SRB_FLAGS_SHIFT 16
215 #define SRB_STOP_TASKING 19
216 #define SRB_START_TASKING 20
217 #define SRB_SHUT_DOWN 21
220 #define SRB_COMPLETE 0xffffffff
222 #define TX_FRAME 0x80000000
225 #define NUM_OF_SRB 32
228 #define MAX_RATE_BITS 6
230 #define TX_UBR 0x0000
231 #define TX_UBR_CAPPED 0x0008
232 #define TX_ABR 0x0018
233 #define TX_FRAME_NOTCAP 0x0000
234 #define TX_FRAME_CAPPED 0x8000
236 #define FP_155_RATE 0x24b1
237 #define FP_25_RATE 0x1f9d
252 #define VERSION_NUMBER 0x01050025
255 #define DMA_VALID 0xb728e149
257 #define FLASH_BASE 0xa0c00000
258 #define FLASH_SIZE 0x00020000
259 #define BIA_BASE (FLASH_BASE+0x0001c000)
260 #define BIA_ADDRESS ((void *)0xa0c1c000)
261 #define PLX_BASE 0xe0000000
277 #define BAD_COMMAND (-1)
278 #define COMMAND_IN_PROGRESS 1
279 #define COMMAND_PASSED_TEST 2
280 #define COMMAND_FAILED_TEST 3
281 #define COMMAND_READ_DATA_OK 4
282 #define COMMAND_READ_BAD_ADDRESS 5
283 #define COMMAND_WRITE_DATA_OK 6
284 #define COMMAND_WRITE_BAD_ADDRESS 7
285 #define COMMAND_WRITE_FLASH_FAILURE 8
286 #define COMMAND_COMPLETE 9
287 #define COMMAND_FLASH_ERASE_FAILURE 10
288 #define COMMAND_WRITE_BAD_DATA 11
292 #define GPINT_TST_FAILURE 0x00000001
293 #define SUNI_DATA_PATTERN_FAILURE 0x00000002
294 #define SUNI_DATA_BITS_FAILURE 0x00000004
295 #define SUNI_UTOPIA_FAILURE 0x00000008
296 #define SUNI_FIFO_FAILURE 0x00000010
297 #define SRAM_FAILURE 0x00000020
298 #define SELF_TEST_FAILURE 0x0000003f
309 #define UNUSED_LOADER_MAILBOXES 6
334 #define AMB_RESET_BITS 0x40000000
335 #define AMB_INTERRUPT_BITS 0x00000300
336 #define AMB_DOORBELL_BITS 0x00030000
340 #define MAX_COMMAND_DATA 13
341 #define MAX_TRANSFER_DATA 11
431 #ifdef AMB_NEW_MICROCODE
514 #ifdef AMB_NEW_MICROCODE
516 u16 talk_block_spare;
540 #define NEXTQ(current,start,limit) \
541 ( (current)+1 < (limit) ? (current)+1 : (start) )
652 #define AMB_DEV(atm_dev) ((amb_dev *) (atm_dev)->dev_data)
653 #define AMB_VCC(atm_vcc) ((amb_vcc *) (atm_vcc)->dev_data)