- Main Page
- Data Structures
- Files
- Directories

- Search for |

- File List
- Globals

# lnc.h File Reference

`#include <ubixos/types.h>`

Include dependency graph for lnc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | arpcom
struct | hostRingEntry
struct | initBlock
struct | lncInfo
struct | mds
struct | nicInfo
## Defines
#define | Am79C960 0x0003
#define | Am79C961 0x2260
#define | Am79C961A 0x2261
#define | Am79C965 0x2430
#define | Am79C970 0x0242
#define | Am79C970A 0x2621
#define | Am79C971 0x2623
#define | Am79C972 0x2624
#define | Am79C973 0x2625
#define | Am79C978 0x2626
#define | AMD_MASK 0x003
#define | BABL 0x4000
#define | C_LANCE 2
#define | CERR 0x2000
#define | CSR0 0x0000
#define | CSR1 1
#define | CSR2 2
#define | CSR3 3
#define | CSR88 88
#define | CSR89 89
#define | DMA_FIXED 1
#define | DMA_MBUF 2
#define | ERR 0x8000
#define | ETHER_ADDR_LEN 6
#define | IDON 0x0100
#define | INEA 0x0040
#define | INIT 0x0001
#define | INTR 0x0080
#define | LANCE 1
#define | MEM_SLEW 8
#define | MERR 0x0800
#define | MISS 0x1000
#define | NDESC(len2) (1 << len2)
#define | NE2100 2
#define | NE2100_IOSIZE 24
#define | NORMAL 0
#define | NRDRE 3
#define | NTDRE 3
#define | PART_MASK 0xffff
#define | PCnet_32 6
#define | PCNET_BDP 0x16
#define | PCnet_FAST 9
#define | PCnet_FASTplus 10
#define | PCnet_Home 11
#define | PCnet_ISA 3
#define | PCnet_ISA_II 5
#define | PCnet_ISAplus 4
#define | PCnet_PCI 7
#define | PCnet_PCI_II 8
#define | PCNET_RAP 0x12
#define | PCNET_RDP 0x10
#define | PCNET_RESET 0x14
#define | PCNET_VSW 0x18
#define | RECVBUFSIZE 1518
#define | RINT 0x0400
#define | RXON 0x0020
#define | SHMEM 4
#define | STOP 0x0004
#define | STRT 0x0002
#define | TDMD 0x0008
#define | TINT 0x0200
#define | TRANSBUFSIZE 1518
#define | TXON 0x0010
#define | UNKNOWN 0
## Functions
void | _lncInt ()
void | initLNC ()
int | lanceProbe (struct lncInfo *lnc)
int | lncAttach (struct lncInfo *lnc, int unit)
void | lncInt ()
int | probe (struct lncInfo *lnc)
uInt16 | readBcr (struct lncInfo *lnc, uInt16 port)
uInt16 | readCsr (struct lncInfo *lnc, uInt16 port)
void | writeBcr (struct lncInfo *lnc, uInt16 port, uInt16 val)
void | writeCsr (struct lncInfo *lnc, uInt16 port, uInt16 val)
## Variables
lncInfo * | lnc

## Define Documentation

#define Am79C960 0x0003

Definition at line 100 of file lnc.h.

Referenced by probe().

#define Am79C961 0x2260

Definition at line 101 of file lnc.h.

Referenced by probe().

#define Am79C961A 0x2261

Definition at line 102 of file lnc.h.

Referenced by probe().

#define Am79C965 0x2430

Definition at line 103 of file lnc.h.

Referenced by probe().

#define Am79C970 0x0242

Definition at line 104 of file lnc.h.

Referenced by probe().

#define Am79C970A 0x2621

Definition at line 105 of file lnc.h.

Referenced by probe().

#define Am79C971 0x2623

Definition at line 106 of file lnc.h.

Referenced by probe().

#define Am79C972 0x2624

Definition at line 107 of file lnc.h.

Referenced by probe().

#define Am79C973 0x2625

Definition at line 108 of file lnc.h.

Referenced by probe().

#define Am79C978 0x2626

Definition at line 109 of file lnc.h.

Referenced by probe().

#define AMD_MASK 0x003

Definition at line 98 of file lnc.h.

Referenced by probe().

#define BABL 0x4000

Definition at line 80 of file lnc.h.

#define C_LANCE 2

Definition at line 60 of file lnc.h.

Referenced by lanceProbe(), and lncAttach().

#define CERR 0x2000

Definition at line 81 of file lnc.h.

#define CSR0 0x0000

Definition at line 72 of file lnc.h.

Referenced by initLNC(), and lanceProbe().

