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

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

?? ide3.c

?? ucos在三星s3c44b0上的ide程序
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
			return 0;	}	*startstop = ide_error(drive, "status error", stat);	return 1;}/* * execute_drive_cmd() issues a special drive command, * usually initiated by ioctl() from the external hdparm program. */static ide_startstop_t execute_drive_cmd (ide_drive_t *drive, struct request *rq){ 	switch(rq->cmd) { 		case IDE_DRIVE_TASKFILE: 		{ 			ide_task_t *args = rq->special;  			if (!(args)) break; #ifdef CONFIG_IDE_TASK_IOCTL_DEBUG	{	printk(KERN_INFO "%s: ", drive->name);//	printk("TF.0=x%02x ", args->tfRegister[IDE_DATA_OFFSET]);	printk("TF.1=x%02x ", args->tfRegister[IDE_FEATURE_OFFSET]);	printk("TF.2=x%02x ", args->tfRegister[IDE_NSECTOR_OFFSET]);	printk("TF.3=x%02x ", args->tfRegister[IDE_SECTOR_OFFSET]);	printk("TF.4=x%02x ", args->tfRegister[IDE_LCYL_OFFSET]);	printk("TF.5=x%02x ", args->tfRegister[IDE_HCYL_OFFSET]);	printk("TF.6=x%02x ", args->tfRegister[IDE_SELECT_OFFSET]);	printk("TF.7=x%02x\n", args->tfRegister[IDE_COMMAND_OFFSET]);	printk(KERN_INFO "%s: ", drive->name);//	printk("HTF.0=x%02x ", args->hobRegister[IDE_DATA_OFFSET_HOB]);	printk("HTF.1=x%02x ", args->hobRegister[IDE_FEATURE_OFFSET_HOB]);	printk("HTF.2=x%02x ", args->hobRegister[IDE_NSECTOR_OFFSET_HOB]);	printk("HTF.3=x%02x ", args->hobRegister[IDE_SECTOR_OFFSET_HOB]);	printk("HTF.4=x%02x ", args->hobRegister[IDE_LCYL_OFFSET_HOB]);	printk("HTF.5=x%02x ", args->hobRegister[IDE_HCYL_OFFSET_HOB]);	printk("HTF.6=x%02x ", args->hobRegister[IDE_SELECT_OFFSET_HOB]);	printk("HTF.7=x%02x\n", args->hobRegister[IDE_CONTROL_OFFSET_HOB]);	}#endif /* CONFIG_IDE_TASK_IOCTL_DEBUG *///			if (args->tf_out_flags.all == 0) { 			do_taskfile(drive, 				(struct hd_drive_task_hdr *)&args->tfRegister,				(struct hd_drive_hob_hdr *)&args->hobRegister, 				args->handler);//			} else {//				return flagged_taskfile(drive, args);//			}  			if (((args->command_type == IDE_DRIVE_TASK_RAW_WRITE) || 			     (args->command_type == IDE_DRIVE_TASK_OUT)) &&			      args->prehandler && args->handler)				return args->prehandler(drive, rq); 			return ide_started; 		} 		case IDE_DRIVE_TASK: 		{ 			byte *args = rq->buffer; 			byte sel;  			if (!(args)) break;#ifdef DEBUG 			printk("%s: DRIVE_TASK_CMD ", drive->name); 			printk("cmd=0x%02x ", args[0]); 			printk("fr=0x%02x ", args[1]); 			printk("ns=0x%02x ", args[2]); 			printk("sc=0x%02x ", args[3]); 			printk("lcyl=0x%02x ", args[4]); 			printk("hcyl=0x%02x ", args[5]); 			printk("sel=0x%02x\n", args[6]);#endif 			OUT_BYTE(args[1], IDE_FEATURE_REG); 			OUT_BYTE(args[3], IDE_SECTOR_REG); 			OUT_BYTE(args[4], IDE_LCYL_REG); 			OUT_BYTE(args[5], IDE_HCYL_REG); 			sel = (args[6] & ~0x10); 			if (drive->select.b.unit) 				sel |= 0x10; 			OUT_BYTE(sel, IDE_SELECT_REG); 			ide_cmd(drive, args[0], args[2], &drive_cmd_intr); 			return ide_started; 		} 		case IDE_DRIVE_CMD: 		{ 			byte *args = rq->buffer;  			if (!(args)) break;#ifdef DEBUG 			printk("%s: DRIVE_CMD ", drive->name); 			printk("cmd=0x%02x ", args[0]); 			printk("sc=0x%02x ", args[1]); 			printk("fr=0x%02x ", args[2]); 			printk("xx=0x%02x\n", args[3]);#endif 			if (args[0] == WIN_SMART) { 				OUT_BYTE(0x4f, IDE_LCYL_REG); 				OUT_BYTE(0xc2, IDE_HCYL_REG); 				OUT_BYTE(args[2],IDE_FEATURE_REG); 				OUT_BYTE(args[1],IDE_SECTOR_REG); 				ide_cmd(drive, args[0], args[3], &drive_cmd_intr); 				return ide_started; 			} 			OUT_BYTE(args[2],IDE_FEATURE_REG); 			ide_cmd(drive, args[0], args[1], &drive_cmd_intr); 			return ide_started; 		} 		default: 			break; 	} 	/* 	 * NULL is actually a valid way of waiting for 	 * all current requests to be flushed from the queue. 	 */#ifdef DEBUG 	printk("%s: DRIVE_CMD (null)\n", drive->name);#endif 	ide_end_drive_cmd(drive, GET_STAT(), GET_ERR()); 	return ide_stopped;}/* * start_request() initiates handling of a new I/O request * needed to reverse the perverted changes anonymously made back * 2.3.99-pre6 */static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq){	ide_startstop_t startstop;	unsigned long block, blockend;	unsigned int minor = MINOR(rq->rq_dev), unit = minor >> PARTN_BITS;	ide_hwif_t *hwif = HWIF(drive);#ifdef DEBUG	printk("%s: start_request: current=0x%08lx\n", hwif->name, (unsigned long) rq);#endif	/* bail early if we've exceeded max_failures */	if (drive->max_failures && (drive->failures > drive->max_failures)) {		goto kill_rq;	}	if (unit >= MAX_DRIVES) {		printk("%s: bad device number: %s\n", hwif->name, kdevname(rq->rq_dev));		goto kill_rq;	}#ifdef DEBUG	if (rq->bh && !buffer_locked(rq->bh)) {		printk("%s: block not locked\n", drive->name);		goto kill_rq;	}#endif	block    = rq->sector;	blockend = block + rq->nr_sectors;	if ((rq->cmd == READ || rq->cmd == WRITE) &&	    (drive->media == ide_disk || drive->media == ide_floppy)) {		if ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) {			printk("%s%c: bad access: block=%ld, count=%ld\n", drive->name,			 (minor&PARTN_MASK)?'0'+(minor&PARTN_MASK):' ', block, rq->nr_sectors);			goto kill_rq;		}		block += drive->part[minor&PARTN_MASK].start_sect + drive->sect0;	}	/* Yecch - this will shift the entire interval,	   possibly killing some innocent following sector */	if (block == 0 && drive->remap_0_to_1 == 1)		block = 1;  /* redirect MBR access to EZ-Drive partn table */#if (DISK_RECOVERY_TIME > 0)	while ((read_timer() - hwif->last_time) < DISK_RECOVERY_TIME);#endif	SELECT_DRIVE(hwif, drive);	if (ide_wait_stat(&startstop, drive, drive->ready_stat, BUSY_STAT|DRQ_STAT, WAIT_READY)) {		printk("%s: drive not ready for command\n", drive->name);		return startstop;	}	if (!drive->special.all) {		switch(rq->cmd) {			case IDE_DRIVE_CMD:			case IDE_DRIVE_TASK:			case IDE_DRIVE_TASKFILE:				return execute_drive_cmd(drive, rq);			default:				break;		}		if (drive->driver != NULL) {			return (DRIVER(drive)->do_request(drive, rq, block));		}		printk("%s: media type %d not supported\n", drive->name, drive->media);		goto kill_rq;	}	return do_special(drive);kill_rq:	if (drive->driver != NULL)		DRIVER(drive)->end_request(0, HWGROUP(drive));	else		ide_end_request(0, HWGROUP(drive));	return ide_stopped;}ide_startstop_t restart_request (ide_drive_t *drive){	ide_hwgroup_t *hwgroup = HWGROUP(drive);	unsigned long flags;	struct request *rq;	spin_lock_irqsave(&io_request_lock, flags);	hwgroup->handler = NULL;	del_timer(&hwgroup->timer);	rq = hwgroup->rq;	spin_unlock_irqrestore(&io_request_lock, flags);	return start_request(drive, rq);}/* * ide_stall_queue() can be used by a drive to give excess bandwidth back * to the hwgroup by sleeping for timeout jiffies. */void ide_stall_queue (ide_drive_t *drive, unsigned long timeout){	if (timeout > WAIT_WORSTCASE)		timeout = WAIT_WORSTCASE;	drive->sleep = timeout + jiffies;}#define WAKEUP(drive)	((drive)->service_start + 2 * (drive)->service_time)/* * choose_drive() selects the next drive which will be serviced. */static inline ide_drive_t *choose_drive (ide_hwgroup_t *hwgroup){	ide_drive_t *drive, *best;repeat:		best = NULL;	drive = hwgroup->drive;	do {		if (!list_empty(&drive->queue.queue_head) && (!drive->sleep || 0 <= (signed long)(jiffies - drive->sleep))) {			if (!best			 || (drive->sleep && (!best->sleep || 0 < (signed long)(best->sleep - drive->sleep)))			 || (!best->sleep && 0 < (signed long)(WAKEUP(best) - WAKEUP(drive))))			{				if( !drive->queue.plugged )					best = drive;			}		}	} while ((drive = drive->next) != hwgroup->drive);	if (best && best->nice1 && !best->sleep && best != hwgroup->drive && best->service_time > WAIT_MIN_SLEEP) {		long t = (signed long)(WAKEUP(best) - jiffies);		if (t >= WAIT_MIN_SLEEP) {			/*			 * We *may* have some time to spare, but first let's see if			 * someone can potentially benefit from our nice mood today..			 */			drive = best->next;			do {				if (!drive->sleep				 && 0 < (signed long)(WAKEUP(drive) - (jiffies - best->service_time))				 && 0 < (signed long)((jiffies + t) - WAKEUP(drive)))				{					ide_stall_queue(best, IDE_MIN(t, 10 * WAIT_MIN_SLEEP));					goto repeat;				}			} while ((drive = drive->next) != best);		}	}	return best;}/* * Issue a new request to a drive from hwgroup * Caller must have already done spin_lock_irqsave(&io_request_lock, ..); * * A hwgroup is a serialized group of IDE interfaces.  Usually there is * exactly one hwif (interface) per hwgroup, but buggy controllers (eg. CMD640) * may have both interfaces in a single hwgroup to "serialize" access. * Or possibly multiple ISA interfaces can share a common IRQ by being grouped * together into one hwgroup for serialized access. * * Note also that several hwgroups can end up sharing a single IRQ, * possibly along with many other devices.  This is especially common in * PCI-based systems with off-board IDE controller cards. * * The IDE driver uses the single global io_request_lock spinlock to protect * access to the request queues, and to protect the hwgroup->busy flag. * * The first thread into the driver for a particular hwgroup sets the * hwgroup->busy flag to indicate that this hwgroup is now active, * and then initiates processing of the top request from the request queue. * * Other threads attempting entry notice the busy setting, and will simply * queue their new requests and exit immediately.  Note that hwgroup->busy * remains set even when the driver is merely awaiting the next interrupt. * Thus, the meaning is "this hwgroup is busy processing a request". * * When processing of a request completes, the completing thread or IRQ-handler * will start the next request from the queue.  If no more work remains, * the driver will clear the hwgroup->busy flag and exit. * * The io_request_lock (spinlock) is used to protect all access to the * hwgroup->busy flag, but is otherwise not needed for most processing in * the driver.  This makes the driver much more friendlier to shared IRQs * than previous designs, while remaining 100% (?) SMP safe and capable. *//* --BenH: made non-static as ide-pmac.c uses it to kick the hwgroup back *         into life on wakeup from machine sleep. */ void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq){	ide_drive_t	*drive;	ide_hwif_t	*hwif;	struct request	*rq;	ide_startstop_t	startstop;	ide_get_lock(&ide_lock, ide_intr, hwgroup);	/* for atari only: POSSIBLY BROKEN HERE(?) */	__cli();	/* necessary paranoia: ensure IRQs are masked on local CPU */	while (!hwgroup->busy) {		hwgroup->busy = 1;		drive = choose_drive(hwgroup);		if (drive == NULL) {			unsigned long sleep = 0;			hwgroup->rq = NULL;			drive = hwgroup->drive;			do {				if (drive->sleep && (!sleep || 0 < (signed long)(sleep - drive->sleep)))					sleep = drive->sleep;			} while ((drive = drive->next) != hwgroup->drive);			if (sleep) {				/*				 * Take a short snooze, and then wake up this hwgroup again.				 * This gives other hwgroups on the same a chance to				 * play fairly with us, just in case there are big differences				 * in relative throughputs.. don't want to hog the cpu too much.				 */				if (0 < (signed long)(jiffies + WAIT_MIN_SLEEP - sleep)) 					sleep = jiffies + WAIT_MIN_SLEEP;#if 1				if (timer_pending(&hwgroup->timer))					printk("ide_set_handler: timer already active\n");#endif				hwgroup->sleeping = 1;	/* so that ide_timer_expiry knows what to do */				mod_timer(&hwgroup->timer, sleep);				/* we purposely leave hwgroup->busy==1 while sleeping */			} else {				/* Ugly, but how can we sleep for the lock otherwise? perhaps from tq_disk? */				ide_release_lock(&ide_lock);	/* for atari only */				hwgroup->busy = 0;			}			return;		/* no more work for this hwgroup (for now) */		}		hwif = HWIF(drive);		if (hwgroup->hwif->sharing_irq && hwif != hwgroup->hwif && hwif->hw.io_ports[IDE_CONTROL_OFFSET]) {			/* set nIEN for previous hwif */			SELECT_INTERRUPT(hwif, drive);		}		hwgroup->hwif = hwif;		hwgroup->drive = drive;		drive->sleep = 0;		drive->service_start = jiffies;		if ( drive->queue.plugged )	/* paranoia */			printk("%s: Huh? nuking plugged queue\n", drive->name);		rq = hwgroup->rq = blkdev_entry_next_request(&drive->queue.queue_head);		/*		 * Some systems have trouble with IDE IRQs arriving while		 * the driver is still setting things up.  So, here we disable		 * the IRQ used by this interface while the request is being started.		 * This may look bad at first, but pretty much the same thing		 * happens anyway when any interrupt comes in, IDE or otherwise		 *  -- the kernel masks the IRQ while it is being handled.		 */		if (masked_irq && hwif->hw.irq != masked_irq)			disable_irq_nosync(hwif->hw.irq);		spin_unlock(&io_request_lock);		ide__sti();	/* allow other IRQs while we start this request */		startstop = start_request(drive, rq);		spin_lock_irq(&io_request_lock);		if (masked_irq && hwif->hw.irq != masked_irq)			enable_irq(hwif->hw.irq);		if (startstop == ide_stopped)			hwgroup->busy = 0;	}}/* * ide_get_queue() returns the queue which corresponds to a given device. */request_queue_t *ide_get_queue (kdev_t dev){	ide_hwif_t *hwif = (ide_hwif_t *)blk_dev[MAJOR(dev)].data;	return &hwif->drives[DEVICE_NR(dev) & 1].queue;}/* * Passes the stuff to ide_do_request */void do_ide_request(request_queue_t *q){	ide_do_request(q->queuedata, 0);}/* * un-busy the hwgroup etc, and clear any pending DMA status. we want to * retry the current request in pio mode instead of risking tossing it

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产黄色精品视频| 伦理电影国产精品| 精品少妇一区二区三区在线播放| 国产宾馆实践打屁股91| 天堂av在线一区| 国产精品久久久久精k8| 日韩免费视频一区二区| 91色视频在线| 国产精品乡下勾搭老头1| 石原莉奈在线亚洲二区| 亚洲丝袜精品丝袜在线| 久久夜色精品国产噜噜av| 欧美精品xxxxbbbb| 91欧美一区二区| 成人在线综合网站| 精品中文字幕一区二区| 亚洲第一二三四区| 亚洲美女区一区| 中文字幕一区二区三区四区| 亚洲精品在线观看网站| 日韩一区二区三区观看| 欧美在线不卡视频| 色综合久久久久综合体桃花网| 国产黄人亚洲片| 精品一区二区三区在线播放| 亚洲成a人片综合在线| 悠悠色在线精品| 综合网在线视频| 国产精品免费av| 中文欧美字幕免费| 国产精品欧美精品| 欧美国产1区2区| 久久蜜桃av一区精品变态类天堂 | 五月天激情综合| 亚洲黄色片在线观看| 亚洲视频1区2区| 亚洲色图欧美偷拍| 亚洲日本护士毛茸茸| 国产精品不卡在线| 中文字幕中文字幕在线一区| 国产精品动漫网站| 亚洲特级片在线| 亚洲男同1069视频| 一级中文字幕一区二区| 一区二区三区精品视频| 亚洲宅男天堂在线观看无病毒| 一卡二卡三卡日韩欧美| 亚洲一区自拍偷拍| 爽好多水快深点欧美视频| 日韩激情中文字幕| 美女性感视频久久| 国产高清在线精品| www.日韩精品| 在线亚洲免费视频| 91麻豆精品国产自产在线观看一区 | 欧美日本一区二区三区四区| 欧美精品丝袜久久久中文字幕| 亚洲三级视频在线观看| 亚洲在线中文字幕| 偷拍日韩校园综合在线| 蜜桃视频在线观看一区| 国模大尺度一区二区三区| 国产成人av电影| 在线亚洲人成电影网站色www| 欧美理论片在线| 精品国内片67194| 国产精品久久国产精麻豆99网站| 亚洲免费电影在线| 奇米一区二区三区| 丁香婷婷综合激情五月色| 91猫先生在线| 日韩一区二区在线观看视频 | 亚洲欧美另类图片小说| 亚洲午夜久久久| 乱中年女人伦av一区二区| 丁香六月综合激情| 欧美图区在线视频| 久久综合九色综合97婷婷| 亚洲男同1069视频| 久久精品99国产精品日本| av成人老司机| 欧美一区二区视频在线观看 | 日韩精品电影在线| 成人午夜在线视频| 欧美日本一区二区三区| 国产欧美日韩综合| 亚洲18女电影在线观看| 国产大陆a不卡| 欧美性感一类影片在线播放| 日韩视频一区二区三区| 国产成人鲁色资源国产91色综 | 在线日韩av片| 久久网站热最新地址| 亚洲在线一区二区三区| 国产成人精品免费在线| 欧美日韩三级一区二区| 中文字幕的久久| 男男成人高潮片免费网站| 91蜜桃传媒精品久久久一区二区| 日韩午夜电影在线观看| 亚洲精品v日韩精品| 国产一区二区三区四区五区美女 | 精品一区二区成人精品| 色悠悠亚洲一区二区| 久久久亚洲午夜电影| 天天影视涩香欲综合网| 91香蕉国产在线观看软件| 欧美精品一区二区三区高清aⅴ | 久久精品在线免费观看| 日韩高清不卡一区二区| 91视频在线看| 国产视频一区二区在线| 裸体歌舞表演一区二区| 欧美日韩aaaaaa| 亚洲香蕉伊在人在线观| 99国产精品久久久久久久久久| 精品久久一区二区| 日本不卡不码高清免费观看| 欧美性色黄大片手机版| 成人免费一区二区三区在线观看| 国产在线一区观看| 欧美videos中文字幕| 婷婷中文字幕一区三区| 在线观看免费一区| 亚洲精品网站在线观看| 91网上在线视频| 最近日韩中文字幕| av在线一区二区| 国产精品国产三级国产| 国产aⅴ精品一区二区三区色成熟| 欧美大胆人体bbbb| 麻豆成人免费电影| 日韩欧美国产电影| 强制捆绑调教一区二区| 欧美一级片在线| 婷婷丁香久久五月婷婷| 欧美日韩免费观看一区二区三区| 亚洲综合视频网| 欧美三级中文字幕| 首页综合国产亚洲丝袜| 欧美一区二区观看视频| 秋霞午夜av一区二区三区| 日韩一区二区三区四区 | 国产成人精品一区二区三区四区 | 国产不卡免费视频| 国产精品乱子久久久久| 成人国产精品视频| 国产精品传媒视频| 色婷婷狠狠综合| 亚洲超碰97人人做人人爱| 欧美日韩一区在线| 人人超碰91尤物精品国产| 欧美电影免费提供在线观看| 国产一区二区三区免费在线观看| 欧美国产在线观看| 色婷婷av一区二区三区软件| 亚洲一区视频在线| 欧美一级日韩一级| 国产成人av电影免费在线观看| 亚洲欧美一区二区在线观看| 色国产综合视频| 青草av.久久免费一区| 久久精品日韩一区二区三区| 成人app软件下载大全免费| 一区二区国产视频| 欧美一区二区三区播放老司机 | 欧美色综合影院| 蜜臀久久久99精品久久久久久| 久久久久国产精品麻豆| 91社区在线播放| 麻豆久久久久久久| 国产精品久久久久婷婷二区次| 欧美性一区二区| 黑人巨大精品欧美一区| 亚洲欧美日韩国产综合| 欧美一区二区三区免费大片| 成人综合在线观看| 午夜精品久久久| 欧美激情在线一区二区| 欧美三级在线播放| 国产伦精一区二区三区| 一区二区三区四区精品在线视频| 日韩精品影音先锋| 91浏览器入口在线观看| 久草精品在线观看| 亚洲美女电影在线| 久久综合色8888| 欧美午夜在线观看| 国产成人h网站| 天天综合日日夜夜精品| 国产精品国产精品国产专区不片 | 91精品国产综合久久久久久漫画| 国产成人精品1024| 日韩高清一区在线| 亚洲三级小视频| 久久久精品2019中文字幕之3| 欧美另类变人与禽xxxxx| www.欧美日韩| 国模少妇一区二区三区| 三级不卡在线观看|