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

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

?? pcnet_cs.c

?? pcmcia驅動源代碼,直接可以在linux2.6下使用 !
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*======================================================================    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.153 2003/11/09 18:53:09    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/ptrace.h>#include <linux/slab.h>#include <linux/string.h>#include <linux/timer.h>#include <linux/delay.h>#include <linux/ethtool.h>#include <linux/netdevice.h>#include <../drivers/net/8390.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>#include <asm/io.h>#include <asm/system.h>#include <asm/byteorder.h>#include <asm/uaccess.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 const char *if_names[] = { "auto", "10baseT", "10base2"};#ifdef PCMCIA_DEBUGstatic int pc_debug = PCMCIA_DEBUG;module_param(pc_debug, int, 0);#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)static char *version ="pcnet_cs.c 1.153 2003/11/09 18:53:09 (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_param(n, int, 0)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_param_array(hw_addr, int, NULL, 0);/*====================================================================*/static void mii_phy_probe(struct net_device *dev);static int pcnet_config(struct pcmcia_device *link);static void pcnet_release(struct pcmcia_device *link);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 const struct ethtool_ops netdev_ethtool_ops;static irqreturn_t ei_irq_wrapper(int irq, void *dev_id);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(struct pcmcia_device *link, int start_pg,			      int stop_pg, int cm_offset);static int setup_dma_config(struct pcmcia_device *link, int start_pg,			    int stop_pg);static void pcnet_detach(struct pcmcia_device *p_dev);static dev_info_t dev_info = "pcnet_cs";/*====================================================================*/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 pcmcia_device	*p_dev;    dev_node_t		node;    u_int		flags;    void		__iomem *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;static inline pcnet_dev_t *PRIV(struct net_device *dev){	char *p = netdev_priv(dev);	return (pcnet_dev_t *)(p + sizeof(struct ei_device));}/*======================================================================    pcnet_attach() creates an "instance" of the driver, allocating    local data structures for one device.  The device is registered    with Card Services.======================================================================*/static int pcnet_probe(struct pcmcia_device *link){    pcnet_dev_t *info;    struct net_device *dev;    DEBUG(0, "pcnet_attach()\n");    /* Create new ethernet device */    dev = __alloc_ei_netdev(sizeof(pcnet_dev_t));    if (!dev) return -ENOMEM;    info = PRIV(dev);    info->p_dev = link;    link->priv = dev;    link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;    link->irq.IRQInfo1 = IRQ_LEVEL_ID;    link->conf.Attributes = CONF_ENABLE_IRQ;    link->conf.IntType = INT_MEMORY_AND_IO;    SET_MODULE_OWNER(dev);    dev->open = &pcnet_open;    dev->stop = &pcnet_close;    dev->set_config = &set_config;    return pcnet_config(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(struct pcmcia_device *link){	struct net_device *dev = link->priv;	DEBUG(0, "pcnet_detach(0x%p)\n", link);	if (link->dev_node)		unregister_netdev(dev);	pcnet_release(link);	free_netdev(dev);} /* 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(struct pcmcia_device *link){    struct net_device *dev = link->priv;    win_req_t req;    memreq_t mem;    u_char __iomem *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;    i = pcmcia_request_window(&link, &req, &link->win);    if (i != CS_SUCCESS) {	cs_error(link, RequestWindow, i);	return NULL;    }    virt = ioremap(req.Base, req.Size);    mem.Page = 0;    for (i = 0; i < NR_INFO; i++) {	mem.CardOffset = hw_info[i].offset & ~(req.Size-1);	pcmcia_map_mem_page(link->win, &mem);	base = &virt[hw_info[i].offset & (req.Size-1)];	if ((readb(base+0) == hw_info[i].a0) &&	    (readb(base+2) == hw_info[i].a1) &&	    (readb(base+4) == hw_info[i].a2))	    break;    }    if (i < NR_INFO) {	for (j = 0; j < 6; j++)	    dev->dev_addr[j] = readb(base + (j<<1));    }    iounmap(virt);    j = pcmcia_release_window(link->win);    if (j != CS_SUCCESS)	cs_error(link, ReleaseWindow, j);    return (i < NR_INFO) ? hw_info+i : NULL;} /* get_hwinfo *//*======================================================================    This probes for a card's hardware address by reading the PROM.    It checks the address against a list of known types, then falls    back to a simple NE2000 clone signature check.======================================================================*/static hw_info_t *get_prom(struct pcmcia_device *link){    struct net_device *dev = link->priv;    kio_addr_t ioaddr = dev->base_addr;    u_char prom[32];    int i, j;    /* This is lifted straight from drivers/net/ne.c */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区公司| 9i看片成人免费高清| 欧美一级艳片视频免费观看| 青椒成人免费视频| 欧美xxxxxxxxx| 成人一区二区三区在线观看| 中文字幕一区二区在线播放| 在线中文字幕一区二区| 日韩精品久久理论片| 精品国产乱码久久久久久图片| 国产盗摄视频一区二区三区| 亚洲男同1069视频| 777色狠狠一区二区三区| 极品瑜伽女神91| 一区二区中文字幕在线| 欧美精品九九99久久| 国产一区二区三区不卡在线观看| √…a在线天堂一区| 精品视频免费看| 国产一区二区导航在线播放| 亚洲色图一区二区三区| 7777女厕盗摄久久久| 高清不卡在线观看| 日日夜夜精品视频免费| 国产亚洲一二三区| 欧美久久久影院| 成人做爰69片免费看网站| 午夜视频一区二区| 国产精品久久久久久久久免费桃花| 欧美日韩精品专区| 成人激情开心网| 日韩制服丝袜av| 亚洲欧美日韩成人高清在线一区| 日韩亚洲欧美一区| 94-欧美-setu| 韩国v欧美v日本v亚洲v| 午夜欧美大尺度福利影院在线看| 久久免费看少妇高潮| 欧美日韩1234| 91亚洲精品久久久蜜桃| 国产一区欧美日韩| 日本美女一区二区三区视频| 日韩一区中文字幕| 久久久久久久久久久久久久久99| 欧美日韩一级大片网址| 成人手机在线视频| 91在线观看美女| 成人精品免费网站| 久久99精品国产.久久久久| 一区二区三区高清| 国产精品天干天干在线综合| 日韩精品一区二区三区在线| 欧美综合久久久| 91一区二区在线| 99国产精品一区| 成人午夜电影网站| 国产激情精品久久久第一区二区| 老司机精品视频在线| 婷婷一区二区三区| 亚洲aⅴ怡春院| 亚洲欧美日韩一区二区三区在线观看| 欧美国产亚洲另类动漫| 久久综合色8888| 欧美精品一区二区在线观看| 欧美成人精品高清在线播放| 91精品久久久久久久久99蜜臂| 欧美三级资源在线| 欧美日韩国产高清一区二区三区| 色老汉av一区二区三区| 91国产免费看| 欧美色图免费看| 欧美体内she精视频| 欧美色图12p| 正在播放亚洲一区| 欧美一级免费观看| 欧美一级在线视频| 日韩女优制服丝袜电影| 2023国产精华国产精品| 久久精品人人做人人爽人人| 国产日韩欧美高清在线| 中文字幕欧美三区| 亚洲日本在线观看| 一区二区三区在线观看动漫| 一区二区三区视频在线看| 亚洲一区二区三区四区不卡 | 日韩欧美一二三四区| 91精品国产丝袜白色高跟鞋| 欧美一区二区三区公司| 精品久久久久一区| 欧美国产成人精品| 亚洲欧美日韩电影| 日日夜夜免费精品| 国模套图日韩精品一区二区 | 在线免费观看日韩欧美| 欧美日韩一区二区三区四区五区| 欧美顶级少妇做爰| 精品成人佐山爱一区二区| 国产欧美视频在线观看| 亚洲日本乱码在线观看| 日日夜夜免费精品| 国产乱人伦偷精品视频不卡| 99久久精品99国产精品| 欧美精选午夜久久久乱码6080| 日韩一区二区视频| 国产午夜亚洲精品羞羞网站| 亚洲人123区| 久久99精品久久久久久动态图| 成人激情小说乱人伦| 欧美日韩国产影片| 国产亚洲欧美色| 亚洲自拍都市欧美小说| 国产一区二区h| 色婷婷激情一区二区三区| 欧美一区二区三区视频在线| 国产亚洲欧洲997久久综合| 亚洲一级不卡视频| 国产曰批免费观看久久久| 93久久精品日日躁夜夜躁欧美| 在线综合视频播放| 亚洲欧洲精品一区二区精品久久久 | 国产乱子轮精品视频| 色视频一区二区| 国产欧美日本一区视频| 五月天激情综合| 99久久综合色| 精品国产一区二区三区不卡 | 成人免费视频caoporn| 欧美精品在线一区二区三区| 免费观看成人鲁鲁鲁鲁鲁视频| 国产一区二区三区精品欧美日韩一区二区三区| 91在线观看免费视频| 久久久久久久久久久久久久久99| 一片黄亚洲嫩模| 成人午夜在线播放| 精品精品国产高清一毛片一天堂| 亚洲桃色在线一区| 国产高清在线精品| 精品国产一区二区精华| 亚洲成va人在线观看| 色综合久久综合网| 国产精品国产精品国产专区不片| 久久av中文字幕片| 91精品国产免费| 亚洲一卡二卡三卡四卡| 色综合咪咪久久| 中文字幕欧美一| 成人午夜av电影| 国产欧美日韩亚州综合| 国产一区美女在线| 日韩精品一区在线| 日本大胆欧美人术艺术动态| 欧洲视频一区二区| 伊人色综合久久天天人手人婷| 成人激情免费视频| 国产精品久久久久久久久免费丝袜 | 亚洲123区在线观看| 91女神在线视频| 中文字幕中文字幕一区二区| 成人在线视频一区| 国产欧美综合色| 高清国产一区二区| 国产精品丝袜在线| 风间由美一区二区av101| 久久亚洲综合av| 国产精品一区二区免费不卡| 精品捆绑美女sm三区| 黑人巨大精品欧美一区| 亚洲精品在线免费播放| 国产在线精品免费| 国产亚洲综合av| 成人免费电影视频| 中文字幕中文字幕一区二区| 91蜜桃网址入口| 亚洲午夜日本在线观看| 欧美日韩黄视频| 全国精品久久少妇| 欧美变态tickle挠乳网站| 国产在线国偷精品产拍免费yy| 久久久99久久| 成人黄色a**站在线观看| 亚洲欧美怡红院| 欧美理论电影在线| 老鸭窝一区二区久久精品| 欧美精品一区二区不卡 | av毛片久久久久**hd| 亚洲日本乱码在线观看| 欧美日韩国产首页| 裸体健美xxxx欧美裸体表演| 久久免费偷拍视频| www.成人网.com| 香蕉乱码成人久久天堂爱免费| 日韩一级片在线观看| 国产高清在线精品| 一区二区免费在线| 日韩欧美一区二区免费| 成人av中文字幕| 无码av免费一区二区三区试看 | 亚洲欧洲综合另类| 5858s免费视频成人| 福利视频网站一区二区三区|