#define CSR1 1

Definition at line 73 of file lnc.h.

#define CSR2 2

Definition at line 74 of file lnc.h.

#define CSR3 3

Definition at line 75 of file lnc.h.

Referenced by initLNC(), and lanceProbe().

#define CSR88 88

Definition at line 76 of file lnc.h.

Referenced by probe().

#define CSR89 89

Definition at line 77 of file lnc.h.

Referenced by probe().

#define DMA_FIXED 1

Definition at line 52 of file lnc.h.

Referenced by initLNC(), and lncAttach().

#define DMA_MBUF 2

Definition at line 53 of file lnc.h.

#define ERR 0x8000

Definition at line 79 of file lnc.h.

Referenced by lncInt().

#define ETHER_ADDR_LEN 6

Definition at line 42 of file lnc.h.

Referenced by initLNC().

#define IDON 0x0100

Definition at line 86 of file lnc.h.

Referenced by initLNC().

#define INEA 0x0040

Definition at line 88 of file lnc.h.

Referenced by initLNC(), and lanceProbe().

#define INIT 0x0001

Definition at line 94 of file lnc.h.

Referenced by initLNC().

#define INTR 0x0080

Definition at line 87 of file lnc.h.

Referenced by lncInt().

#define LANCE 1

Definition at line 59 of file lnc.h.

Referenced by lanceProbe(), and lncAttach().

#define MEM_SLEW 8

Definition at line 37 of file lnc.h.

Referenced by lncAttach().

#define MERR 0x0800

Definition at line 83 of file lnc.h.

#define MISS 0x1000

Definition at line 82 of file lnc.h.

#define NDESC | ( | len2 |  | ) | (1 << len2)

Definition at line 35 of file lnc.h.

Referenced by lncAttach().

#define NE2100 2

Definition at line 49 of file lnc.h.

Referenced by initLNC().

#define NE2100_IOSIZE 24

Definition at line 43 of file lnc.h.

#define NORMAL 0

Definition at line 36 of file lnc.h.

Referenced by lncAttach().

#define NRDRE 3

Definition at line 40 of file lnc.h.

Referenced by initLNC().

#define NTDRE 3

Definition at line 41 of file lnc.h.

Referenced by initLNC().

#define PART_MASK 0xffff

Definition at line 99 of file lnc.h.

Referenced by probe().

#define PCnet_32 6

Definition at line 64 of file lnc.h.

Referenced by initLNC(), lncAttach(), and probe().

#define PCNET_BDP 0x16

Definition at line 47 of file lnc.h.

Referenced by initLNC().

#define PCnet_FAST 9

Definition at line 67 of file lnc.h.

Referenced by probe().

#define PCnet_FASTplus 10

Definition at line 68 of file lnc.h.

Referenced by probe().

#define PCnet_Home 11

Definition at line 69 of file lnc.h.

Referenced by probe().

#define PCnet_ISA 3

Definition at line 61 of file lnc.h.

Referenced by probe().

#define PCnet_ISA_II 5

Definition at line 63 of file lnc.h.

Referenced by probe().

#define PCnet_ISAplus 4

Definition at line 62 of file lnc.h.

Referenced by probe().

#define PCnet_PCI 7

Definition at line 65 of file lnc.h.

Referenced by probe().

#define PCnet_PCI_II 8

Definition at line 66 of file lnc.h.

Referenced by probe().

#define PCNET_RAP 0x12

Definition at line 45 of file lnc.h.

Referenced by initLNC().

#define PCNET_RDP 0x10

Definition at line 44 of file lnc.h.

Referenced by initLNC().

#define PCNET_RESET 0x14

Definition at line 46 of file lnc.h.

#define PCNET_VSW 0x18

Definition at line 48 of file lnc.h.

#define RECVBUFSIZE 1518

Definition at line 39 of file lnc.h.

Referenced by lncAttach().

#define RINT 0x0400

Definition at line 84 of file lnc.h.

Referenced by lncInt().

#define RXON 0x0020

Definition at line 89 of file lnc.h.

#define SHMEM 4

Definition at line 54 of file lnc.h.

Referenced by lncAttach().

#define STOP 0x0004

Definition at line 92 of file lnc.h.

Referenced by lanceProbe().

#define STRT 0x0002

Definition at line 93 of file lnc.h.

Referenced by initLNC().

#define TDMD 0x0008

Definition at line 91 of file lnc.h.

#define TINT 0x0200

Definition at line 85 of file lnc.h.

Referenced by lncInt().

#define TRANSBUFSIZE 1518

Definition at line 38 of file lnc.h.

Referenced by lncAttach().

#define TXON 0x0010

