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

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

?? rtl81x9.c

?? VxWorks系統realtek8139網卡驅動(源碼).zip
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* rtl81x9End.c - RealTek RTL81x9 Fast Ethernet interface header */

/* Copyright 1984-2000 Wind River Systems, Inc. */
/*
modification history
--------------------
01f,17feb00,dgy  Updated interrupt routine to ensure reserved interrupt
				 bits are masked out prior to checking status.
01e,16feb00,dgy  Updated rtl81x9HandleRecvInt to cover more checking within the 
				 loop that looks for RX biffer empty.
01d,16feb00,dgy  Updated rtl81x9Wait to fix problem whereby always timed as
				 checking incorrect register.
01c,28jan00,dgy  Updated comments that refered to the wrong files.
01c,28jan00,dgy  Updated comments that refered to the wrong files.
01b,28jan00,dgy  Changed ryl81x9CsrReadByte to use the correct SYS_IN
				 macro.
01a,29oct99,dgy  created
*/

/*
				Theory of Operation

I. Board Compatibility

This device driver is designed for the RealTek RTL81x9, the RealTek Fast
Ethernet controllers for PCI.  This chip is used on a few clone boards.


II. Board-specific settings

PCI bus devices are configured by the system at boot time, so no jumpers
need to be set on the board.  The system BIOS will assign the
PCI INTA signal to a (preferably otherwise unused) system IRQ line.

III. Driver operation

IIIa. Rx Ring buffers

The receive unit uses a single linear ring buffer rather than the more
common (and more efficient) descriptor-based architecture.  Incoming frames
are sequentially stored into the Rx region, and the host copies them into
mBlks.

IIIb. Tx operation

The RTL81x9 uses a fixed set of four Tx descriptors in register space.

EXTERNAL INTERFACE
The only external interface is the rtl81x9EndLoad() routine, which expects
the <initString> parameter as input.  This parameter passes in a 
colon-delimited string of the format:

<unit>:<devMemAddr>:<devIoAddr>:<pciMemBase:<vecNum>:<intLvl>:<memAdrs>:
<memSize>:<memWidth>:<flags>:<buffMultiplier>

The el3c90xEndLoad() function uses strtok() to parse the string.

TARGET-SPECIFIC PARAMETERS
.IP <unit>
A convenient holdover from the former model.  This parameter is used only
in the string name for the driver.

.IP <devMemAddr>
This parameter in the memory base address of the device registers in the
memory map of the CPU. It indicates to the driver where to find the
register set. < This parameter should be equal to NONE if the device
does not support memory mapped registers.


.IP <devIoAddr>
This parameter in the IO base address of the device registers in the
IO map of some CPUs. It indicates to the driver where to find the RDP
register. If both <devIoAddr> and <devMemAddr> are given then the device
chooses <devMemAddr> which is a memory mapped register base address.
This parameter should be equal to NONE if the device does not support 
IO mapped registers.


. <pciMemBase>
This parameter is the base address of the CPU memory as seen from the
PCI 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 interrupts
for various events within the device; thus it contains
an 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 organize
and service the various interrupt sources.  This driver avoids all
board-specific knowledge of such devices.  During the driver's
initialization, the external routine sysRtl81x9IntEnable() is called to
perform any board-specific operations required to allow the servicing of a
NIC interrupt.  For a description of sysRtl81x9IntEnable(), see "External
Support Requirements" below.

.IP <memAdrs>
This parameter gives the driver the memory address to carve out its
buffers and data structures. If this parameter is specified to be
NONE then the driver allocates cache coherent memory for buffers
and descriptors from the system pool.
The 3C90x NIC is a DMA type of device and typically shares access to
some region of memory with the CPU.  This driver is designed for systems
that directly share memory between the CPU and the NIC.  It
assumes that this shared memory is directly available to it
without any arbitration or timing concerns.

.IP <memSize>
This parameter can be used to explicitly limit the amount of shared
memory (bytes) this driver will use.  The constant NONE can be used to
indicate no specific size limitation.  This parameter is used only if
a specific memory region is provided to the driver.

.IP <memWidth>
Some target hardware that restricts the shared memory region to a
specific location also restricts the access width to this region by
the CPU.  On these targets, performing an access of an invalid width
will cause a bus error.

This parameter can be used to specify the number of bytes of access
width 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 <flags>
This is parameter is used for future use, currently its value should be
zero.


EXTERNAL SUPPORT REQUIREMENTS
This 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_DELAY (delay)
    sysEl3c90xIntEnable(pDrvCtrl->intLevel) 
    sysEl3c90xIntDisable(pDrvCtrl->intLevel)
    sysDelay (delay)
.CE

There are default values in the source code for these macros.  They presume
memory mapped accesses to the device registers and the normal intConnect(),
and intEnable() BSP functions.  The first argument to each is the device
controller structure. Thus, each has access back to all the device-specific
information.  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 and
SYS_INT_DISABLE allow the driver to be customized for BSPs that use special
versions of these routines.

The macro SYS_INT_CONNECT is used to connect the interrupt handler to
the appropriate vector.  By default it is the routine intConnect().

The macro SYS_INT_DISCONNECT is used to disconnect the interrupt handler prior
to unloading the module.  By default this is a dummy routine that
returns OK.

The macro SYS_INT_ENABLE is used to enable the interrupt level for the
end device.  It is called once during initialization.  It calls an
external board level routine sysRtl81x9IntEnable(). 

The macro SYS_INT_DISABLE is used to disable the interrupt level for the
end device.  It is called during stop.  It calls an
external board level routine sysRtl81x9IntDisable().

The macro SYS_DELAY is used for a delay loop. It calls an external board
level routine sysDelay(delay). The granularity of delay is one microsecond.

SYSTEM RESOURCE USAGE
When implemented, this driver requires the following system resources:

    - one mutual exclusion semaphore
    - one interrupt vector
    - 24072 bytes in text for a I80486 target
    - 112 bytes in the initialized data section (data)
    - 0 bytes in the uninitialized data section (BSS)

The driver allocates clusters of size 1536 bytes for receive frames and
and transmit frames. There are 16 descriptors in the upload ring
and 16 descriptors in the download ring. The buffer multiplier by default
is 2, which means that the total number of clusters allocated by default
are 64 ((upload descriptors + download descriptors)*2). There are as many
clBlks as the number of clusters. The number of mBlks allocated are twice
the number of clBlks. By default there are 64 clusters, 64 clBlks and 128
mBlks allocated in the pool for the device. Depending on the load of the
system increase the number of clusters allocated by incrementing the buffer
multiplier.


INCLUDES:
end.h endLib.h etherMultiLib.h rtl81x9End.h

SEE ALSO: muxLib, endLib, netBufLib
.pG "Writing and Enhanced Network Driver"

*/

