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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dp83815.c

?? linux下的DP83815網(wǎng)卡驅(qū)動源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* dp83815.c -- National DP83815 PCI Ethernet Controller Driver */

static const char *version =
    "dp83815.c:v1.52C National DP83815 Fast Ethernet Driver\n";

/*    
1. INTRODUCTION
---------------

The DP83815 is a PCI bus based single chip 10/100 Mbps ethernet
controller targeted for PC mother boards, adapter cards, and embedded
systems. It fully implements the V2.2 33MHz PCI bus interface for host
communications with power management support. Packet descriptors and
data are transferred via bus-mastering, reducing the burden on the
host CPU. The DP83815 can support full duplex 10/100 Mbps transmission
and reception.

The DP83815 driver is developed for use on Linux v2.0.36. It can be
configured either as a static driver into the kernel or as a loadable
module. The driver is capable of 10/100 Mbps Full/Half duplex mode
operation via an internal PHY. Detailed features are given below.

2.1 Chip Features

o The chip is bus-master capable and transfers packet descriptors
and data using DMA with burst sizes upto 128 words.

o It supports 10 Mbps Ethernet and 100 Mbps Fast Ethernet via
an internal PHY and emerging 1-2 Mbps home networking
solutions via external PHY.

o Flexible Rx packet filtration including: perfect match, broadcast, 
multicast/unicast hash table, deep packet pattern matching.

o Internal Tx and Rx data FIFOs of 2KB each

o 802.3u Auto-Negotiation - advertised features configurable via
EEPROM

o Full duplex support for 10 and 100Mb/s data rates


2.2 Driver Features

2.2.1 Supported Features

o 10 Mbps full duplex and half duplex
o 100 Mbps full duplex and half duplex
o Auto Negotiation
o Broadcast and perfect match transmit and receive
o ARP transmit and receive
o Promiscuous mode
o Multicast support
o Loadable Kernel Module
o PCI bus probe for auto-configuration when configured as a static
  driver or a loadable kernel module
o Endian, and CPU architecture neutral
o Driver now supports insmod params.

2.2.2 Unsupported Features

o ACPI
o Multiple ethernet addresses 
o Wake on LAN and OnNow support for PC98/99, and other power-management
  features.
o Magic packets with SecureON, VLAN
o Programming EEPROM/Flash
o Old Linux kernels 1.xx.xx
o Newer MP kernels 2.2.xx 
o Remote boot           


3. DRIVER OPERATION
-------------------

Buffer management used in this version of the driver sets up the
transmit and receive buffer descriptors in a ring. The rings, shared
between the driver and the device, are located in memory buffers 
allocated in the kernel. The device accesses these buffers via DMA.

Each device will be allocated two similar queues of descriptors, one
for transmit and the other for receive. These queues are linked
together into a ring. For the default size of the transmit rings is
10, while the size of the receive ring is 30. These values can be
changed via macros in the driver source file.

The driver implements no copy transmit and receive operation. All
receive descriptors are created with no associated buffers, but the
descriptor uses the sk_buff passed to it via the transmit routine. The
sk_buff is held by the driver until the next transmit operation that
follows the actual transmit of the packet.

Each receive descriptor is initialized, at creation time, with an
sk_buff. Each sk_buff has a data buffer that can hold a max ethernet
packet. When a packet is suceesfully received, the skb is directly
sent to the stack with no copy, and it is replaced with a newly
allocated sk_buff. But if the packet less than 128 bytes
was received, the data is instead copied into a new skb. 

The driver makes of appropriate macros to adjust for endian-ness of
the host CPU, PCI bus, Ethernet, and the DP device. It also performs
appropriate translations of addresses for device use. These builtin
features makes the driver extremely portable to run on Linux systems
with non-Intel CPUs with minimum changes.


4. FILES IN THIS RELEASE
------------------------

The following files are included in a tar ball, dp83815.tar.gz

README.Linux   - This file
dp83815.c      - Driver source file
dp83815.h      - Driver header file
dp83815.o      - Driver object module
Makefile       - Rules to compile and install the driver.


5. MODIFICATION HISTORY
-----------------------
version 1.52c:

o This version of driver supports Linux kernel version large than 2.4.18 
and has bee tested on Red Hat 8.0 9.0  distribution .

version 1.51:

o fixes for short cable attenuation.

version 1.50:

o merged dp83815.c driver, to support link aggregration
o added function dp83815_rx_control function for fail over only support.

version 1.40:

o upgraded the driver to support linux kernel version 2.4.x.
o fixed duplex support.
o added bytes count support to ethernet MIB.
o fixed MAC address read routine to read from eeprom.
o implemented support for load-time parameters.

version 1.30:

o Driver release supporting Redhat Linux ver 5.2 and 
  linux kernel version 2.0.36.
 
6. INSTALLATION
---------------

6.1 Kernel Requirements:

This version of the driver supports Linux kernel version 2.4.x and
has been tested on Red Hat 7.0 distribution.

6.2 Installation Procedure:

To install the driver, login as root, and extract the files into an 
appropriate directory.

     # mkdir <path>/dp83815 
     # cp dp83815.c dp83815.h makefile  <path>/dp83815/
     # cd <path>/dp83815/
     # make

To install the current driver object module in the filesystem run,

     # make install

You'll need to edit the following files to configure the driver as a
valid ethernet device in the system

  o /etc/hosts
  o /etc/sysconfig/network-scripts/ifcfg-eth?
  o /etc/conf.modules

6.3 Load Parameters:

This version of the driver supports to specify parameters via insmod
while loading the driver dynamically in to the running
kernel. Parameter are specified as list of string inside double quotes
seprated by commas.  This does not apply to "debug" parameter which is
a integer value. For example

     fullduplex="1,0,1,0,0,0" debug=7

Using these parameters, except "debug", maximum MAX_DEV dp83815
devices can be configured to user specified configuartion. If there
more than MAX_DEV dp83815 devices first MAX_DEV devices will be
configured using these parameters if they are defined otherwise they
will use defaults, and other devices beyond MAX_DEV will be configured
for autonegotiation advertising for 10/100 Mb/s and full/half duplex.

Following is the list parameters supported:

  o fullduplex: This parameter can be assigned values 0, 1, or 2.

    0: Device in half duplex mode. 
    1: Device in full duplex mode.
    2: full/half duplex (used during autonegotiation to advertise 
       that device is capable of doing both full and half duplex 
       mode of operation.)

  If no value is defined for full-duplex parameter, in case of
  autonegotiation, driver will use full/half duplex capability to advertise,
  otherwise it will put device in half duplex mode. If no autonegotiation is
  being done, then value of 2 for fullduplex will put the device in half
  duplex mode.

  o speed100: This parameter can be assigned value 0, 1, or 2.

    0: Device in 10 Mb/s mode.
    1: Device in 100 Mb/s mode.
    2: Device either in 10 or 100 Mb/s mode. (used during auto 
       negotiation to advertise the capability of the device.)
  
  If no value is defined for this parameter, in case of
  autonegotiation device capability of 10/100 Mb/s will be advertised,
  otherwise in case of no autonegotiation it will put device in 100
  Mb/s mode. If no autonegoatiation is done then value of 2 for
  speed100 will put the device in 100 Mb/s mode.

  o autoneg: This parameter can be assigned 0 or 1.
    
    0: no autonegotiation.
    1: do autonegotiation.
      
  If no value is defined for this parameter, driver will do the
  autonegotiation for the device capability defined by fullduplex and
  speed100 parameter.
  
  Autonegotiation can be done for the following capabilities:
  a) 10 Mb/s full/half duplex.
  b) 10/100 Mb/s half duplex.
  c) 100 Mb/s half duplex.
  d) 10/100 Mbs/s hfull/half duplex.

 o txdesc: This parameter specify number of desriptor used for
           tranmit, it can be assigned any interger value. By default
           driver uses 32 descriptors for transmit.

 o rxdesc: This parameter specify number of receive desriptor, and can
           be assigned any interger value. By default driver uses 30
           desriptors.
 
 o debug: This parameter can be assigned any or sum of the following values.
 
   1:   debug enabled at device probe level.
   2:   debug enabled at device open level.
   4:   debug enabled at device close level.
   8:   debug enabled at device ioctl level.
   16:  debug enabled at device transmit level.
   32:  debug enabled at device receive level.
   64:  debug enabled at device rxfilter setup level.
   128: debug enabled at device autonegotiation level.
   256: debug enabled at device interrupt level.
   
   By defualt none of the debug level will be enabled.

 
The driver can be dynamically loaded and unloaded from a running kernel 
using insmod/rmmod.

	# insmod dp83815
        # rmmod dp83815

Load time parameters can be specified while  running insmod. The example below
shows parameters for   3   dp83815   cards.

  - Card 0 is configured with full-duplex/100/no-autoneg/64 txDesc/32 rxDesc

  - Card 1 is configured with half-duplex/10/no-autoneg/32 txdesc/default
  rxdesc

  - Card 2 is configured with full-or-half-duplex/10-or-100/autoneg/default
  tx-and-rx desc

  - Driver debug level is set to 6 (open & close debug level enabled).


	# insmod dp83815 fullduplex="1,0,2" speed100="1,0,2" \
          autoneg="0,0,1" txdesc="64,32" rxdec="32" debug=6

To install and test the driver, shutdown the network stack, install
the driver, and re-start the startup the stack again.

	# sh /etc/rc.d/init.d/network stop
	# insmod dp83815
	# sh /etc/rc.d/init.d/network start
	

7. FUNCTIONALITY TESTING
------------------------

When the driver is loaded into the system via `insmod' it probes the
PCI bus to locate all DP83815 devices, and creates control structures
for each. The driver logs a couple of messages available in
`/var/log/messages' for each device with information about its PCI
geographic location, IRQ, IO address, and some basic debug information 
(addresses of some important structures).

All the devices on the PCI bus can be listed by,

# cat /proc/pci

IRQ and IO address information from this can be correlated with the 
information displayed by the driver in `/var/log/messages'.

When the TCP/IP stack is initialized, it opens all configured ethernet 
devices, and initializes them for use. At this time, the driver will
perform autonegotiation and log information about the link status.
The driver can then be tested by running ping, telnet, ftp, NFS etc.


8. KNOWN DRIVER PROBLEMS
------------------------

o  Since the device requires that the receive buffer be aligned on a
4-byte (word) boundary, it is not possible to align the IP header
on a word boundary unless the received packet is copied. Since this
version of the driver support a no-copy receive operation, the IP
header will not be aligned. This is not a problem for Intel CPUs,
but will cause exceptions on RISC CPUs (PowerPC, Alpha, ...). While
porting the driver to these platforms, the no-copy receive can be
turned off, but setting the DP_RX_COPY_THRESHOLD to ETH_MAX_PKT_SIZE,
whereby forcing all receive buffers to be copied.

The driver ensures that the IP headers in a copied buffer is aligned
on a word-boundary.


9. DOCUMENTATION REFERENCES
---------------------------

1. National DP83815 10/100 Mb/s Integrated PCI Ethernet
   Media Access Controller and Physical Layer, 1998.

2. Linux Device Drivers, Alessandro Rubini, 1998.

10. BUG REPORTS
--------------

Bug reports and enhancement requests should be directed to
National. Please include the driver version number, hardware
information, and Linux kernel version number along with the bug
report.

mailto: support@nsc.com

*/

