Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
lanai.c File Reference
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/atmdev.h>
#include <asm/io.h>
#include <asm/byteorder.h>
#include <linux/spinlock.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/interrupt.h>

Go to the source code of this file.

Data Structures

struct  lanai_buffer
 
struct  lanai_vcc_stats
 
struct  lanai_vcc
 
struct  lanai_dev_stats
 
struct  lanai_dev
 

Macros

#define NUM_VCI   (1024)
 
#define DEBUG
 
#define FULL_MEMORY_TEST
 
#define SERVICE_ENTRIES   (1024)
 
#define TX_FIFO_DEPTH   (7)
 
#define LANAI_POLL_PERIOD   (10*HZ)
 
#define AAL5_RX_MULTIPLIER   (3)
 
#define AAL5_TX_MULTIPLIER   (3)
 
#define AAL0_TX_MULTIPLIER   (40)
 
#define AAL0_RX_BUFFER_SIZE   (PAGE_SIZE)
 
#define DEV_LABEL   "lanai"
 
#define DPRINTK(format, args...)   printk(KERN_DEBUG DEV_LABEL ": " format, ##args)
 
#define APRINTK(truth, format, args...)
 
#define RWDEBUG(format, args...)
 
#define LANAI_MAPPING_SIZE   (0x40000)
 
#define LANAI_EEPROM_SIZE   (128)
 
#define LANAI_PAGE_SIZE   ((PAGE_SIZE >= 1024) ? PAGE_SIZE : 1024)
 
#define RESET_GET_BOARD_REV(x)   (((x)>> 0)&0x03) /* Board revision */
 
#define RESET_GET_BOARD_ID(x)   (((x)>> 2)&0x03) /* Board ID */
 
#define BOARD_ID_LANAI256   (0) /* 25.6M adapter card */
 
#define STATUS_PROMDATA   (0x00000001) /* PROM_DATA pin */
 
#define STATUS_WAITING   (0x00000002) /* Interrupt being delayed */
 
#define STATUS_SOOL   (0x00000004) /* SOOL alarm */
 
#define STATUS_LOCD   (0x00000008) /* LOCD alarm */
 
#define STATUS_LED   (0x00000010) /* LED (HAPPI) output */
 
#define STATUS_GPIN   (0x00000020) /* GPIN pin */
 
#define STATUS_BUTTBUSY   (0x00000040) /* Butt register is pending */
 
#define CONFIG1_PROMDATA   (0x00000001) /* PROM_DATA pin */
 
#define CONFIG1_PROMCLK   (0x00000002) /* PROM_CLK pin */
 
#define CONFIG1_SET_READMODE(x)   ((x)*0x004) /* PCI BM reads; values: */
 
#define READMODE_PLAIN   (0) /* Plain memory read */
 
#define READMODE_LINE   (2) /* Memory read line */
 
#define READMODE_MULTIPLE   (3) /* Memory read multiple */
 
#define CONFIG1_DMA_ENABLE   (0x00000010) /* Turn on DMA */
 
#define CONFIG1_POWERDOWN   (0x00000020) /* Turn off clocks */
 
#define CONFIG1_SET_LOOPMODE(x)   ((x)*0x080) /* Clock&loop mode; values: */
 
#define LOOPMODE_NORMAL   (0) /* Normal - no loop */
 
#define LOOPMODE_TIME   (1)
 
#define LOOPMODE_DIAG   (2)
 
#define LOOPMODE_LINE   (3)
 
#define CONFIG1_MASK_LOOPMODE   (0x00000180)
 
#define CONFIG1_SET_LEDMODE(x)   ((x)*0x0200) /* Mode of LED; values: */
 
#define LEDMODE_NOT_SOOL   (0) /* !SOOL */
 
#define LEDMODE_OFF   (1) /* 0 */
 
#define LEDMODE_ON   (2) /* 1 */
 
#define LEDMODE_NOT_LOCD   (3) /* !LOCD */
 
#define LEDMORE_GPIN   (4) /* GPIN */
 
#define LEDMODE_NOT_GPIN   (7) /* !GPIN */
 
#define CONFIG1_MASK_LEDMODE   (0x00000E00)
 
#define CONFIG1_GPOUT1   (0x00001000) /* Toggle for reset */
 
#define CONFIG1_GPOUT2   (0x00002000) /* Loopback PHY */
 
