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

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

?? ide-io.c

?? ep9315平臺下硬盤驅動的源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
	/*	 * complain a little, later we might remove some of this verbosity	 */	if (error < 0) {		printk(KERN_ERR "%s: error waiting for DMA\n", drive->name);		(void)HWIF(drive)->ide_dma_end(drive);		ret = DRIVER(drive)->error(drive, "dma timeout retry",				hwif->INB(IDE_STATUS_REG));	} else {	printk(KERN_ERR "%s: timeout waiting for DMA\n", drive->name);	(void) hwif->ide_dma_timeout(drive);	}	/*	 * disable dma for now, but remember that we did so because of	 * a timeout -- we'll reenable after we finish this next request	 * (or rather the first chunk of it) in pio.	 */	drive->retry_pio++;	drive->state = DMA_PIO_RETRY;	(void) hwif->ide_dma_off_quietly(drive);	/*	 * un-busy drive etc (hwgroup->busy is cleared on return) and	 * make sure request is sane	 */	rq = HWGROUP(drive)->rq;	HWGROUP(drive)->rq = NULL;	rq->errors = 0;	rq->sector = rq->bh->b_rsector;	rq->current_nr_sectors = rq->bh->b_size >> 9;	rq->hard_cur_sectors = rq->current_nr_sectors;	rq->buffer = rq->bh->b_data;	return ret;}/** *	ide_timer_expiry	-	handle lack of an IDE interrupt *	@data: timer callback magic (hwgroup) * *	An IDE command has timed out before the expected drive return *	occurred. At this point we attempt to clean up the current *	mess. If the current handler includes an expiry handler then *	we invoke the expiry handler, and providing it is happy the *	work is done. If that fails we apply generic recovery rules *	invoking the handler and checking the drive DMA status. We *	have an excessively incestuous relationship with the DMA *	logic that wants cleaning up. */ void ide_timer_expiry (unsigned long data){	ide_hwgroup_t	*hwgroup = (ide_hwgroup_t *) data;	ide_handler_t	*handler;	ide_expiry_t	*expiry; 	unsigned long	flags;	unsigned long	wait = -1;	spin_lock_irqsave(&io_request_lock, flags);	if ((handler = hwgroup->handler) == NULL) {		/*		 * Either a marginal timeout occurred		 * (got the interrupt just as timer expired),		 * or we were "sleeping" to give other devices a chance.		 * Either way, we don't really want to complain about anything.		 */		if (hwgroup->sleeping) {			hwgroup->sleeping = 0;			hwgroup->busy = 0;		}	} else {		ide_drive_t *drive = hwgroup->drive;		if (!drive) {			printk(KERN_ERR "ide_timer_expiry: hwgroup->drive was NULL\n");			hwgroup->handler = NULL;		} else {			ide_hwif_t *hwif;			ide_startstop_t startstop = ide_stopped;			if (!hwgroup->busy) {				hwgroup->busy = 1;	/* paranoia */				printk(KERN_ERR "%s: ide_timer_expiry: hwgroup->busy was 0 ??\n", drive->name);			}			if ((expiry = hwgroup->expiry) != NULL) {				/* continue */				if ((wait = expiry(drive)) > 0) {					/* reset timer */					hwgroup->timer.expires  = jiffies + wait;					add_timer(&hwgroup->timer);					spin_unlock_irqrestore(&io_request_lock, flags);					return;				}			}			hwgroup->handler = NULL;			/*			 * We need to simulate a real interrupt when invoking			 * the handler() function, which means we need to			 * globally mask the specific IRQ:			 */			spin_unlock(&io_request_lock);			hwif  = HWIF(drive);#if DISABLE_IRQ_NOSYNC			disable_irq_nosync(hwif->irq);#else			/* disable_irq_nosync ?? */			disable_irq(hwif->irq);#endif /* DISABLE_IRQ_NOSYNC */			/* local CPU only,			 * as if we were handling an interrupt */			local_irq_disable();			if (hwgroup->poll_timeout != 0) {				startstop = handler(drive);			} else if (drive_is_ready(drive)) {				if (drive->waiting_for_dma)					(void) hwgroup->hwif->ide_dma_lostirq(drive);				(void)ide_ack_intr(hwif);				printk(KERN_ERR "%s: lost interrupt\n", drive->name);				startstop = handler(drive);			} else {				if (drive->waiting_for_dma) {					startstop = ide_dma_timeout_retry(drive, wait);				} else {					startstop = DRIVER(drive)->error(drive, "irq timeout", hwif->INB(IDE_STATUS_REG));				}			}			set_recovery_timer(hwif);			drive->service_time = jiffies - drive->service_start;			spin_lock_irq(&io_request_lock);			enable_irq(hwif->irq);			if (startstop == ide_stopped)				hwgroup->busy = 0;		}	}	ide_do_request(hwgroup, IDE_NO_IRQ);	spin_unlock_irqrestore(&io_request_lock, flags);}EXPORT_SYMBOL(ide_timer_expiry);/** *	unexpected_intr		-	handle an unexpected IDE interrupt *	@irq: interrupt line *	@hwgroup: hwgroup being processed * *	There's nothing really useful we can do with an unexpected interrupt, *	other than reading the status register (to clear it), and logging it. *	There should be no way that an irq can happen before we're ready for it, *	so we needn't worry much about losing an "important" interrupt here. * *	On laptops (and "green" PCs), an unexpected interrupt occurs whenever *	the drive enters "idle", "standby", or "sleep" mode, so if the status *	looks "good", we just ignore the interrupt completely. * *	This routine assumes __cli() is in effect when called. * *	If an unexpected interrupt happens on irq15 while we are handling irq14 *	and if the two interfaces are "serialized" (CMD640), then it looks like *	we could screw up by interfering with a new request being set up for  *	irq15. * *	In reality, this is a non-issue.  The new command is not sent unless  *	the drive is ready to accept one, in which case we know the drive is *	not trying to interrupt us.  And ide_set_handler() is always invoked *	before completing the issuance of any new drive command, so we will not *	be accidentally invoked as a result of any valid command completion *	interrupt. * *	Note that we must walk the entire hwgroup here. We know which hwif *	is doing the current command, but we don't know which hwif burped *	mysteriously. */ static void unexpected_intr (int irq, ide_hwgroup_t *hwgroup){	u8 stat;	ide_hwif_t *hwif = hwgroup->hwif;	/*	 * handle the unexpected interrupt	 */	do {		if (hwif->irq == irq) {			stat = hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);			if (!OK_STAT(stat, READY_STAT, BAD_STAT)) {				/* Try to not flood the console with msgs */				static unsigned long last_msgtime, count;				++count;				if (time_after(jiffies, last_msgtime + HZ)) {					last_msgtime = jiffies;					printk(KERN_ERR "%s%s: unexpected interrupt, "						"status=0x%02x, count=%ld\n",						hwif->name,						(hwif->next==hwgroup->hwif) ? "" : "(?)", stat, count);				}			}		}	} while ((hwif = hwif->next) != hwgroup->hwif);}/** *	ide_intr	-	default IDE interrupt handler *	@irq: interrupt number *	@dev_id: hwif group *	@regs: unused weirdness from the kernel irq layer * *	This is the default IRQ handler for the IDE layer. You should *	not need to override it. If you do be aware it is subtle in *	places * *	hwgroup->hwif is the interface in the group currently performing *	a command. hwgroup->drive is the drive and hwgroup->handler is *	the IRQ handler to call. As we issue a command the handlers *	step through multiple states, reassigning the handler to the *	next step in the process. Unlike a smart SCSI controller IDE *	expects the main processor to sequence the various transfer *	stages. We also manage a poll timer to catch up with most *	timeout situations. There are still a few where the handlers *	don't ever decide to give up. * *	The handler eventually returns ide_stopped to indicate the *	request completed. At this point we issue the next request *	on the hwgroup and the process begins again. */ void ide_intr (int irq, void *dev_id, struct pt_regs *regs){	unsigned long flags;	ide_hwgroup_t *hwgroup = (ide_hwgroup_t *)dev_id;	ide_hwif_t *hwif;	ide_drive_t *drive;	ide_handler_t *handler;	ide_startstop_t startstop;	spin_lock_irqsave(&io_request_lock, flags);	hwif = hwgroup->hwif;	if (!ide_ack_intr(hwif)) {		spin_unlock_irqrestore(&io_request_lock, flags);		return;	}	if ((handler = hwgroup->handler) == NULL ||	    hwgroup->poll_timeout != 0) {		/*		 * Not expecting an interrupt from this drive.		 * That means this could be:		 *	(1) an interrupt from another PCI device		 *	sharing the same PCI INT# as us.		 * or	(2) a drive just entered sleep or standby mode,		 *	and is interrupting to let us know.		 * or	(3) a spurious interrupt of unknown origin.		 *		 * For PCI, we cannot tell the difference,		 * so in that case we just ignore it and hope it goes away.		 */#ifdef CONFIG_BLK_DEV_IDEPCI		if (hwif->pci_dev && !hwif->pci_dev->vendor)#endif	/* CONFIG_BLK_DEV_IDEPCI */		{			/*			 * Probably not a shared PCI interrupt,			 * so we can safely try to do something about it:			 */			unexpected_intr(irq, hwgroup);#ifdef CONFIG_BLK_DEV_IDEPCI		} else {			/*			 * Whack the status register, just in case			 * we have a leftover pending IRQ.			 */			(void) hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);#endif /* CONFIG_BLK_DEV_IDEPCI */		}		spin_unlock_irqrestore(&io_request_lock, flags);		return;	}	drive = hwgroup->drive;	if (!drive) {		/*		 * This should NEVER happen, and there isn't much		 * we could do about it here.		 */		spin_unlock_irqrestore(&io_request_lock, flags);		return;	}	if (!drive_is_ready(drive)) {		/*		 * This happens regularly when we share a PCI IRQ with		 * another device.  Unfortunately, it can also happen		 * with some buggy drives that trigger the IRQ before		 * their status register is up to date.  Hopefully we have		 * enough advance overhead that the latter isn't a problem.		 */		spin_unlock_irqrestore(&io_request_lock, flags);		return;	}	if (!hwgroup->busy) {		hwgroup->busy = 1;	/* paranoia */		printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name);	}	hwgroup->handler = NULL;	del_timer(&hwgroup->timer);	spin_unlock(&io_request_lock);	if (drive->unmask)		local_irq_enable();	/* service this interrupt, may set handler for next interrupt */	startstop = handler(drive);	spin_lock_irq(&io_request_lock);	/*	 * Note that handler() may have set things up for another	 * interrupt to occur soon, but it cannot happen until	 * we exit from this routine, because it will be the	 * same irq as is currently being serviced here, and Linux	 * won't allow another of the same (on any CPU) until we return.	 */	set_recovery_timer(HWIF(drive));	drive->service_time = jiffies - drive->service_start;	if (startstop == ide_stopped) {		if (hwgroup->handler == NULL) {	/* paranoia */			hwgroup->busy = 0;			ide_do_request(hwgroup, hwif->irq);		} else {			printk(KERN_ERR "%s: ide_intr: huh? expected NULL handler "				"on exit\n", drive->name);		}	}	spin_unlock_irqrestore(&io_request_lock, flags);}EXPORT_SYMBOL(ide_intr);/* * get_info_ptr() returns the (ide_drive_t *) for a given device number. * It returns NULL if the given device number does not match any present drives. */ide_drive_t *get_info_ptr (kdev_t i_rdev){	int		major = MAJOR(i_rdev);	unsigned int	h;	for (h = 0; h < MAX_HWIFS; ++h) {		ide_hwif_t  *hwif = &ide_hwifs[h];		if (hwif->present && major == hwif->major) {			unsigned unit = DEVICE_NR(i_rdev);			if (unit < MAX_DRIVES) {				ide_drive_t *drive = &hwif->drives[unit];				if (drive->present)					return drive;			}			break;		}	}	return NULL;}EXPORT_SYMBOL(get_info_ptr);/** *	ide_init_drive_cmd	-	initialize a drive command request *	@rq: request object * *	Initialize a request before we fill it in and send it down to *	ide_do_drive_cmd. Commands must be set up by this function. Right *	now it doesn't do a lot, but if that changes abusers will have a *	nasty suprise. */void ide_init_drive_cmd (struct request *rq){	memset(rq, 0, sizeof(*rq));	rq->cmd = IDE_DRIVE_CMD;}EXPORT_SYMBOL(ide_init_drive_cmd);/** *	ide_do_drive_cmd	-	issue IDE special command *	@drive: device to issue command *	@rq: request to issue *	@action: action for processing * *	This function issues a special IDE device request *	onto the request queue. * *	If action is ide_wait, then the rq is queued at the end of the *	request queue, and the function sleeps until it has been processed. *	This is for use when invoked from an ioctl handler. * *	If action is ide_preempt, then the rq is queued at the head of *	the request queue, displacing the currently-being-processed *	request and this function returns immediately without waiting *	for the new rq to be completed.  This is VERY DANGEROUS, and is *	intended for careful use by the ATAPI tape/cdrom driver code. * *	If action is ide_next, then the rq is queued immediately after *	the currently-being-processed-request (if any), and the function *	returns without waiting for the new rq to be completed.  As above, *	This is VERY DANGEROUS, and is intended for careful use by the *	ATAPI tape/cdrom driver code. * *	If action is ide_end, then the rq is queued at the end of the *	request queue, and the function returns immediately without waiting *	for the new rq to be completed. This is again intended for careful *	use by the ATAPI tape/cdrom driver code. */ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t action){	unsigned long flags;	ide_hwgroup_t *hwgroup = HWGROUP(drive);	unsigned int major = HWIF(drive)->major;	request_queue_t *q = &drive->queue;	struct list_head *queue_head = &q->queue_head;	DECLARE_COMPLETION(wait);#ifdef CONFIG_BLK_DEV_PDC4030	if (HWIF(drive)->chipset == ide_pdc4030 && rq->buffer != NULL)		return -ENOSYS;  /* special drive cmds not supported */#endif	rq->errors = 0;	rq->rq_status = RQ_ACTIVE;	rq->rq_dev = MKDEV(major,(drive->select.b.unit)<<PARTN_BITS);	if (action == ide_wait)		rq->waiting = &wait;	spin_lock_irqsave(&io_request_lock, flags);	if (blk_queue_empty(q) || action == ide_preempt) {		if (action == ide_preempt)			hwgroup->rq = NULL;	} else {		if (action == ide_wait || action == ide_end) {			queue_head = queue_head->prev;		} else			queue_head = queue_head->next;	}	list_add(&rq->queue, queue_head);	ide_do_request(hwgroup, IDE_NO_IRQ);	spin_unlock_irqrestore(&io_request_lock, flags);	if (action == ide_wait) {		/* wait for it to be serviced */		wait_for_completion(&wait);		/* return -EIO if errors */		return rq->errors ? -EIO : 0;	}	return 0;}EXPORT_SYMBOL(ide_do_drive_cmd);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
尤物在线观看一区| 有码一区二区三区| 日韩**一区毛片| 成人动漫一区二区| 日韩欧美资源站| 一区二区三区美女| 国产suv精品一区二区6| 欧美一区二区三区的| 亚洲人123区| 国产成人精品亚洲日本在线桃色 | 日韩国产高清在线| 91伊人久久大香线蕉| 国产网站一区二区三区| 久久国产精品露脸对白| 欧美日韩亚洲综合在线| 日韩美女视频19| 成人丝袜18视频在线观看| 精品日产卡一卡二卡麻豆| 日韩在线一区二区| 欧美在线你懂的| 亚洲人成在线播放网站岛国| 国产成人高清视频| 久久亚洲精品国产精品紫薇| 久久成人免费网站| 555www色欧美视频| 亚洲成人手机在线| 欧美中文字幕一区二区三区亚洲| 成人欧美一区二区三区1314| 国产传媒欧美日韩成人| 久久综合九色综合久久久精品综合 | 26uuu国产一区二区三区| 奇米一区二区三区av| 91精品在线观看入口| 日韩电影免费在线看| 91麻豆精品国产91久久久久久久久| 亚洲aⅴ怡春院| 欧美日韩国产一区二区三区地区| 亚洲综合一二三区| 欧美中文字幕久久| 亚洲成人免费av| 欧美日韩不卡在线| 男人的天堂久久精品| 日韩欧美二区三区| 精品无人码麻豆乱码1区2区| 欧美刺激脚交jootjob| 精彩视频一区二区三区| 久久伊人中文字幕| 国产一区视频导航| 中文字幕的久久| 99久久综合精品| 亚洲精品中文字幕乱码三区| 欧美日韩中字一区| 婷婷成人激情在线网| 日韩精品在线一区二区| 国产麻豆日韩欧美久久| 国产精品少妇自拍| 在线视频综合导航| 日韩精品欧美精品| 久久综合九色综合97婷婷女人 | 国产成人av资源| 国产精品国产三级国产aⅴ入口 | 色综合久久综合中文综合网| 亚洲免费在线播放| 欧美猛男超大videosgay| 视频一区在线视频| 精品欧美乱码久久久久久| 国产91精品免费| 亚洲乱码精品一二三四区日韩在线| 欧美在线制服丝袜| 老司机免费视频一区二区三区| 国产婷婷一区二区| 色域天天综合网| 奇米影视在线99精品| 2022国产精品视频| 91同城在线观看| 日日摸夜夜添夜夜添国产精品| 久久亚洲欧美国产精品乐播 | 久久国产夜色精品鲁鲁99| 日本一区二区三区在线不卡| 91国偷自产一区二区三区观看| 日韩精品一级中文字幕精品视频免费观看| www久久精品| 99久久精品免费精品国产| 亚洲18女电影在线观看| 久久精品一区二区| 欧美性猛交xxxx乱大交退制版 | 天堂成人免费av电影一区| 久久这里都是精品| 在线免费观看日本一区| 精品一区二区免费视频| 亚洲欧美日韩小说| 欧美mv日韩mv亚洲| 91久久国产最好的精华液| 久久91精品久久久久久秒播| 成人欧美一区二区三区视频网页 | 久久只精品国产| 在线视频你懂得一区| 激情综合色综合久久综合| 国产精品污网站| 91精品国产综合久久福利软件| 国产精品色噜噜| 国产精品自在在线| 亚洲久本草在线中文字幕| 欧美xxxx在线观看| 91福利视频在线| 国产精品综合二区| 视频一区二区不卡| 亚洲色图欧洲色图婷婷| 欧美精品一区二区三区高清aⅴ | 亚洲高清久久久| 国产欧美一区二区精品婷婷| 欧美精品粉嫩高潮一区二区| 99久久精品国产麻豆演员表| 久久激情五月激情| 婷婷综合另类小说色区| 亚洲视频精选在线| 久久影院午夜片一区| 欧美一级日韩免费不卡| 一本一本大道香蕉久在线精品| 国产精品1区2区| 久久精品噜噜噜成人av农村| 香蕉成人伊视频在线观看| 亚洲欧美偷拍卡通变态| 国产午夜久久久久| 欧美成人在线直播| 欧美丰满高潮xxxx喷水动漫| 91久久久免费一区二区| av午夜一区麻豆| 粉嫩av一区二区三区在线播放| 麻豆成人91精品二区三区| 亚洲五码中文字幕| 亚洲视频一区在线观看| 久久亚洲欧美国产精品乐播| 日韩欧美久久久| 欧美一级精品在线| 91精品国产一区二区三区香蕉| 91精品福利视频| 91视频在线看| av一区二区三区| 成人午夜在线免费| 国产不卡免费视频| 国产一区二区三区在线观看免费视频 | 亚洲人成精品久久久久久| 国产精品日韩成人| 欧美高清在线视频| 欧美激情在线免费观看| 久久久不卡影院| 国产日韩欧美高清在线| 国产午夜精品一区二区三区视频| 精品蜜桃在线看| 久久综合九色综合97_久久久| 日韩欧美成人午夜| 欧美不卡在线视频| 久久一区二区三区四区| 国产网站一区二区| 亚洲国产精品国自产拍av| 中文字幕不卡的av| 国产精品精品国产色婷婷| ...av二区三区久久精品| 亚洲三级在线观看| 亚洲精品美国一| 亚洲综合小说图片| 视频在线在亚洲| 久久精品72免费观看| 国内成+人亚洲+欧美+综合在线| 国产一区二区日韩精品| 国产不卡一区视频| 国产成人精品在线看| 99精品欧美一区二区三区小说 | 日本精品一区二区三区高清| 色88888久久久久久影院按摩| 精品视频一区三区九区| 欧美一级淫片007| 久久一夜天堂av一区二区三区| 国产欧美一区二区三区网站| 国产精品国产三级国产普通话三级| 亚洲色图欧洲色图婷婷| 亚洲18影院在线观看| 激情深爱一区二区| 国产久卡久卡久卡久卡视频精品| 福利视频网站一区二区三区| 成人h动漫精品一区二| 91麻豆精东视频| 欧美日韩激情一区二区三区| 日韩欧美国产一区二区三区| 国产亚洲欧美中文| 亚洲视频在线一区| 日韩精彩视频在线观看| 国产一区二区精品久久99| 99精品一区二区| 91精品国产乱码久久蜜臀| 久久久精品免费免费| 亚洲精品美国一| 久久99精品国产.久久久久久 | 麻豆国产精品一区二区三区| 国产精品 欧美精品| 欧美在线观看一区| 日韩欧美电影一二三| 成人免费在线播放视频| 日本亚洲免费观看|