Definition at line 90 of file lnc.h.

#define UNKNOWN 0

Definition at line 58 of file lnc.h.

Referenced by lanceProbe().

## Function Documentation

void _lncInt | ( |  | ) |

Referenced by initLNC().

void initLNC | ( |  | ) |

Definition at line 104 of file lnc.c.

References _lncInt(), arpcom::ac_enaddr, lncInfo::arpcom, lncInfo::bdp, CSR0, CSR3, dDpl3, dInt, DMA_FIXED, dPresent, ETHER_ADDR_LEN, nicInfo::ic, nicInfo::ident, IDON, INEA, INIT, inportByte(), kmalloc(), kprintf(), lnc, lncAttach(), nicInfo::memMode, mVec, NE2100, lncInfo::nic, lncInfo::nrdre, NRDRE, lncInfo::ntdre, NTDRE, PCnet_32, PCNET_BDP, PCNET_RAP, PCNET_RDP, probe(), lncInfo::rap, lncInfo::rdp, readCsr(), setVector(), STRT, writeCsr(), and x1000.

Here is the call graph for this function:

int lanceProbe | ( | struct lncInfo * | lnc | ) |

Definition at line 192 of file lnc.c.

References C_LANCE, CSR0, CSR3, INEA, inportWord(), LANCE, lnc, lncInfo::rdp, readCsr(), STOP, UNKNOWN, and writeCsr().

Referenced by probe().

Here is the call graph for this function:

int lncAttach | ( | struct lncInfo * | lnc,
|  | int | unit |
| ) |  |  |

Definition at line 246 of file lnc.c.

References arpcom::ac_enaddr, lncInfo::arpcom, C_LANCE, DMA_FIXED, nicInfo::ic, icIdent, nicInfo::ident, kmalloc(), kprintf(), LANCE, lnc, MEM_SLEW, nicInfo::memMode, nicInfo::mode, NDESC, lncInfo::nic, nicIdent, NORMAL, lncInfo::nrdre, lncInfo::ntdre, PCnet_32, RECVBUFSIZE, lncInfo::recvRing, SHMEM, and TRANSBUFSIZE.

Referenced by initLNC().

Here is the call graph for this function:

void lncInt | ( |  | ) |

Definition at line 208 of file lnc.c.

References ERR, inportWord(), INTR, kprintf(), lnc, outportByte(), outportWord(), lncInfo::rdp, RINT, TINT, and x20.

Here is the call graph for this function:

int probe | ( | struct lncInfo * | lnc | ) |

Definition at line 154 of file lnc.c.

References Am79C960, Am79C961, Am79C961A, Am79C965, Am79C970, Am79C970A, Am79C971, Am79C972, Am79C973, Am79C978, AMD_MASK, CSR88, CSR89, lanceProbe(), lnc, PART_MASK, PCnet_32, PCnet_FAST, PCnet_FASTplus, PCnet_Home, PCnet_ISA, PCnet_ISA_II, PCnet_ISAplus, PCnet_PCI, PCnet_PCI_II, and readCsr().

Referenced by initLNC().

Here is the call graph for this function:

uInt16 readBcr | ( | struct lncInfo * | lnc,
|  | uInt16 | port |
| ) |  |  |

Definition at line 98 of file lnc.c.

References lncInfo::bdp, inportWord(), outportWord(), and lncInfo::rap.

Here is the call graph for this function:

uInt16 readCsr | ( | struct lncInfo * | lnc,
|  | uInt16 | port |
| ) |  |  |

Definition at line 88 of file lnc.c.

References inportWord(), lnc, outportWord(), lncInfo::rap, and lncInfo::rdp.

Referenced by initLNC(), lanceProbe(), and probe().

Here is the call graph for this function:

void writeBcr | ( | struct lncInfo * | lnc,
|  | uInt16 | port,
|  | uInt16 | val |
| ) |  |  |

Definition at line 93 of file lnc.c.

References lncInfo::bdp, lnc, outportWord(), and lncInfo::rap.

Here is the call graph for this function:

void writeCsr | ( | struct lncInfo * | lnc,
|  | uInt16 | port,
|  | uInt16 | val |
| ) |  |  |

Definition at line 83 of file lnc.c.

References lnc, outportWord(), lncInfo::rap, and lncInfo::rdp.

Referenced by initLNC(), and lanceProbe().

Here is the call graph for this function:

## Variable Documentation

struct lncInfo* lnc

Definition at line 58 of file lnc.c.

Referenced by initLNC(), lanceProbe(), lncAttach(), lncInt(), probe(), readCsr(), writeBcr(), and writeCsr().