#define CONFIG1_GPOUT3   (0x00004000) /* Loopback lanai */
 
#define CONFIG2_HOWMANY   (0x00000001) /* >512 VCIs? */
 
#define CONFIG2_PTI7_MODE   (0x00000002) /* Make PTI=7 RM, not OAM */
 
#define CONFIG2_VPI_CHK_DIS   (0x00000004) /* Ignore RX VPI value */
 
#define CONFIG2_HEC_DROP   (0x00000008) /* Drop cells w/ HEC errors */
 
#define CONFIG2_VCI0_NORMAL   (0x00000010) /* Treat VCI=0 normally */
 
#define CONFIG2_CBR_ENABLE   (0x00000020) /* Deal with CBR traffic */
 
#define CONFIG2_TRASH_ALL   (0x00000040) /* Trashing incoming cells */
 
#define CONFIG2_TX_DISABLE   (0x00000080) /* Trashing outgoing cells */
 
#define CONFIG2_SET_TRASH   (0x00000100) /* Turn trashing on */
 
#define STATS_GET_FIFO_OVFL(x)   (((x)>> 0)&0xFF) /* FIFO overflowed */
 
#define STATS_GET_HEC_ERR(x)   (((x)>> 8)&0xFF) /* HEC was bad */
 
#define STATS_GET_BAD_VCI(x)   (((x)>>16)&0xFF) /* VCI not open */
 
#define STATS_GET_BUF_OVFL(x)   (((x)>>24)&0xFF) /* VCC buffer full */
 
#define SSTUFF_SET_SIZE(x)   ((x)*0x20000000) /* size of service buffer */
 
#define SSTUFF_SET_ADDR(x)   ((x)>>8) /* set address of buffer */
 
#define SRAM_START   (0x20000)
 
#define SRAM_BYTES   (0x20000) /* Again, half don't really exist */
 
#define RXADDR1_SET_SIZE(x)   ((x)*0x0000100) /* size of RX buffer */
 
#define RXADDR1_SET_RMMODE(x)   ((x)*0x00800) /* RM cell action; values: */
 
#define RMMODE_TRASH   (0) /* discard */
 
#define RMMODE_PRESERVE   (1) /* input as AAL0 */
 
#define RMMODE_PIPE   (2) /* pipe to coscheduler */
 
#define RMMODE_PIPEALL   (3) /* pipe non-RM too */
 
#define RXADDR1_OAM_PRESERVE   (0x00002000) /* Input OAM cells as AAL0 */
 
#define RXADDR1_SET_MODE(x)   ((x)*0x0004000) /* Reassembly mode */
 
#define RXMODE_TRASH   (0) /* discard */
 
#define RXMODE_AAL0   (1) /* non-AAL5 mode */
 
#define RXMODE_AAL5   (2) /* AAL5, intr. each PDU */
 
#define RXMODE_AAL5_STREAM   (3) /* AAL5 w/o per-PDU intr */
 
#define RXWRITEPTR_LASTEFCI   (0x00002000) /* Last PDU had EFCI bit */
 
#define RXWRITEPTR_DROPPING   (0x00004000) /* Had error, dropping */
 
#define RXWRITEPTR_TRASHING   (0x00008000) /* Trashing */
 
#define RXBUFSTART_CLP   (0x00004000)
 
#define RXBUFSTART_CI   (0x00008000)
 
#define TXADDR1_SET_SIZE(x)   ((x)*0x0000100) /* size of TX buffer */
 
#define TXADDR1_ABR   (0x00008000) /* use ABR (doesn't work) */
 
#define TXREADPTR_GET_PTR(x)   ((x)&0x01FFF)
 
#define TXREADPTR_MASK_DELTA   (0x0000E000) /* ? */
 
#define TXENDPTR_CLP   (0x00002000)
 
#define TXENDPTR_MASK_PDUMODE   (0x0000C000) /* PDU mode; values: */
 
#define PDUMODE_AAL0   (0*0x04000)
 
#define PDUMODE_AAL5   (2*0x04000)
 
#define PDUMODE_AAL5STREAM   (3*0x04000)
 
#define TXWRITEPTR_GET_PTR(x)   ((x)&0x1FFF)
 
#define TXCBR_NEXT_BOZO   (0x00008000) /* "bozo bit" */
 
