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

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

?? ide-ep93xx.c

?? ep9315平臺下硬盤驅動的源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
		return 0;	return 1;}/***************************************************************************** * * ep93xx_ide_dma_read() * * This function sets up a dma read operation. * ****************************************************************************/static intep93xx_ide_dma_read(ide_drive_t *drive){	u8 lba48 = (drive->addressing == 1) ? 1 : 0;	struct request *rq = HWGROUP(drive)->rq;	unsigned int flags, i;	ide_hwif_t *hwif = HWIF(drive);	task_ioreg_t command = WIN_NOP;	DPRINTK("%s: ep93xx_ide_dma_read\n", drive->name);	DPRINTK("    %ld, %ld\n", HWGROUP(drive)->rq->sector,		HWGROUP(drive)->rq->nr_sectors);	/*	 * Check if we are already transferring on this dma channel.	 */	if (hwif->sg_dma_active || drive->waiting_for_dma) {		DPRINTK("%s: dma_read: dma already active \n", drive->name);		return 1;	}	/*	 * Compute the array index used for this request.	 */	i = drive->name[2] == 'a' ? 0 : 2;	/*	 * See if this request matches the most recent request, and that the	 * most recent request ended in error.	 */	if (g_bad && (g_cmd == READ) && (g_drive == drive) &&	    (g_sector == HWGROUP(drive)->rq->sector) &&	    (g_nr_sectors == HWGROUP(drive)->rq->nr_sectors)) {		g_cur_retries++;		if (g_cur_retries > g_max_retries[i])			g_max_retries[i]++;		if (g_cur_retries == RETRIES_PER_TRANSFER) {			g_bad = 0;			return 1;		}	} else {		g_cur_retries = 0;		g_cmd = READ;		g_drive = drive;		g_sector = HWGROUP(drive)->rq->sector;		g_nr_sectors = HWGROUP(drive)->rq->nr_sectors;	}	/*	 * Save information about this transfer.	 */	g_xfers[i]++;	g_sectors[i] += HWGROUP(drive)->rq->nr_sectors;	/*	 * Indicate that we're waiting for dma.	 */	drive->waiting_for_dma = 1;	/*	 * Configure DMA M2M channel flags for a source address hold, h/w	 * initiated P2M transfer.	 */	flags = (SOURCE_HOLD | TRANSFER_MODE_HW_P2M);	if (drive->current_speed & 0x20) {		flags |= (WS_IDE_MDMA_READ << WAIT_STATES_SHIFT);		/*		 * MDMA data register address.		 */		hwif->dma_base = IDEMDMADATAIN - IO_BASE_VIRT + IO_BASE_PHYS;	} else {		flags |= (WS_IDE_UDMA_READ << WAIT_STATES_SHIFT);		/*		 * UDMA data register address.		 */		hwif->dma_base = IDEUDMADATAIN - IO_BASE_VIRT + IO_BASE_PHYS;	}	/*	 * Configure the dma interface for this IDE operation.	 */	if (ep93xx_dma_config(hwif->hw.dma, 0, flags, ep93xx_ide_callback,			      (unsigned int)drive) != 0) {		DPRINTK("%s: ep93xx_ide_dma_read: ERROR- dma config failed",				drive->name);		drive->waiting_for_dma = 0;		/*		 * Fail.		 */		return 1;	}	/*	 * Build the table of dma-able buffers.	 */	if (!(g_prd_count = ide_build_dmatable(drive))) {		DPRINTK("%s: ep93xx_ide_dma_read: ERROR- failed to build dma table",			drive->name);		drive->waiting_for_dma = 0;		/*		 * Fail, try PIO instead of DMA		 */		return 1;	}	/*	 * Indicate that the scatter gather is active.	 */	hwif->sg_dma_active = 1;	/*	 * test stuff	 */	g_prd_total = g_prd_count;	g_prd_returned = 0;	DPRINTK("%d buffers\n", g_prd_total);	/*	 * Prepare the dma interface with some buffers from the	 * dma_table.	 */	do {		/*		 * Add a buffer to the dma interface.		 */		if (ep93xx_dma_add_buffer(hwif->hw.dma, hwif->dma_base,					  hwif->dmatable_cpu[0],					  hwif->dmatable_cpu[1], 0,					  g_prd_count) != 0)			break;		hwif->dmatable_cpu += 2;		/*		 * Decrement the count of dmatable entries		 */		g_prd_count--;	} while (g_prd_count);	/*	 * Nothing further is required if this is not a ide_disk (i.e. an ATAPI	 * device).	 */	if (drive->media != ide_disk)		return 0;	/*	 * Determine the command to be sent to the device.	 */	command = (lba48) ? WIN_READDMA_EXT : WIN_READDMA;	if (rq->cmd == IDE_DRIVE_TASKFILE) {		ide_task_t *args = rq->special;		command = args->tfRegister[IDE_COMMAND_OFFSET];	}	/*	 * Send the read command to the device.	 */	ide_execute_command(drive, command, &ep93xx_ide_dma_intr, 2*WAIT_CMD,			    &ep93xx_idedma_timer_expiry);	/*	 * initiate the dma transfer.	 */	return hwif->ide_dma_begin(drive);}/***************************************************************************** * * ep93xx_ide_dma_first_read() * * This function handles the very first dma read operation. * ****************************************************************************/static intep93xx_ide_dma_first_read(ide_drive_t *drive){	ide_hwif_t *hwif = HWIF(drive);	/*	 * Switch the hwif to the real read routine.	 */	hwif->ide_dma_read = ep93xx_ide_dma_read;	/*	 * Register a proc entry for the statistics that we gather.	 */#ifdef CONFIG_PROC_FS	create_proc_info_entry("ide/ep93xx", 0, 0, ep93xx_get_info);#endif	/*	 * Do the actual read.	 */	return hwif->ide_dma_read(drive);}/***************************************************************************** * * ep93xx_ide_dma_write() * * This function sets up a dma write operation. * ****************************************************************************/static intep93xx_ide_dma_write(ide_drive_t *drive){	u8 lba48 = (drive->addressing == 1) ? 1 : 0;	struct request *rq = HWGROUP(drive)->rq;	unsigned int flags, i;	ide_hwif_t *hwif = HWIF(drive);	task_ioreg_t command = WIN_NOP;	DPRINTK("%s: ep93xx_ide_dma_write\n", drive->name);	/*	 * Check if we are already transferring on this dma channel.	 */	if (hwif->sg_dma_active || drive->waiting_for_dma) {		DPRINTK("%s: dma_write - dma is already active \n",			drive->name);		return 1;	}	/*	 * Compute the array index used for this request.	 */	i = drive->name[2] == 'a' ? 1 : 3;	/*	 * See if this request matches the most recent request, and that the	 * most recent request ended in error.	 */	if (g_bad && (g_cmd == WRITE) && (g_drive == drive) &&	    (g_sector == HWGROUP(drive)->rq->sector) &&	    (g_nr_sectors == HWGROUP(drive)->rq->nr_sectors)) {		g_cur_retries++;		if (g_cur_retries > g_max_retries[i])			g_max_retries[i]++;		if (g_cur_retries == RETRIES_PER_TRANSFER) {			g_bad = 0;			return 1;		}	} else {		g_cur_retries = 0;		g_cmd = WRITE;		g_drive = drive;		g_sector = HWGROUP(drive)->rq->sector;		g_nr_sectors = HWGROUP(drive)->rq->nr_sectors;	}	/*	 * Save information about this transfer.	 */	g_xfers[i]++;	g_sectors[i] += HWGROUP(drive)->rq->nr_sectors;	/*	 * Indicate that we're waiting for dma.	 */	drive->waiting_for_dma = 1;	/*	 * Configure DMA M2M channel flags for a destination address	 * hold, h/w initiated M2P transfer.	 */	flags = (DESTINATION_HOLD | TRANSFER_MODE_HW_M2P);	/*	 * Determine if we need the MDMA or UDMA data register.	 */	if (drive->current_speed & 0x20) {		flags |= (WS_IDE_MDMA_WRITE << WAIT_STATES_SHIFT);		/*		 * MDMA data register address.		 */		hwif->dma_base = IDEMDMADATAOUT - IO_BASE_VIRT + IO_BASE_PHYS;	} else {		flags |= (WS_IDE_UDMA_WRITE << WAIT_STATES_SHIFT);		/*		 * UDMA data register address.		 */		hwif->dma_base = IDEUDMADATAOUT - IO_BASE_VIRT + IO_BASE_PHYS;	}	/*	 * Configure the dma interface for this IDE operation.	 */	if (ep93xx_dma_config(hwif->hw.dma, 0, flags, ep93xx_ide_callback,			      (unsigned int)drive) != 0) {		drive->waiting_for_dma = 0;		return 1;	}	/*	 * Build the table of dma-able buffers.	 */	if (!(g_prd_count = ide_build_dmatable(drive))) {		drive->waiting_for_dma = 0;		/*		 * Fail, try PIO instead of DMA		 */		return 1;	}	/*	 * Indicate that we're waiting for dma.	 */	hwif->sg_dma_active = 1;	/*	 * test stuff	 */	g_prd_total = g_prd_count;	g_prd_returned = 0;	/*	 * Prepare the dma interface with some buffers from the	 * dma_table.	 */	do {		/*		 * Add a buffer to the dma interface.		 */		if (ep93xx_dma_add_buffer(hwif->hw.dma,					  hwif->dmatable_cpu[0],					  hwif->dma_base,					  hwif->dmatable_cpu[1], 0,					  g_prd_count) != 0)			break;		hwif->dmatable_cpu += 2;		/*		 * Decrement the count of dmatable entries		 */		g_prd_count--;	} while (g_prd_count);	/*	 * Nothing further is required if this is not a ide_disk (i.e. an ATAPI	 * device).	 */	if (drive->media != ide_disk)		return 0;	/*	 * Determine the command to be sent to the device.	 */	command = (lba48) ? WIN_WRITEDMA_EXT : WIN_WRITEDMA;	if (rq->cmd == IDE_DRIVE_TASKFILE) {		ide_task_t *args = rq->special;		command = args->tfRegister[IDE_COMMAND_OFFSET];	}	/*	 * Send the write dma command to the device.	 */	ide_execute_command(drive, command, &ep93xx_ide_dma_intr, 2*WAIT_CMD,			    &ep93xx_idedma_timer_expiry);	/*	 * initiate the dma transfer.	 */	return hwif->ide_dma_begin(drive);}/***************************************************************************** * * ep93xx_ide_dma_begin() * * This function initiates a dma transfer. * ****************************************************************************/static intep93xx_ide_dma_begin(ide_drive_t *drive){	ide_hwif_t *hwif = HWIF(drive);	DPRINTK("%s: ep93xx_ide_dma_begin\n", drive->name);	/*	 * The transfer is not bad yet.	 */	g_bad = 0;	/*	 * Configure the ep93xx ide controller for a dma operation.	 */	if (HWGROUP(drive)->rq->cmd == READ)		ep93xx_rwproc(drive, 0);	else		ep93xx_rwproc(drive, 1);	/*	 * Start the dma transfer.	 */	ep93xx_dma_start(hwif->hw.dma, 1, NULL);	return 0;}/***************************************************************************** * * ep93xx_ide_dma_end() * * This function performs any tasks needed to cleanup after a dma transfer. * Returns 1 if an error occured, and 0 otherwise. * ****************************************************************************/static intep93xx_ide_dma_end(ide_drive_t *drive){	ide_hwif_t * hwif = HWIF(drive);	int i, stat;	DPRINTK("%s: ep93xx_ide_dma_end\n", drive->name);	/*	 * See if there is any data left in UDMA FIFOs.  For a read, first wait	 * until either the DMA is done or the FIFO is empty.  If there is any	 * residual data in the FIFO, there was an error in the transfer.	 */	if (HWGROUP(drive)->rq->cmd == READ) {		do {			i = inl(IDEUDMARFST);		} while (!ep93xx_dma_is_done(hwif->hw.dma) &&			 ((i & 15) != ((i >> 4) & 15)));		udelay(1);	}	else		i = inl(IDEUDMAWFST);	if ((i & 15) != ((i >> 4) & 15))		g_bad = 1;            	/*	 * See if all of the buffers were returned by the DMA driver.  If not,	 * then a transfer error has occurred.	 */	if (!ep93xx_dma_is_done(hwif->hw.dma))		g_bad = 1;	/*	 * Put the dma interface into pause mode.	 */	ep93xx_dma_pause(hwif->hw.dma, 1, 0);	ep93xx_dma_flush(hwif->hw.dma);	/*	 * Enable PIO mode on the IDE interface.	 */	ep93xx_set_pio();	/*	 * Indicate there's no dma transfer currently in progress.	 */	hwif->sg_dma_active = 0;	drive->waiting_for_dma = 0;	/*	 * Get status from the ide device.	 */	stat = HWIF(drive)->INB(IDE_STATUS_REG);	/*	 * If this is an ATAPI device and it reported an error, then simply	 * return a DMA success.	 */	if ((drive->media != ide_disk) && (stat & ERR_STAT))		return 0;	/*	 * See if a CRC error occurred.  If so, then a transfer error has	 * occurred.	 */	if ((stat & ERR_STAT) && (HWIF(drive)->INB(IDE_ERROR_REG) & ICRC_ERR))		g_bad = 1;	/*	 * Compute the array index used for this request.	 */	i = HWGROUP(drive)->rq->cmd == READ ? 0 : 1;	i += drive->name[2] == 'a' ? 0 : 2;	/*	 * Fail if an error occurred during the DMA.	 */	if (g_bad) {		/*		 * Increment the number of retries for this request, along with		 * the number of consecutive errors for this drive.		 */		g_retries[i]++;		g_errors[i]++;		/*		 * See if the maximum number of consective errors has occurred.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝袜脚交一区二区| 精品视频1区2区3区| **欧美大码日韩| 欧美精选一区二区| 99亚偷拍自图区亚洲| 麻豆精品一区二区| 亚洲综合久久av| 国产人久久人人人人爽| 日韩一级片在线观看| 91蝌蚪porny九色| 久久亚洲一区二区三区明星换脸| 韩国成人在线视频| 视频一区二区三区入口| 亚洲综合在线五月| 在线不卡的av| 粉嫩av一区二区三区在线播放| 日韩va亚洲va欧美va久久| 国产精品国产成人国产三级 | 亚洲gay无套男同| 国产精品卡一卡二| 国产欧美久久久精品影院| 日韩三级中文字幕| 91精品麻豆日日躁夜夜躁| 一本色道久久综合亚洲aⅴ蜜桃 | 成人精品视频网站| 精品在线免费观看| 日韩av在线发布| 性感美女极品91精品| 亚洲制服丝袜在线| 一级日本不卡的影视| 欧美网站大全在线观看| 伊人色综合久久天天| 欧美熟乱第一页| 老司机精品视频在线| 天天影视色香欲综合网老头| 一区二区三区日韩欧美精品| 亚洲欧美经典视频| 亚洲码国产岛国毛片在线| 中文字幕日本不卡| 亚洲婷婷国产精品电影人久久| 国产精品卡一卡二卡三| 亚洲欧洲日韩女同| 亚洲人精品一区| 亚洲自拍偷拍九九九| 一区二区三区四区乱视频| 亚洲最色的网站| 亚洲成av人片一区二区梦乃| 午夜精品一区在线观看| 日韩黄色小视频| 免费视频最近日韩| 国产一区二区女| 成人午夜电影小说| 99re这里只有精品首页| 在线视频一区二区免费| 欧美老年两性高潮| 欧美伊人精品成人久久综合97 | 天堂精品中文字幕在线| 91蜜桃免费观看视频| 激情综合亚洲精品| 亚洲一区二区三区四区五区黄 | 久久影院电视剧免费观看| 欧美不卡一区二区三区四区| 久久网站热最新地址| 国产免费成人在线视频| 亚洲视频在线一区二区| 亚洲国产一二三| 捆绑调教美女网站视频一区| 国产69精品久久99不卡| 91视频免费播放| 91精品国产乱码久久蜜臀| 国产亚洲欧美一级| 樱花草国产18久久久久| 麻豆精品一区二区综合av| 懂色av一区二区夜夜嗨| 中文一区在线播放| 成人晚上爱看视频| 久久激情五月婷婷| 久久不见久久见中文字幕免费| 91色在线porny| 欧美午夜精品一区二区蜜桃| 日韩一区和二区| 久久精品一区二区| 亚洲一区在线观看网站| 美腿丝袜一区二区三区| 99精品视频一区二区| 7777女厕盗摄久久久| 国产视频一区二区在线| 亚洲高清在线精品| 国产成人精品综合在线观看 | 午夜精品成人在线| 国产高清不卡一区| 欧美乱妇一区二区三区不卡视频| 国产日韩欧美激情| 蜜桃一区二区三区四区| 一本久道中文字幕精品亚洲嫩| 欧美mv和日韩mv的网站| 亚洲一区二区三区四区的| 国产精品白丝jk黑袜喷水| 亚洲同性gay激情无套| 狠狠v欧美v日韩v亚洲ⅴ| 色八戒一区二区三区| 久久久五月婷婷| 7777精品久久久大香线蕉| 国产欧美视频一区二区| 青青草91视频| 欧美亚洲愉拍一区二区| 国产精品久久久一本精品| 久久99精品久久久久久国产越南| 一本色道久久综合精品竹菊| 国产欧美一区二区精品忘忧草| 日日骚欧美日韩| 欧美体内she精高潮| 国产精品久久久99| 高清视频一区二区| 2020日本不卡一区二区视频| 日本系列欧美系列| 9191国产精品| 首页国产欧美久久| 欧美色视频一区| 亚洲一区二区三区爽爽爽爽爽| 91在线精品一区二区| 国产精品久久免费看| 丁香啪啪综合成人亚洲小说| 久久久亚洲精品一区二区三区| 蜜桃在线一区二区三区| 欧美一区二区三区日韩视频| 国产欧美日韩亚州综合| 欧美人成免费网站| 蜜臀av性久久久久蜜臀av麻豆| 福利一区二区在线| 国产精品一卡二卡| 欧美mv日韩mv国产网站app| 日韩高清一区二区| 欧美高清视频不卡网| 亚洲在线中文字幕| 欧美日韩国产精品自在自线| 亚洲成a人v欧美综合天堂下载| 欧美三级韩国三级日本三斤| 午夜精品久久久| 91.com视频| 美女免费视频一区| 久久嫩草精品久久久精品| 国产精一品亚洲二区在线视频| 久久久www成人免费毛片麻豆| 国产丶欧美丶日本不卡视频| 国产精品你懂的在线| 99久久精品国产导航| 一区二区三区四区视频精品免费 | 国产v日产∨综合v精品视频| 久久精品在这里| www.视频一区| 一区二区欧美国产| 7777精品伊人久久久大香线蕉最新版| 青椒成人免费视频| 久久精品欧美一区二区三区不卡| 日韩欧美的一区二区| 日韩理论在线观看| 在线欧美一区二区| 天天av天天翘天天综合网色鬼国产| 欧美精品色综合| 蜜臂av日日欢夜夜爽一区| 国产欧美一区二区精品性色超碰 | 欧美精品色一区二区三区| 日韩国产欧美在线视频| 久久香蕉国产线看观看99| 99精品在线观看视频| 午夜精品久久久| 国产欧美视频在线观看| 91年精品国产| 日本视频免费一区| 国产欧美精品国产国产专区| 欧美丝袜第三区| 国产美女精品一区二区三区| 亚洲精品乱码久久久久| 欧美一级久久久久久久大片| 国产69精品一区二区亚洲孕妇| 亚洲国产日韩a在线播放| 精品国产乱码久久久久久久久| jlzzjlzz亚洲日本少妇| 日韩中文字幕麻豆| 国产精品久久久久一区| 欧美一区二区三区四区视频| 成人av网站在线观看| 男女性色大片免费观看一区二区| 国产精品欧美综合在线| 51精品久久久久久久蜜臀| 国产91色综合久久免费分享| 亚洲va欧美va天堂v国产综合| 久久久久久久网| 欧美精品第1页| 99精品1区2区| 国产一区二区免费视频| 视频一区在线播放| 综合中文字幕亚洲| 精品国产伦一区二区三区观看体验 | 国产午夜亚洲精品不卡| 欧美亚洲尤物久久| 99这里只有精品| 国产一区二区中文字幕| 日本欧美加勒比视频|