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

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

?? ide-io.c

?? ep9315平臺下硬盤驅動的源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
 *	back. */ide_startstop_t do_special (ide_drive_t *drive){	special_t *s = &drive->special;#ifdef DEBUG	printk("%s: do_special: 0x%02x\n", drive->name, s->all);#endif	if (s->b.set_tune) {		s->b.set_tune = 0;		if (HWIF(drive)->tuneproc != NULL)			HWIF(drive)->tuneproc(drive, drive->tune_req);		return ide_stopped;	}	else		return DRIVER(drive)->special(drive);}EXPORT_SYMBOL(do_special);/** *	execute_drive_command	-	issue special drive command *	@drive: the drive to issue th command on *	@rq: the request structure holding the command * *	execute_drive_cmd() issues a special drive command,  usually  *	initiated by ioctl() from the external hdparm program. The *	command can be a drive command, drive task or taskfile  *	operation. Weirdly you can call it with NULL to wait for *	all commands to finish. Don't do this as that is due to change */ide_startstop_t execute_drive_cmd (ide_drive_t *drive, struct request *rq){	ide_hwif_t *hwif = HWIF(drive); 	switch(rq->cmd) { 		case IDE_DRIVE_TASKFILE: 		{ 			ide_task_t *args = rq->special;  			if (!(args)) break; 			if (args->tf_out_flags.all != 0) 				return flagged_taskfile(drive, args);			return do_rw_taskfile(drive, args); 		} 		case IDE_DRIVE_TASK: 		{ 			u8 *args = rq->buffer; 			u8 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 			hwif->OUTB(args[1], IDE_FEATURE_REG); 			hwif->OUTB(args[3], IDE_SECTOR_REG); 			hwif->OUTB(args[4], IDE_LCYL_REG); 			hwif->OUTB(args[5], IDE_HCYL_REG); 			sel = (args[6] & ~0x10); 			if (drive->select.b.unit) 				sel |= 0x10; 			hwif->OUTB(sel, IDE_SELECT_REG); 			ide_cmd(drive, args[0], args[2], &drive_cmd_intr); 			return ide_started; 		} 		case IDE_DRIVE_CMD: 		{ 			u8 *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) { 				hwif->OUTB(0x4f, IDE_LCYL_REG); 				hwif->OUTB(0xc2, IDE_HCYL_REG); 				hwif->OUTB(args[2],IDE_FEATURE_REG); 				hwif->OUTB(args[1],IDE_SECTOR_REG); 				ide_cmd(drive, args[0], args[3], &drive_cmd_intr); 				return ide_started; 			} 			hwif->OUTB(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,			hwif->INB(IDE_STATUS_REG),			hwif->INB(IDE_ERROR_REG)); 	return ide_stopped;}EXPORT_SYMBOL(execute_drive_cmd);/** *	start_request	-	start of I/O and command issuing for IDE * *	start_request() initiates handling of a new I/O request. It *	accepts commands and I/O (read/write) requests. It also does *	the final remapping for weird stuff like EZDrive. Once  *	device mapper can work sector level the EZDrive stuff can go away * *	FIXME: this function needs a rename */ 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;	}	/*	 * bail early if we've sent a device to sleep, however how to wake	 * this needs to be a masked flag.  FIXME for proper operations.	 */	if (drive->suspend_reset) {		goto kill_rq;	}	if (unit >= MAX_DRIVES) {		printk(KERN_ERR "%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(KERN_ERR "%s: block not locked\n", drive->name);		goto kill_rq;	}#endif	block    = rq->sector;	blockend = block + rq->nr_sectors;	if (blk_fs_request(rq) &&	    (drive->media == ide_disk || drive->media == ide_floppy)) {		if ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) {			printk(KERN_ERR "%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(drive);	if (ide_wait_stat(&startstop, drive, drive->ready_stat, BUSY_STAT|DRQ_STAT, WAIT_READY)) {		printk(KERN_ERR "%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:				return execute_drive_cmd(drive, rq);			case IDE_DRIVE_TASKFILE:				return execute_drive_cmd(drive, rq);			default:				break;		}		return (DRIVER(drive)->do_request(drive, rq, block));	}	return do_special(drive);kill_rq:	DRIVER(drive)->end_request(drive, 0);	return ide_stopped;}EXPORT_SYMBOL(start_request);int restart_request (ide_drive_t *drive, struct request *rq){	(void) start_request(drive, rq);	return 0;}EXPORT_SYMBOL(restart_request);/** *	ide_stall_queue		-	pause an IDE device *	@drive: drive to stall *	@timeout: time to stall for (jiffies) * *	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;}EXPORT_SYMBOL(ide_stall_queue);#define WAKEUP(drive)	((drive)->service_start + 2 * (drive)->service_time)/** *	choose_drive		-	select a drive to service *	@hwgroup: hardware group to select on * *	choose_drive() selects the next drive which will be serviced. *	This is neccessary because the IDE layer can't issue commands *	to both drives on the same cable, unlike SCSI. */ static inline ide_drive_t *choose_drive (ide_hwgroup_t *hwgroup){	ide_drive_t *drive, *best;repeat:		best = NULL;	drive = hwgroup->drive;	do {		if (!blk_queue_empty(&drive->queue) && (!drive->sleep || time_after_eq(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 (!blk_queue_plugged(&drive->queue))					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;	/* for atari only: POSSIBLY BROKEN HERE(?) */	ide_get_lock(ide_intr, hwgroup);	/* necessary paranoia: ensure IRQs are masked on local CPU */	local_irq_disable();	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 (time_before(sleep, jiffies + WAIT_MIN_SLEEP))					sleep = jiffies + WAIT_MIN_SLEEP;#if 1				if (timer_pending(&hwgroup->timer))					printk(KERN_ERR "ide_set_handler: timer already active\n");#endif				/* so that ide_timer_expiry knows what to do */				hwgroup->sleeping = 1;				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?				 */				/* for atari only */				ide_release_lock();				hwgroup->busy = 0;			}			/* no more work for this hwgroup (for now) */			return;		}		hwif = HWIF(drive);		if (hwgroup->hwif->sharing_irq &&		    hwif != hwgroup->hwif &&		    hwif->io_ports[IDE_CONTROL_OFFSET]) {			/* set nIEN for previous hwif */			SELECT_INTERRUPT(drive);		}		hwgroup->hwif = hwif;		hwgroup->drive = drive;		drive->sleep = 0;		drive->service_start = jiffies;		/* paranoia */		if (blk_queue_plugged(&drive->queue))			printk(KERN_ERR "%s: Huh? nuking plugged queue\n", drive->name);		rq = blkdev_entry_next_request(&drive->queue.queue_head);		hwgroup->rq = rq;		/*		 * 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 (hwif->irq != masked_irq)			disable_irq_nosync(hwif->irq);		spin_unlock(&io_request_lock);		local_irq_enable();			/* allow other IRQs while we start this request */		startstop = start_request(drive, rq);		spin_lock_irq(&io_request_lock);		if (hwif->irq != masked_irq)			enable_irq(hwif->irq);		if (startstop == ide_stopped)			hwgroup->busy = 0;	}}EXPORT_SYMBOL(ide_do_request);/* * 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;}EXPORT_SYMBOL(ide_get_queue);/* * Passes the stuff to ide_do_request */void do_ide_request(request_queue_t *q){	ide_do_request(q->queuedata, IDE_NO_IRQ);}/* * 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 * all away */static ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error){	ide_hwif_t *hwif = HWIF(drive);	struct request *rq;	ide_startstop_t ret = ide_stopped;	/*	 * end current dma transaction	 */	(void) hwif->ide_dma_end(drive);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆产精品久久久久久| 日韩制服丝袜先锋影音| 日韩三级.com| 欧美特级限制片免费在线观看| 国产伦精品一区二区三区免费 | 欧美日韩精品一区二区三区 | 欧美日韩免费一区二区三区视频| 国产不卡在线视频| 国产精品1区2区3区| 国产在线精品免费av| 精品在线亚洲视频| 韩国毛片一区二区三区| 久久er99热精品一区二区| 日本在线不卡一区| 精品在线免费观看| 国产91色综合久久免费分享| 国产一区二区三区av电影 | 中文字幕电影一区| 国产精品人成在线观看免费| 国产精品国产三级国产aⅴ中文| 亚洲视频在线观看一区| 亚洲码国产岛国毛片在线| 亚洲一区精品在线| 久久精品国产在热久久| 国产成人综合视频| 91麻豆国产香蕉久久精品| 欧美日精品一区视频| 欧美不卡一区二区三区四区| 国产亚洲一本大道中文在线| 国产精品久久久久婷婷二区次| 亚洲欧美经典视频| 婷婷激情综合网| 国产精品99久久久久久宅男| 色八戒一区二区三区| 欧美久久高跟鞋激| 久久精品一区二区三区不卡 | 国产欧美日韩三区| 亚洲美女少妇撒尿| 九一久久久久久| 欧美在线高清视频| 久久久综合视频| 亚洲超碰精品一区二区| 国产乱码精品一区二区三区av| 色老综合老女人久久久| 日韩美女一区二区三区| 亚洲欧美偷拍另类a∨色屁股| 日本美女视频一区二区| 99re热视频这里只精品| 欧美成人三级电影在线| 亚洲一二三四在线| 国产成人亚洲综合色影视| 欧美日韩精品一区二区三区蜜桃| 国产午夜精品一区二区三区视频 | 日韩激情在线观看| 色哟哟一区二区三区| 日韩欧美亚洲一区二区| 一区二区在线免费| 国产黄色精品视频| 欧美一级精品大片| 亚洲国产中文字幕在线视频综合 | 欧美在线观看视频一区二区| 久久久久久久久久久久久夜| 日韩av电影天堂| 色香色香欲天天天影视综合网| 精品国产成人系列| 日韩电影一二三区| 欧美肥胖老妇做爰| 一区二区三区欧美| 不卡一区二区在线| 久久久精品影视| 韩国欧美国产1区| 日韩欧美国产电影| 奇米一区二区三区av| 欧美精品高清视频| 天天影视涩香欲综合网 | 日韩欧美国产一区二区在线播放| 五月天亚洲精品| 欧美丝袜自拍制服另类| 亚洲一区二区欧美日韩| 91久久精品网| 亚洲成人免费av| 欧美日韩亚洲另类| 五月天精品一区二区三区| 制服丝袜亚洲播放| 久久丁香综合五月国产三级网站| 欧美一级一级性生活免费录像| 丝袜美腿高跟呻吟高潮一区| 欧美日本高清视频在线观看| 午夜欧美在线一二页| 91.麻豆视频| 久久不见久久见免费视频7| 精品国产乱码久久久久久影片| 蜜臀91精品一区二区三区| 日韩欧美一区中文| 五月天网站亚洲| 久久亚洲影视婷婷| 成人av影视在线观看| 国产精品嫩草99a| 91福利社在线观看| 亚洲成人久久影院| 精品久久久久av影院| 国内久久精品视频| 亚洲色图制服诱惑| 欧美三级蜜桃2在线观看| 久久国内精品视频| 久久精品日产第一区二区三区高清版| 成人性生交大片免费看中文| 国产精品美女久久久久久久久久久| 一本大道av一区二区在线播放| 亚洲欧美另类图片小说| 欧美在线观看一区| 美女视频黄频大全不卡视频在线播放| 欧美一级高清大全免费观看| 捆绑紧缚一区二区三区视频| 中文字幕在线免费不卡| 日本韩国一区二区| 五月激情六月综合| 久久综合五月天婷婷伊人| 成人动漫中文字幕| 亚洲国产精品av| 91精品国产黑色紧身裤美女| 国内成人免费视频| 亚洲视频香蕉人妖| 91精品国产91久久久久久最新毛片 | 国产99一区视频免费| 亚洲视频免费在线观看| 日韩女同互慰一区二区| 成人黄色一级视频| 亚洲成av人**亚洲成av**| 欧美丝袜丝nylons| 美洲天堂一区二卡三卡四卡视频| wwwwxxxxx欧美| 在线精品亚洲一区二区不卡| 日本欧美一区二区三区| 国产精品福利一区二区三区| 欧美日精品一区视频| 国产一区二区视频在线| 亚洲一区在线视频| 亚洲精品在线三区| 一本色道久久综合亚洲91 | 欧美喷潮久久久xxxxx| 成人黄色免费短视频| 蜜桃视频一区二区三区在线观看| 国产精品成人免费在线| 欧美一区二区免费观在线| 91在线视频播放地址| 激情亚洲综合在线| 亚洲国产综合色| 久久精品视频一区| 久久精品人人做| 欧美久久久久久久久久| 色av综合在线| 从欧美一区二区三区| 亚洲男帅同性gay1069| 亚洲人成在线观看一区二区| 日韩欧美第一区| 欧美日韩视频一区二区| 日本久久精品电影| 九九视频精品免费| 国产在线精品一区二区三区不卡| 日韩影院免费视频| 亚洲韩国一区二区三区| 一区二区三区在线视频观看58 | 成人免费看片app下载| 国产在线精品不卡| 日本不卡一区二区三区高清视频| 欧美精品一区二区三区四区| 日韩免费观看2025年上映的电影| 9191成人精品久久| 欧美美女喷水视频| 欧美日韩精品一区二区三区四区| 韩国一区二区视频| 成人一区二区视频| 国产成人免费av在线| 国产精品99久久久久久似苏梦涵| 国内精品视频666| 成人福利视频在线| 99免费精品在线| 91色porny在线视频| 99久久精品国产网站| 成人国产精品免费观看动漫| 色综合天天综合在线视频| 色妞www精品视频| 欧美色男人天堂| 91麻豆精品91久久久久同性| 欧美日韩国产另类一区| 91精品国产黑色紧身裤美女| 欧美成人精品福利| 国产免费成人在线视频| 亚洲国产精华液网站w| 性感美女久久精品| 久久 天天综合| 不卡av在线网| 欧美视频日韩视频| 国产拍欧美日韩视频二区| 中文字幕日韩av资源站| 亚洲小少妇裸体bbw| 精品一区二区三区在线播放| av不卡一区二区三区| 7777女厕盗摄久久久|