#define CARDVCC_SIZE   (0x40)
 
#define EEPROM_COPYRIGHT   (0)
 
#define EEPROM_COPYRIGHT_LEN   (44)
 
#define EEPROM_CHECKSUM   (62)
 
#define EEPROM_CHECKSUM_REV   (63)
 
#define EEPROM_MAC   (64)
 
#define EEPROM_MAC_REV   (70)
 
#define EEPROM_SERIAL   (112)
 
#define EEPROM_SERIAL_REV   (116)
 
#define EEPROM_MAGIC   (120)
 
#define EEPROM_MAGIC_REV   (124)
 
#define EEPROM_MAGIC_VALUE   (0x5AB478D2)
 
#define INT_STATS   (0x00000002) /* Statistics counter overflow */
 
#define INT_SOOL   (0x00000004) /* SOOL changed state */
 
#define INT_LOCD   (0x00000008) /* LOCD changed state */
 
#define INT_LED   (0x00000010) /* LED (HAPPI) changed state */
 
#define INT_GPIN   (0x00000020) /* GPIN changed state */
 
#define INT_PING   (0x00000040) /* PING_COUNT fulfilled */
 
#define INT_WAKE   (0x00000080) /* Lanai wants bus */
 
#define INT_CBR0   (0x00000100) /* CBR sched hit VCI 0 */
 
#define INT_LOCK   (0x00000200) /* Service list overflow */
 
#define INT_MISMATCH   (0x00000400) /* TX magic list mismatch */
 
#define INT_AAL0_STR   (0x00000800) /* Non-AAL5 buffer half filled */
 
#define INT_AAL0   (0x00001000) /* Non-AAL5 data available */
 
#define INT_SERVICE   (0x00002000) /* Service list entries available */
 
#define INT_TABORTSENT   (0x00004000) /* Target abort sent by lanai */
 
#define INT_TABORTBM   (0x00008000) /* Abort rcv'd as bus master */
 
#define INT_TIMEOUTBM   (0x00010000) /* No response to bus master */
 
#define INT_PCIPARITY   (0x00020000) /* Parity error on PCI */
 
#define INT_ALL   (0x0003FFFE) /* All interrupts */
 
#define INT_STATUS   (0x0000003C) /* Some status pin changed */
 
#define INT_DMASHUT   (0x00038000) /* DMA engine got shut down */
 
#define INT_SEGSHUT   (0x00000700) /* Segmentation got shut down */
 
#define e(flag, name)
 
#define e(flag, name, stat)
 
#define DESCRIPTOR_MAGIC   (0xD0000000)
 
#define DESCRIPTOR_AAL5   (0x00008000)
 
#define DESCRIPTOR_AAL5_STREAM   (0x00004000)
 
#define DESCRIPTOR_CLP   (0x00002000)
 
#define VCCTABLE_GETFREEPAGE
 
#define SERVICE_TX   (0x80000000) /* Was from transmission */
 
#define SERVICE_TRASH   (0x40000000) /* RXed PDU was trashed */
 
#define SERVICE_CRCERR   (0x20000000) /* RXed PDU had CRC error */
 
#define SERVICE_CI   (0x10000000) /* RXed PDU had CI set */
 
#define SERVICE_CLP   (0x08000000) /* RXed PDU had CLP set */
 
#define SERVICE_STREAM   (0x04000000) /* RX Stream mode */
 
#define SERVICE_GET_VCI(x)   (((x)>>16)&0x3FF)
 
#define SERVICE_GET_END(x)   ((x)&0x1FFF)
 
#define CBRICG_FRAC_BITS   (4)
 
#define CBRICG_MAX   (2046 << CBRICG_FRAC_BITS)
 
#define lanai_proc_read   NULL
 

Typedefs

typedef int vci_t
 
typedef void __iomembus_addr_t
 

Enumerations

enum  lanai_type { lanai2 = PCI_DEVICE_ID_EF_ATM_LANAI2, lanaihb = PCI_DEVICE_ID_EF_ATM_LANAIHB }
 
