Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations
ambassador.h File Reference

Go to the source code of this file.

Data Structures

struct  amb_mem
 
struct  transfer_block
 
struct  loader_block
 
struct  command
 
struct  tx_frag
 
struct  tx_frag_end
 
struct  tx_simple
 
struct  tx_in
 
struct  tx_out
 
struct  rx_out
 
struct  rx_in
 
struct  adap_talk_block
 
struct  suni_stats
 
struct  amb_cq_ptrs
 
struct  amb_cq
 
struct  amb_txq
 
struct  amb_rxq
 
struct  amb_stats
 
struct  amb_tx_info
 
struct  amb_rx_info
 
struct  amb_vcc
 
struct  amb_dev
 

Macros

#define DEV_LABEL   "amb"
 
#define PCI_VENDOR_ID_MADGE   0x10B6
 
#define PCI_DEVICE_ID_MADGE_AMBASSADOR   0x1001
 
#define PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD   0x1002
 
#define PRINTK(severity, format, args...)   printk(severity DEV_LABEL ": " format "\n" , ## args)
 
#define PRINTD(bits, format, args...)
 
#define PRINTDB(bits, format, args...)
 
#define PRINTDM(bits, format, args...)
 
#define PRINTDE(bits, format, args...)
 
#define PRINTDD(bits, format, args...)
 
#define PRINTDDB(sec, fmt, args...)
 
#define PRINTDDM(sec, fmt, args...)
 
#define PRINTDDE(sec, fmt, args...)
 
#define COM_Q_ENTRIES   8
 
#define TX_Q_ENTRIES   32
 
#define RX_Q_ENTRIES   64
 
#define AMB_EXTENT   0x80
 
#define MIN_QUEUE_SIZE   2
 
#define NUM_RX_POOLS   4
 
#define MIN_RX_BUFFERS   1
 
#define MIN_PCI_LATENCY   64
 
#define NUM_VPI_BITS   0
 
#define NUM_VCI_BITS   10
 
#define NUM_VCS   1024
 
#define RX_ERR   0x8000
 
#define CRC_ERR   0x4000
 
#define LEN_ERR   0x2000
 
#define ABORT_ERR   0x1000
 
#define UNUSED_ERR   0x0800
 
#define SRB_OPEN_VC   0
 
#define SRB_CLOSE_VC   1
 
#define SRB_GET_BIA   2
 
#define SRB_GET_SUNI_STATS   3
 
#define SRB_SET_BITS_8   4
 
#define SRB_SET_BITS_16   5
 
#define SRB_SET_BITS_32   6
 
#define SRB_CLEAR_BITS_8   7
 
#define SRB_CLEAR_BITS_16   8
 
#define SRB_CLEAR_BITS_32   9
 
#define SRB_SET_8   10
 
#define SRB_SET_16   11
 
#define SRB_SET_32   12
 
#define SRB_GET_32   13
 
#define SRB_GET_VERSION   14
 
#define SRB_FLUSH_BUFFER_Q   15
 
#define SRB_GET_DMA_SPEEDS   16
 
#define SRB_MODIFY_VC_RATE   17
 
#define SRB_MODIFY_VC_FLAGS   18
 
#define SRB_RATE_SHIFT   16
 
#define SRB_POOL_SHIFT   (SRB_FLAGS_SHIFT+5)
 
#define SRB_FLAGS_SHIFT   16
 
#define SRB_STOP_TASKING   19
 
#define SRB_START_TASKING   20
 
#define SRB_SHUT_DOWN   21
 
#define MAX_SRB   21
 
#define SRB_COMPLETE   0xffffffff
 
#define TX_FRAME   0x80000000
 
#define NUM_OF_SRB   32
 
#define MAX_RATE_BITS   6
 
#define TX_UBR   0x0000
 
#define TX_UBR_CAPPED   0x0008
 
#define TX_ABR   0x0018
 
#define TX_FRAME_NOTCAP   0x0000
 
#define TX_FRAME_CAPPED   0x8000
 
#define FP_155_RATE   0x24b1
 
#define FP_25_RATE   0x1f9d
 
#define VERSION_NUMBER   0x01050025 /* Jason's first hacked version. */
 
#define DMA_VALID   0xb728e149 /* completely random */
 
#define FLASH_BASE   0xa0c00000
 
#define FLASH_SIZE   0x00020000 /* 128K */
 
