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

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

?? pg.c

?? 該文件是rt_linux
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* 	pg.c    (c) 1998  Grant R. Guenther <grant@torque.net>			  Under the terms of the GNU General Public License.	The pg driver provides a simple character device interface for	sending ATAPI commands to a device.  With the exception of the	ATAPI reset operation, all operations are performed by a pair	of read and write operations to the appropriate /dev/pgN device.	A write operation delivers a command and any outbound data in	a single buffer.  Normally, the write will succeed unless the	device is offline or malfunctioning, or there is already another	command pending.  If the write succeeds, it should be followed	immediately by a read operation, to obtain any returned data and	status information.  A read will fail if there is no operation	in progress.	As a special case, the device can be reset with a write operation,	and in this case, no following read is expected, or permitted.	There are no ioctl() operations.  Any single operation	may transfer at most PG_MAX_DATA bytes.  Note that the driver must	copy the data through an internal buffer.  In keeping with all	current ATAPI devices, command packets are assumed to be exactly	12 bytes in length.	To permit future changes to this interface, the headers in the	read and write buffers contain a single character "magic" flag.	Currently this flag must be the character "P".	By default, the driver will autoprobe for a single parallel	port ATAPI device, but if their individual parameters are	specified, the driver can handle up to 4 devices.	To use this device, you must have the following device 	special files defined:		/dev/pg0 c 97 0		/dev/pg1 c 97 1		/dev/pg2 c 97 2		/dev/pg3 c 97 3	(You'll need to change the 97 to something else if you use	the 'major' parameter to install the driver on a different	major number.)	The behaviour of the pg driver can be altered by setting	some parameters from the insmod command line.  The following	parameters are adjustable:	    drive0      These four arguments can be arrays of       	    drive1      1-6 integers as follows:	    drive2	    drive3      <prt>,<pro>,<uni>,<mod>,<slv>,<dly>			Where,		<prt>   is the base of the parallel port address for			the corresponding drive.  (required)		<pro>   is the protocol number for the adapter that			supports this drive.  These numbers are			logged by 'paride' when the protocol modules			are initialised.  (0 if not given)		<uni>   for those adapters that support chained			devices, this is the unit selector for the			chain of devices on the given port.  It should			be zero for devices that don't support chaining.			(0 if not given)		<mod>   this can be -1 to choose the best mode, or one			of the mode numbers supported by the adapter.			(-1 if not given)		<slv>   ATAPI devices can be jumpered to master or slave.			Set this to 0 to choose the master drive, 1 to			choose the slave, -1 (the default) to choose the			first drive found.		<dly>   some parallel ports require the driver to 			go more slowly.  -1 sets a default value that			should work with the chosen protocol.  Otherwise,			set this to a small integer, the larger it is			the slower the port i/o.  In some cases, setting			this to zero will speed up the device. (default -1)	    major	You may use this parameter to overide the			default major number (97) that this driver			will use.  Be sure to change the device			name as well.	    name	This parameter is a character string that			contains the name the kernel will use for this			device (in /proc output, for instance).			(default "pg").	    verbose     This parameter controls the amount of logging			that is done by the driver.  Set it to 0 for 			quiet operation, to 1 to enable progress			messages while the driver probes for devices,			or to 2 for full debug logging.  (default 0)	If this driver is built into the kernel, you can use 	the following command line parameters, with the same values	as the corresponding module parameters listed above:	    pg.drive0	    pg.drive1	    pg.drive2	    pg.drive3	In addition, you can use the parameter pg.disable to disable	the driver entirely.*//* Changes:	1.01	GRG 1998.06.16	Bug fixes	1.02    GRG 1998.09.24  Added jumbo support*/#define PG_VERSION      "1.02"#define PG_MAJOR	97#define PG_NAME		"pg"#define PG_UNITS	4#ifndef PI_PG#define PI_PG	4#endif/* Here are things one can override from the insmod command.   Most are autoprobed by paride unless set here.  Verbose is 0   by default.*/static int	verbose = 0;static int	major = PG_MAJOR;static char	*name = PG_NAME;static int      disable = 0;static int drive0[6] = {0,0,0,-1,-1,-1};static int drive1[6] = {0,0,0,-1,-1,-1};static int drive2[6] = {0,0,0,-1,-1,-1};static int drive3[6] = {0,0,0,-1,-1,-1};static int (*drives[4])[6] = {&drive0,&drive1,&drive2,&drive3};static int pg_drive_count;#define D_PRT   0#define D_PRO   1#define D_UNI   2#define D_MOD   3#define D_SLV   4#define D_DLY   5#define DU              (*drives[unit])/* end of parameters */#include <linux/module.h>#include <linux/errno.h>#include <linux/fs.h>#include <linux/devfs_fs_kernel.h>#include <linux/kernel.h>#include <linux/delay.h>#include <linux/slab.h>#include <linux/mtio.h>#include <linux/pg.h>#include <linux/wait.h>#include <linux/smp_lock.h>#include <asm/uaccess.h>#ifndef MODULE#include "setup.h"static STT pg_stt[5] = {{"drive0",6,drive0},			{"drive1",6,drive1},			{"drive2",6,drive2},			{"drive3",6,drive3},			{"disable",1,&disable}};void pg_setup( char *str, int *ints){       generic_setup(pg_stt,5,str);}#endifMODULE_PARM(verbose,"i");MODULE_PARM(major,"i");MODULE_PARM(name,"s");MODULE_PARM(drive0,"1-6i");MODULE_PARM(drive1,"1-6i");MODULE_PARM(drive2,"1-6i");MODULE_PARM(drive3,"1-6i");#include "paride.h"#define PG_SPIN_DEL     50              /* spin delay in micro-seconds  */#define PG_SPIN         200#define PG_TMO		HZ#define PG_RESET_TMO	10*HZ#define STAT_ERR        0x01#define STAT_INDEX      0x02#define STAT_ECC        0x04#define STAT_DRQ        0x08#define STAT_SEEK       0x10#define STAT_WRERR      0x20#define STAT_READY      0x40#define STAT_BUSY       0x80#define ATAPI_IDENTIFY		0x12int pg_init(void);#ifdef MODULEvoid cleanup_module( void );#endifstatic int pg_open(struct inode *inode, struct file *file);static int pg_release (struct inode *inode, struct file *file);static ssize_t pg_read(struct file * filp, char * buf, 		       size_t count, loff_t *ppos);static ssize_t pg_write(struct file * filp, const char * buf, 			size_t count, loff_t *ppos);static int pg_detect(void);static int pg_identify (int unit, int log);#define PG_NAMELEN      8struct pg_unit {	struct pi_adapter pia;    /* interface to paride layer */	struct pi_adapter *pi;	int busy;        	  /* write done, read expected */	int start;		  /* jiffies at command start */	int dlen;		  /* transfer size requested */	int timeout;		  /* timeout requested */	int status;		  /* last sense key */	int drive;		  /* drive */	int access;               /* count of active opens ... */	int present;		  /* device present ? */	char *bufptr;	char name[PG_NAMELEN];	  /* pg0, pg1, ... */	};struct pg_unit pg[PG_UNITS];/*  'unit' must be defined in all functions - either as a local or a param */#define PG pg[unit]#define PI PG.pistatic char pg_scratch[512];            /* scratch block buffer *//* kernel glue structures */static struct file_operations pg_fops = {	owner:		THIS_MODULE,	read:		pg_read,	write:		pg_write,	open:		pg_open,	release:	pg_release,};void pg_init_units( void ){       int     unit, j;	pg_drive_count = 0;	for (unit=0;unit<PG_UNITS;unit++) {		PG.pi = & PG.pia;		PG.access = 0;		PG.busy = 0;		PG.present = 0;		PG.bufptr = NULL;		PG.drive = DU[D_SLV];		j = 0;		while ((j < PG_NAMELEN-2) && (PG.name[j]=name[j])) j++;		PG.name[j++] = '0' + unit;		PG.name[j] = 0;		if (DU[D_PRT]) pg_drive_count++;	}} static devfs_handle_t devfs_handle;int pg_init (void)      /* preliminary initialisation */{       int unit;	if (disable) return -1;	pg_init_units();	if (pg_detect()) return -1;	if (devfs_register_chrdev(major,name,&pg_fops)) {		printk("pg_init: unable to get major number %d\n",			major);		for (unit=0;unit<PG_UNITS;unit++)		  if (PG.present) pi_release(PI);		return -1;	}	devfs_handle = devfs_mk_dir (NULL, "pg", NULL);	devfs_register_series (devfs_handle, "%u", 4, DEVFS_FL_DEFAULT,			       major, 0, S_IFCHR | S_IRUSR | S_IWUSR,			       &pg_fops, NULL);	return 0;}#ifdef MODULE/* Glue for modules ... */void    cleanup_module(void);int     init_module(void){       int     err;#ifdef PARIDE_JUMBO       { extern paride_init();         paride_init();       } #endif	err = pg_init();	return err;}void    cleanup_module(void){       int unit;	devfs_unregister (devfs_handle);	devfs_unregister_chrdev(major,name);	for (unit=0;unit<PG_UNITS;unit++)	  if (PG.present) pi_release(PI);}#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品人人做| 日本不卡视频一二三区| 午夜精品福利在线| 国产一二三精品| 91高清在线观看| 久久久精品欧美丰满| 丝袜诱惑亚洲看片| 色婷婷久久久久swag精品 | 久久综合九色欧美综合狠狠| 亚洲美腿欧美偷拍| 国产99久久久国产精品潘金网站| 色成年激情久久综合| 国产女同互慰高潮91漫画| 免费高清不卡av| 欧美做爰猛烈大尺度电影无法无天| 久久久电影一区二区三区| 麻豆精品视频在线| 3751色影院一区二区三区| 一区二区三区四区乱视频| 成人亚洲精品久久久久软件| 精品欧美乱码久久久久久| 日本欧洲一区二区| 欧美日韩视频在线观看一区二区三区 | 国产精品久久久久久久久免费桃花 | 亚洲香蕉伊在人在线观| www.欧美亚洲| 亚洲国产精品成人综合| 国产精品一区免费视频| 久久综合狠狠综合久久综合88| 久久9热精品视频| 日韩精品一区二区三区视频| 看片网站欧美日韩| 欧美videos中文字幕| 激情图片小说一区| 久久色中文字幕| 国产精品1区2区3区| 欧美国产日韩精品免费观看| 国产精品88888| 国产精品久久久久永久免费观看 | 久久爱另类一区二区小说| 日韩亚洲欧美成人一区| 日本va欧美va瓶| 精品国产露脸精彩对白| 国内欧美视频一区二区| 欧美精品一区二区三区蜜桃视频 | 日本一区二区三区四区| 成人黄色在线视频| 自拍偷拍欧美精品| 欧美性三三影院| 热久久国产精品| 久久午夜免费电影| 色综合天天综合网天天狠天天| 亚洲风情在线资源站| 亚洲一区二区三区视频在线| 色视频欧美一区二区三区| 91传媒视频在线播放| 欧美亚男人的天堂| 精品国产一区二区三区不卡| 欧美激情资源网| 亚洲一区二区三区免费视频| 91片黄在线观看| 最新日韩av在线| 国产农村妇女毛片精品久久麻豆| 成人短视频下载| 亚洲电影在线播放| 久久综合一区二区| 日本伦理一区二区| 精品亚洲国内自在自线福利| 中文字幕亚洲成人| 91麻豆精品91久久久久久清纯| 国产精品中文有码| 亚洲成人免费视| 国产午夜精品久久| 欧美日韩一区二区在线视频| 精品综合久久久久久8888| 成人欧美一区二区三区小说 | 丁香六月综合激情| 香蕉成人啪国产精品视频综合网| 久久综合久久99| 欧美日韩精品是欧美日韩精品| 国产精品小仙女| 日韩av成人高清| 亚洲欧美日韩国产中文在线| 久久精品在这里| 欧美美女bb生活片| 色综合一个色综合| 国产suv精品一区二区883| 日韩中文字幕区一区有砖一区 | 午夜精品福利视频网站| 国产三级欧美三级日产三级99| 欧美性猛交一区二区三区精品| 国产精品自拍三区| 久久超碰97人人做人人爱| 午夜精品福利一区二区三区av| 亚洲人123区| 国产性色一区二区| 亚洲精品在线电影| 在线视频你懂得一区| 成人久久视频在线观看| 国产呦精品一区二区三区网站| 日韩制服丝袜先锋影音| 亚洲一区自拍偷拍| 亚洲男同1069视频| 1000精品久久久久久久久| 久久久99久久| 精品国产露脸精彩对白| 精品国产露脸精彩对白| 6080日韩午夜伦伦午夜伦| 欧美日韩日日夜夜| 欧美日本在线视频| 欧美日韩精品一区二区在线播放| 色婷婷综合久久久| 色综合激情五月| 欧美亚一区二区| 欧洲一区二区三区在线| 欧洲亚洲精品在线| 欧美精品一卡两卡| 日韩一区二区三区电影| 日韩一级视频免费观看在线| 日韩一区二区三区电影| 欧美成va人片在线观看| 337p粉嫩大胆色噜噜噜噜亚洲| 精品欧美一区二区在线观看| 久久蜜臀中文字幕| 亚洲国产成人一区二区三区| 国产精品久久久久久久岛一牛影视| 日本一区二区三区高清不卡| 国产精品五月天| 亚洲色图欧美偷拍| 婷婷综合另类小说色区| 美腿丝袜亚洲色图| 国产一区二区三区精品视频| 成人午夜看片网址| 色狠狠色狠狠综合| 日韩欧美综合在线| 日本一区二区免费在线观看视频| 国产精品白丝在线| 一区二区三区四区在线免费观看| 亚洲高清免费视频| 国模娜娜一区二区三区| 成人av电影在线| 欧美色图第一页| 精品免费一区二区三区| 国产精品视频免费| 午夜精品福利久久久| 国产91精品一区二区麻豆亚洲| 成人av免费网站| 欧美日韩一本到| 久久麻豆一区二区| 一区二区国产视频| 精品一区二区三区视频| 99久久综合色| 欧美videofree性高清杂交| 中文字幕av在线一区二区三区| 一区二区欧美精品| 久久国产精品一区二区| 91麻豆6部合集magnet| 日韩欧美资源站| 一区二区三区四区av| 精品一区二区三区免费视频| 一本高清dvd不卡在线观看 | 色婷婷综合久久久中文字幕| 精品福利视频一区二区三区| 亚洲欧洲日本在线| 精品亚洲成a人| 欧美喷水一区二区| 国产精品久99| 狠狠色综合日日| 精品视频一区三区九区| 国产精品沙发午睡系列990531| 老司机免费视频一区二区| 色婷婷精品久久二区二区蜜臂av | 欧美xxxx老人做受| 亚洲一区二区在线播放相泽| 国产成人夜色高潮福利影视| 7777精品伊人久久久大香线蕉经典版下载| 国产精品无人区| 国产成人免费在线观看不卡| 欧美日韩免费观看一区三区| 国产欧美日韩视频一区二区| 日本中文一区二区三区| 欧美性色黄大片| 亚洲蜜臀av乱码久久精品蜜桃| 国产mv日韩mv欧美| 久久久www免费人成精品| 日本少妇一区二区| 欧美女孩性生活视频| 亚洲国产中文字幕| 一本色道久久综合亚洲aⅴ蜜桃 | 一本色道久久加勒比精品| 国产拍揄自揄精品视频麻豆| 久久精品国内一区二区三区| 欧美精品成人一区二区三区四区| 亚洲男人的天堂一区二区| 97久久精品人人爽人人爽蜜臀| 欧美激情一区在线观看| 丁香激情综合五月| 欧美激情综合在线| 国产ts人妖一区二区| 国产精品超碰97尤物18|