enum  lanai_register {
  Reset_Reg = 0x00, Endian_Reg = 0x04, IntStatus_Reg = 0x08, IntStatusMasked_Reg = 0x0C,
  IntAck_Reg = 0x10, IntAckMasked_Reg = 0x14, IntStatusSet_Reg = 0x18, IntStatusSetMasked_Reg = 0x1C,
  IntControlEna_Reg = 0x20, IntControlDis_Reg = 0x24, Status_Reg = 0x28, Config1_Reg = 0x2C,
  Config2_Reg = 0x30, Statistics_Reg = 0x34, ServiceStuff_Reg = 0x38, ServWrite_Reg = 0x3C,
  ServRead_Reg = 0x40, TxDepth_Reg = 0x44, Butt_Reg = 0x48, CBR_ICG_Reg = 0x50,
  CBR_PTR_Reg = 0x54, PingCount_Reg = 0x58, DMA_Addr_Reg = 0x5C
}
 
enum  lanai_vcc_offset {
  vcc_rxaddr1 = 0x00, vcc_rxaddr2 = 0x04, vcc_rxcrc1 = 0x08, vcc_rxcrc2 = 0x0C,
  vcc_rxwriteptr = 0x10, vcc_rxbufstart = 0x14, vcc_rxreadptr = 0x18, vcc_txicg = 0x1C,
  vcc_txaddr1 = 0x20, vcc_txaddr2 = 0x24, vcc_txcrc1 = 0x28, vcc_txcrc2 = 0x2C,
  vcc_txreadptr = 0x30, vcc_txendptr = 0x34, vcc_txwriteptr = 0x38, vcc_txcbr_next
}
 

Functions

 MODULE_DEVICE_TABLE (pci, lanai_pci_tbl)
 
 module_init (lanai_module_init)
 
 module_exit (lanai_module_exit)
 
 MODULE_AUTHOR ("Mitchell Blank Jr <[email protected]>")
 
 MODULE_DESCRIPTION ("Efficient Networks Speedstream 3010 driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AAL0_RX_BUFFER_SIZE   (PAGE_SIZE)

Definition at line 153 of file lanai.c.

#define AAL0_TX_MULTIPLIER   (40)

Definition at line 146 of file lanai.c.

#define AAL5_RX_MULTIPLIER   (3)

Definition at line 132 of file lanai.c.

#define AAL5_TX_MULTIPLIER   (3)

Definition at line 138 of file lanai.c.

#define APRINTK (   truth,
  format,
  args... 
)
Value:
do { \
if (unlikely(!(truth))) \
printk(KERN_ERR DEV_LABEL ": " format, ##args); \
} while (0)

Definition at line 170 of file lanai.c.

#define BOARD_ID_LANAI256   (0) /* 25.6M adapter card */

Definition at line 399 of file lanai.c.

#define CARDVCC_SIZE   (0x40)

Definition at line 641 of file lanai.c.

#define CBRICG_FRAC_BITS   (4)

Definition at line 2069 of file lanai.c.

#define CBRICG_MAX   (2046 << CBRICG_FRAC_BITS)

Definition at line 2070 of file lanai.c.

#define CONFIG1_DMA_ENABLE   (0x00000010) /* Turn on DMA */

Definition at line 424 of file lanai.c.

#define CONFIG1_GPOUT1   (0x00001000) /* Toggle for reset */

Definition at line 440 of file lanai.c.

#define CONFIG1_GPOUT2   (0x00002000) /* Loopback PHY */

Definition at line 441 of file lanai.c.

#define CONFIG1_GPOUT3   (0x00004000) /* Loopback lanai */

Definition at line 442 of file lanai.c.

#define CONFIG1_MASK_LEDMODE   (0x00000E00)

Definition at line 439 of file lanai.c.

#define CONFIG1_MASK_LOOPMODE   (0x00000180)

Definition at line 431 of file lanai.c.

#define CONFIG1_POWERDOWN   (0x00000020) /* Turn off clocks */

Definition at line 425 of file lanai.c.

#define CONFIG1_PROMCLK   (0x00000002) /* PROM_CLK pin */

Definition at line 419 of file lanai.c.

#define CONFIG1_PROMDATA   (0x00000001) /* PROM_DATA pin */

Definition at line 418 of file lanai.c.

#define CONFIG1_SET_LEDMODE (   x)    ((x)*0x0200) /* Mode of LED; values: */

Definition at line 432 of file lanai.c.

#define CONFIG1_SET_LOOPMODE (   x)    ((x)*0x080) /* Clock&loop mode; values: */

Definition at line 426 of file lanai.c.

#define CONFIG1_SET_READMODE (   x)    ((x)*0x004) /* PCI BM reads; values: */

Definition at line 420 of file lanai.c.

#define CONFIG2_CBR_ENABLE   (0x00000020) /* Deal with CBR traffic */

Definition at line 449 of file lanai.c.

#define CONFIG2_HEC_DROP   (0x00000008) /* Drop cells w/ HEC errors */

Definition at line 447 of file lanai.c.

#define CONFIG2_HOWMANY   (0x00000001) /* >512 VCIs? */

Definition at line 444 of file lanai.c.

#define CONFIG2_PTI7_MODE   (0x00000002) /* Make PTI=7 RM, not OAM */

Definition at line 445 of file lanai.c.

#define CONFIG2_SET_TRASH   (0x00000100) /* Turn trashing on */

Definition at line 452 of file lanai.c.

#define CONFIG2_TRASH_ALL   (0x00000040) /* Trashing incoming cells */

Definition at line 450 of file lanai.c.

#define CONFIG2_TX_DISABLE   (0x00000080) /* Trashing outgoing cells */

Definition at line 451 of file lanai.c.

#define CONFIG2_VCI0_NORMAL   (0x00000010) /* Treat VCI=0 normally */

Definition at line 448 of file lanai.c.

#define CONFIG2_VPI_CHK_DIS   (0x00000004) /* Ignore RX VPI value */

Definition at line 446 of file lanai.c.

#define DEBUG

Definition at line 82 of file lanai.c.

#define DESCRIPTOR_AAL5   (0x00008000)

Definition at line 1166 of file lanai.c.

#define DESCRIPTOR_AAL5_STREAM   (0x00004000)

Definition at line 1167 of file lanai.c.

#define DESCRIPTOR_CLP   (0x00002000)

Definition at line 1168 of file lanai.c.

#define DESCRIPTOR_MAGIC   (0xD0000000)

Definition at line 1165 of file lanai.c.

#define DEV_LABEL   "lanai"

Definition at line 164 of file lanai.c.

#define DPRINTK (   format,
  args... 
)    printk(KERN_DEBUG DEV_LABEL ": " format, ##args)

Definition at line 168 of file lanai.c.

#define e (   flag,
  name 
)
Value:
if (changes & flag) \
status_message(lanai->number, name, new & flag)
#define e (   flag,
  name,
  stat 
)
Value:
if (s & flag) { \
pcistatus_got(lanai->number, name); \
++lanai->stats.pcierr_##stat; \
}
#define EEPROM_CHECKSUM   (62)