#define BIA_BASE   (FLASH_BASE+0x0001c000) /* Flash Sector 7 */
 
#define BIA_ADDRESS   ((void *)0xa0c1c000)
 
#define PLX_BASE   0xe0000000
 
#define BAD_COMMAND   (-1)
 
#define COMMAND_IN_PROGRESS   1
 
#define COMMAND_PASSED_TEST   2
 
#define COMMAND_FAILED_TEST   3
 
#define COMMAND_READ_DATA_OK   4
 
#define COMMAND_READ_BAD_ADDRESS   5
 
#define COMMAND_WRITE_DATA_OK   6
 
#define COMMAND_WRITE_BAD_ADDRESS   7
 
#define COMMAND_WRITE_FLASH_FAILURE   8
 
#define COMMAND_COMPLETE   9
 
#define COMMAND_FLASH_ERASE_FAILURE   10
 
#define COMMAND_WRITE_BAD_DATA   11
 
#define GPINT_TST_FAILURE   0x00000001
 
#define SUNI_DATA_PATTERN_FAILURE   0x00000002
 
#define SUNI_DATA_BITS_FAILURE   0x00000004
 
#define SUNI_UTOPIA_FAILURE   0x00000008
 
#define SUNI_FIFO_FAILURE   0x00000010
 
#define SRAM_FAILURE   0x00000020
 
#define SELF_TEST_FAILURE   0x0000003f
 
#define UNUSED_LOADER_MAILBOXES   6
 
#define AMB_RESET_BITS   0x40000000
 
#define AMB_INTERRUPT_BITS   0x00000300
 
#define AMB_DOORBELL_BITS   0x00030000
 
#define MAX_COMMAND_DATA   13
 
#define MAX_TRANSFER_DATA   11
 
#define NEXTQ(current, start, limit)   ( (current)+1 < (limit) ? (current)+1 : (start) )
 
#define AMB_DEV(atm_dev)   ((amb_dev *) (atm_dev)->dev_data)
 
#define AMB_VCC(atm_vcc)   ((amb_vcc *) (atm_vcc)->dev_data)
 

Typedefs

typedef struct amb_dev amb_dev
 

Enumerations

enum  loader_command {
  host_memory_test = 1, read_adapter_memory, write_adapter_memory, adapter_start,
  get_version_number, interrupt_host, flash_erase_sector, adap_download_block = 0x20,
  adap_erase_flash, adap_run_in_iram, adap_end_download
}
 
enum  amb_flags { dead }
 
enum  rounding {
  round_up, round_down, round_nearest, round_up,
  round_down, round_nearest
}
 

Macro Definition Documentation

#define ABORT_ERR   0x1000

Definition at line 126 of file ambassador.h.

#define AMB_DEV (   atm_dev)    ((amb_dev *) (atm_dev)->dev_data)

Definition at line 652 of file ambassador.h.

#define AMB_DOORBELL_BITS   0x00030000

Definition at line 336 of file ambassador.h.

#define AMB_EXTENT   0x80

Definition at line 103 of file ambassador.h.

#define AMB_INTERRUPT_BITS   0x00000300

Definition at line 335 of file ambassador.h.

#define AMB_RESET_BITS   0x40000000

Definition at line 334 of file ambassador.h.

#define AMB_VCC (   atm_vcc)    ((amb_vcc *) (atm_vcc)->dev_data)

Definition at line 653 of file ambassador.h.

#define BAD_COMMAND   (-1)

Definition at line 277 of file ambassador.h.

#define BIA_ADDRESS   ((void *)0xa0c1c000)

Definition at line 260 of file ambassador.h.

#define BIA_BASE   (FLASH_BASE+0x0001c000) /* Flash Sector 7 */

Definition at line 259 of file ambassador.h.

#define COM_Q_ENTRIES   8

Definition at line 96 of file ambassador.h.

#define COMMAND_COMPLETE   9

Definition at line 286 of file ambassador.h.

#define COMMAND_FAILED_TEST   3

Definition at line 280 of file ambassador.h.

#define COMMAND_FLASH_ERASE_FAILURE   10

Definition at line 287 of file ambassador.h.

#define COMMAND_IN_PROGRESS   1

Definition at line 278 of file ambassador.h.

#define COMMAND_PASSED_TEST   2

Definition at line 279 of file ambassador.h.

#define COMMAND_READ_BAD_ADDRESS   5

Definition at line 282 of file ambassador.h.

#define COMMAND_READ_DATA_OK   4

