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

    /*****************************************************************************************
    Copyright(c)2002-2004TheUbixOSProject
    Allrightsreserved.

    Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,are
    permittedprovidedthatthefollowingconditionsaremet:

    Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistof
    conditions,thefollowingdisclaimerandthelistofauthors.Redistributionsinbinary
    formmustreproducetheabovecopyrightnotice,thislistofconditions,thefollowing
    disclaimerandthelistofauthorsinthedocumentationand/orothermaterialsprovided
    withthedistribution.NeitherthenameoftheUbixOSProjectnorthenamesofits
    contributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftware
    withoutspecificpriorwrittenpermission.

    THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANY
    EXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOF
    MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALL
    THECOPYRIGHTOWNERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,
    SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENT
    OFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,OR
    TORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHIS
    SOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.

    $Id: lnc_8h.xml 88 2016-01-12 00:11:29Z reddawg $

    *****************************************************************************************/

    #ifndef_LNC_H
    #define_LNC_H

    #include<ubixos/types.h>

    #defineNDESC(len2)(1<<len2)
    #defineNORMAL0
    #defineMEM_SLEW8
    #defineTRANSBUFSIZE1518
    #defineRECVBUFSIZE1518
    #defineNRDRE3
    #defineNTDRE3
    #defineETHER_ADDR_LEN6
    #defineNE2100_IOSIZE24
    #definePCNET_RDP0x10/*RegisterDataPort*/
    #definePCNET_RAP0x12/*RegisterAddressPort*/
    #definePCNET_RESET0x14
    #definePCNET_BDP0x16
    #definePCNET_VSW0x18
    #defineNE21002

    /*mem_modevalues*/
    #defineDMA_FIXED1
    #defineDMA_MBUF2
    #defineSHMEM4

    /**********ChipTypes**********/
    #defineUNKNOWN0/*Unknown*/
    #defineLANCE1/*Am7990*/
    #defineC_LANCE2/*Am79C90*/
    #definePCnet_ISA3/*Am79C960*/
    #definePCnet_ISAplus4/*Am79C961*/
    #definePCnet_ISA_II5/*Am79C961A*/
    #definePCnet_326/*Am79C965*/
    #definePCnet_PCI7/*Am79C970*/
    #definePCnet_PCI_II8/*Am79C970A*/
    #definePCnet_FAST9/*Am79C971*/
    #definePCnet_FASTplus10/*Am79C972*/
    #definePCnet_Home11/*Am79C978*/

    /********AM7990Specifics**************/
    #defineCSR00x0000
    #defineCSR11
    #defineCSR22
    #defineCSR33
    #defineCSR8888
    #defineCSR8989

    #defineERR0x8000
    #defineBABL0x4000
    #defineCERR0x2000
    #defineMISS0x1000
    #defineMERR0x0800
    #defineRINT0x0400
    #defineTINT0x0200
    #defineIDON0x0100
    #defineINTR0x0080
    #defineINEA0x0040
    #defineRXON0x0020
    #defineTXON0x0010
    #defineTDMD0x0008
    #defineSTOP0x0004
    #defineSTRT0x0002
    #defineINIT0x0001

    /*CSR88-89:ChipIDmasks*/
    #defineAMD_MASK0x003
    #definePART_MASK0xffff
    #defineAm79C9600x0003
    #defineAm79C9610x2260
    #defineAm79C961A0x2261
    #defineAm79C9650x2430
    #defineAm79C9700x0242
    #defineAm79C970A0x2621
    #defineAm79C9710x2623
    #defineAm79C9720x2624
    #defineAm79C9730x2625
    #defineAm79C9780x2626

    /**********Structs**********/

    structinitBlock{
    uInt16mode;/*Moderegister*/
    uInt8padr[6];/*Ethernetaddress*/
    uInt8ladrf[8];/*Logicaladdressfilter(multicast)*/
    uInt16rdra;/*Loworderpointertoreceivering*/
    uInt16rlen;/*Highorderpointerandno.rings*/
    uInt16tdra;/*Loworderpointertotransmitring*/
    uInt16tlen;/*Highorderpointerandnorings*/
    };

    structmds{
    uInt16md0;
    uInt16md1;
    shortmd2;
    uInt16md3;
    };

    structhostRingEntry{
    structmds*md;
    union{
    //structmbuf*mbuf;
    char*data;
    }buff;
    };

    structarpcom{
    //structifnetac_if;/*network-visibleinterface*/
    uInt8ac_enaddr[6];/*ethernethardwareaddress*/
    intac_multicnt;/*lengthofac_multiaddrslist*/
    void*ac_netgraph;/*ng_ether(4)netgraphnodeinfo*/
    };

    structnicInfo{
    intident;/*Typeofcard*/
    intic;/*Typeofic,Am7990,Am79C960etc.*/
    intmemMode;
    intiobase;
    intmode;/*Modesettingatinitialization*/
    };

    structlncInfo{
    structarpcomarpcom;
    structnicInfonic;
    structhostRingEntry*recvRing;
    structhostRingEntry*transRings;
    structinitBlock*initBloack;
    intrap;
    intrdp;
    intbdp;
    intnrdre;
    intntdre;
    };

    externstructlncInfo*lnc;

    voidwriteCsr(structlncInfo*lnc,uInt16port,uInt16val);
    uInt16readCsr(structlncInfo*lnc,uInt16port);
    voidwriteBcr(structlncInfo*lnc,uInt16port,uInt16val);
    uInt16readBcr(structlncInfo*lnc,uInt16port);

    voidinitLNC();
    intprobe(structlncInfo*lnc);
    intlanceProbe(structlncInfo*lnc);
    intlncAttach(structlncInfo*lnc,intunit);

    voidlncInt();
    void_lncInt();

    #endif

    /***
    $Log: lnc_8h.xml,v $
    Revision 1.6  2006/12/19 14:12:52  reddawg
    rtld-elf almost workign

    Revision1.1.1.12006/06/0112:46:14reddawg
    ubix2

    Revision1.22005/10/1200:13:37reddawg
    Removed

    Revision1.1.1.12005/09/2617:23:50reddawg
    nomessage

    Revision1.22004/05/2115:05:07reddawg
    Cleanedup

    END
    ***/