Definition at line 849 of file lanai.c.

#define EEPROM_CHECKSUM_REV   (63)

Definition at line 850 of file lanai.c.

#define EEPROM_COPYRIGHT   (0)

Definition at line 847 of file lanai.c.

#define EEPROM_COPYRIGHT_LEN   (44)

Definition at line 848 of file lanai.c.

#define EEPROM_MAC   (64)

Definition at line 851 of file lanai.c.

#define EEPROM_MAC_REV   (70)

Definition at line 852 of file lanai.c.

#define EEPROM_MAGIC   (120)

Definition at line 855 of file lanai.c.

#define EEPROM_MAGIC_REV   (124)

Definition at line 856 of file lanai.c.

#define EEPROM_MAGIC_VALUE   (0x5AB478D2)

Definition at line 858 of file lanai.c.

#define EEPROM_SERIAL   (112)

Definition at line 853 of file lanai.c.

#define EEPROM_SERIAL_REV   (116)

Definition at line 854 of file lanai.c.

#define FULL_MEMORY_TEST

Definition at line 94 of file lanai.c.

#define INT_AAL0   (0x00001000) /* Non-AAL5 data available */

Definition at line 1051 of file lanai.c.

#define INT_AAL0_STR   (0x00000800) /* Non-AAL5 buffer half filled */

Definition at line 1050 of file lanai.c.

#define INT_ALL   (0x0003FFFE) /* All interrupts */

Definition at line 1059 of file lanai.c.

#define INT_CBR0   (0x00000100) /* CBR sched hit VCI 0 */

Definition at line 1047 of file lanai.c.

#define INT_DMASHUT   (0x00038000) /* DMA engine got shut down */

Definition at line 1061 of file lanai.c.

#define INT_GPIN   (0x00000020) /* GPIN changed state */