#define END_MACROS

#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"
#include "ioLib.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"

#include "endLib.h"
#include "lstLib.h"			/* Needed to maintain protocol list. */


/***** LOCAL DEFINITIONS *****/
#include "drv/end/unsupported/rtl81x9.h"

#ifdef	DRV_DEBUG
	int	rtl81x9Debug = 0; /* Turn it off initially. */
#endif /* DRV_DEBUG */

/* network buffers configuration */

M_CL_CONFIG rtlMclConfig = 	/* mBlk configuration table */
    {
    0, 0, NULL, 0
    };

CL_DESC rtlClDesc [] = 	/* network cluster pool configuration table */
    {
    /* 
    clusterSize	num		memArea		memSize
    -----------	----		-------		-------
    */
    {RTL_BUFSIZ,		0,	NULL,		0}
    }; 

int rtlClDescNumEnt = (NELEMENTS(rtlClDesc));


#define END_FLAGS_ISSET(pEnd, setBits)                                  \
            ((pEnd)->flags & (setBits))

#define END_HADDR(pEnd)                                                 \
		((pEnd)->mib2Tbl.ifPhysAddress.phyAddress)

#define END_HADDR_LEN(pEnd)                                             \
		((pEnd)->mib2Tbl.ifPhysAddress.addrLength)

/*
 * Default macro definitions for BSP interface.
 * For X86 arch, the intConnect/Disconnect defaults are pciIntConnect and
 * pciIntDisconnect.  For all others it is just intConnect and a dummy
 * disconnect function.
 * HELP: This needs to be fixed by porting pciIntLib to all architectures.
 */


