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

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

?? ide3.c

?? ucos在三星s3c44b0上的ide程序
?? C
?? 第 1 頁 / 共 5 頁
字號:
 * all away */void ide_dma_timeout_retry(ide_drive_t *drive){	ide_hwif_t *hwif = HWIF(drive);	struct request *rq;	/*	 * end current dma transaction	 */	(void) hwif->dmaproc(ide_dma_end, drive);	/*	 * complain a little, later we might remove some of this verbosity	 */	printk("%s: timeout waiting for DMA\n", drive->name);	(void) hwif->dmaproc(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->dmaproc(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->buffer = rq->bh->b_data;}/* * ide_timer_expiry() is our timeout function for all drive operations. * But note that it can also be invoked as a result of a "sleep" operation * triggered by the mod_timer() call in ide_do_request. */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;	spin_lock_irqsave(&io_request_lock, flags);	del_timer(&hwgroup->timer);	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("ide_timer_expiry: hwgroup->drive was NULL\n");			hwgroup->handler = NULL;		} else {			ide_hwif_t *hwif;			ide_startstop_t startstop;			if (!hwgroup->busy) {				hwgroup->busy = 1;	/* paranoia */				printk("%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->hw.irq);#else			disable_irq(hwif->hw.irq);	/* disable_irq_nosync ?? */#endif /* DISABLE_IRQ_NOSYNC */			__cli();	/* local CPU only, as if we were handling an interrupt */			if (hwgroup->poll_timeout != 0) {				startstop = handler(drive);			} else if (drive_is_ready(drive)) {				if (drive->waiting_for_dma)					(void) hwgroup->hwif->dmaproc(ide_dma_lostirq, drive);				(void)ide_ack_intr(hwif);				printk("%s: lost interrupt\n", drive->name);				startstop = handler(drive);			} else {				if (drive->waiting_for_dma) {					startstop = ide_stopped;					ide_dma_timeout_retry(drive);				} else					startstop = ide_error(drive, "irq timeout", GET_STAT());			}			set_recovery_timer(hwif);			drive->service_time = jiffies - drive->service_start;			enable_irq(hwif->hw.irq);			spin_lock_irq(&io_request_lock);			if (startstop == ide_stopped)				hwgroup->busy = 0;		}	}	ide_do_request(hwgroup, 0);	spin_unlock_irqrestore(&io_request_lock, flags);}/* * 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. * */static void unexpected_intr (int irq, ide_hwgroup_t *hwgroup){	byte stat;	ide_hwif_t *hwif = hwgroup->hwif;	/*	 * handle the unexpected interrupt	 */	do {		if (hwif->hw.irq == irq) {			stat = IN_BYTE(hwif->hw.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 (0 < (signed long)(jiffies - (last_msgtime + HZ))) {					last_msgtime = jiffies;					printk("%s%s: unexpected interrupt, status=0x%02x, count=%ld\n",					 hwif->name, (hwif->next == hwgroup->hwif) ? "" : "(?)", stat, count);				}			}		}	} while ((hwif = hwif->next) != hwgroup->hwif);}/* * entry point for all interrupts, caller does __cli() for us */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 (IDE_PCI_DEVID_EQ(hwif->pci_devid, IDE_PCI_DEVID_NULL))#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) IN_BYTE(hwif->hw.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("%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)		ide__sti();	/* local CPU only */	startstop = handler(drive);		/* service this interrupt, may set handler for next interrupt */	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->hw.irq);		} else {			printk("%s: ide_intr: huh? expected NULL handler on exit\n", drive->name);		}	}	spin_unlock_irqrestore(&io_request_lock, flags);}/* * 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);#if 0	int		minor = MINOR(i_rdev) & PARTN_MASK;#endif	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 0				if ((drive->present) && (drive->part[minor].nr_sects))#else				if (drive->present)#endif					return drive;			}			break;		}	}	return NULL;}/* * This function is intended to be used prior to invoking ide_do_drive_cmd(). */void ide_init_drive_cmd (struct request *rq){	memset(rq, 0, sizeof(*rq));	rq->cmd = IDE_DRIVE_CMD;}/* * 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;	struct list_head *queue_head = &drive->queue.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 (list_empty(queue_head) || 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, 0);	spin_unlock_irqrestore(&io_request_lock, flags);	if (action == ide_wait) {		wait_for_completion(&wait);	/* wait for it to be serviced */		return rq->errors ? -EIO : 0;	/* return -EIO if errors */	}	return 0;}/* * This routine is called to flush all partitions and partition tables * for a changed disk, and then re-read the new partition table. * If we are revalidating a disk because of a media change, then we * enter with usage == 0.  If we are using an ioctl, we automatically have * usage == 1 (we need an open channel to use an ioctl :-), so this * is our limit. */int ide_revalidate_disk (kdev_t i_rdev){	ide_drive_t *drive;	ide_hwgroup_t *hwgroup;	unsigned int p, major, minor;	unsigned long flags;	if ((drive = get_info_ptr(i_rdev)) == NULL)		return -ENODEV;	major = MAJOR(i_rdev);	minor = drive->select.b.unit << PARTN_BITS;	hwgroup = HWGROUP(drive);	spin_lock_irqsave(&io_request_lock, flags);	if (drive->busy || (drive->usage > 1)) {		spin_unlock_irqre

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产不卡在线一区| 91精品欧美一区二区三区综合在 | 欧美日韩免费在线视频| 欧美一级黄色片| 中文字幕电影一区| 免费高清在线一区| 日本道免费精品一区二区三区| 精品动漫一区二区三区在线观看| 亚洲欧洲综合另类在线| 激情综合五月天| 欧美日韩国产首页| 一区二区三区.www| 不卡一卡二卡三乱码免费网站| 日韩午夜在线播放| 亚洲一区影音先锋| 91视频观看免费| 欧美激情中文不卡| 黑人巨大精品欧美黑白配亚洲| 欧美日韩亚洲不卡| 亚洲精品一二三区| av亚洲精华国产精华| 国产日产欧产精品推荐色| 蜜桃精品视频在线| 欧美一区二区免费视频| 亚洲午夜精品网| 欧美图片一区二区三区| 亚洲乱码国产乱码精品精98午夜| 懂色av一区二区在线播放| 26uuu久久综合| 狠狠色狠狠色合久久伊人| 91精品国产福利| 青青草97国产精品免费观看 | 国产精品一区二区三区乱码| 91精品国产色综合久久不卡电影| 亚洲高清视频在线| 欧美三级在线视频| 午夜精品久久久久久不卡8050| 欧美综合欧美视频| 五月激情综合婷婷| 日韩一级完整毛片| 国精品**一区二区三区在线蜜桃| 精品少妇一区二区三区免费观看| 久久国产尿小便嘘嘘尿| 久久五月婷婷丁香社区| 国产高清亚洲一区| 亚洲同性同志一二三专区| 91色乱码一区二区三区| 亚洲一区二区三区国产| 91精品国产综合久久精品| 乱一区二区av| 国产精品毛片无遮挡高清| 91香蕉视频mp4| 性欧美大战久久久久久久久| 欧美一级片在线观看| 国产精品2024| 亚洲精品国产a| 91精品国产全国免费观看| 国内一区二区在线| 亚洲丝袜制服诱惑| 制服丝袜日韩国产| 国产成人在线视频网站| 18成人在线视频| 欧美片网站yy| 国产精品一卡二卡在线观看| 亚洲欧美日韩人成在线播放| 在线成人小视频| 国产成人在线看| 亚洲综合色噜噜狠狠| 日韩三级精品电影久久久| 成人午夜伦理影院| 日韩vs国产vs欧美| 国产精品人成在线观看免费 | 亚洲h在线观看| www久久久久| 色综合 综合色| 看电视剧不卡顿的网站| 自拍偷拍国产精品| 欧美成人一区二区| 在线区一区二视频| 国产成人免费在线观看不卡| 亚洲国产精品自拍| 国产精品视频一区二区三区不卡| 欧美日韩精品专区| 99久久777色| 精品在线你懂的| 亚洲h在线观看| 亚洲免费视频成人| 日本一区二区不卡视频| 91精品国产一区二区三区| 色av成人天堂桃色av| 国产一区二区剧情av在线| 亚洲成人动漫精品| 亚洲精品视频自拍| 中文成人综合网| 欧美精品一区二区三区一线天视频 | 99精品视频在线观看免费| 美女视频黄久久| 亚洲成人777| 一区二区不卡在线播放| 国产精品婷婷午夜在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 在线观看日韩一区| 一本到高清视频免费精品| 国产精品亚洲午夜一区二区三区 | 日韩精品一区二区三区四区| 在线观看av一区二区| 成人高清视频免费观看| 国产美女一区二区| 国产一区二区三区四区五区美女| 日本午夜一本久久久综合| 亚洲成av人片在www色猫咪| 亚洲综合图片区| 亚洲综合色婷婷| 亚洲小说欧美激情另类| 亚洲午夜视频在线观看| 一区av在线播放| 亚洲综合在线第一页| 亚洲制服丝袜一区| 亚洲国产精品人人做人人爽| 亚洲午夜av在线| 性做久久久久久久免费看| 日韩在线观看一区二区| 午夜久久福利影院| 日韩不卡手机在线v区| 蜜臀av性久久久久av蜜臀妖精| 日本欧美一区二区在线观看| 蜜臀av一区二区三区| 另类中文字幕网| 国产一区二区三区久久久| 成人午夜免费视频| 在线观看亚洲a| 在线播放视频一区| 亚洲精品在线免费观看视频| 国产女主播视频一区二区| 成人免费在线观看入口| 亚洲午夜激情av| 久久99国产精品尤物| 国产不卡视频一区| 色婷婷综合久久久| 欧美一区二区大片| 国产亚洲午夜高清国产拍精品| 国产精品高潮呻吟久久| 亚洲一级二级三级在线免费观看| 日韩高清一区二区| 国产高清不卡一区| 日本道在线观看一区二区| 91精品国产免费| 中文无字幕一区二区三区 | 在线看日韩精品电影| 91精品福利在线一区二区三区 | 爽好多水快深点欧美视频| 久久精品72免费观看| 国产成人av一区二区| 欧美色国产精品| 久久久久成人黄色影片| 亚洲综合网站在线观看| 激情久久五月天| 色999日韩国产欧美一区二区| 欧美一区二区三区白人| 亚洲欧美影音先锋| 久久精品免费看| 欧洲精品在线观看| 日本一区二区三区高清不卡| 亚洲va国产天堂va久久en| 成人性生交大片免费看中文| 欧美久久一区二区| 国产精品成人免费精品自在线观看| 亚洲va欧美va人人爽| 成人不卡免费av| 日韩欧美国产午夜精品| 成人免费高清在线| 欧美一区二区三区免费观看视频| 国产精品亲子乱子伦xxxx裸| 毛片av一区二区| 欧美四级电影在线观看| 国产精品超碰97尤物18| 国产一区啦啦啦在线观看| 6080亚洲精品一区二区| 伊人色综合久久天天| 成人一道本在线| 久久久精品中文字幕麻豆发布| 日韩激情一区二区| 欧美亚洲自拍偷拍| 亚洲欧美韩国综合色| 成人va在线观看| 国产精品久久久久久久久图文区| 久久精品久久久精品美女| 欧美日韩精品综合在线| 亚洲图片欧美一区| 日本韩国欧美一区| 亚洲精品一二三| 色天使色偷偷av一区二区| 综合电影一区二区三区 | 日本午夜精品一区二区三区电影| 色婷婷av一区二区三区大白胸| 国产精品电影一区二区| 成人av在线资源| 国产精品伦理在线| 99久免费精品视频在线观看| 中文幕一区二区三区久久蜜桃|