Definition at line 1044 of file lanai.c.

#define INT_LED   (0x00000010) /* LED (HAPPI) changed state */

Definition at line 1043 of file lanai.c.

#define INT_LOCD   (0x00000008) /* LOCD changed state */

Definition at line 1042 of file lanai.c.

#define INT_LOCK   (0x00000200) /* Service list overflow */

Definition at line 1048 of file lanai.c.

#define INT_MISMATCH   (0x00000400) /* TX magic list mismatch */

Definition at line 1049 of file lanai.c.

#define INT_PCIPARITY   (0x00020000) /* Parity error on PCI */

Definition at line 1056 of file lanai.c.

#define INT_PING   (0x00000040) /* PING_COUNT fulfilled */

Definition at line 1045 of file lanai.c.

#define INT_SEGSHUT   (0x00000700) /* Segmentation got shut down */

Definition at line 1062 of file lanai.c.

#define INT_SERVICE   (0x00002000) /* Service list entries available */

Definition at line 1052 of file lanai.c.

#define INT_SOOL   (0x00000004) /* SOOL changed state */

Definition at line 1041 of file lanai.c.

#define INT_STATS   (0x00000002) /* Statistics counter overflow */

Definition at line 1040 of file lanai.c.

#define INT_STATUS   (0x0000003C) /* Some status pin changed */

Definition at line 1060 of file lanai.c.

#define INT_TABORTBM   (0x00008000) /* Abort rcv'd as bus master */

Definition at line 1054 of file lanai.c.

#define INT_TABORTSENT   (0x00004000) /* Target abort sent by lanai */

Definition at line 1053 of file lanai.c.

#define INT_TIMEOUTBM   (0x00010000) /* No response to bus master */

Definition at line 1055 of file lanai.c.

#define INT_WAKE   (0x00000080) /* Lanai wants bus */

Definition at line 1046 of file lanai.c.

#define LANAI_EEPROM_SIZE   (128)

Definition at line 193 of file lanai.c.

#define LANAI_MAPPING_SIZE   (0x40000)

Definition at line 192 of file lanai.c.

#define LANAI_PAGE_SIZE   ((PAGE_SIZE >= 1024) ? PAGE_SIZE : 1024)

Definition at line 323 of file lanai.c.

#define LANAI_POLL_PERIOD   (10*HZ)

Definition at line 125 of file lanai.c.

#define lanai_proc_read   NULL

Definition at line 2456 of file lanai.c.

#define LEDMODE_NOT_GPIN   (7) /* !GPIN */

Definition at line 438 of file lanai.c.

#define LEDMODE_NOT_LOCD   (3) /* !LOCD */

Definition at line 436 of file lanai.c.

#define LEDMODE_NOT_SOOL   (0) /* !SOOL */

Definition at line 433 of file lanai.c.

#define LEDMODE_OFF   (1) /* 0 */

Definition at line 434 of file lanai.c.

#define LEDMODE_ON   (2) /* 1 */

Definition at line 435 of file lanai.c.

#define LEDMORE_GPIN   (4) /* GPIN */

Definition at line 437 of file lanai.c.

#define LOOPMODE_DIAG   (2)

Definition at line 429 of file lanai.c.

#define LOOPMODE_LINE   (3)

Definition at line 430 of file lanai.c.

#define LOOPMODE_NORMAL   (0) /* Normal - no loop */

Definition at line 427 of file lanai.c.

#define LOOPMODE_TIME   (1)

Definition at line 428 of file lanai.c.

#define NUM_VCI   (1024)

Definition at line 77 of file lanai.c.

#define PDUMODE_AAL0   (0*0x04000)

Definition at line 632 of file lanai.c.

#define PDUMODE_AAL5   (2*0x04000)

Definition at line 633 of file lanai.c.

#define PDUMODE_AAL5STREAM   (3*0x04000)

Definition at line 634 of file lanai.c.

#define READMODE_LINE   (2) /* Memory read line */

Definition at line 422 of file lanai.c.

#define READMODE_MULTIPLE   (3) /* Memory read multiple */

Definition at line 423 of file lanai.c.

#define READMODE_PLAIN   (0) /* Plain memory read */

Definition at line 421 of file lanai.c.

#define RESET_GET_BOARD_ID (   x)    (((x)>> 2)&0x03) /* Board ID */