Definition at line 281 of file ambassador.h.

#define COMMAND_WRITE_BAD_ADDRESS   7

Definition at line 284 of file ambassador.h.

#define COMMAND_WRITE_BAD_DATA   11

Definition at line 288 of file ambassador.h.

#define COMMAND_WRITE_DATA_OK   6

Definition at line 283 of file ambassador.h.

#define COMMAND_WRITE_FLASH_FAILURE   8

Definition at line 285 of file ambassador.h.

#define CRC_ERR   0x4000

Definition at line 124 of file ambassador.h.

#define DEV_LABEL   "amb"

Definition at line 31 of file ambassador.h.

#define DMA_VALID   0xb728e149 /* completely random */

Definition at line 255 of file ambassador.h.

#define FLASH_BASE   0xa0c00000

Definition at line 257 of file ambassador.h.

#define FLASH_SIZE   0x00020000 /* 128K */

Definition at line 258 of file ambassador.h.

#define FP_155_RATE   0x24b1

Definition at line 236 of file ambassador.h.

#define FP_25_RATE   0x1f9d

Definition at line 237 of file ambassador.h.

#define GPINT_TST_FAILURE   0x00000001

Definition at line 292 of file ambassador.h.

#define LEN_ERR   0x2000

Definition at line 125 of file ambassador.h.

#define MAX_COMMAND_DATA   13

Definition at line 340 of file ambassador.h.

#define MAX_RATE_BITS   6

Definition at line 228 of file ambassador.h.

#define MAX_SRB   21

Definition at line 218 of file ambassador.h.

#define MAX_TRANSFER_DATA   11

Definition at line 341 of file ambassador.h.

#define MIN_PCI_LATENCY   64

Definition at line 115 of file ambassador.h.

#define MIN_QUEUE_SIZE   2

Definition at line 106 of file ambassador.h.

#define MIN_RX_BUFFERS   1

Definition at line 112 of file ambassador.h.

#define NEXTQ (   current,
  start,
  limit 
)    ( (current)+1 < (limit) ? (current)+1 : (start) )

Definition at line 540 of file ambassador.h.

#define NUM_OF_SRB   32

Definition at line 225 of file ambassador.h.

#define NUM_RX_POOLS   4

Definition at line 109 of file ambassador.h.

#define NUM_VCI_BITS   10

Definition at line 119 of file ambassador.h.

#define NUM_VCS   1024

Definition at line 120 of file ambassador.h.

#define NUM_VPI_BITS   0

Definition at line 118 of file ambassador.h.

#define PCI_DEVICE_ID_MADGE_AMBASSADOR   0x1001

Definition at line 37 of file ambassador.h.

#define PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD   0x1002

Definition at line 40 of file ambassador.h.

#define PCI_VENDOR_ID_MADGE   0x10B6

Definition at line 34 of file ambassador.h.

#define PLX_BASE   0xe0000000

Definition at line 261 of file ambassador.h.

#define PRINTD (   bits,
  format,
  args... 
)

Definition at line 81 of file ambassador.h.

#define PRINTDB (   bits,
  format,
  args... 
)

Definition at line 82 of file ambassador.h.

#define PRINTDD (   bits,
  format,
  args... 
)

Definition at line 88 of file ambassador.h.

#define PRINTDDB (   sec,
  fmt,
  args... 
)

Definition at line 89 of file ambassador.h.

#define PRINTDDE (   sec,
  fmt,
  args... 
)

Definition at line 91 of file ambassador.h.

#define PRINTDDM (   sec,
  fmt,
  args... 
)

Definition at line 90 of file ambassador.h.

#define PRINTDE (   bits,
  format,
  args... 
)

Definition at line 84 of file ambassador.h.

#define PRINTDM (   bits,
  format,
  args... 
)

Definition at line 83 of file ambassador.h.

