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

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

?? pg.c

?? MIZI Research, Inc.發布的嵌入式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一区二区三区免费野_久草精品视频
99在线热播精品免费| 国产成人综合精品三级| 久久久高清一区二区三区| 93久久精品日日躁夜夜躁欧美| 日韩影院免费视频| 国产精品久99| 精品捆绑美女sm三区| 欧美性色综合网| 粉嫩av一区二区三区粉嫩| 青青草成人在线观看| 亚洲综合精品久久| 国产精品久久久久7777按摩| 久久综合九色综合久久久精品综合| 在线观看91视频| 99久久精品99国产精品| 国产成人在线视频网址| 日本不卡中文字幕| 亚洲第一在线综合网站| 最新不卡av在线| 国产亚洲精品精华液| 日韩欧美二区三区| 欧美日韩aaa| 欧美精品自拍偷拍| 欧美亚洲动漫精品| 在线一区二区观看| 色综合天天综合网国产成人综合天 | 国产美女精品在线| 日韩国产一二三区| 三级久久三级久久久| 亚洲国产一区在线观看| 91黄色免费版| 日韩激情视频在线观看| 国产精品午夜电影| 国产欧美日韩不卡| 国产日韩欧美a| 久久精品欧美一区二区三区不卡| 日韩视频免费观看高清完整版在线观看| 精品视频一区二区三区免费| 91麻豆精品视频| 色嗨嗨av一区二区三区| 91美女片黄在线观看| 91在线无精精品入口| www.色综合.com| 成人av资源网站| 99久久精品国产毛片| 91女神在线视频| 91官网在线观看| 欧美区一区二区三区| 欧美一级在线观看| 日韩欧美国产三级| 久久久综合视频| 中文字幕免费不卡| 亚洲欧洲综合另类在线| 亚洲国产精品久久人人爱| 亚洲第一搞黄网站| 麻豆一区二区三| 国产精品一级黄| 色婷婷综合久久久久中文| 亚洲综合网站在线观看| 香蕉成人伊视频在线观看| 久久精品国产色蜜蜜麻豆| 国产专区欧美精品| 波多野结衣视频一区| 色94色欧美sute亚洲线路二| 欧美日韩国产高清一区二区三区 | 成人福利视频网站| 欧美伊人久久大香线蕉综合69 | 美女视频一区在线观看| 国产美女主播视频一区| 99v久久综合狠狠综合久久| 欧美日韩三级一区二区| 欧美成人综合网站| 日韩毛片高清在线播放| 首页国产欧美日韩丝袜| 国产精品99久久久久久有的能看| www.色精品| 91精品国产综合久久久久久久久久| 久久精品欧美日韩| 一级做a爱片久久| 蜜乳av一区二区三区| av不卡一区二区三区| 欧美精品日韩一本| 国产精品无人区| 天堂成人国产精品一区| 国产成人啪午夜精品网站男同| 色婷婷av一区二区三区软件| 欧美精品乱码久久久久久按摩| 国产区在线观看成人精品| 亚洲免费在线视频一区 二区| 精品综合久久久久久8888| 91免费观看国产| 日韩一区二区电影网| 伊人色综合久久天天人手人婷| 久久99久久99小草精品免视看| 色哟哟精品一区| 国产亚洲自拍一区| 五月天激情综合网| 成人av第一页| 精品免费一区二区三区| 亚洲最快最全在线视频| 国产98色在线|日韩| 欧美美女网站色| 亚洲免费在线播放| 国产99久久久精品| 日韩欧美国产综合| 亚洲成人精品一区| 99国产精品一区| 久久久不卡影院| 国内精品视频一区二区三区八戒| 欧美日韩三级视频| 一级做a爱片久久| 91理论电影在线观看| 国产精品亲子乱子伦xxxx裸| 国内外精品视频| 欧美sm美女调教| 蜜乳av一区二区| 欧美一区二区三区在线观看| 亚洲制服丝袜av| 色8久久精品久久久久久蜜| 国产精品欧美一区二区三区| 精彩视频一区二区三区| 日韩精品一区二区三区中文精品| 日韩综合在线视频| 欧美日韩国产首页| 亚洲gay无套男同| 91搞黄在线观看| 亚洲一级二级三级| 91激情五月电影| 亚洲国产精品久久人人爱蜜臀| 色综合久久久网| 亚洲精品中文在线| 99re视频精品| 亚洲免费av网站| 色综合一个色综合亚洲| 一区二区三区在线观看欧美| 93久久精品日日躁夜夜躁欧美| 国产精品久久久久aaaa| 97久久精品人人做人人爽| 最新日韩av在线| 91麻豆精品秘密| 午夜亚洲福利老司机| 欧美高清dvd| 久久国产精品第一页| 精品国产免费久久| 韩国毛片一区二区三区| 久久久国产精华| 99视频超级精品| 亚洲一区二区三区四区不卡| 欧美精品日韩一本| 精品制服美女丁香| 国产精品美女久久久久高潮| 99久久精品免费看国产免费软件| 亚洲乱码日产精品bd| 欧美日韩国产一级| 九九九久久久精品| 国产精品久久三| 欧美亚洲高清一区| 麻豆国产精品一区二区三区| 久久久久久久久伊人| jlzzjlzz欧美大全| 性做久久久久久免费观看欧美| 91精品国产综合久久久蜜臀图片| 国产精选一区二区三区| 国产精品国产三级国产普通话蜜臀 | 99这里都是精品| 亚洲一卡二卡三卡四卡| 欧美精品久久久久久久久老牛影院| 青青草91视频| 国产精品三级久久久久三级| 91视频xxxx| 日本欧美肥老太交大片| 国产精品欧美一区二区三区| 欧美性大战xxxxx久久久| 久久av中文字幕片| 国产精品另类一区| 欧美久久一二区| 国产不卡在线播放| 亚洲成人免费视| 久久精品一区四区| 精品视频1区2区| 国产精品12区| 亚洲成人在线免费| 中文字幕精品一区| 538prom精品视频线放| 成人午夜在线播放| 日韩福利电影在线观看| 最新日韩在线视频| www一区二区| 欧美视频一二三区| 风间由美性色一区二区三区| 日韩av电影免费观看高清完整版在线观看 | 蜜桃av一区二区三区电影| 中文字幕一区二区三区蜜月| 日韩视频一区二区| 色一情一伦一子一伦一区| 国产成人免费视频精品含羞草妖精| 偷拍日韩校园综合在线| 日韩伦理电影网| 国产欧美日韩在线观看| 日韩欧美一区二区免费|