Definition at line 398 of file lanai.c.

#define RESET_GET_BOARD_REV (   x)    (((x)>> 0)&0x03) /* Board revision */

Definition at line 397 of file lanai.c.

#define RMMODE_PIPE   (2) /* pipe to coscheduler */

Definition at line 600 of file lanai.c.

#define RMMODE_PIPEALL   (3) /* pipe non-RM too */

Definition at line 601 of file lanai.c.

#define RMMODE_PRESERVE   (1) /* input as AAL0 */

Definition at line 599 of file lanai.c.

#define RMMODE_TRASH   (0) /* discard */

Definition at line 598 of file lanai.c.

#define RWDEBUG (   format,
  args... 
)

Definition at line 187 of file lanai.c.

#define RXADDR1_OAM_PRESERVE   (0x00002000) /* Input OAM cells as AAL0 */

Definition at line 602 of file lanai.c.

#define RXADDR1_SET_MODE (   x)    ((x)*0x0004000) /* Reassembly mode */

Definition at line 603 of file lanai.c.

#define RXADDR1_SET_RMMODE (   x)    ((x)*0x00800) /* RM cell action; values: */

Definition at line 597 of file lanai.c.

#define RXADDR1_SET_SIZE (   x)    ((x)*0x0000100) /* size of RX buffer */

Definition at line 596 of file lanai.c.

#define RXBUFSTART_CI   (0x00008000)

Definition at line 617 of file lanai.c.

#define RXBUFSTART_CLP   (0x00004000)

Definition at line 616 of file lanai.c.

#define RXMODE_AAL0   (1) /* non-AAL5 mode */

Definition at line 605 of file lanai.c.

#define RXMODE_AAL5   (2) /* AAL5, intr. each PDU */

Definition at line 606 of file lanai.c.

#define RXMODE_AAL5_STREAM   (3) /* AAL5 w/o per-PDU intr */

Definition at line 607 of file lanai.c.

#define RXMODE_TRASH   (0) /* discard */

Definition at line 604 of file lanai.c.

#define RXWRITEPTR_DROPPING   (0x00004000) /* Had error, dropping */

Definition at line 613 of file lanai.c.

#define RXWRITEPTR_LASTEFCI   (0x00002000) /* Last PDU had EFCI bit */

Definition at line 612 of file lanai.c.

#define RXWRITEPTR_TRASHING   (0x00008000) /* Trashing */

Definition at line 614 of file lanai.c.

#define SERVICE_CI   (0x10000000) /* RXed PDU had CI set */

Definition at line 1620 of file lanai.c.

#define SERVICE_CLP   (0x08000000) /* RXed PDU had CLP set */

Definition at line 1621 of file lanai.c.

#define SERVICE_CRCERR   (0x20000000) /* RXed PDU had CRC error */

Definition at line 1619 of file lanai.c.

#define SERVICE_ENTRIES   (1024)

Definition at line 101 of file lanai.c.

#define SERVICE_GET_END (   x)    ((x)&0x1FFF)

Definition at line 1624 of file lanai.c.

#define SERVICE_GET_VCI (   x)    (((x)>>16)&0x3FF)

Definition at line 1623 of file lanai.c.

#define SERVICE_STREAM   (0x04000000) /* RX Stream mode */

Definition at line 1622 of file lanai.c.

#define SERVICE_TRASH   (0x40000000) /* RXed PDU was trashed */

Definition at line 1618 of file lanai.c.

#define SERVICE_TX   (0x80000000) /* Was from transmission */

Definition at line 1617 of file lanai.c.

#define SRAM_BYTES   (0x20000) /* Again, half don't really exist */

Definition at line 536 of file lanai.c.

#define SRAM_START   (0x20000)

Definition at line 535 of file lanai.c.

#define SSTUFF_SET_ADDR (   x)    ((x)>>8) /* set address of buffer */

Definition at line 460 of file lanai.c.

#define SSTUFF_SET_SIZE (   x)    ((x)*0x20000000) /* size of service buffer */

Definition at line 459 of file lanai.c.

#define STATS_GET_BAD_VCI (   x)    (((x)>>16)&0xFF) /* VCI not open */

Definition at line 456 of file lanai.c.

#define STATS_GET_BUF_OVFL (   x)    (((x)>>24)&0xFF) /* VCC buffer full */

Definition at line 457 of file lanai.c.

