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

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

?? atari_bionet.c

?? 講述linux的初始化過程
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* bionet.c     BioNet-100 device driver for linux68k. * * Version:	@(#)bionet.c	1.0	02/06/96 * * Author:	Hartmut Laue <laue@ifk-mp.uni-kiel.de> * and		Torsten Narjes <narjes@ifk-mp.uni-kiel.de> * * Little adaptions for integration into pl7 by Roman Hodek * * Some changes in bionet_poll_rx by Karl-Heinz Lohner *	What is it ?	------------	This driver controls the BIONET-100 LAN-Adapter which connects	an ATARI ST/TT via the ACSI-port to an Ethernet-based network.	This version can be compiled as a loadable module (See the	compile command at the bottom of this file).	At load time, you can optionally set the debugging level and the	fastest response time on the command line of 'insmod'.	'bionet_debug'		controls the amount of diagnostic messages:	  0  : no messages	  >0 : see code for meaning of printed messages	'bionet_min_poll_time' (always >=1)		gives the time (in jiffies) between polls. Low values		increase the system load (beware!)	When loaded, a net device with the name 'bio0' becomes available,	which can be controlled with the usual 'ifconfig' command.	It is possible to compile this driver into the kernel like other	(net) drivers. For this purpose, some source files (e.g. config-files	makefiles, Space.c) must be changed accordingly. (You may refer to	other drivers how to do it.) In this case, the device will be detected	at boot time and (probably) appear as 'eth0'.	This code is based on several sources:	- The driver code for a parallel port ethernet adapter by	  Donald Becker (see file 'atp.c' from the PC linux distribution)	- The ACSI code by Roman Hodek for the ATARI-ACSI harddisk support	  and DMA handling.	- Very limited information about moving packets in and out of the	  BIONET-adapter from the TCP package for TOS by BioData GmbH.	Theory of Operation	-------------------	Because the ATARI DMA port is usually shared between several	devices (eg. harddisk, floppy) we cannot block the ACSI bus	while waiting for interrupts. Therefore we use a polling mechanism	to fetch packets from the adapter. For the same reason, we send	packets without checking that the previous packet has been sent to	the LAN. We rely on the higher levels of the networking code to detect	missing packets and resend them.	Before we access the ATARI DMA controller, we check if another	process is using the DMA. If not, we lock the DMA, perform one or	more packet transfers and unlock the DMA before returning.	We do not use 'stdma_lock' unconditionally because it is unclear	if the networking code can be set to sleep, which will happen if	another (possibly slow) device is using the DMA controller.	The polling is done via timer interrupts which periodically	'simulate' an interrupt from the Ethernet adapter. The time (in jiffies)	between polls varies depending on an estimate of the net activity.	The allowed range is given by the variable 'bionet_min_poll_time'	for the lower (fastest) limit and the constant 'MAX_POLL_TIME'	for the higher (slowest) limit.	Whenever a packet arrives, we switch to fastest response by setting	the polling time to its lowest limit. If the following poll fails,	because no packets have arrived, we increase the time for the next	poll. When the net activity is low, the polling time effectively	stays at its maximum value, resulting in the lowest load for the	machine. */#define MAX_POLL_TIME	10static char *version =	"bionet.c:v1.0 06-feb-96 (c) Hartmut Laue.\n";#include <linux/module.h>#include <linux/errno.h>#include <linux/kernel.h>#include <linux/sched.h>#include <linux/types.h>#include <linux/fcntl.h>#include <linux/interrupt.h>#include <linux/ptrace.h>#include <linux/ioport.h>#include <linux/in.h>#include <linux/malloc.h>#include <linux/string.h>#include <linux/delay.h>#include <linux/timer.h>#include <linux/init.h>#include <linux/netdevice.h>#include <linux/etherdevice.h>#include <linux/skbuff.h>#include <asm/setup.h>#include <asm/pgtable.h>#include <asm/system.h>#include <asm/bitops.h>#include <asm/io.h>#include <asm/dma.h>#include <asm/atarihw.h>#include <asm/atariints.h>#include <asm/atari_acsi.h>#include <asm/atari_stdma.h>extern struct net_device *init_etherdev(struct net_device *dev, int sizeof_private);/* use 0 for production, 1 for verification, >2 for debug */#ifndef NET_DEBUG#define NET_DEBUG 0#endif/* * Global variable 'bionet_debug'. Can be set at load time by 'insmod' */unsigned int bionet_debug = NET_DEBUG;MODULE_PARM(bionet_debug, "i");static unsigned int bionet_min_poll_time = 2;/* Information that need to be kept for each board. */struct net_local {	struct net_device_stats stats;	long open_time;			/* for debugging */	int  poll_time;			/* polling time varies with net load */};static struct nic_pkt_s {		/* packet format */	unsigned char	status;	unsigned char	dummy;	unsigned char	l_lo, l_hi;	unsigned char	buffer[3000];} *nic_packet;unsigned char *phys_nic_packet;/* Index to functions, as function prototypes. */extern int bionet_probe(struct net_device *dev);static int bionet_open(struct net_device *dev);static int bionet_send_packet(struct sk_buff *skb, struct net_device *dev);static void bionet_poll_rx(struct net_device *);static int bionet_close(struct net_device *dev);static struct net_device_stats *net_get_stats(struct net_device *dev);static void bionet_tick(unsigned long);static struct timer_list bionet_timer = { function: bionet_tick };#define STRAM_ADDR(a)	(((a) & 0xff000000) == 0)/* The following routines access the ethernet board connected to the * ACSI port via the st_dma chip. */#define NODE_ADR 0x60#define C_READ 8#define C_WRITE 0x0a#define C_GETEA 0x0f#define C_SETCR 0x0estatic intsendcmd(unsigned int a0, unsigned int mod, unsigned int cmd) {	unsigned int c;	dma_wd.dma_mode_status = (mod | ((a0) ? 2 : 0) | 0x88);	dma_wd.fdc_acces_seccount = cmd;	dma_wd.dma_mode_status = (mod | 0x8a);	if( !acsi_wait_for_IRQ(HZ/2) )	/* wait for cmd ack */		return -1;		/* timeout */	c = dma_wd.fdc_acces_seccount;	return (c & 0xff);}static voidset_status(int cr) {	sendcmd(0,0x100,NODE_ADR | C_SETCR);    /* CMD: SET CR */	sendcmd(1,0x100,cr);	dma_wd.dma_mode_status = 0x80;}static intget_status(unsigned char *adr) {	int i,c;	DISABLE_IRQ();	c = sendcmd(0,0x00,NODE_ADR | C_GETEA);  /* CMD: GET ETH ADR*/	if( c < 0 ) goto gsend;	/* now read status bytes */	for (i=0; i<6; i++) {		dma_wd.fdc_acces_seccount = 0;	/* request next byte */    		if( !acsi_wait_for_IRQ(HZ/2) ) {	/* wait for cmd ack */			c = -1;			goto gsend;		/* timeout */		}		c = dma_wd.fdc_acces_seccount;		*adr++ = (unsigned char)c;	}	c = 1;gsend:  	dma_wd.dma_mode_status = 0x80;	return c;}static voidbionet_intr(int irq, void *data, struct pt_regs *fp) {	return;}static intget_frame(unsigned long paddr, int odd) {	int c;	unsigned long flags;	DISABLE_IRQ();	save_flags(flags);	cli();	dma_wd.dma_mode_status		= 0x9a;	dma_wd.dma_mode_status		= 0x19a;	dma_wd.dma_mode_status		= 0x9a;	dma_wd.fdc_acces_seccount	= 0x04;		/* sector count (was 5) */	dma_wd.dma_lo			= (unsigned char)paddr;	paddr >>= 8;	dma_wd.dma_md			= (unsigned char)paddr;	paddr >>= 8;	dma_wd.dma_hi			= (unsigned char)paddr;	restore_flags(flags);	c = sendcmd(0,0x00,NODE_ADR | C_READ);	/* CMD: READ */	if( c < 128 ) goto rend;	/* now read block */	c = sendcmd(1,0x00,odd);	/* odd flag for address shift */	dma_wd.dma_mode_status	= 0x0a;	if( !acsi_wait_for_IRQ(100) ) {	/* wait for DMA to complete */		c = -1;		goto rend;	}	dma_wd.dma_mode_status	= 0x8a;	dma_wd.dma_mode_status	= 0x18a;	dma_wd.dma_mode_status	= 0x8a;	c = dma_wd.fdc_acces_seccount;	dma_wd.dma_mode_status	= 0x88;	c = dma_wd.fdc_acces_seccount;	c = 1;rend:	dma_wd.dma_mode_status	= 0x80;	udelay(40);	acsi_wait_for_noIRQ(20);	return c;}static inthardware_send_packet(unsigned long paddr, int cnt) {	unsigned int c;	unsigned long flags;	DISABLE_IRQ();	save_flags(flags);	cli();	dma_wd.dma_mode_status	= 0x19a;	dma_wd.dma_mode_status	= 0x9a;	dma_wd.dma_mode_status	= 0x19a;	dma_wd.dma_lo		= (unsigned char)paddr;	paddr >>= 8;	dma_wd.dma_md		= (unsigned char)paddr;	paddr >>= 8;	dma_wd.dma_hi		= (unsigned char)paddr;	dma_wd.fdc_acces_seccount	= 0x4;		/* sector count */	restore_flags(flags);	c = sendcmd(0,0x100,NODE_ADR | C_WRITE);	/* CMD: WRITE */	c = sendcmd(1,0x100,cnt&0xff);	c = sendcmd(1,0x100,cnt>>8);	/* now write block */	dma_wd.dma_mode_status	= 0x10a;	/* DMA enable */	if( !acsi_wait_for_IRQ(100) )		/* wait for DMA to complete */		goto end;	dma_wd.dma_mode_status	= 0x19a;	/* DMA disable ! */	c = dma_wd.fdc_acces_seccount;end:	c = sendcmd(1,0x100,0);	c = sendcmd(1,0x100,0);	dma_wd.dma_mode_status	= 0x180;	udelay(40);	acsi_wait_for_noIRQ(20);	return( c & 0x02);}/* Check for a network adaptor of this type, and return '0' if one exists. */int __init bionet_probe(struct net_device *dev){	unsigned char station_addr[6];	static unsigned version_printed = 0;	static int no_more_found = 0; /* avoid "Probing for..." printed 4 times */	int i;	if (!MACH_IS_ATARI || no_more_found)		return -ENODEV;	printk("Probing for BioNet 100 Adapter...\n");	stdma_lock(bionet_intr, NULL);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲夂夂婷婷色拍ww47| 国产日韩欧美综合一区| 91丨porny丨国产入口| 国产在线不卡一卡二卡三卡四卡| 亚洲成人福利片| 亚洲国产日韩在线一区模特| 日韩美女啊v在线免费观看| 国产精品久久久久久久久免费相片| 精品久久久久久久久久久久包黑料 | 九九精品一区二区| 麻豆国产精品官网| 另类小说视频一区二区| 美女脱光内衣内裤视频久久影院| 久久国产麻豆精品| 国产真实乱子伦精品视频| 国产成人免费视频一区| 成人在线视频一区二区| 99久久精品免费| 色哟哟一区二区| 欧美挠脚心视频网站| 正在播放一区二区| 亚洲精品一区二区在线观看| 久久久久97国产精华液好用吗| 久久蜜臀精品av| 1区2区3区欧美| 亚洲a一区二区| 热久久久久久久| 豆国产96在线|亚洲| 一本色道综合亚洲| 91麻豆精品91久久久久久清纯| 欧美成人女星排名| 国产精品情趣视频| 亚洲一区二区三区在线| 麻豆国产精品777777在线| 国产.欧美.日韩| 在线国产电影不卡| 久久亚洲捆绑美女| 亚洲乱码国产乱码精品精98午夜| 日韩av一区二| 丁香桃色午夜亚洲一区二区三区| 色婷婷久久久综合中文字幕| 日韩欧美一区在线观看| 亚洲欧洲三级电影| 美国一区二区三区在线播放| 成人免费视频免费观看| 精品视频一区 二区 三区| 久久影院电视剧免费观看| 亚洲精品乱码久久久久久黑人| 美日韩黄色大片| 一本一本大道香蕉久在线精品| 日韩一级片在线观看| 中文字幕一区av| 久久99国内精品| 一本久道久久综合中文字幕| 久久久久一区二区三区四区| 午夜精品一区二区三区电影天堂 | 男女性色大片免费观看一区二区 | 一区二区在线观看不卡| 国产尤物一区二区| 在线观看欧美黄色| 国产精品成人免费在线| 国产酒店精品激情| 日韩一区二区在线观看| 亚洲自拍偷拍欧美| aaa国产一区| 国产亚洲精品福利| 激情图片小说一区| 欧美人牲a欧美精品| 亚洲黄色免费电影| 99精品国产99久久久久久白柏 | 国产精品综合av一区二区国产馆| 欧美精品一二三四| 香蕉影视欧美成人| 91成人免费在线视频| 亚洲国产精品av| 丰满放荡岳乱妇91ww| 亚洲精品在线网站| 精品一区二区av| 日韩亚洲欧美中文三级| 日韩黄色免费网站| 欧美日韩精品一区二区三区| 亚洲小说春色综合另类电影| 91国产视频在线观看| 亚洲三级理论片| 欧洲av在线精品| 亚洲自拍偷拍麻豆| 欧美日本在线看| 日韩精品乱码免费| 欧美福利一区二区| 日韩av午夜在线观看| 精品免费国产一区二区三区四区| 蜜桃av一区二区在线观看| 日韩免费视频线观看| 国产在线精品免费av| 国产色产综合产在线视频| 成人av在线资源网| 亚洲女同ⅹxx女同tv| 欧美三级视频在线观看| 水野朝阳av一区二区三区| 日韩精品一区二区三区中文不卡| 激情文学综合网| 日本一区二区三级电影在线观看| 成a人片国产精品| 亚洲精品免费看| 538prom精品视频线放| 黄色小说综合网站| 国产精品久久久久久久午夜片| 色婷婷av一区二区三区之一色屋| 亚洲影院理伦片| 精品少妇一区二区三区 | 欧美激情一区二区三区不卡 | 色婷婷综合在线| 奇米影视7777精品一区二区| 国产亚洲精品久| 欧美日韩中文一区| 国产在线精品一区在线观看麻豆| 欧美国产国产综合| 欧美高清视频不卡网| 国产白丝精品91爽爽久久 | 欧美日韩国产精选| 成人自拍视频在线观看| 亚洲一级二级在线| 久久久国产一区二区三区四区小说| 99精品黄色片免费大全| 久久精品国产第一区二区三区| 国产精品青草久久| 欧美大黄免费观看| 欧美制服丝袜第一页| 国模无码大尺度一区二区三区| 一区二区视频在线| 久久免费视频色| 7777女厕盗摄久久久| 成人av网站免费| 理论电影国产精品| 亚洲成人高清在线| 中文字幕制服丝袜成人av| 日韩一区二区在线观看视频播放| 99免费精品在线| 国内精品免费在线观看| 视频一区免费在线观看| 日韩美女视频一区二区| 日本一区免费视频| 精品国产乱码久久久久久蜜臀| 欧美日韩一级大片网址| 92精品国产成人观看免费 | 中文字幕一区二区三区av| 久久伊99综合婷婷久久伊| 欧美精品久久久久久久多人混战| 一本大道久久a久久精品综合| 国产麻豆一精品一av一免费| 天堂午夜影视日韩欧美一区二区| 亚洲品质自拍视频| 亚洲欧美日韩国产手机在线| 国产精品传媒视频| 成人欧美一区二区三区1314| 中文字幕第一区二区| 欧美激情一区在线| 中文字幕第一区| 国产精品久久久久久亚洲毛片 | 亚洲精品免费在线| 亚洲婷婷综合久久一本伊一区| 国产精品久久久久婷婷二区次| 久久久久国产成人精品亚洲午夜| 久久综合久久99| 国产拍欧美日韩视频二区| 日本一区二区免费在线| 中文成人综合网| 中文字幕一区二区三区在线观看 | 夜夜精品浪潮av一区二区三区| 中文字幕一区在线| 一区二区三区精品在线| 亚洲图片欧美视频| 日日骚欧美日韩| 久久www免费人成看片高清| 国产精品一线二线三线精华| 成人自拍视频在线观看| 91在线观看污| 欧美日韩视频在线第一区 | 91麻豆精品国产| 精品精品国产高清一毛片一天堂| 久久综合九色综合欧美就去吻| 国产精品视频免费看| 一区二区三区国产豹纹内裤在线| 亚洲一区二区三区四区在线免费观看 | 久久久久久黄色| 亚洲欧美中日韩| 亚洲成人免费观看| 国产精品一区二区三区四区| 99在线精品一区二区三区| 欧美人妇做爰xxxⅹ性高电影| 久久亚洲一区二区三区明星换脸| 国产精品久久夜| 日本视频在线一区| 成人激情黄色小说| 欧美一区二区三区小说| 中文字幕不卡在线观看| 亚洲成人免费看| www.欧美日韩国产在线| 91精品国产丝袜白色高跟鞋| 国产精品丝袜一区|