亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ln97xend.c

?? vxworks嵌入式開發vmware bsp包 其中已包括網卡的驅動 本人試過 非常好用
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* ln97xEnd.c - END style AMD Am79C97X PCnet-PCI Ethernet driver *//* Copyright 1984-1998 Wind River Systems, Inc., and Cetia Inc. */#include "copyright_wrs.h"/*modification history--------------------01c,08dec98,snk  made architecture independant, by teamF1 Inc.		 tested with x86 & power Pc architectures.01b,21sep98,dat  modified to stand alone01a,01aug98,dmb  written from if_lnPci.c, ver 01e*//*DESCRIPTION  This module implements the Advanced Micro Devices Am79C971Am79C972 and Am79C973 PCnet-PCI Ethernet 32 bit network interface driver.The PCnet-PCI ethernet controller is inherently little endian becausethe chip is designed to operate on a PCI bus which is a little endianbus. The software interface to the driver is divided into three parts.The first part is the PCI configuration registers and their set up. This part is done at the BSP level in the various BSPs which use thisdriver. The second and third part are dealt in the driver. The secondpart of the interface comprises of the I/O control registers and theirprogramming. The third part of the interface comprises of the descriptorsand the buffers. This driver is designed to be moderately generic, operating unmodifiedacross the range of architectures and targets supported by VxWorks.  Toachieve this, the driver must be given several target-specific parameters,and some external support routines must be provided. These target-specificvalues and the external support routines are described below.This driver supports multiple units per CPU.  The driver can beconfigured to support big-endian or little-endian architectures.  Itcontains error recovery code to handle known device errata related to DMAactivity. Big endian processors can be connected to the PCI bus through some controllerswhich take care of hardware byte swapping. In such cases all the registers which the chip DMA s to have to be swapped and written to, so that when thehardware swaps the accesses, the chip would see them correctly. The chip stillhas to be programmed to operated in little endian mode as it is on the PCI bus.If the cpu board hardware automatically swaps all the accesses to and from thePCI bus, then input and output byte stream need not be swapped. BOARD LAYOUTThis device is on-board.  No jumpering diagram is necessary.EXTERNAL INTERFACEThe only external interface is the ln97xEndLoad() routine, which expectsthe <initString> parameter as input.  This parameter passes in a colon-delimited string of the format:<unit>:<devMemAddr>:<devIoAddr>:<pciMemBase:<vecNum>:<intLvl>:<memAdrs>:<memSize>:<memWidth>:<csr3b>:<offset>:<flags>The ln97xEndLoad() function uses strtok() to parse the string.TARGET-SPECIFIC PARAMETERS.IP <unit>A convenient holdover from the former model.  This parameter is used onlyin the string name for the driver..IP <devMemAddr>This parameter in the memory base address of the device registers in thememory map of the CPU. It indicates to the driver where to find theRDP register.The LANCE presents two registers to the external interface, the RDP (registerdata port) and RAP (register address port) registers.  This driver assumes that these two registers occupy two unique addresses in a memory spacethat is directly accessible by the CPU executing this driver.  The driverassumes that the RDP register is mapped at a lower address than the RAPregister; the RDP register is therefore derived from the "base address."This parameter should be equal to NONE if memory map is not used..IP <devIoAddr>This parameter in the IO base address of the device registers in theIO map of some CPUs. It indicates to the driver where to find the RDPregister. If both <devIoAddr> and <devMemAddr> are given then the devicechooses <devMemAddr> which is a memory mapped register base address.This parameter should be equal to NONE if IO map is not used..IP <pciMemBase>This parameter is the base address of the CPU memory as seen from thePCI bus. This parameter is zero for most intel architectures..IP <vecNum>This parameter is the vector associated with the device interrupt.This driver configures the LANCE device to generate hardware interruptsfor various events within the device; thus it containsan interrupt handler routine.  The driver calls intConnect() to connect its interrupt handler to the interrupt vector generated as a result of the LANCE interrupt..IP <intLvl>Some targets use additional interrupt controller devices to help organizeand service the various interrupt sources.  This driver avoids allboard-specific knowledge of such devices.  During the driver'sinitialization, the external routine sysLan97xIntEnable() is called toperform any board-specific operations required to allow the servicing of aLANCE interrupt.  For a description of sysLan97xIntEnable(), see "ExternalSupport Requirements" below..IP <memAdrs>This parameter gives the driver the memory address to carve out itsbuffers and data structures. If this parameter is specified to beNONE then the driver allocates cache coherent memory for buffersand descriptors from the system pool.The LANCE device is a DMA type of device and typically shares access tosome region of memory with the CPU.  This driver is designed for systemsthat directly share memory between the CPU and the LANCE.  Itassumes that this shared memory is directly available to itwithout any arbitration or timing concerns..IP <memSize>This parameter can be used to explicitly limit the amount of sharedmemory (bytes) this driver will use.  The constant NONE can be used toindicate no specific size limitation.  This parameter is used only ifa specific memory region is provided to the driver..IP <memWidth>Some target hardware that restricts the shared memory region to aspecific location also restricts the access width to this region bythe CPU.  On these targets, performing an access of an invalid widthwill cause a bus error.This parameter can be used to specify the number of bytes of accesswidth to be used by the driver during access to the shared memory.The constant NONE can be used to indicate no restrictions.Current internal support for this mechanism is not robust; implementation may not work on all targets requiring these restrictions..IP <csr3b>The LANCE control register #3 determines the bus mode of the device,allowing the support of big-endian and little-endian architectures.This parameter, defined as "UINT32 lnCSR_3B", is the value that willbe placed into LANCE control register #3.  The default value supportsMotorola-type buses.  For information about changing this parameter, see the manual. Normally for devices on the PCI bus this should always belittle endian. This value is zero normally.IP <offset>This parameter specifies the offset from which the packet has to beloaded from the begining of the device buffer. Normally this parameter iszero except for architectures which access long words only on alignedaddresses. For these architectures the value of this offset should be 2..IP <flags>This is parameter is used for future use, currently its value should bezero.EXTERNAL SUPPORT REQUIREMENTSThis driver requires several external support functions, defined as macros:.CS    SYS_INT_CONNECT(pDrvCtrl, routine, arg)    SYS_INT_DISCONNECT (pDrvCtrl, routine, arg)    SYS_INT_ENABLE(pDrvCtrl)    SYS_INT_DISABLE(pDrvCtrl)    SYS_OUT_BYTE(pDrvCtrl, reg, data)    SYS_IN_BYTE(pDrvCtrl, reg, data)    SYS_OUT_WORD(pDrvCtrl, reg, data)    SYS_IN_WORD(pDrvCtrl, reg, data)    SYS_OUT_LONG(pDrvCtrl, reg, data)    SYS_IN_LONG(pDrvCtrl, reg, data)    SYS_ENET_ADDR_GET(pDrvCtrl, pAddress)        sysLan97xIntEnable(pDrvCtrl->intLevel)     sysLan97xIntDisable(pDrvCtrl->intLevel)     sysLan97xEnetAddrGet(pDrvCtrl, enetAdrs).CEThere are default values in the source code for these macros.  They presumememory mapped accesses to the device registers and the normal intConnect(),and intEnable() BSP functions.  The first argument to each is the devicecontroller structure. Thus, each has access back to all the device-specificinformation.  Having the pointer in the macro facilitates the addition of new features to this driver.The macros SYS_INT_CONNECT, SYS_INT_DISCONNECT, SYS_INT_ENABLE andSYS_INT_DISABLE allow the driver to be customized for BSPs that use specialversions of these routines.The macro SYS_INT_CONNECT is used to connect the interrupt handler tothe appropriate vector.  By default it is the routine intConnect().The macro SYS_INT_DISCONNECT is used to disconnect the interrupt handler priorto unloading the module.  By default this is a dummy routine thatreturns OK.The macro SYS_INT_ENABLE is used to enable the interrupt level for theend device.  It is called once during initialization.  It calls anexternal board level routine sysLan97xIntEnable(). The macro SYS_INT_DISABLE is used to disable the interrupt level for theend device.  It is called during stop.  It calls anexternal board level routine sysLan97xIntDisable(). The macro SYS_ENET_ADDR_GET is used get the ethernet hardware of thechip. This macro calls an external board level routine namelysysLan97xEnetAddrGet() to get the ethernet address.SYSTEM RESOURCE USAGEWhen implemented, this driver requires the following system resources:    - one mutual exclusion semaphore    - one interrupt vector    - 13288 bytes in text for a I80486 target    - 64 bytes in the initialized data section (data)    - 0 bytes in the uninitialized data section (BSS)The driver allocates clusters of size 1520 bytes for receive frames andand transmit frames.INCLUDES:end.h endLib.h etherMultiLib.h ln97xEnd.hSEE ALSO: muxLib, endLib, netBufLib.I "Writing and Enhanced Network Driver".I "Advanced Micro Devices PCnet-PCI Ethernet Controller for PCI."*/#include "vxWorks.h"#include "wdLib.h"#include "stdlib.h"#include "taskLib.h"#include "logLib.h"#include "intLib.h"#include "netLib.h"#include "stdio.h"#include "stdlib.h"#include "sysLib.h"#include "iv.h"#include "memLib.h"#include "semLib.h"#include "cacheLib.h"#include "sys/ioctl.h"#include "etherLib.h"#ifndef DOC             /* don't include when building documentation */#include "net/mbuf.h"#endif  /* DOC */#include "net/protosw.h"#include "sys/socket.h"#include "errno.h"#include "net/if.h"#include "net/route.h"#include "netinet/in.h"#include "netinet/in_systm.h"#include "netinet/in_var.h"#include "netinet/ip.h"#include "netinet/if_ether.h"#include "net/if_subr.h"#include "m2Lib.h"#include "etherMultiLib.h"              /* multicast stuff. */#include "end.h"                        /* Common END structures. */#include "netBufLib.h"#include "muxLib.h"#undef END_MACROS#include "endLib.h"#include "lstLib.h"                     /* Needed to maintain protocol list. */#include "ln97xEnd.h"			/* modify by frank *//* local defines *//* * If LN_KICKSTART_TX is TRUE the transmitter is kick-started to force a * read of the transmit descriptors, otherwise the internal polling (1.6msec) * will initiate a read of the descriptors.  This should be FALSE is there * is any chance of memory latency or chip accesses detaining the LANCE DMA, * which results in a transmitter UFLO error.  This can be changed with the * global lnKickStartTx below. */#define LN_KICKSTART_TX TRUE/* Cache macros */#define LN_CACHE_INVALIDATE(address, len) \        CACHE_DRV_INVALIDATE (&pDrvCtrl->cacheFuncs, (address), (len))#define LN_CACHE_VIRT_TO_PHYS(address) \        CACHE_DRV_VIRT_TO_PHYS (&pDrvCtrl->cacheFuncs, (address))#define LN_CACHE_PHYS_TO_VIRT(address) \        CACHE_DRV_PHYS_TO_VIRT (&pDrvCtrl->cacheFuncs, (address))/* memory to PCI address translation macros */#define PCI_TO_MEM_PHYS(pciAdrs) \    ((pciAdrs) - (pDrvCtrl->pciMemBase))	#define MEM_TO_PCI_PHYS(memAdrs) \    ((memAdrs) + (pDrvCtrl->pciMemBase))    /* * Default macro definitions for BSP interface. * These macros can be redefined in a wrapper file, to generate * a new module with an optimized interface. */#ifndef SYS_INT_CONNECT#define SYS_INT_CONNECT(pDrvCtrl,rtn,arg,pResult) \    { \    IMPORT STATUS sysIntConnect(); \    *pResult = intConnect ((VOIDFUNCPTR *)INUM_TO_IVEC (pDrvCtrl->ivec), \                             rtn, (int)arg); \    }#endif /*SYS_INT_CONNECT*/#ifndef SYS_INT_DISCONNECT#define SYS_INT_DISCONNECT(pDrvCtrl,rtn,arg,pResult) \    { \    *pResult = OK; /* HELP: need a real routine */ \    }#endif /*SYS_INT_DISCONNECT*/#ifndef SYS_INT_ENABLE#define SYS_INT_ENABLE() \    { \    IMPORT STATUS sysLan97xIntEnable(); \    sysLan97xIntEnable (pDrvCtrl->ilevel); \    }#endif /* SYS_INT_ENABLE*//* Macro to disable the appropriate interrupt level */#ifndef SYS_INT_DISABLE#   define SYS_INT_DISABLE(pDrvCtrl) \    { \    IMPORT STATUS sysLan97xIntDisable (); \    sysLan97xIntDisable (pDrvCtrl->ilevel); \    }#endif#ifndef SYS_OUT_LONG#define SYS_OUT_LONG(pDrvCtrl,addr,value) \    { \    *((ULONG *)(addr)) = (value); \    }#endif /* SYS_OUT_LONG */#ifndef SYS_IN_LONG#define SYS_IN_LONG(pDrvCtrl,addr,data) \    { \    ((data) = *((ULONG *)(addr))); \    }#endif /* SYS_IN_LONG */#ifndef SYS_OUT_SHORT#define SYS_OUT_SHORT(pDrvCtrl,addr,value) \    { \    *((USHORT *)(addr)) = (value); \    }#endif /* SYS_OUT_SHORT*/#ifndef SYS_IN_SHORT#define SYS_IN_SHORT(pDrvCtrl,addr,data) \    { \    ((data) = *((USHORT *)(addr))); \    }      #endif /* SYS_IN_SHORT*/#ifndef SYS_OUT_BYTE#define SYS_OUT_BYTE(pDrvCtrl,addr,value) \    { \    *((UCHAR *)(addr)) = (value); \    }#endif /* SYS_OUT_BYTE */#ifndef SYS_IN_BYTE#define SYS_IN_BYTE(pDrvCtrl,addr,data) \    { \    ((data) = *((UCHAR *)(addr))); \    }#endif /* SYS_IN_BYTE */#ifndef SYS_ENET_ADDR_GET#define SYS_ENET_ADDR_GET(pDrvCtrl, pAddress) \    { \    IMPORT STATUS sysLan97xEnetAddrGet (LN_97X_DRV_CTRL *pDrvCtrl, \                                     char * enetAdrs); \    sysLan97xEnetAddrGet (pDrvCtrl, pAddress); \    }#endif /* SYS_ENET_ADDR_GET *//* A shortcut for getting the hardware address from the MIB II stuff. */#define END_HADDR(pEnd) \                ((pEnd)->mib2Tbl.ifPhysAddress.phyAddress)#define END_HADDR_LEN(pEnd) \                ((pEnd)->mib2Tbl.ifPhysAddress.addrLength)#define END_FLAGS_ISSET(pEnd, setBits) \            ((pEnd)->flags & (setBits))/* externs */IMPORT int endMultiLstCnt (END_OBJ *);#ifdef DRV_DEBUG	/* if debugging driver */int      ln97xDebug = DRV_DEBUG_LOAD | DRV_DEBUG_INT | DRV_DEBUG_TX;NET_POOL pLan97xNetPool;#define DRV_LOG(FLG, X0, X1, X2, X3, X4, X5, X6) \        if (ln97xDebug & FLG) \            logMsg((char *)X0, (int)X1, (int)X2, (int)X3, (int)X4, \		    (int)X5, (int)X6);#define DRV_PRINT(FLG,X) \        if (ln97xDebug & FLG) printf X;#else /*DRV_DEBUG*/#define DRV_LOG(DBG_SW, X0, X1, X2, X3, X4, X5, X6)#define DRV_PRINT(DBG_SW,X)#endif /*DRV_DEBUG*//* locals */LOCAL int lnTsize = LN_TMD_TLEN;    /* deflt xmit ring size as power of 2 */LOCAL int lnRsize = LN_RMD_RLEN;    /* deflt recv ring size as power of 2 */LOCAL BOOL lnKickStartTx = LN_KICKSTART_TX;/* forward static functions */LOCAL int 	ln97xReset (LN_97X_DRV_CTRL * pDrvCtrl);LOCAL void 	ln97xInt (LN_97X_DRV_CTRL * pDrvCtrl);LOCAL void 	ln97xHandleRecvInt (LN_97X_DRV_CTRL * pDrvCtrl);LOCAL STATUS 	ln97xRecv (LN_97X_DRV_CTRL * pDrvCtrl, LN_RMD *rmd);LOCAL LN_RMD *	ln97xFullRMDGet (LN_97X_DRV_CTRL * pDrvCtrl);LOCAL void 	ln97xCsrWrite (LN_97X_DRV_CTRL * pDrvCtrl, int reg,                               UINT32 value);LOCAL void 	ln97xRestart (LN_97X_DRV_CTRL * pDrvCtrl);LOCAL STATUS 	ln97xRestartSetup (LN_97X_DRV_CTRL * pDrvCtrl);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品夜夜夜夜久久| 99视频一区二区| 欧美日韩精品一区二区| 欧美成人精品二区三区99精品| 亚洲一区二区三区四区在线免费观看 | 久久久精品国产免大香伊| 日本中文字幕一区| 欧美午夜精品久久久久久孕妇| 亚洲视频综合在线| eeuss国产一区二区三区| 国产欧美精品在线观看| 韩日精品视频一区| 日韩免费成人网| 日本不卡一二三| 91精品国产综合久久精品麻豆| 五月激情六月综合| 91精品国产综合久久久蜜臀粉嫩| 欧美激情一区在线观看| 成人在线视频一区二区| 日韩伦理免费电影| 欧美日韩一区二区电影| 亚洲激情综合网| 欧美日韩你懂得| 日韩va亚洲va欧美va久久| 日韩一二三区视频| 丁香婷婷综合五月| 日韩毛片在线免费观看| 欧美三级乱人伦电影| 日本午夜精品一区二区三区电影| 日韩一区二区高清| 国产不卡高清在线观看视频| 久久天天做天天爱综合色| 顶级嫩模精品视频在线看| 亚洲美女在线一区| 91麻豆精品国产91久久久久久久久 | 91豆麻精品91久久久久久| 一区二区免费看| 欧美精品免费视频| 国产一区 二区| 国产精品久久久久久久第一福利| 欧美视频一区二区三区在线观看| 日本视频在线一区| 欧美激情一区三区| 在线播放欧美女士性生活| 亚洲小少妇裸体bbw| 精品美女在线观看| av电影在线观看完整版一区二区| 亚洲国产精品综合小说图片区| 欧美男生操女生| 国产高清久久久久| 亚洲成人免费在线观看| 久久精品亚洲乱码伦伦中文| 精品视频1区2区3区| 韩国女主播一区| 亚洲图片有声小说| 国产日韩欧美一区二区三区乱码| 91福利在线观看| 国产精品99久久久久久宅男| 亚洲高清不卡在线观看| 国产精品久久久久久一区二区三区| 欧美福利电影网| 国产91富婆露脸刺激对白| 亚洲成a人在线观看| 国产精品三级电影| 91黄色免费版| 国产成人亚洲综合色影视| 亚洲福利视频一区| 日韩毛片高清在线播放| 久久精品在这里| 欧美电影免费观看高清完整版在线 | 国产亚洲欧美激情| 日韩免费一区二区三区在线播放| 91在线无精精品入口| 麻豆国产91在线播放| 亚洲综合小说图片| 自拍偷拍亚洲综合| 国产女人水真多18毛片18精品视频| 91国产成人在线| 99国产欧美久久久精品| 国产露脸91国语对白| 日本怡春院一区二区| 日韩三级免费观看| 在线不卡中文字幕| 欧美三区免费完整视频在线观看| 99久久99久久精品免费观看| 国产麻豆精品theporn| 久久av资源站| 男男视频亚洲欧美| 日韩黄色片在线观看| 亚洲成人免费av| 午夜精品福利视频网站| 亚洲伊人伊色伊影伊综合网| 亚洲欧美色一区| 亚洲激情中文1区| 婷婷成人激情在线网| 激情六月婷婷久久| 不卡一卡二卡三乱码免费网站| 不卡区在线中文字幕| 91福利区一区二区三区| 正在播放一区二区| 国产亚洲成aⅴ人片在线观看| 国产精品国产三级国产有无不卡| 一区二区三区**美女毛片| 日韩精品一卡二卡三卡四卡无卡| 国内偷窥港台综合视频在线播放| 国产成人夜色高潮福利影视| 91丝袜美腿高跟国产极品老师| 欧美中文字幕一区二区三区 | 精品播放一区二区| 国产精品久久久久久久久图文区 | 国产福利精品导航| 91香蕉视频污| 日韩欧美一区二区不卡| 国产精品久久三区| 日韩电影免费在线| 国产福利精品导航| 欧美狂野另类xxxxoooo| 久久免费视频色| 一区二区三区不卡在线观看| 精品影院一区二区久久久| 99视频热这里只有精品免费| 91精品在线免费| 国产精品卡一卡二卡三| 日韩av一区二区在线影视| aa级大片欧美| 日韩欧美专区在线| 亚洲黄色免费电影| 国产盗摄精品一区二区三区在线| 91福利在线看| 国产精品久久久久久久久免费桃花| 日韩精品久久久久久| 91免费国产在线| 久久综合久久综合久久综合| 亚洲一区二三区| 成人激情午夜影院| 欧美成人性战久久| 亚洲成人自拍网| 一本久久综合亚洲鲁鲁五月天| 久久综合五月天婷婷伊人| 亚洲高清视频中文字幕| 91小视频免费观看| 日本一区二区电影| 国产麻豆9l精品三级站| 欧美精品久久天天躁| 一区二区三区欧美日| 国产成人三级在线观看| 精品久久一区二区| 天堂久久久久va久久久久| 91成人看片片| 日本aⅴ免费视频一区二区三区| 91麻豆免费看| 国产精品免费aⅴ片在线观看| 久久国产精品区| 日韩欧美国产精品一区| 日韩国产精品久久久久久亚洲| 91成人免费在线视频| 一区二区三区在线视频观看| av在线不卡电影| 国产精品视频九色porn| 国产成人免费视频网站| ww亚洲ww在线观看国产| 久久66热偷产精品| 欧美成人三级电影在线| 理论片日本一区| 欧美成人video| 另类小说欧美激情| 欧美成人乱码一区二区三区| 久久国产欧美日韩精品| 欧美大片一区二区三区| 久久国产精品99久久人人澡| 日韩视频免费观看高清在线视频| 蜜臀久久久99精品久久久久久| 91精品国产色综合久久久蜜香臀| 首页国产欧美久久| 91精品国产色综合久久不卡电影| 日本va欧美va欧美va精品| 欧美mv日韩mv国产网站app| 激情图区综合网| 亚洲国产精品黑人久久久| 99re热这里只有精品免费视频| 亚洲欧美日韩电影| 精品视频免费看| 美女精品自拍一二三四| 久久无码av三级| 99精品视频在线免费观看| 国产精品成人免费精品自在线观看| a4yy欧美一区二区三区| 亚洲精品ww久久久久久p站| 欧美日韩一区二区三区不卡| 日韩国产成人精品| 久久先锋资源网| 91丨porny丨国产| 性做久久久久久久免费看| 日韩情涩欧美日韩视频| 成人国产免费视频| 亚洲一二三区视频在线观看| 日韩一二三区不卡| 99久久99久久精品国产片果冻| 亚洲6080在线| 精品成人一区二区三区四区|