UbixOS
2.0
|
#include <sys/types.h>
Go to the source code of this file.
Data Structures | |
struct | arpcom |
struct | hostRingEntry |
struct | hostRingEntry_old |
struct | initBlock16 |
struct | initBlock32 |
struct | lncInfo |
struct | mds |
struct | nicInfo |
Macros | |
#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 | BCR18 18 |
#define | BCR18_DWIO 0x0080 |
#define | BCR20 0x0014 |
#define | BDP 0x16 |
#define | BDP32 0x1C |
#define | C_LANCE 2 /* Am79C90 */ |
#define | CERR 0x2000 |
#define | CSR0 0x0000 |
#define | CSR0_STOP 0x0004 |
#define | CSR1 1 |
#define | CSR15 15 |
#define | CSR15_DRTY 0x0020 |
#define | CSR15_DXMTFCS 0x0008 |
#define | CSR15_PROM 0x8000 |
#define | CSR2 2 |
#define | CSR3 3 |
#define | CSR58 0x003A |
#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 /* Am7990 */ |
#define | MEM_SLEW 8 |
#define | MERR 0x0800 |
#define | MISS 0x1000 |
#define | MODE_16 0 |
#define | MODE_32 1 |
#define | MODE_INVALID 3 |
#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 /* Am79C965 */ |
#define | PCnet_FAST 9 /* Am79C971 */ |
#define | PCnet_FASTplus 10 /* Am79C972 */ |
#define | PCnet_Home 11 /* Am79C978 */ |
#define | PCnet_ISA 3 /* Am79C960 */ |
#define | PCnet_ISA_II 5 /* Am79C961A */ |
#define | PCnet_ISAplus 4 /* Am79C961 */ |
#define | PCnet_PCI 7 /* Am79C970 */ |
#define | PCnet_PCI_II 8 /* Am79C970A */ |
#define | PCNET_VSW 0x18 |
#define | RAP 0x12 |
#define | RAP32 0x14 |
#define | RDP 0x10 |
#define | RDP32 0x10 |
#define | RECVBUFSIZE 1518 |
#define | RESET 0x14 |
#define | RESET32 0x18 |
#define | RINT 0x0400 |
#define | RXON 0x0020 |
#define | SHMEM 4 |
#define | STRT 0x0002 |
#define | TDMD 0x0008 |
#define | TINT 0x0200 |
#define | TRANSBUFSIZE 1518 |
#define | TXON 0x0010 |
#define | UNKNOWN 0 /* Unknown */ |
Functions | |
void | _lncInt () |
int | initLNC () |
int | lanceProbe (struct lncInfo *lnc) |
int | lnc_driverOwnsRX (struct lncInfo *) |
int | lnc_getMode (struct lncInfo *) |
void | lnc_INT () |
void | lnc_isr () |
int | lnc_probe (struct lncInfo *) |
uint16_t | lnc_readBCR (struct lncInfo *, uint16_t) |
uint32_t | lnc_readBCR32 (struct lncInfo *, uint32_t) |
uint16_t | lnc_readCSR (struct lncInfo *, uint16_t) |
uint32_t | lnc_readCSR32 (struct lncInfo *, uint32_t) |
void | lnc_reset (struct lncInfo *) |
void | lnc_reset32 (struct lncInfo *) |
void | lnc_rxINT () |
int | lnc_sendPacket (struct lncInfo *lnc, void *packet, size_t len, uInt8 *dest) |
int | lnc_switchDWord (struct lncInfo *) |
void | lnc_txINT () |
void | lnc_writeBCR (struct lncInfo *, uint16_t, uint16_t) |
void | lnc_writeBCR32 (struct lncInfo *, uint32_t, uint32_t) |
void | lnc_writeCSR (struct lncInfo *, uint16_t, uint16_t) |
void | lnc_writeCSR32 (struct lncInfo *, uint32_t, uint32_t) |
int | lncAttach (struct lncInfo *lnc, int unit) |
void | lncInt () |
int | probe (struct lncInfo *lnc) |
Variables | |
struct lncInfo * | lnc |
void _lncInt | ( | ) |
int initLNC | ( | ) |
Definition at line 94 of file lnc.c.
References arpcom::ac_enaddr, lncInfo::arpcom, lncInfo::bufferSize, CSR0, CSR1, CSR2, CSR3, dDpl3, dInt, DMA_FIXED, dPresent, ETHER_ADDR_LEN, nicInfo::ic, nicInfo::ident, IDON, INEA, lncInfo::init, INIT, inportByte(), lncInfo::ioAddr, irqEnable(), kmalloc(), kprintf(), lnc, lnc_getMode(), lnc_isr(), lnc_probe(), lnc_readBCR32(), lnc_readCSR32(), lnc_switchDWord(), lnc_writeBCR32(), lnc_writeCSR32(), lncAttach(), nicInfo::memMode, memset(), initBlock32::mode, MODE_16, MODE_32, NE2100, lncInfo::nic, lncInfo::nrdre, NRDRE, lncInfo::ntdre, NTDRE, initBlock32::padr, PCnet_32, initBlock32::rdra, initBlock32::rlen, lncInfo::rxRing, setVector(), STRT, sVec, initBlock32::tdra, initBlock32::tlen, lncInfo::txRing, and vmm_getRealAddr().
int lanceProbe | ( | struct lncInfo * | lnc | ) |
Definition at line 231 of file lnc.c.
References C_LANCE, CSR0, CSR0_STOP, CSR3, INEA, inportWord(), lncInfo::ioAddr, LANCE, lnc, lnc_readCSR(), lnc_writeCSR(), RDP, and UNKNOWN.
Referenced by lnc_probe().
int lnc_driverOwnsRX | ( | struct lncInfo * | ) |
Definition at line 518 of file lnc.c.
References lnc, hostRingEntry::md, lncInfo::rxPtr, and lncInfo::rxRing.
Referenced by lnc_rxINT(), and lnc_thread().
int lnc_getMode | ( | struct lncInfo * | ) |
Definition at line 573 of file lnc.c.
References CSR0, CSR0_STOP, lnc, lnc_readCSR(), lnc_readCSR32(), lnc_reset(), lnc_reset32(), MODE_16, MODE_32, and MODE_INVALID.
Referenced by initLNC().
void lnc_INT | ( | ) |
void lnc_isr | ( | ) |
Referenced by initLNC().
int lnc_probe | ( | struct lncInfo * | ) |
Definition at line 191 of file lnc.c.
References Am79C960, Am79C961, Am79C961A, Am79C965, Am79C970, Am79C970A, Am79C971, Am79C972, Am79C973, Am79C978, AMD_MASK, CSR88, CSR89, lanceProbe(), lnc, lnc_readCSR(), PART_MASK, PCnet_32, PCnet_FAST, PCnet_FASTplus, PCnet_Home, PCnet_ISA, PCnet_ISA_II, PCnet_ISAplus, PCnet_PCI, and PCnet_PCI_II.
Referenced by initLNC().
Definition at line 84 of file lnc.c.
References BDP, inportWord(), lncInfo::ioAddr, lnc, outportWord(), and RAP.
Definition at line 89 of file lnc.c.
References BDP32, inportDWord(), lncInfo::ioAddr, lnc, outportDWord(), and RAP32.
Referenced by initLNC(), and lnc_switchDWord().
Definition at line 64 of file lnc.c.
References inportWord(), lncInfo::ioAddr, lnc, outportWord(), RAP, and RDP.
Referenced by lanceProbe(), lnc_getMode(), and lnc_probe().
Definition at line 69 of file lnc.c.
References inportDWord(), lncInfo::ioAddr, lnc, outportDWord(), RAP32, and RDP32.
Referenced by initLNC(), lnc_getMode(), and lnc_switchDWord().
void lnc_reset | ( | struct lncInfo * | ) |
Definition at line 585 of file lnc.c.
References inportWord(), lncInfo::ioAddr, lnc, and RESET.
Referenced by lnc_getMode().
void lnc_reset32 | ( | struct lncInfo * | ) |
Definition at line 589 of file lnc.c.
References inportDWord(), lncInfo::ioAddr, lnc, and RESET32.
Referenced by lnc_getMode().
void lnc_rxINT | ( | ) |
Definition at line 316 of file lnc.c.
References nicBuffer::buffer, lncInfo::bufferSize, kmalloc(), nicBuffer::length, lnc, lnc_driverOwnsRX(), lnc_nextRxPtr(), hostRingEntry::md, memset(), lncInfo::rxBuffer, lncInfo::rxPtr, lncInfo::rxRing, and tmpBuf.
Definition at line 546 of file lnc.c.
References hostRingEntry::bcnt, lncInfo::bufferSize, kpanic(), lnc, lnc_driverOwnsTX(), lnc_nextTxPtr(), hostRingEntry::md, memcpy(), lncInfo::txBuffer, lncInfo::txPtr, and lncInfo::txRing.
int lnc_switchDWord | ( | struct lncInfo * | ) |
Definition at line 593 of file lnc.c.
References BCR18, BCR18_DWIO, CSR58, inportDWord(), inportWord(), lncInfo::ioAddr, kprintf(), lnc, lnc_readBCR32(), lnc_readCSR32(), lnc_writeCSR32(), outportDWord(), RDP, RESET, and RESET32.
Referenced by initLNC().
Definition at line 74 of file lnc.c.
References BDP, lncInfo::ioAddr, lnc, outportWord(), and RAP.
Definition at line 79 of file lnc.c.
References BDP32, lncInfo::ioAddr, lnc, outportDWord(), and RAP32.
Referenced by initLNC().
Definition at line 54 of file lnc.c.
References lncInfo::ioAddr, lnc, outportWord(), RAP, and RDP.
Referenced by lanceProbe().
Definition at line 59 of file lnc.c.
References lncInfo::ioAddr, lnc, outportDWord(), RAP32, and RDP32.
Referenced by initLNC(), lnc_INT(), and lnc_switchDWord().
int lncAttach | ( | struct lncInfo * | lnc, |
int | unit | ||
) |
Definition at line 419 of file lnc.c.
References hostRingEntry::addr, hostRingEntry::bcnt, lncInfo::bufferSize, C_LANCE, nicInfo::ic, kmalloc(), kprintf(), LANCE, lnc, hostRingEntry::md, nicInfo::memMode, memset(), nicInfo::mode, NDESC, lncInfo::nic, NORMAL, lncInfo::nrdre, lncInfo::ntdre, PCnet_32, lncInfo::rxBuffer, lncInfo::rxRing, SHMEM, lncInfo::txBuffer, lncInfo::txRing, and vmm_getRealAddr().
Referenced by initLNC().
void lncInt | ( | ) |
Definition at line 368 of file lnc.c.
References ERR, inportWord(), INTR, lncInfo::ioAddr, kprintf(), lnc, outportByte(), outportWord(), RDP, RINT, and TINT.
int probe | ( | struct lncInfo * | lnc | ) |
struct lncInfo* lnc |
Definition at line 44 of file lnc.c.
Referenced by initLNC(), lanceProbe(), lnc_driverOwnsRX(), lnc_driverOwnsTX(), lnc_getMode(), lnc_INT(), lnc_nextRxPtr(), lnc_nextTxPtr(), lnc_probe(), lnc_readBCR(), lnc_readBCR32(), lnc_readCSR(), lnc_readCSR32(), lnc_reset(), lnc_reset32(), lnc_rxINT(), lnc_sendPacket(), lnc_switchDWord(), lnc_thread(), lnc_writeBCR(), lnc_writeBCR32(), lnc_writeCSR(), lnc_writeCSR32(), lncAttach(), and lncInt().