/* to convert Linux kernel version into hexadecimal number */
#define DP_KERNEL_VERSION(a,b,c)	(((a) << 16) + ((b) <<8 ) +(c))

/* Generic Kernel Module/Driver Headers */

#include <linux/module.h>
#include <linux/kernel.h>

#include <linux/pci.h>

#include <linux/ioport.h>
#include <asm/io.h>         /* IO stuff */
#include <asm/byteorder.h>
#include <linux/delay.h>

/* Ethernet Driver Specific Headers */

#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>

#if ((LINUX_VERSION_CODE >= DP_KERNEL_VERSION(2,4,18) ) )
#include <linux/slab.h>
MODULE_LICENSE("GPL");
#else
#include <linux/malloc.h>
#endif
#include <linux/if_ether.h>

#include "dp83815.h"

#ifdef LINK_AGGR
#include "adapter.h"
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美韩日一区二区三区| 国产一区二区精品久久| 奇米精品一区二区三区在线观看| 久久99精品一区二区三区三区| 99精品视频在线播放观看| 51精品秘密在线观看| 国产精品高潮久久久久无| 久久99精品国产.久久久久 | 国产精品全国免费观看高清 | zzijzzij亚洲日本少妇熟睡| 欧美日韩久久久| 亚洲欧美综合另类在线卡通| 国产乱对白刺激视频不卡| 欧美日韩夫妻久久| 亚洲欧美日韩在线| 成人综合婷婷国产精品久久蜜臀| 欧美电影免费观看高清完整版 | 亚洲高清中文字幕| 99久久99久久精品国产片果冻| 久久色在线观看| 老色鬼精品视频在线观看播放| 欧美日韩精品一二三区| 亚洲天堂成人在线观看| 成人综合婷婷国产精品久久 | 日韩二区三区四区| 欧美日韩一级二级三级| 亚洲免费观看在线观看| 99久久精品免费| 中文字幕免费不卡| 成人在线一区二区三区| 国产亚洲女人久久久久毛片| 精品一区二区影视| 久久久亚洲精华液精华液精华液| 麻豆一区二区三区| 精品理论电影在线观看| 蜜桃av一区二区| 精品国产一区二区三区久久久蜜月| 人人狠狠综合久久亚洲| 欧美一级高清片在线观看| 日韩1区2区日韩1区2区| 日韩美女一区二区三区四区| 久色婷婷小香蕉久久| 精品欧美一区二区三区精品久久| 久久精品99国产精品日本| 91精品福利在线一区二区三区| 青椒成人免费视频| 精品国产伦一区二区三区观看方式 | 日韩网站在线看片你懂的| 美女网站色91| 国产亚洲一区二区三区| 不卡影院免费观看| 一区二区三区在线观看视频| 欧美日韩一区在线观看| 看片的网站亚洲| 欧美激情在线观看视频免费| 色综合一区二区| 亚洲第一久久影院| 精品人在线二区三区| 成人h动漫精品| 一区二区三区精品| 欧美一区二区三区播放老司机| 国内外精品视频| 国产欧美一区二区三区网站| 国产福利一区二区三区| 亚洲精品高清在线观看| 日韩欧美精品三级| 91一区二区在线观看| 免费观看一级欧美片| 国产精品免费av| 欧美日韩黄色影视| 国产成人在线电影| 午夜国产精品一区| 欧美国产精品久久| 欧美剧情片在线观看| 国产成人啪免费观看软件| 午夜久久久久久电影| 中文字幕精品—区二区四季| 欧美日韩国产区一| av福利精品导航| 久久99精品国产91久久来源| 亚洲综合清纯丝袜自拍| 国产日产精品一区| 制服丝袜亚洲色图| 色综合久久综合网欧美综合网| 久久99九九99精品| 天堂va蜜桃一区二区三区漫画版| 欧美国产禁国产网站cc| 精品免费国产二区三区| 91论坛在线播放| 国产精品综合二区| 免费人成精品欧美精品| 亚洲精品videosex极品| 国产欧美日韩久久| 日韩精品资源二区在线| 欧美人与性动xxxx| 一本久久精品一区二区| 国产成人在线看| 狠狠色丁香久久婷婷综| 日韩电影免费在线看| 一区二区三区色| 中文字幕一区二区三区四区| 国产日韩欧美综合一区| 日韩免费观看2025年上映的电影| 在线视频综合导航| 97se亚洲国产综合自在线观| 粉嫩高潮美女一区二区三区| 国产一级精品在线| 国产又黄又大久久| 精品一区二区综合| 久久精品国内一区二区三区| 日产国产高清一区二区三区| 亚洲成人av在线电影| 亚洲黄色片在线观看| 亚洲日本在线看| 中文字幕一区在线| 亚洲少妇30p| 亚洲精品国久久99热| 亚洲制服丝袜av| 偷拍日韩校园综合在线| 亚洲成va人在线观看| 日日摸夜夜添夜夜添国产精品| 亚洲18色成人| 日韩不卡免费视频| 美女视频一区在线观看| 国内久久精品视频| 国产精品一区二区黑丝| 成人精品鲁一区一区二区| 国产成人综合网站| www.色精品| 欧美日韩亚洲另类| 欧美一区二区三区电影| 精品美女一区二区三区| 中文一区二区在线观看| 亚洲精品免费在线观看| 日韩黄色小视频| 久草这里只有精品视频| 大陆成人av片| 欧美视频在线一区| 欧美成人福利视频| 国产欧美日韩在线视频| 亚洲精品日产精品乱码不卡| 日韩综合在线视频| 国产激情一区二区三区| 91麻豆免费视频| 欧美一区二区三区在线电影| 久久麻豆一区二区| 亚洲欧美视频在线观看视频| 午夜影视日本亚洲欧洲精品| 精品在线亚洲视频| 一本色道久久综合亚洲aⅴ蜜桃| 91精品一区二区三区在线观看| 久久影音资源网| 有坂深雪av一区二区精品| 激情综合色丁香一区二区| www.在线成人| 91精品免费在线| 亚洲欧洲日韩女同| 老司机精品视频在线| 91香蕉国产在线观看软件| 日韩亚洲欧美中文三级| 亚洲天天做日日做天天谢日日欢 | 欧美日韩一卡二卡三卡| 国产亚洲综合在线| 五月婷婷另类国产| a亚洲天堂av| 精品少妇一区二区三区日产乱码 | 亚洲午夜羞羞片| 成人性生交大片免费看中文网站| 在线观看欧美日本| 国产精品麻豆视频| 国内精品嫩模私拍在线| 欧美视频一区二区| 亚洲私人影院在线观看| 激情久久五月天| 制服丝袜av成人在线看| 亚洲欧美日韩综合aⅴ视频| 国产精品资源在线看| 91精品国产福利在线观看| 亚洲激情一二三区| fc2成人免费人成在线观看播放| 日韩欧美国产一区二区三区| 亚洲小说春色综合另类电影| av在线不卡免费看| 国产精品少妇自拍| 国产伦精一区二区三区| 日韩欧美国产一区二区在线播放 | 日韩亚洲欧美综合| 亚洲6080在线| 欧美体内she精视频| 亚洲色大成网站www久久九九| 国产高清精品久久久久| 久久这里只有精品视频网| 麻豆中文一区二区| 日韩精品中文字幕一区二区三区 | 欧美日韩国产一级片| 亚洲精品久久嫩草网站秘色| 99re热这里只有精品视频| 中文字幕一区二区三区精华液| 国产999精品久久久久久| 国产日韩欧美激情|