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

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

?? atari_bionet.c

?? linux和2410結(jié)合開發(fā) 用他可以生成2410所需的zImage文件
?? 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/slab.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");MODULE_PARM_DESC(bionet_debug, "bionet debug level (0-2)");MODULE_LICENSE("GPL");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;	static int no_more_found;	/* 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);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色94色欧美sute亚洲线路一久| 蜜臀av在线播放一区二区三区| 国产成人精品免费| 久久免费电影网| 成人小视频免费观看| 中文字幕一区二区不卡| 色猫猫国产区一区二在线视频| 亚洲综合成人在线视频| 欧美日韩二区三区| 蜜乳av一区二区| 中文字幕精品—区二区四季| 成人福利在线看| 亚洲第一久久影院| 精品欧美黑人一区二区三区| 国产99久久久国产精品潘金网站| 国产精品久久毛片| 欧美美女bb生活片| 激情亚洲综合在线| 亚洲天堂中文字幕| 8v天堂国产在线一区二区| 国产一区二区三区美女| 日韩一区在线看| 日韩欧美一级二级三级久久久| 国产69精品一区二区亚洲孕妇| 亚洲欧美另类小说| 精品国产一区二区亚洲人成毛片 | 中文字幕一区二区三区在线不卡| 成人18视频在线播放| 亚洲国产美女搞黄色| 精品国产乱码久久久久久1区2区 | 懂色一区二区三区免费观看| 亚洲伦理在线免费看| 日韩一区国产二区欧美三区| 岛国精品在线观看| 日本午夜精品一区二区三区电影| 国产欧美日韩不卡| 7777精品伊人久久久大香线蕉经典版下载 | 激情五月婷婷综合网| 一区二区视频在线| 久久影院电视剧免费观看| 91网上在线视频| 欧美日韩一区二区在线视频| 成人性生交大片免费看在线播放| 香蕉久久夜色精品国产使用方法| 久久久久久久免费视频了| 欧美色爱综合网| 成熟亚洲日本毛茸茸凸凹| 日韩成人av影视| 亚洲女女做受ⅹxx高潮| 久久精品水蜜桃av综合天堂| 欧美色电影在线| 99在线视频精品| 韩国女主播成人在线观看| 亚洲成人免费视| 亚洲精品精品亚洲| 中文无字幕一区二区三区| 精品福利视频一区二区三区| 欧美精品黑人性xxxx| 色综合久久天天| av在线一区二区| 成人综合婷婷国产精品久久 | 日韩av午夜在线观看| 亚洲欧美福利一区二区| 国产精品久线在线观看| 国产欧美一区二区三区在线看蜜臀| 欧美一级日韩免费不卡| 欧美狂野另类xxxxoooo| 欧美日韩亚洲综合在线 | 91啪在线观看| 成人免费视频视频| 成人精品gif动图一区| 国产麻豆成人传媒免费观看| 久久成人免费网| 久久不见久久见中文字幕免费| 天天影视涩香欲综合网| 亚洲1区2区3区视频| 亚洲图片欧美色图| 亚洲大片在线观看| 亚瑟在线精品视频| 五月天一区二区三区| 亚洲h在线观看| 亚洲va在线va天堂| 日本网站在线观看一区二区三区| 亚洲成人av在线电影| 亚洲图片有声小说| 天堂影院一区二区| 另类人妖一区二区av| 国内精品免费**视频| 国产精品一区二区三区网站| 国产一区二区导航在线播放| 国产麻豆成人精品| 不卡影院免费观看| 色综合久久综合网97色综合 | 一区二区三区四区国产精品| 一区二区三区资源| 三级一区在线视频先锋| 久久成人免费网| 高清成人免费视频| 91视频在线看| 欧美一区二区视频观看视频| 精品国产三级a在线观看| 国产女人18水真多18精品一级做| ●精品国产综合乱码久久久久 | 欧美综合一区二区三区| 欧美高清精品3d| 久久综合色一综合色88| 中文字幕五月欧美| 亚洲国产日韩一级| 国产精品一区二区91| av中文字幕一区| 欧美丰满一区二区免费视频| 精品电影一区二区| 亚洲欧美日韩小说| 蜜臀av性久久久久蜜臀aⅴ| 久久97超碰色| 色呦呦国产精品| 精品少妇一区二区三区免费观看| 中文字幕欧美激情一区| 日日摸夜夜添夜夜添精品视频 | 91亚洲男人天堂| 在线不卡一区二区| 国产欧美日产一区| 五月天亚洲精品| 成人午夜视频免费看| 欧美久久久久久久久久 | 一区在线观看视频| 麻豆精品视频在线观看视频| 成人夜色视频网站在线观看| 欧美日韩一二区| 国产精品久线观看视频| 久久精品99久久久| 欧美日韩精品免费观看视频| 国产日韩欧美精品一区| 日韩国产成人精品| 色婷婷精品大在线视频| 久久久国产一区二区三区四区小说 | 欧美伦理影视网| 国产精品三级av在线播放| 日本亚洲视频在线| 欧美又粗又大又爽| 国产精品久久久久久一区二区三区| 蜜桃av一区二区| 欧美日韩精品免费| 一区二区三区小说| 不卡视频在线看| 麻豆精品新av中文字幕| 欧美在线综合视频| 中文字幕一区二区三区在线观看| 久久精品国产一区二区三区免费看| 91福利在线播放| 亚洲素人一区二区| 成人午夜视频免费看| 欧美精品一区男女天堂| 亚洲图片欧美一区| 欧美午夜片在线看| 自拍av一区二区三区| 成人午夜av电影| 国产视频亚洲色图| 国产精品一卡二卡| 精品国产露脸精彩对白| 久久精品国产成人一区二区三区 | 欧美一区二区网站| 日韩高清欧美激情| 91精品免费观看| 午夜精品在线视频一区| 欧美优质美女网站| 亚洲第一二三四区| 欧美精品三级日韩久久| 日本色综合中文字幕| 欧美一区二区三区日韩| 美腿丝袜亚洲色图| 精品日韩99亚洲| 国产精品99久久久久久有的能看| 26uuu亚洲| 丁香六月久久综合狠狠色| 国产精品素人一区二区| av资源站一区| 亚洲午夜在线电影| 欧美精品少妇一区二区三区| 麻豆一区二区三| 欧美精品一区视频| 岛国精品在线观看| 一区二区三区中文字幕精品精品| 欧美自拍丝袜亚洲| 日韩高清不卡在线| 久久亚洲捆绑美女| www.亚洲免费av| 亚洲尤物在线视频观看| 欧美老女人在线| 精品一区二区免费在线观看| 精品处破学生在线二十三| 国产成人精品免费看| 日韩伦理av电影| 欧美日韩三级视频| 狠狠网亚洲精品| 最近中文字幕一区二区三区| 亚洲一区二区三区不卡国产欧美| 久久成人免费电影| 国产精品99久久久久久似苏梦涵 | 蜜桃av一区二区在线观看|