#define PRINTK (   severity,
  format,
  args... 
)    printk(severity DEV_LABEL ": " format "\n" , ## args)

Definition at line 45 of file ambassador.h.

#define RX_ERR   0x8000

Definition at line 123 of file ambassador.h.

#define RX_Q_ENTRIES   64

Definition at line 98 of file ambassador.h.

#define SELF_TEST_FAILURE   0x0000003f

Definition at line 298 of file ambassador.h.

#define SRAM_FAILURE   0x00000020

Definition at line 297 of file ambassador.h.

#define SRB_CLEAR_BITS_16   8

Definition at line 162 of file ambassador.h.

#define SRB_CLEAR_BITS_32   9

Definition at line 163 of file ambassador.h.

#define SRB_CLEAR_BITS_8   7

Definition at line 161 of file ambassador.h.

#define SRB_CLOSE_VC   1

Definition at line 147 of file ambassador.h.

#define SRB_COMPLETE   0xffffffff

Definition at line 220 of file ambassador.h.

#define SRB_FLAGS_SHIFT   16

Definition at line 213 of file ambassador.h.

#define SRB_FLUSH_BUFFER_Q   15

Definition at line 183 of file ambassador.h.

#define SRB_GET_32   13

Definition at line 173 of file ambassador.h.

#define SRB_GET_BIA   2

Definition at line 150 of file ambassador.h.

#define SRB_GET_DMA_SPEEDS   16

Definition at line 187 of file ambassador.h.

#define SRB_GET_SUNI_STATS   3

Definition at line 155 of file ambassador.h.

#define SRB_GET_VERSION   14

Definition at line 178 of file ambassador.h.

#define SRB_MODIFY_VC_FLAGS   18

Definition at line 196 of file ambassador.h.

#define SRB_MODIFY_VC_RATE   17

Definition at line 192 of file ambassador.h.

#define SRB_OPEN_VC   0

Definition at line 131 of file ambassador.h.

#define SRB_POOL_SHIFT   (SRB_FLAGS_SHIFT+5)

Definition at line 212 of file ambassador.h.

#define SRB_RATE_SHIFT   16

Definition at line 211 of file ambassador.h.

#define SRB_SET_16   11

Definition at line 168 of file ambassador.h.

#define SRB_SET_32   12

Definition at line 169 of file ambassador.h.

#define SRB_SET_8   10

Definition at line 167 of file ambassador.h.

#define SRB_SET_BITS_16   5

Definition at line 159 of file ambassador.h.

#define SRB_SET_BITS_32   6

Definition at line 160 of file ambassador.h.

#define SRB_SET_BITS_8   4

Definition at line 158 of file ambassador.h.

#define SRB_SHUT_DOWN   21

Definition at line 217 of file ambassador.h.

#define SRB_START_TASKING   20

Definition at line 216 of file ambassador.h.

#define SRB_STOP_TASKING   19

Definition at line 215 of file ambassador.h.

#define SUNI_DATA_BITS_FAILURE   0x00000004

Definition at line 294 of file ambassador.h.

#define SUNI_DATA_PATTERN_FAILURE   0x00000002

Definition at line 293 of file ambassador.h.

#define SUNI_FIFO_FAILURE   0x00000010

Definition at line 296 of file ambassador.h.

#define SUNI_UTOPIA_FAILURE   0x00000008

Definition at line 295 of file ambassador.h.

#define TX_ABR   0x0018

Definition at line 232 of file ambassador.h.

#define TX_FRAME   0x80000000

Definition at line 222 of file ambassador.h.

#define TX_FRAME_CAPPED   0x8000

Definition at line 234 of file ambassador.h.

#define TX_FRAME_NOTCAP   0x0000

Definition at line 233 of file ambassador.h.

#define TX_Q_ENTRIES   32

Definition at line 97 of file ambassador.h.

#define TX_UBR   0x0000

Definition at line 230 of file ambassador.h.

#define TX_UBR_CAPPED   0x0008

Definition at line 231 of file ambassador.h.

#define UNUSED_ERR   0x0800

Definition at line 127 of file ambassador.h.

#define UNUSED_LOADER_MAILBOXES   6

Definition at line 309 of file ambassador.h.

#define VERSION_NUMBER   0x01050025 /* Jason's first hacked version. */

Definition at line 252 of file ambassador.h.

Typedef Documentation

Definition at line 650 of file ambassador.h.

Enumeration Type Documentation

enum amb_flags
Enumerator:
dead 

Definition at line 536 of file ambassador.h.

Enumerator:
host_memory_test 
read_adapter_memory 
write_adapter_memory 
adapter_start 
get_version_number 
interrupt_host 
flash_erase_sector 
adap_download_block 
adap_erase_flash 
adap_run_in_iram 
adap_end_download 

Definition at line 263 of file ambassador.h.

enum rounding
Enumerator:
round_up 
round_down 
round_nearest 
round_up 
round_down 
round_nearest 

Definition at line 657 of file ambassador.h.