#define STATS_GET_FIFO_OVFL (   x)    (((x)>> 0)&0xFF) /* FIFO overflowed */

Definition at line 454 of file lanai.c.

#define STATS_GET_HEC_ERR (   x)    (((x)>> 8)&0xFF) /* HEC was bad */

Definition at line 455 of file lanai.c.

#define STATUS_BUTTBUSY   (0x00000040) /* Butt register is pending */

Definition at line 416 of file lanai.c.

#define STATUS_GPIN   (0x00000020) /* GPIN pin */

Definition at line 415 of file lanai.c.

#define STATUS_LED   (0x00000010) /* LED (HAPPI) output */

Definition at line 414 of file lanai.c.

#define STATUS_LOCD   (0x00000008) /* LOCD alarm */

Definition at line 413 of file lanai.c.

#define STATUS_PROMDATA   (0x00000001) /* PROM_DATA pin */

Definition at line 410 of file lanai.c.

#define STATUS_SOOL   (0x00000004) /* SOOL alarm */

Definition at line 412 of file lanai.c.

#define STATUS_WAITING   (0x00000002) /* Interrupt being delayed */

Definition at line 411 of file lanai.c.

#define TX_FIFO_DEPTH   (7)

Definition at line 118 of file lanai.c.

#define TXADDR1_ABR   (0x00008000) /* use ABR (doesn't work) */

Definition at line 622 of file lanai.c.

#define TXADDR1_SET_SIZE (   x)    ((x)*0x0000100) /* size of TX buffer */

Definition at line 621 of file lanai.c.

#define TXCBR_NEXT_BOZO   (0x00008000) /* "bozo bit" */
#define TXENDPTR_CLP   (0x00002000)

Definition at line 630 of file lanai.c.

#define TXENDPTR_MASK_PDUMODE   (0x0000C000) /* PDU mode; values: */

Definition at line 631 of file lanai.c.

#define TXREADPTR_GET_PTR (   x)    ((x)&0x01FFF)

Definition at line 627 of file lanai.c.

#define TXREADPTR_MASK_DELTA   (0x0000E000) /* ? */

Definition at line 628 of file lanai.c.

#define TXWRITEPTR_GET_PTR (   x)    ((x)&0x1FFF)

Definition at line 636 of file lanai.c.

#define VCCTABLE_GETFREEPAGE

Definition at line 1446 of file lanai.c.

Typedef Documentation

Definition at line 196 of file lanai.c.

typedef int vci_t

Definition at line 195 of file lanai.c.

Enumeration Type Documentation

Enumerator:
Reset_Reg 
Endian_Reg 
IntStatus_Reg 
IntStatusMasked_Reg 
IntAck_Reg 
IntAckMasked_Reg 
IntStatusSet_Reg 
IntStatusSetMasked_Reg 
IntControlEna_Reg 
IntControlDis_Reg 
Status_Reg 
Config1_Reg 
Config2_Reg 
Statistics_Reg 
ServiceStuff_Reg 
ServWrite_Reg 
ServRead_Reg 
TxDepth_Reg 
Butt_Reg 
CBR_ICG_Reg 
CBR_PTR_Reg 
PingCount_Reg 
DMA_Addr_Reg 

Definition at line 395 of file lanai.c.

enum lanai_type
Enumerator:
lanai2 
lanaihb 

Definition at line 248 of file lanai.c.

Enumerator:
vcc_rxaddr1 
vcc_rxaddr2 
vcc_rxcrc1 
vcc_rxcrc2 
vcc_rxwriteptr 
vcc_rxbufstart 
vcc_rxreadptr 
vcc_txicg 
vcc_txaddr1 
vcc_txaddr2 
vcc_txcrc1 
vcc_txcrc2 
vcc_txreadptr 
vcc_txendptr 
vcc_txwriteptr 
vcc_txcbr_next 

Definition at line 594 of file lanai.c.

Function Documentation

MODULE_AUTHOR ( "Mitchell Blank Jr <[email protected]>"  )
MODULE_DESCRIPTION ( "Efficient Networks Speedstream 3010 driver )
MODULE_DEVICE_TABLE ( pci  ,
lanai_pci_tbl   
)
module_exit ( lanai_module_exit  )
module_init ( lanai_module_init  )
MODULE_LICENSE ( "GPL"  )