#if CPU_FAMILY == I80X86
#ifndef SYS_INT_CONNECT
#define SYS_INT_CONNECT(pDrvCtrl,rtn,arg,pResult)                       \
    {                                                                   \
    IMPORT STATUS pciIntConnect();                                      \
    *pResult = pciIntConnect ((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)                    \
    {                                                                   \
    IMPORT STATUS pciIntDisconnect();                                      \
    *pResult = pciIntDisconnect ((VOIDFUNCPTR *)INUM_TO_IVEC (pDrvCtrl->ivec),\
			     (rtn));		                        \
    }
#endif /* SYS_INT_DISCONNECT */

#else /* CPU_FAMILY == I80X86 */

#ifndef SYS_INT_CONNECT
#define SYS_INT_CONNECT(pDrvCtrl,rtn,arg,pResult)                       \
    {                                                                   \
    IMPORT STATUS intConnect();                                      \
    *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;							\
    }
#endif /*SYS_INT_DISCONNECT*/


#endif /* CPU_FAMILY == I80X86 */

/* Macro to enable the appropriate interrupt level */

#ifndef SYS_INT_ENABLE
#define SYS_INT_ENABLE(pDrvCtrl) \
    { \
    IMPORT STATUS sysRtl81x9IntEnable(); \
    sysRtl81x9IntEnable ((pDrvCtrl)->ilevel); \
    }
#endif /* SYS_INT_ENABLE*/

/* Macro to disable the appropriate interrupt level */

#ifndef SYS_INT_DISABLE
#define SYS_INT_DISABLE(pDrvCtrl) \
    { \
    IMPORT void sysRtl81x9IntDisable (); \
    sysRtl81x9IntDisable ((pDrvCtrl)->ilevel); \
    }
#endif

#ifndef SYS_OUT_LONG
#define SYS_OUT_LONG(pDrvCtrl,addr,value) \
    { \
    *((ULONG *)(addr)) = PCI_SWAP((value)); \
    }
#endif /* SYS_OUT_LONG */

#ifndef SYS_IN_LONG
#define SYS_IN_LONG(pDrvCtrl,addr,data) \
    { \
    ((data) = PCI_SWAP(*((ULONG *)(addr)))); \
    }
#endif /* SYS_IN_LONG */

#ifndef SYS_OUT_SHORT
#define SYS_OUT_SHORT(pDrvCtrl,addr,value) \
    { \
    *((USHORT *)(addr)) = PCI_WORD_SWAP((value)); \
    }
#endif /* SYS_OUT_SHORT*/

#ifndef SYS_IN_SHORT
#define SYS_IN_SHORT(pDrvCtrl,addr,data) \
    { \
    ((data) = PCI_WORD_SWAP(*((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_OUT_SHORT_CSR
#define SYS_OUT_SHORT_CSR(pDrvCtrl,addr,value) \
    { \
    *(USHORT *)addr = value; \
    }
#endif /*SYS_OUT_SHORT_CSR*/

#ifndef SYS_IN_SHORT_CSR
#define SYS_IN_SHORT_CSR(pDrvCtrl,addr,pData) \
    (*(USHORT *)pData = *(USHORT *)addr)
#endif /*SYS_IN_SHORT_CSR*/


#define SYS_DELAY(count)	{                                               \
			volatile int cx = 0;                            \
			for (cx = 0; cx < (count); cx++);               \
			}

#ifndef SYS_ENET_ADDR_GET
#define SYS_ENET_ADDR_GET(pDrvCtrl, pAddress) \
    { \
    IMPORT STATUS sysRtl81x9EnetAddrGet (RTL81X9END_DEVICE *pDrvCtrl, \
                                     char * enetAdrs); \
    sysRtl81x9EnetAddrGet (pDrvCtrl, pAddress); \
    }
#endif /* SYS_ENET_ADDR_GET */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一区二区三区在线播放| 国产精品欧美综合在线| 亚洲综合色噜噜狠狠| 色婷婷av一区二区三区gif| 国产精品女同互慰在线看| 国产馆精品极品| 欧美国产精品一区二区| 91麻豆蜜桃一区二区三区| 亚洲国产精品嫩草影院| 日韩亚洲电影在线| 国产成人av一区| 亚洲欧美国产三级| 制服.丝袜.亚洲.另类.中文| 精品在线观看免费| 中文字幕永久在线不卡| 欧美日韩一区中文字幕| 久久精品国产免费| 国产精品乱码人人做人人爱 | 日韩精品每日更新| 精品久久久久av影院 | 国产精品高潮呻吟久久| 欧洲亚洲精品在线| 久久er精品视频| 最新久久zyz资源站| 亚洲人成在线观看一区二区| 国产精品电影院| 在线亚洲精品福利网址导航| 午夜国产精品一区| 国产亚洲成年网址在线观看| 一本高清dvd不卡在线观看| 日本不卡一区二区三区高清视频| 欧美极品少妇xxxxⅹ高跟鞋 | 91免费看`日韩一区二区| 蜜桃视频在线观看一区| 中文字幕日韩一区| 日韩一区二区三区四区| 91亚洲国产成人精品一区二三| 日韩精品视频网| 中文字幕佐山爱一区二区免费| 精品国产在天天线2019| 在线区一区二视频| 丰满岳乱妇一区二区三区| 丝袜亚洲另类欧美| 成人免费一区二区三区在线观看| 日韩视频免费直播| 欧美天堂亚洲电影院在线播放| 国产一区二区三区电影在线观看| 亚洲二区视频在线| 国产精品欧美经典| 国产精品传媒入口麻豆| 欧美成人艳星乳罩| 欧美久久一二三四区| 91一区二区三区在线播放| 国产精品自拍网站| 裸体在线国模精品偷拍| 午夜视频一区在线观看| 亚洲另类在线一区| 中文字幕av一区二区三区免费看| 日韩欧美你懂的| 91精品国产入口| 欧美日本一区二区在线观看| 一本大道综合伊人精品热热| 成人av网站免费观看| 国产激情偷乱视频一区二区三区| 日韩黄色小视频| 亚洲一区二区欧美日韩| 有坂深雪av一区二区精品| 自拍偷拍欧美精品| 国产精品超碰97尤物18| 国产亚洲精品7777| 国产欧美1区2区3区| 精品国产乱码久久久久久久久| 欧美一级一级性生活免费录像| 欧美男人的天堂一二区| 精品视频一区 二区 三区| 欧美在线观看一区二区| 在线观看av一区二区| 在线亚洲高清视频| 欧美日精品一区视频| 欧美另类一区二区三区| 制服丝袜亚洲播放| 日韩亚洲欧美成人一区| 欧美精品一区二区三区一线天视频| 日韩久久久精品| 欧洲激情一区二区| 免费成人结看片| 日韩电影免费在线看| 日韩和的一区二区| 麻豆成人在线观看| 国产黄色成人av| 成av人片一区二区| 欧美影院一区二区三区| 欧美日韩一二三区| 欧美大片一区二区三区| 精品国产乱码久久久久久久| 久久精品视频在线免费观看 | 国产一区二区三区在线观看免费| 国产麻豆视频一区| 99精品国产91久久久久久| 欧洲在线/亚洲| 欧美xxxx在线观看| 国产精品久久午夜| 亚洲图片欧美色图| 激情六月婷婷久久| 99国产精品久久久| 国产欧美一区二区精品忘忧草| 久久精品男人的天堂| 亚洲欧美日韩成人高清在线一区| 亚洲成人精品一区二区| 另类专区欧美蜜桃臀第一页| 成人小视频在线| 欧美日韩黄色一区二区| 久久久不卡影院| 亚洲国产精品一区二区久久恐怖片 | 成人午夜免费视频| 欧美午夜精品久久久久久超碰| 欧美成人免费网站| 亚洲视频在线一区二区| 日韩中文欧美在线| 丁香激情综合国产| 欧美一卡2卡3卡4卡| 亚洲丝袜另类动漫二区| 蜜臀久久99精品久久久久久9| 99久久国产综合精品色伊| 欧美一激情一区二区三区| 中文字幕在线观看一区| 久久精品国产久精国产爱| 一本到不卡免费一区二区| 久久婷婷色综合| 午夜视频在线观看一区| 91在线精品一区二区三区| 亚洲精品一区二区三区香蕉 | 中文字幕第一区综合| 日本大胆欧美人术艺术动态| 91最新地址在线播放| 日韩欧美三级在线| 日韩视频在线你懂得| 麻豆精品蜜桃视频网站| 一本大道av伊人久久综合| 精品美女一区二区| 亚洲一区二区三区激情| www.欧美色图| 97精品超碰一区二区三区| 日韩一区二区中文字幕| 亚洲免费视频中文字幕| 成人午夜视频网站| 久久精品一区二区| 蜜臀av一区二区三区| 欧美日韩aaaaaa| 一区二区三区91| aa级大片欧美| 中文在线一区二区| 国产精品一区三区| 精品处破学生在线二十三| 日本亚洲三级在线| 欧美人成免费网站| 亚洲成年人网站在线观看| 色婷婷国产精品久久包臀| 中文字幕亚洲成人| 99视频在线精品| 国产精品久久久久一区| 国产成人在线视频网址| 久久夜色精品国产噜噜av| 久久精品国产精品亚洲精品| 日韩一级片网站| 久久国产福利国产秒拍| 精品免费视频一区二区| 激情图片小说一区| 久久久蜜桃精品| 欧美一区二区三区免费观看视频| 一二三四区精品视频| 欧美亚洲丝袜传媒另类| 亚洲aⅴ怡春院| 制服丝袜日韩国产| 精品在线一区二区| 久久久精品蜜桃| 99精品偷自拍| 夜夜揉揉日日人人青青一国产精品| 欧美伊人精品成人久久综合97| 亚洲午夜在线电影| 欧美精品免费视频| 久久99精品国产.久久久久久| 精品国精品国产尤物美女| 国产99久久久国产精品免费看| 国产三级精品三级| av在线这里只有精品| 一区二区三区成人在线视频| 欧美日韩黄色一区二区| 精品一区二区三区久久| 国产精品天干天干在线综合| 91视视频在线观看入口直接观看www | 国产不卡高清在线观看视频| 国产精品丝袜黑色高跟| 91官网在线观看| 蜜乳av一区二区三区| 欧美激情中文字幕一区二区| 色综合 综合色| 美国精品在线观看| 国产精品久久久久久久久免费樱桃| 一本大道av伊人久久综合|