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

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

?? scsi.c

?? linux0.99源代碼用于研究linux操作系統
?? C
?? 第 1 頁 / 共 3 頁
字號:
					break;			        }			}			else				{				status = FINISHED;				break;				}			/* fall through to REDO */		case REDO:			if (SCpnt->flags & WAS_SENSE)							scsi_request_sense(SCpnt); 				else				  {			    memcpy ((void *) SCpnt->cmnd,				    (void*) SCpnt->data_cmnd, 				    sizeof(SCpnt->data_cmnd));			    SCpnt->request_buffer = SCpnt->buffer;			    SCpnt->request_bufflen = SCpnt->bufflen;			    internal_cmnd (SCpnt);			  };			break;			default: 			INTERNAL_ERROR;		}	if (status == FINISHED) 		{		#ifdef DEBUG			printk("Calling done function - at address %08x\n", SCpnt->done);		#endif		host_busy[host]--; /* Indicate that we are free */		wake_up(&host_wait[host]);		SCpnt->result = result | ((exit & 0xff) << 24);		SCpnt->done (SCpnt);		}#undef FINISHED#undef REDO#undef MAYREDO#undef PENDING	}/*	The scsi_abort function interfaces with the abort() function of the host	we are aborting, and causes the current command to not complete.  The 	caller should deal with any error messages or status returned on the 	next call.		This will not be called rentrantly for a given host.*/	/*	Since we're nice guys and specified that abort() and reset()	can be non-reentrant.  The internal_timeout flags are used for	this.*/int scsi_abort (Scsi_Cmnd * SCpnt, int why)	{	int temp, oldto;	int host = SCpnt->host;		while(1)			{		cli();		if (SCpnt->internal_timeout & IN_ABORT) 			{			sti();			while (SCpnt->internal_timeout & IN_ABORT);			}		else			{				SCpnt->internal_timeout |= IN_ABORT;			oldto = update_timeout(SCpnt, ABORT_TIMEOUT);						sti();			if (!host_busy[host] || !scsi_hosts[host].abort(SCpnt, why))				temp =  0;			else				temp = 1;						cli();			SCpnt->internal_timeout &= ~IN_ABORT;			update_timeout(SCpnt, oldto);			sti();			return temp;			}		}		}int scsi_reset (Scsi_Cmnd * SCpnt)	{	int temp, oldto;	Scsi_Cmnd * SCpnt1;	int host = SCpnt->host;	#ifdef DEBUG	printk("Danger Will Robinson! - SCSI bus for host %d is being reset.\n",host);#endif	while (1) {		cli();			if (SCpnt->internal_timeout & IN_RESET)			{			sti();			while (SCpnt->internal_timeout & IN_RESET);			}		else			{			SCpnt->internal_timeout |= IN_RESET;			oldto = update_timeout(SCpnt, RESET_TIMEOUT);									if (host_busy[host])				{					sti();				SCpnt1 = host_queue[host];				while(SCpnt1) {				  if ((SCpnt1->request.dev > 0) &&				      !(SCpnt1->flags & IS_RESETTING) && 				      !(SCpnt1->internal_timeout & IN_ABORT))				    scsi_abort(SCpnt1, DID_RESET);				  SCpnt1 = SCpnt1->next;				};				temp = scsi_hosts[host].reset();							}							else				{				host_busy[host]++;					sti();				temp = scsi_hosts[host].reset();				last_reset[host] = jiffies;				host_busy[host]--;				}				cli();			SCpnt->internal_timeout &= ~IN_RESET;			update_timeout(SCpnt, oldto);			sti();			return temp;				}		}	}			 static void scsi_main_timeout(void)	{	/*		We must not enter update_timeout with a timeout condition still pending.	*/	int timed_out, host;	Scsi_Cmnd * SCpnt = NULL;	do 	{			cli();	/*		Find all timers such that they have 0 or negative (shouldn't happen)		time remaining on them.	*/					timed_out = 0;		for(host = 0; host < max_scsi_hosts; host++) {		  SCpnt = host_queue[host];		  while (SCpnt){		    if (SCpnt->timeout != 0 && SCpnt->timeout <= time_elapsed)		      {			sti();			SCpnt->timeout = 0;			scsi_times_out(SCpnt);			++timed_out; 			cli();		      }		  SCpnt =  SCpnt->next;		  };		};		update_timeout(NULL, 0);	      } while (timed_out);		sti();      }/*	These are used to keep track of things. */static int time_start, time_elapsed;/*	The strategy is to cause the timer code to call scsi_times_out()	when the soonest timeout is pending.  	The arguments are used when we are queueing a new command, because	we do not want to subtract the time used from this time, but when we	set the timer, we want to take this value into account.*/	static int update_timeout(Scsi_Cmnd * SCset, int timeout)	{	unsigned int least, used, host;	unsigned int oldto;	Scsi_Cmnd * SCpnt = NULL;	cli();/* 	Figure out how much time has passed since the last time the timeouts    	were updated */	used = (time_start) ? (jiffies - time_start) : 0;/*	Find out what is due to timeout soonest, and adjust all timeouts for	the amount of time that has passed since the last time we called 	update_timeout. */		oldto = 0;	if(SCset){	  oldto = SCset->timeout - used;	  SCset->timeout = timeout + used;	};	least = 0xffffffff;	for(host = 0; host < max_scsi_hosts; host++) {	  SCpnt = host_queue[host];	  while (SCpnt){	    if (SCpnt->timeout > 0 && (SCpnt->timeout -= used) < least)	      least = SCpnt->timeout;	    SCpnt =  SCpnt->next;	  };	};/*	If something is due to timeout again, then we will set the next timeout 	interrupt to occur.  Otherwise, timeouts are disabled.*/		if (least != 0xffffffff)		{		time_start = jiffies;			timer_table[SCSI_TIMER].expires = (time_elapsed = least) + jiffies;			timer_active |= 1 << SCSI_TIMER;		}	else		{		timer_table[SCSI_TIMER].expires = time_start = time_elapsed = 0;		timer_active &= ~(1 << SCSI_TIMER);		}		sti();	return oldto;	}		static unsigned short * dma_malloc_freelist = NULL;static unsigned int dma_sectors = 0;unsigned int dma_free_sectors = 0;unsigned int need_isa_buffer = 0;static unsigned char * dma_malloc_buffer = NULL;char *scsi_malloc(unsigned int len){  unsigned int nbits, mask;  int i, j;  if((len & 0x1ff) || len > 4096)    panic("Inappropriate buffer size requested");    cli();  nbits = len >> 9;  mask = (1 << nbits) - 1;    for(i=0;i < (dma_sectors >> 4); i++)    for(j=0; j<17-nbits; j++){      if ((dma_malloc_freelist[i] & (mask << j)) == 0){	dma_malloc_freelist[i] |= (mask << j);	sti();	dma_free_sectors -= nbits;#ifdef DEBUG	printk("SMalloc: %d %x ",len, dma_malloc_buffer + (i << 13) + (j << 9));#endif	return (void*) ((unsigned long) dma_malloc_buffer + (i << 13) + (j << 9));      };    };  sti();  return NULL;  /* Nope.  No more */}int scsi_free(char *obj, unsigned int len){  int offset;  int page, sector, nbits, mask;#ifdef DEBUG  printk("Sfree %x %d\n",obj, len);#endif  offset = ((int) obj) - ((int) dma_malloc_buffer);  if (offset < 0) panic("Bad offset");  page = offset >> 13;  sector = offset >> 9;  if(sector >= dma_sectors) panic ("Bad page");  sector = (offset >> 9) & 15;  nbits = len >> 9;  mask = (1 << nbits) - 1;  if ((mask << sector) > 0xffff) panic ("Bad memory alignment");  cli();  if(dma_malloc_freelist[page] & (mask << sector) != (mask<<sector))    panic("Trying to free unused memory");  dma_free_sectors += nbits;  dma_malloc_freelist[page] &= ~(mask << sector);  sti();  return 0;}/*	scsi_dev_init() is our initialization routine, which inturn calls host 	initialization, bus scanning, and sd/st initialization routines.  It 	should be called from main().*/unsigned long scsi_dev_init (unsigned long memory_start,unsigned long memory_end)	{	int i;	int host;	Scsi_Cmnd * SCpnt;#ifdef FOO_ON_YOU	return;#endif		timer_table[SCSI_TIMER].fn = scsi_main_timeout;	timer_table[SCSI_TIMER].expires = 0;	scsi_init();            /* initialize all hosts */	for (i = 0; i < max_scsi_hosts; ++i)		last_reset[i] = 0;					scsi_devices = (Scsi_Device *) memory_start;        scan_scsis();           /* scan for scsi devices */	memory_start += NR_SCSI_DEVICES * sizeof(Scsi_Device);	memory_start = sd_init1(memory_start, memory_end);        memory_start = st_init1(memory_start, memory_end);	memory_start = sr_init1(memory_start, memory_end);	last_cmnd = (Scsi_Cmnd *) memory_start;	SCpnt = last_cmnd;	for (i=0; i< NR_SCSI_DEVICES; i++) {	  int j;	  switch (scsi_devices[i].type)	    {	    case TYPE_TAPE :	      st_attach(&scsi_devices[i]);	      break;	    case TYPE_ROM:	      sr_attach(&scsi_devices[i]);	      break;	    case TYPE_DISK:	    case TYPE_MOD:	      sd_attach(&scsi_devices[i]);	    default:	      break;	    };	  if(scsi_devices[i].type != -1){	    for(j=0;j<scsi_hosts[scsi_devices[i].host_no].cmd_per_lun;j++){	      SCpnt->host = scsi_devices[i].host_no;	      SCpnt->target = scsi_devices[i].id;	      SCpnt->lun = scsi_devices[i].lun;	      SCpnt->index = i;	      SCpnt->request.dev = -1; /* Mark not busy */	      SCpnt->use_sg = 0;	      host = scsi_devices[i].host_no;	      if(host_queue[host])		host_queue[host]->prev = SCpnt;	      SCpnt->next = host_queue[host];	      SCpnt->prev = NULL;	      host_queue[host] = SCpnt;	      SCpnt++;	    };	  };	};	memory_start = (int) SCpnt;	if (NR_SD > 0 || NR_SR > 0 || NR_ST > 0)	  dma_sectors = 16;  /* Base value we use */	for (i = 0; i < NR_SCSI_DEVICES; ++i) {	  int host;	  host = scsi_devices[i].host_no;	  	  if(scsi_devices[i].type != TYPE_TAPE)	    dma_sectors += ((scsi_hosts[host].sg_tablesize * 			     sizeof(struct scatterlist) + 511) >> 9) * 			       scsi_hosts[host].cmd_per_lun;	  	  if(scsi_hosts[host].unchecked_isa_dma &&	     memory_end > ISA_DMA_THRESHOLD &&	     scsi_devices[i].type != TYPE_TAPE) {	    dma_sectors += 32 * scsi_hosts[host].cmd_per_lun;	    need_isa_buffer++;	  };	};	dma_sectors = (dma_sectors + 15) & 0xfff0;	dma_free_sectors = dma_sectors;  /* This must be a multiple of 16 */	memory_start = (memory_start + 3) & 0xfffffffc;	dma_malloc_freelist = (unsigned short *) memory_start;	memory_start += dma_sectors >> 3;	memset(dma_malloc_freelist, 0, dma_sectors >> 3);	if(memory_start & 1) memory_start++; /* Some host adapters require						buffers to be word aligned */	dma_malloc_buffer = (char *) memory_start;	memory_start += dma_sectors << 9;	memory_start = sd_init(memory_start, memory_end); /* init scsi disks */        memory_start = st_init(memory_start, memory_end); /* init scsi tapes */	memory_start = sr_init(memory_start, memory_end);	return memory_start;	}static void print_inquiry(unsigned char *data){        int i;	printk("  Vendor: ");	for (i = 8; i < 16; i++)	        {	        if (data[i] >= 20 && i < data[4] + 5)		        printk("%c", data[i]);	        else		        printk(" ");	        }	printk("  Model: ");	for (i = 16; i < 32; i++)	        {	        if (data[i] >= 20 && i < data[4] + 5)		        printk("%c", data[i]);	        else		        printk(" ");	        }	printk("  Rev: ");	for (i = 32; i < 36; i++)	        {	        if (data[i] >= 20 && i < data[4] + 5)		        printk("%c", data[i]);	        else		        printk(" ");	        }	printk("\n");	i = data[0] & 0x1f;	printk("  Type:   %s ", i == 0x00 ? "Direct-Access    " :				i == 0x01 ? "Sequential-Access" :				i == 0x02 ? "Printer          " :				i == 0x03 ? "Processor        " :				i == 0x04 ? "WORM             " :				i == 0x05 ? "CD-ROM           " :				i == 0x06 ? "Scanner          " :				i == 0x07 ? "Optical Device   " :				i == 0x08 ? "Medium Changer   " :				i == 0x09 ? "Communications   " :				            "Unknown          " );	printk("                 ANSI SCSI revision: %02x", data[2] & 0x07);	if ((data[2] & 0x07) == 1 && (data[3] & 0x0f) == 1)	  printk(" CCS\n");	else	  printk("\n");}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产不卡高清在线观看视频| 亚洲免费观看高清完整版在线| 成人性生交大片免费看视频在线| 亚洲乱码一区二区三区在线观看| 精品区一区二区| 在线精品视频免费播放| 国产麻豆视频精品| 日韩精品欧美精品| 亚洲激情欧美激情| 国产欧美精品在线观看| 欧美精品久久99| 在线观看免费成人| 暴力调教一区二区三区| 黄一区二区三区| 日本午夜一区二区| 亚洲一区二区三区精品在线| 国产精品剧情在线亚洲| www日韩大片| 欧美成人艳星乳罩| 日韩视频一区二区在线观看| 欧美色涩在线第一页| 色哟哟一区二区在线观看| 成人免费视频视频在线观看免费 | 黑人精品欧美一区二区蜜桃| 亚洲国产精品尤物yw在线观看| 中文字幕在线观看不卡| 久久九九国产精品| 精品久久久久久久久久久久久久久| 欧美日韩激情一区二区三区| 欧美性猛交xxxx黑人交| 91玉足脚交白嫩脚丫在线播放| 国产成人在线色| 丁香六月久久综合狠狠色| 国产精品自拍av| 国产一区二区三区免费观看 | 日韩一卡二卡三卡四卡| 欧美一区二区三区四区五区| 亚洲精品日日夜夜| 欧美一级久久久久久久大片| 欧美剧情片在线观看| 欧美日韩一区久久| 在线不卡中文字幕播放| 666欧美在线视频| 日韩一区二区在线观看视频| 日韩欧美的一区二区| 欧美电影免费提供在线观看| 精品成人一区二区三区| 国产亚洲欧美日韩日本| 欧美国产综合色视频| 国产精品麻豆久久久| 亚洲人成人一区二区在线观看 | 久久99热狠狠色一区二区| 日本不卡一区二区| 麻豆精品久久精品色综合| 久久精品国产色蜜蜜麻豆| 精品一区二区综合| 成人综合日日夜夜| 欧美日韩一区视频| www.日韩精品| 91精品国产综合久久久久久漫画| 在线欧美小视频| 色综合久久久久久久久| 亚洲精品久久久蜜桃| 欧美国产乱子伦| 欧美做爰猛烈大尺度电影无法无天| 精品在线一区二区| 色婷婷精品久久二区二区蜜臀av| 亚洲综合精品久久| 久久久久久久久久久久久夜| 精品国产精品网麻豆系列| 国产精品日产欧美久久久久| 欧美大片国产精品| 欧美精品亚洲一区二区在线播放| 国产精品白丝jk白祙喷水网站| 全国精品久久少妇| 日本欧美韩国一区三区| 理论片日本一区| 丝袜a∨在线一区二区三区不卡| 欧美不卡激情三级在线观看| 欧美精品1区2区| 成人精品亚洲人成在线| 日韩国产欧美三级| 日本伊人色综合网| 亚洲成人自拍偷拍| 日韩av在线播放中文字幕| 美腿丝袜在线亚洲一区| 丁香六月综合激情| 欧美男男青年gay1069videost| 日韩一区二区视频在线观看| 精品盗摄一区二区三区| 久久午夜羞羞影院免费观看| 亚洲成人免费电影| 亚洲国产美国国产综合一区二区| 51精品久久久久久久蜜臀| 久久久久亚洲综合| 亚洲成人av电影在线| 国产1区2区3区精品美女| 91麻豆精品国产91久久久使用方法 | 国模套图日韩精品一区二区 | 国产一区二区三区四| 91成人免费在线视频| 国产亚洲污的网站| 免费人成在线不卡| 日本久久电影网| 亚洲国产精华液网站w| 久久福利资源站| 欧美精品在线观看播放| 亚洲女女做受ⅹxx高潮| 岛国精品在线播放| 久久网这里都是精品| 午夜精品成人在线| 一本色道亚洲精品aⅴ| 欧美韩国一区二区| 国产麻豆欧美日韩一区| 日韩精品一区二区三区蜜臀| 亚洲成人av一区二区三区| 亚洲精品成人a在线观看| 欧美日韩精品一区二区三区蜜桃| 国产美女在线观看一区| 欧美一区二区精品| 亚洲午夜视频在线观看| 色一情一伦一子一伦一区| 国产精品毛片久久久久久| 国产剧情在线观看一区二区| 日韩欧美电影一二三| 日本不卡不码高清免费观看| 欧美色图12p| 亚洲高清在线视频| 欧美专区日韩专区| 亚洲与欧洲av电影| 欧美在线高清视频| 亚洲国产日韩综合久久精品| 欧美自拍偷拍一区| 亚洲一二三四久久| 欧洲精品在线观看| 午夜精品久久久久久久| 欧美精品99久久久**| 日韩精品三区四区| 欧美一区二区视频在线观看| 日韩福利电影在线| 日韩欧美亚洲国产另类| 美女视频一区在线观看| 2021国产精品久久精品| 国产盗摄女厕一区二区三区| 中文子幕无线码一区tr| 成人精品gif动图一区| 亚洲欧洲精品一区二区精品久久久 | 国产又黄又大久久| 久久先锋影音av鲁色资源| 国产成人午夜视频| 中文字幕在线不卡一区| 色哦色哦哦色天天综合| 亚洲18影院在线观看| 日韩欧美第一区| 国产精品88av| 亚洲激情一二三区| 欧美一区二区私人影院日本| 黑人巨大精品欧美黑白配亚洲| 中文在线资源观看网站视频免费不卡 | 欧美变态凌虐bdsm| 成人深夜在线观看| 一区二区欧美精品| 日韩欧美国产一区二区三区| 日韩电影在线一区二区| 欧美日韩精品是欧美日韩精品| 久久精品国产99国产精品| 国产精品天天看| 欧美在线色视频| 免费成人深夜小野草| 国产视频一区二区三区在线观看| 91丨porny丨国产入口| 亚洲国产日日夜夜| 久久久不卡影院| 欧美视频三区在线播放| 黄色成人免费在线| 亚洲激情五月婷婷| 亚洲精品一区二区三区在线观看| 成人av在线资源网| 日本不卡视频在线观看| 国产精品久久久久久久久果冻传媒 | 久久久国产综合精品女国产盗摄| 91麻豆成人久久精品二区三区| 日本在线观看不卡视频| 国产精品精品国产色婷婷| 日韩一区和二区| 91热门视频在线观看| 国产在线播放一区| 亚洲一区二区三区四区五区黄| 国产欧美一区视频| 91精品国产高清一区二区三区蜜臀| 99久久久久久99| 久久精品国产99| 国产精品国产自产拍在线| 91福利国产精品| 欧美极品xxx| 91精品午夜视频| 91浏览器在线视频| 国产一区二区三区四| 欧美aⅴ一区二区三区视频| 亚洲毛片av在线|