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

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

?? pcnet_cs.c

?? 該文件是rt_linux
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*======================================================================    A PCMCIA ethernet driver for NS8390-based cards    This driver supports the D-Link DE-650 and Linksys EthernetCard    cards, the newer D-Link and Linksys combo cards, Accton EN2212    cards, the RPTI EP400, and the PreMax PE-200 in non-shared-memory    mode, and the IBM Credit Card Adapter, the NE4100, the Thomas    Conrad ethernet card, and the Kingston KNE-PCM/x in shared-memory    mode.  It will also handle the Socket EA card in either mode.    Copyright (C) 1999 David A. Hinds -- dahinds@users.sourceforge.net    pcnet_cs.c 1.149 2002/06/29 06:27:37        The network driver code is based on Donald Becker's NE2000 code:    Written 1992,1993 by Donald Becker.    Copyright 1993 United States Government as represented by the    Director, National Security Agency.  This software may be used and    distributed according to the terms of the GNU General Public License,    incorporated herein by reference.    Donald Becker may be reached at becker@scyld.com    Based also on Keith Moore's changes to Don Becker's code, for IBM    CCAE support.  Drivers merged back together, and shared-memory    Socket EA support added, by Ken Raeburn, September 1995.======================================================================*/#include <linux/kernel.h>#include <linux/module.h>#include <linux/init.h>#include <linux/sched.h>#include <linux/ptrace.h>#include <linux/slab.h>#include <linux/string.h>#include <linux/timer.h>#include <linux/delay.h>#include <linux/ethtool.h>#include <asm/io.h>#include <asm/system.h>#include <asm/byteorder.h>#include <asm/uaccess.h>#include <linux/netdevice.h>#include <../drivers/net/8390.h>#include <pcmcia/version.h>#include <pcmcia/cs_types.h>#include <pcmcia/cs.h>#include <pcmcia/cistpl.h>#include <pcmcia/ciscode.h>#include <pcmcia/ds.h>#include <pcmcia/cisreg.h>#define PCNET_CMD	0x00#define PCNET_DATAPORT	0x10	/* NatSemi-defined port window offset. */#define PCNET_RESET	0x1f	/* Issue a read to reset, a write to clear. */#define PCNET_MISC	0x18	/* For IBM CCAE and Socket EA cards */#define PCNET_START_PG	0x40	/* First page of TX buffer */#define PCNET_STOP_PG	0x80	/* Last page +1 of RX ring *//* Socket EA cards have a larger packet buffer */#define SOCKET_START_PG	0x01#define SOCKET_STOP_PG	0xff#define PCNET_RDC_TIMEOUT (2*HZ/100)	/* Max wait in jiffies for Tx RDC */static char *if_names[] = { "auto", "10baseT", "10base2"};#ifdef PCMCIA_DEBUGstatic int pc_debug = PCMCIA_DEBUG;MODULE_PARM(pc_debug, "i");#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)static char *version ="pcnet_cs.c 1.149 2002/06/29 06:27:37 (David Hinds)";#else#define DEBUG(n, args...)#endif/*====================================================================*//* Module parameters */MODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>");MODULE_DESCRIPTION("NE2000 compatible PCMCIA ethernet driver");MODULE_LICENSE("GPL");#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i")/* Bit map of interrupts to choose from */INT_MODULE_PARM(irq_mask,	0xdeb8);static int irq_list[4] = { -1 };MODULE_PARM(irq_list, "1-4i");INT_MODULE_PARM(if_port,	1);	/* Transceiver type */INT_MODULE_PARM(use_big_buf,	1);	/* use 64K packet buffer? */INT_MODULE_PARM(mem_speed,	0);	/* shared mem speed, in ns */INT_MODULE_PARM(delay_output,	0);	/* pause after xmit? */INT_MODULE_PARM(delay_time,	4);	/* in usec */INT_MODULE_PARM(use_shmem,	-1);	/* use shared memory? */INT_MODULE_PARM(full_duplex,	0);	/* full duplex? *//* Ugh!  Let the user hardwire the hardware address for queer cards */static int hw_addr[6] = { 0, /* ... */ };MODULE_PARM(hw_addr, "6i");/*====================================================================*/static void mii_phy_probe(struct net_device *dev);static void pcnet_config(dev_link_t *link);static void pcnet_release(u_long arg);static int pcnet_event(event_t event, int priority,		       event_callback_args_t *args);static int pcnet_open(struct net_device *dev);static int pcnet_close(struct net_device *dev);static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);static int do_ioctl_light(struct net_device *dev, struct ifreq *rq, int cmd);static void ei_irq_wrapper(int irq, void *dev_id, struct pt_regs *regs);static void ei_watchdog(u_long arg);static void pcnet_reset_8390(struct net_device *dev);static int set_config(struct net_device *dev, struct ifmap *map);static int setup_shmem_window(dev_link_t *link, int start_pg,			      int stop_pg, int cm_offset);static int setup_dma_config(dev_link_t *link, int start_pg,			    int stop_pg);static dev_link_t *pcnet_attach(void);static void pcnet_detach(dev_link_t *);static dev_info_t dev_info = "pcnet_cs";static dev_link_t *dev_list;/*====================================================================*/typedef struct hw_info_t {    u_int	offset;    u_char	a0, a1, a2;    u_int	flags;} hw_info_t;#define DELAY_OUTPUT	0x01#define HAS_MISC_REG	0x02#define USE_BIG_BUF	0x04#define HAS_IBM_MISC	0x08#define IS_DL10019	0x10#define IS_DL10022	0x20#define HAS_MII		0x40#define USE_SHMEM	0x80	/* autodetected */#define AM79C9XX_HOME_PHY	0x00006B90  /* HomePNA PHY */#define AM79C9XX_ETH_PHY	0x00006B70  /* 10baseT PHY */#define MII_PHYID_REV_MASK	0xfffffff0#define MII_PHYID_REG1		0x02#define MII_PHYID_REG2		0x03static hw_info_t hw_info[] = {    { /* Accton EN2212 */ 0x0ff0, 0x00, 0x00, 0xe8, DELAY_OUTPUT },     { /* Allied Telesis LA-PCM */ 0x0ff0, 0x00, 0x00, 0xf4, 0 },    { /* APEX MultiCard */ 0x03f4, 0x00, 0x20, 0xe5, 0 },    { /* ASANTE FriendlyNet */ 0x4910, 0x00, 0x00, 0x94,      DELAY_OUTPUT | HAS_IBM_MISC },    { /* Danpex EN-6200P2 */ 0x0110, 0x00, 0x40, 0xc7, 0 },    { /* DataTrek NetCard */ 0x0ff0, 0x00, 0x20, 0xe8, 0 },    { /* Dayna CommuniCard E */ 0x0110, 0x00, 0x80, 0x19, 0 },    { /* D-Link DE-650 */ 0x0040, 0x00, 0x80, 0xc8, 0 },    { /* EP-210 Ethernet */ 0x0110, 0x00, 0x40, 0x33, 0 },    { /* EP4000 Ethernet */ 0x01c0, 0x00, 0x00, 0xb4, 0 },    { /* Epson EEN10B */ 0x0ff0, 0x00, 0x00, 0x48,      HAS_MISC_REG | HAS_IBM_MISC },    { /* ELECOM Laneed LD-CDWA */ 0xb8, 0x08, 0x00, 0x42, 0 },    { /* Hypertec Ethernet */ 0x01c0, 0x00, 0x40, 0x4c, 0 },    { /* IBM CCAE */ 0x0ff0, 0x08, 0x00, 0x5a,      HAS_MISC_REG | HAS_IBM_MISC },    { /* IBM CCAE */ 0x0ff0, 0x00, 0x04, 0xac,      HAS_MISC_REG | HAS_IBM_MISC },    { /* IBM CCAE */ 0x0ff0, 0x00, 0x06, 0x29,      HAS_MISC_REG | HAS_IBM_MISC },    { /* IBM FME */ 0x0374, 0x08, 0x00, 0x5a,      HAS_MISC_REG | HAS_IBM_MISC },    { /* IBM FME */ 0x0374, 0x00, 0x04, 0xac,      HAS_MISC_REG | HAS_IBM_MISC },    { /* Kansai KLA-PCM/T */ 0x0ff0, 0x00, 0x60, 0x87,      HAS_MISC_REG | HAS_IBM_MISC },    { /* NSC DP83903 */ 0x0374, 0x08, 0x00, 0x17,      HAS_MISC_REG | HAS_IBM_MISC },    { /* NSC DP83903 */ 0x0374, 0x00, 0xc0, 0xa8,      HAS_MISC_REG | HAS_IBM_MISC },    { /* NSC DP83903 */ 0x0374, 0x00, 0xa0, 0xb0,      HAS_MISC_REG | HAS_IBM_MISC },    { /* NSC DP83903 */ 0x0198, 0x00, 0x20, 0xe0,      HAS_MISC_REG | HAS_IBM_MISC },    { /* I-O DATA PCLA/T */ 0x0ff0, 0x00, 0xa0, 0xb0, 0 },    { /* Katron PE-520 */ 0x0110, 0x00, 0x40, 0xf6, 0 },    { /* Kingston KNE-PCM/x */ 0x0ff0, 0x00, 0xc0, 0xf0,      HAS_MISC_REG | HAS_IBM_MISC },    { /* Kingston KNE-PCM/x */ 0x0ff0, 0xe2, 0x0c, 0x0f,      HAS_MISC_REG | HAS_IBM_MISC },    { /* Kingston KNE-PC2 */ 0x0180, 0x00, 0xc0, 0xf0, 0 },    { /* Maxtech PCN2000 */ 0x5000, 0x00, 0x00, 0xe8, 0 },    { /* NDC Instant-Link */ 0x003a, 0x00, 0x80, 0xc6, 0 },    { /* NE2000 Compatible */ 0x0ff0, 0x00, 0xa0, 0x0c, 0 },    { /* Network General Sniffer */ 0x0ff0, 0x00, 0x00, 0x65,      HAS_MISC_REG | HAS_IBM_MISC },    { /* Panasonic VEL211 */ 0x0ff0, 0x00, 0x80, 0x45,       HAS_MISC_REG | HAS_IBM_MISC },    { /* PreMax PE-200 */ 0x07f0, 0x00, 0x20, 0xe0, 0 },    { /* RPTI EP400 */ 0x0110, 0x00, 0x40, 0x95, 0 },    { /* SCM Ethernet */ 0x0ff0, 0x00, 0x20, 0xcb, 0 },    { /* Socket EA */ 0x4000, 0x00, 0xc0, 0x1b,      DELAY_OUTPUT | HAS_MISC_REG | USE_BIG_BUF },    { /* Socket LP-E CF+ */ 0x01c0, 0x00, 0xc0, 0x1b, 0 },    { /* SuperSocket RE450T */ 0x0110, 0x00, 0xe0, 0x98, 0 },    { /* Volktek NPL-402CT */ 0x0060, 0x00, 0x40, 0x05, 0 },    { /* NEC PC-9801N-J12 */ 0x0ff0, 0x00, 0x00, 0x4c, 0 },    { /* PCMCIA Technology OEM */ 0x01c8, 0x00, 0xa0, 0x0c, 0 }};#define NR_INFO		(sizeof(hw_info)/sizeof(hw_info_t))static hw_info_t default_info = { 0, 0, 0, 0, 0 };static hw_info_t dl10019_info = { 0, 0, 0, 0, IS_DL10019|HAS_MII };static hw_info_t dl10022_info = { 0, 0, 0, 0, IS_DL10022|HAS_MII };typedef struct pcnet_dev_t {    struct net_device	dev;	/* so &dev == &pcnet_dev_t */    dev_link_t		link;    dev_node_t		node;    u_int		flags;    caddr_t		base;    struct timer_list	watchdog;    int			stale, fast_poll;    u_char		phy_id;    u_char		eth_phy, pna_phy;    u_short		link_status;    u_long		mii_reset;} pcnet_dev_t;/*======================================================================    This bit of code is used to avoid unregistering network devices    at inappropriate times.  2.2 and later kernels are fairly picky    about when this can happen.    ======================================================================*/static void flush_stale_links(void){    dev_link_t *link, *next;    for (link = dev_list; link; link = next) {	next = link->next;	if (link->state & DEV_STALE_LINK)	    pcnet_detach(link);    }}/*====================================================================*/static void cs_error(client_handle_t handle, int func, int ret){    error_info_t err = { func, ret };    CardServices(ReportError, handle, &err);}/*======================================================================    We never need to do anything when a pcnet device is "initialized"    by the net software, because we only register already-found cards.======================================================================*/static int pcnet_init(struct net_device *dev){    return 0;}/*======================================================================    pcnet_attach() creates an "instance" of the driver, allocating    local data structures for one device.  The device is registered    with Card Services.======================================================================*/static dev_link_t *pcnet_attach(void){    pcnet_dev_t *info;    dev_link_t *link;    struct net_device *dev;    client_reg_t client_reg;    int i, ret;    DEBUG(0, "pcnet_attach()\n");    flush_stale_links();    /* Create new ethernet device */    info = kmalloc(sizeof(*info), GFP_KERNEL);    if (!info) return NULL;    memset(info, 0, sizeof(*info));    link = &info->link; dev = &info->dev;    link->priv = info;        link->release.function = &pcnet_release;    link->release.data = (u_long)link;    link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;    link->irq.IRQInfo1 = IRQ_INFO2_VALID|IRQ_LEVEL_ID;    if (irq_list[0] == -1)	link->irq.IRQInfo2 = irq_mask;    else	for (i = 0; i < 4; i++)	    link->irq.IRQInfo2 |= 1 << irq_list[i];    link->conf.Attributes = CONF_ENABLE_IRQ;    link->conf.IntType = INT_MEMORY_AND_IO;    ethdev_init(dev);    dev->init = &pcnet_init;    dev->open = &pcnet_open;    dev->stop = &pcnet_close;    dev->set_config = &set_config;    /* Register with Card Services */    link->next = dev_list;    dev_list = link;    client_reg.dev_info = &dev_info;    client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;    client_reg.EventMask =	CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |	CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |	CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;    client_reg.event_handler = &pcnet_event;    client_reg.Version = 0x0210;    client_reg.event_callback_args.client_data = link;    ret = CardServices(RegisterClient, &link->handle, &client_reg);    if (ret != CS_SUCCESS) {	cs_error(link->handle, RegisterClient, ret);	pcnet_detach(link);	return NULL;    }    return link;} /* pcnet_attach *//*======================================================================    This deletes a driver "instance".  The device is de-registered    with Card Services.  If it has been released, all local data    structures are freed.  Otherwise, the structures will be freed    when the device is released.======================================================================*/static void pcnet_detach(dev_link_t *link){    pcnet_dev_t *info = link->priv;    dev_link_t **linkp;    DEBUG(0, "pcnet_detach(0x%p)\n", link);    /* Locate device structure */    for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)	if (*linkp == link) break;    if (*linkp == NULL)	return;    del_timer(&link->release);    if (link->state & DEV_CONFIG) {	pcnet_release((u_long)link);	if (link->state & DEV_STALE_CONFIG) {	    link->state |= DEV_STALE_LINK;	    return;	}    }    if (link->handle)	CardServices(DeregisterClient, link->handle);    /* Unlink device structure, free bits */    *linkp = link->next;    if (link->dev)	unregister_netdev(&info->dev);    kfree(info);} /* pcnet_detach *//*======================================================================    This probes for a card's hardware address, for card types that    encode this information in their CIS.======================================================================*/static hw_info_t *get_hwinfo(dev_link_t *link){    struct net_device *dev = link->priv;    win_req_t req;    memreq_t mem;    u_char *base, *virt;    int i, j;    /* Allocate a small memory window */    req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;    req.Base = 0; req.Size = 0;    req.AccessSpeed = 0;    link->win = (window_handle_t)link->handle;    i = CardServices(RequestWindow, &link->win, &req);    if (i != CS_SUCCESS) {	cs_error(link->handle, RequestWindow, i);	return NULL;    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久三区| 国产乱人伦精品一区二区在线观看 | 偷窥国产亚洲免费视频| 国内精品写真在线观看| 色就色 综合激情| 国产日本亚洲高清| 亚洲不卡在线观看| 91年精品国产| 国产日韩高清在线| 琪琪一区二区三区| 欧美系列日韩一区| 国产精品美女久久久久aⅴ| 奇米色777欧美一区二区| 91国偷自产一区二区开放时间| 日本一区二区成人| 国内精品伊人久久久久av一坑 | 亚洲成av人片| 色视频欧美一区二区三区| 欧美韩日一区二区三区| 国产伦精品一区二区三区在线观看| 欧美日韩中文另类| 一区二区三区成人| 色一情一伦一子一伦一区| 国产精品国产精品国产专区不片| 国产一区二区免费看| 日韩精品一区二区三区中文不卡| 舔着乳尖日韩一区| 欧美视频中文字幕| 亚洲国产人成综合网站| 在线观看视频91| 亚洲女与黑人做爰| 色88888久久久久久影院野外| 亚洲人成人一区二区在线观看| 成人精品免费看| 国产亚洲一区字幕| 丁香五精品蜜臀久久久久99网站| 久久精品夜夜夜夜久久| 国产夫妻精品视频| 中文字幕一区二区在线观看 | 欧美日韩免费一区二区三区视频| 亚洲精品乱码久久久久久| 日本韩国欧美国产| 亚洲成av人片一区二区| 亚洲精品一区二区三区99| 久久99国产乱子伦精品免费| 久久伊人中文字幕| 不卡一二三区首页| 亚洲最大色网站| 欧美一区二区三区日韩| 另类专区欧美蜜桃臀第一页| 国产欧美精品一区二区三区四区 | 一区二区三区美女视频| 欧美丝袜丝交足nylons| 日本在线不卡视频一二三区| 精品成人一区二区| 91丨九色丨尤物| 日本欧美在线看| 国产丝袜美腿一区二区三区| 日本韩国一区二区| 麻豆精品国产91久久久久久| 国产精品少妇自拍| 精品1区2区3区| 国产麻豆精品久久一二三| 国产片一区二区| 精品视频在线视频| 国产精品小仙女| 亚洲一区在线看| 亚洲精品一区在线观看| 91啦中文在线观看| 另类小说色综合网站| 欧美激情中文字幕一区二区| 99精品视频在线观看免费| 日日摸夜夜添夜夜添亚洲女人| 久久久九九九九| 欧美色男人天堂| 国产成人自拍网| 五月综合激情网| 一区二区三区日韩欧美精品| 制服丝袜亚洲精品中文字幕| 成人性生交大片| 蜜桃视频免费观看一区| 亚洲视频精选在线| 久久久久免费观看| 欧美丰满一区二区免费视频| 成人免费视频播放| 日本强好片久久久久久aaa| 亚洲日本在线看| 精品国产亚洲一区二区三区在线观看| 色伊人久久综合中文字幕| 国内精品视频666| 奇米影视7777精品一区二区| 亚洲日本在线a| 国产精品国产三级国产有无不卡| 欧美精品在线观看播放| 色猫猫国产区一区二在线视频| 国产一区二区女| 久久国产尿小便嘘嘘| 午夜视频一区在线观看| 亚洲综合区在线| 亚洲免费观看高清完整版在线观看| 欧美va亚洲va香蕉在线| 欧美伊人久久久久久午夜久久久久| 成人免费视频一区| 国产精品99久久久久久久vr | 色综合色综合色综合 | 亚洲视频图片小说| 国产精品日产欧美久久久久| 国产亚洲欧美日韩在线一区| 日韩美女一区二区三区四区| 9191精品国产综合久久久久久| 日本二三区不卡| 色哟哟欧美精品| 欧美色区777第一页| 欧美性猛交xxxxxx富婆| 在线观看不卡视频| 欧美最猛黑人xxxxx猛交| 日本久久电影网| 欧美吻胸吃奶大尺度电影| 欧美三级乱人伦电影| 欧美精品一区二区三区蜜桃 | caoporn国产一区二区| 国产激情视频一区二区在线观看| 国产成人在线视频网站| 高清国产一区二区| 97se亚洲国产综合在线| 在线国产电影不卡| 欧美日韩三级视频| 欧美成人欧美edvon| 国产精品日韩成人| 亚洲综合小说图片| 日av在线不卡| 成人网页在线观看| 色综合网色综合| 欧美高清视频不卡网| 精品日韩一区二区三区免费视频| 久久精品人人爽人人爽| 日韩一区日韩二区| 水蜜桃久久夜色精品一区的特点 | 五月婷婷久久丁香| 麻豆视频观看网址久久| 91精品办公室少妇高潮对白| 欧美精品一区视频| 91在线播放网址| 69精品人人人人| 久久综合色天天久久综合图片| 亚洲国产精品激情在线观看| 亚洲免费高清视频在线| 婷婷久久综合九色国产成人| 国产一区视频网站| 欧洲精品在线观看| 久久麻豆一区二区| 亚洲另类色综合网站| 激情成人综合网| 欧美色图片你懂的| 国产亚洲综合av| 日日骚欧美日韩| 色www精品视频在线观看| 久久久久国产免费免费| 亚洲第一电影网| 99久久精品99国产精品| 欧美成人a∨高清免费观看| 亚洲日本va在线观看| 久久aⅴ国产欧美74aaa| 色噜噜狠狠一区二区三区果冻| 亚洲精品一区二区在线观看| 一区二区在线观看不卡| 国产露脸91国语对白| 3d成人h动漫网站入口| 亚洲丝袜另类动漫二区| 国产精品综合久久| 日韩一区二区中文字幕| 一区二区不卡在线视频 午夜欧美不卡在| 久久精品国产澳门| 欧美日本在线看| 一区二区三区国产| 99精品黄色片免费大全| 国产午夜精品久久| 久久99久久99精品免视看婷婷 | 一区二区三区日韩| 国产成人午夜精品影院观看视频| 欧美顶级少妇做爰| 尤物在线观看一区| 91亚洲午夜精品久久久久久| 国产视频一区二区三区在线观看| 日av在线不卡| 日韩亚洲国产中文字幕欧美| 亚洲综合免费观看高清完整版| 99久久久国产精品| 国产精品嫩草影院av蜜臀| 国产一区二区三区在线观看免费视频| 91精品国产综合久久精品| 亚洲va欧美va国产va天堂影院| 欧美在线观看视频一区二区| 亚洲狠狠丁香婷婷综合久久久| 99国产精品久久久久久久久久| 国产精品午夜电影| 顶级嫩模精品视频在线看| 欧美精彩视频一区二区三区| 国产乱一区二区| 国产精品久久久久久久蜜臀|