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

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

?? ncr5380.c

?? <Linux1.0核心游記>電子書+書后源碼+Linux1.0源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
 */static volatile int main_running = 0;/*  * Function : run_main(void) *  * Purpose : insure that the coroutine is running and will process our  * 	request.  main_running is checked/set here (in an inline function) *	rather than in NCR5380_main itself to reduce the chances of stack *	overflow. * */static __inline__ void run_main(void) {    cli();    if (!main_running) {	main_running = 1;        NCR5380_main();	/*          * main_running is cleared in NCR5380_main once it can't do 	 * more work, and NCR5380_main exits with interrupts disabled.	 */	sti();    } else 	sti();}#ifdef USLEEP#ifndef NCR5380_TIMER#error "NCR5380_TIMER must be defined so that this type of NCR5380 driver gets a unique timer."#endif/* * These need tweaking, and would probably work best as per-device  * flags initialized differently for disk, tape, cd, etc devices. * People with broken devices are free to experiment as to what gives * the best results for them. * * USLEEP_SLEEP should be a minimum seek time. * * USLEEP_POLL should be a maximum rotational latency. */#ifndef USLEEP_SLEEP/* 20 ms (reasonable hard disk speed) */#define USLEEP_SLEEP 2#endif/* 300 RPM (floppy speed) */#ifndef USLEEP_POLL#define USLEEP_POLL 20#endifstatic struct Scsi_Host * expires_first = NULL;/*  * Function : int should_disconnect (unsigned char cmd) * * Purpose : decide weather a commmand would normally disconnect or  *	not, since if it won't disconnect we should go to sleep. * * Input : cmd - opcode of SCSI command * * Returns : DISCONNECT_LONG if we should disconnect for a really long  * 	time (ie always, sleep, look for REQ active, sleep),  *	DISCONNECT_TIME_TO_DATA if we would only disconnect for a normal * 	time-to-data dealy, DISCONNECT_NONE if this command would return * 	immediately. * *      Future sleep algorithms based on time to data can exploit  *      something like this so they can differentiate between "normal"  *	(ie, read, write, seek) and unusual commands (ie, * format). * * Note : We don't deal with commands that handle an immediate disconnect, *         */static int should_disconnect (unsigned char cmd) {    switch (cmd) {    case READ_6:    case WRITE_6:    case SEEK_6:    case READ_10:    case WRITE_10:    case SEEK_10:	return DISCONNECT_TIME_TO_DATA;    case FORMAT_UNIT:    case SEARCH_HIGH:    case SEARCH_LOW:    case SEARCH_EQUAL:	return DISCONNECT_LONG;    default:	return DISCONNECT_NONE;    }}/* * Assumes instance->time_expires has been set in higher level code. */static int NCR5380_set_timer (struct Scsi_Host *instance) {    struct Scsi_Host *tmp, **prev;        cli();    if (((struct NCR5380_hostdata *) (instance->host_data))->next_timer) {	sti();	return -1;    }    for (prev = &expires_first, tmp = expires_first; tmp; 	prev = &(((struct NCR5380_hostdata *) tmp->host_data)->next_timer), 	tmp = ((struct NCR5380_hostdata *) tmp->host_data)->next_timer)	if (instance->time_expires < tmp->time_expires) 	    break;	       instance->next_timer = tmp;    *prev = instance;    timer_table[NCR5380_TIMER].expires = expires_first->time_expires;    timer_active |= 1 << NCR5380_TIMER;    sti;    return 0;}    /* Doing something about unwanted rentrancy here might be useful */void NCR5380_timer_fn(void) {    struct Scsi_Host *instance;    cli();    for (; expires_first && expires_first->time_expires >= jiffies; ) {	instance = ((NCR5380_hostdata *) expires_first->host_data)->	    expires_next;	((NCR5380_hostdata *) expires_first->host_data)->expires_next = 	    NULL;	((NCR5380_hostdata *) expires_first->host_data)->time_expires = 	    0;	expires_first = instance;    }    if (expires_first) {	timer_table[NCR5380_TIMER].expires = ((NCR5380_hostdata *) 	    expires_first->host_data)->time_expires;	timer_active |= (1 << NCR5380_TIMER);    } else {	timer_table[NCR5380_TIMER].expires = 0;	timer_active &= ~(1 << MCR5380_TIMER);    }    sti();    run_main();}#endif /* def USLEEP */static void NCR5380_all_init (void) {    static int done = 0;    if (!done) {#if (NDEBUG & NDEBUG_INIT)	printk("scsi : NCR5380_all_init()\n");#endif	done = 1;#ifdef USLEEP	timer_table[NCR5380_TIMER].expires = 0;	timer_table[NCR5380_TIMER].fn = NCR5380_timer_fn;#endif    }}#ifdef AUTOPROBE_IRQ/* * Function : int NCR5380_probe_irq (struct Scsi_Host *instance, int possible) *  * Purpose : autoprobe for the IRQ line used by the NCR5380.   * * Inputs : instance - pointer to this instance of the NCR5380 driver, *          possible - bitmask of permissable interrupts. * * Returns : number of the IRQ selected, IRQ_NONE if no interrupt fired. *  * XXX no effort is made to deal with spurious interrupts.  */static int probe_irq;static void probe_intr (int sig) {    probe_irq = sig;};static struct sigaction probe_sigaction = { probe_intr, 0, SA_INTERRUPT,    NULL};static int NCR5380_probe_irq (struct Scsi_Host *instance, int possible) {    NCR5380_local_declare();    struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *)	 instance->hostdata;    unsigned long timeout;    int trying_irqs, i, mask;    NCR5380_setup(instance);    for (trying_irqs = i = 0, mask = 1; i < 16; ++i, mask <<= 1) 	if ((mask & possible) &&  (irqaction (i, &probe_sigaction) 	    == 0)) 	    trying_irqs |= mask;    timeout = jiffies + 25;    probe_irq = IRQ_NONE;/* * A interrupt is triggered whenever BSY = false, SEL = true * and a bit set in the SELECT_ENABLE_REG is asserted on the  * SCSI bus. * * Note that the bus is only driven when the phase control signals * (I/O, C/D, and MSG) match those in the TCR, so we must reset that * to zero. */    NCR5380_write(TARGET_COMMAND_REG, 0);    NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);    NCR5380_write(OUTPUT_DATA_REG, hostdata->id_mask);    NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_DATA | 	ICR_ASSERT_SEL);    while (probe_irq == IRQ_NONE && jiffies < timeout);    NCR5380_write(SELECT_ENABLE_REG, 0);    NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);    for (i = 0, mask = 1; i < 16; ++i, mask <<= 1)	if (trying_irqs & mask) 	    free_irq(i);    return probe_irq;}#endif /* AUTOPROBE_IRQ */ /* * Function : void NCR58380_print_options (struct Scsi_Host *instance) * * Purpose : called by probe code indicating the NCR5380 driver *	     options that were selected. * * Inputs : instance, pointer to this instance.  Unused. */static void NCR5380_print_options (struct Scsi_Host *instance) {    printk(" generic options"#ifdef AUTOPROBE_IRQ    " AUTOPROBE_IRQ"#endif#ifdef AUTOSENSE     " AUTOSENSE"#endif#ifdef DIFFERENTIAL    " DIFFERENTIAL"#endif#ifdef REAL_DMA    " REAL DMA"#endif#ifdef REAL_DMA_POLL    " REAL DMA POLL"#endif#ifdef PARITY    " PARITY"#endif#ifdef PSEUDO_DMA    " PSEUDO DMA"#endif#ifdef SCSI2    " SCSI-2"#endif#ifdef UNSAFE    " UNSAFE "#endif    );#ifdef USLEEP    printk(" USLEEP, USLEEP_POLL=%d USLEEP_SLEEP=%d", USLEEP_POLL, USLEEP_SLEEP);#endif    printk(" generic release=%d", NCR5380_PUBLIC_RELEASE);}/*  * Function : void NCR5380_init (struct Scsi_Host *instance) * * Purpose : initializies *instance and corresponding 5380 chip. * * Inputs : instance - instantiation of the 5380 driver.   * * Notes : I assume that the host, hostno, and id bits have been * 	set correctly.  I don't care about the irq and other fields.  *  */static void NCR5380_init (struct Scsi_Host *instance) {    NCR5380_local_declare();    int i;    struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *) 	instance->hostdata;    NCR5380_setup(instance);    NCR5380_all_init();    hostdata->id_mask = 1 << instance->this_id;    for (i = hostdata->id_mask; i <= 0x80; i <<= 1)	if (i > hostdata->id_mask)	    hostdata->id_higher_mask |= i;    for (i = 0; i < 8; ++i)	hostdata->busy[i] = 0;#ifdef REAL_DMA    hostdata->dmalen = 0;#endif    hostdata->connected = NULL;    hostdata->issue_queue = NULL;    hostdata->disconnected_queue = NULL;    hostdata->flags = FLAG_CHECK_LAST_BYTE_SENT;    if (!the_template) {	the_template = instance->hostt;	first_instance = instance;    }	#ifdef USLEEP    hostdata->time_expires = 0;    hostdata->next_timer = NULL;#endif#ifndef AUTOSENSE    if ((instance->cmd_per_lun > 1) || instance->can_queue > 1)) 	 printk("scsi%d : WARNING : support for multiple outstanding commands enabled\n"	        "         without AUTOSENSE option, contigent alligence conditions may\n"	        "         be incorrectly cleared.\n", instance->host_no);#endif /* def AUTOSENSE */    NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);    NCR5380_write(MODE_REG, MR_BASE);    NCR5380_write(TARGET_COMMAND_REG, 0);    NCR5380_write(SELECT_ENABLE_REG, 0);}/*  * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd,  *	void (*done)(Scsi_Cmnd *))  * * Purpose :  enqueues a SCSI command * * Inputs : cmd - SCSI command, done - function called on completion, with *	a pointer to the command descriptor. *  * Returns : 0 * * Side effects :  *      cmd is added to the per instance issue_queue, with minor  *	twiddling done to the host specific fields of cmd.  If the  *	main coroutine is not running, it is restarted. * *//* Only make static if a wrapper function is used */#ifndef NCR5380_queue_commandstatic#endifint NCR5380_queue_command (Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *)) {    struct NCR5380_hostdata *hostdata = (struct NCR5380_hostdata *)	cmd->host->hostdata;    Scsi_Cmnd *tmp;#if (NDEBUG & NDEBUG_NO_WRITE)    switch (cmd->cmnd[0]) {    case WRITE:    case WRITE_10:	printk("scsi%d : WRITE attempted with NO_WRITE debugging flag set\n",	    instance->host_no);	cmd->result = (DID_ERROR << 16);	done(cmd);	return 0;    }#endif /* (NDEBUG & NDEBUG_NO_WRITE) */    /*      * We use the host_scribble field as a pointer to the next command       * in a queue      */    cmd->host_scribble = NULL;    cmd->scsi_done = done;    cmd->result = 0;    /*      * Insert the cmd into the issue queue. Note that REQUEST SENSE      * commands are added to the head of the queue since any command will     * clear the contingent allegience condition that exists and the      * sense data is only guranteed to be valid while the condition exists.     */    cli();    if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) {	cmd->host_scribble = (unsigned char *) hostdata->issue_queue;	hostdata->issue_queue = cmd;    } else {	for (tmp = (Scsi_Cmnd *) hostdata->issue_queue; tmp->host_scribble; 		tmp = (Scsi_Cmnd *) tmp->host_scribble);	tmp->host_scribble = (unsigned char *) cmd;    }#if (NDEBUG & NDEBUG_QUEUES)    printk("scsi%d : command added to %s of queue\n", instance->host_no,	(cmd->cmnd[0] == REQUEST_SENSE) ? "head" : "tail");#endif/* Run the coroutine if it isn't allready running. */    run_main();    return 0;}/* * Function : NCR5380_main (void)  *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人动漫视频在线| 一区二区激情小说| 精品亚洲成a人| 久久影院午夜片一区| 国产精品中文字幕日韩精品 | 亚洲18女电影在线观看| 欧美区视频在线观看| 蜜桃视频一区二区三区在线观看| 日韩欧美一区二区久久婷婷| 国产一区二区三区免费播放 | 91在线观看下载| 一区二区久久久| 日韩免费观看高清完整版| 国产经典欧美精品| 亚洲猫色日本管| 欧美一区二区不卡视频| 国产·精品毛片| 亚洲午夜电影在线观看| 26uuu精品一区二区在线观看| 成人免费高清视频在线观看| 亚洲男人电影天堂| 欧美一区二区久久| 国产成人av一区| 亚洲高清一区二区三区| 26uuu亚洲综合色| 色婷婷综合久久久久中文一区二区 | 中文字幕一区日韩精品欧美| 欧美视频完全免费看| 精品一区二区精品| 一区二区三区在线影院| 久久久一区二区三区| 日本二三区不卡| 精品一区二区三区的国产在线播放| 久久精品网站免费观看| 欧美性色黄大片| 韩国一区二区在线观看| 亚洲电影欧美电影有声小说| 国产午夜一区二区三区| 69堂国产成人免费视频| 成人国产精品免费观看视频| 免费久久99精品国产| 亚洲视频香蕉人妖| 欧美成人一区二区三区片免费 | 蜜桃久久久久久久| 国产精品久久二区二区| 精品久久人人做人人爰| 欧美精品在线一区二区三区| 99精品黄色片免费大全| 国产精品自拍av| 五月综合激情婷婷六月色窝| 亚洲精品一二三| 日本一区二区三区高清不卡| 日韩三级视频中文字幕| 欧美日韩精品二区第二页| 99视频有精品| 97久久精品人人做人人爽| 久久福利视频一区二区| 日日摸夜夜添夜夜添精品视频 | 国产欧美视频一区二区| 日韩一卡二卡三卡| 欧美片网站yy| 欧美日韩国产系列| 欧美三级午夜理伦三级中视频| av亚洲精华国产精华精| 丁香桃色午夜亚洲一区二区三区| 精品一二三四在线| 蜜臀av一级做a爰片久久| 亚洲va欧美va国产va天堂影院| 伊人色综合久久天天人手人婷| 17c精品麻豆一区二区免费| 国产精品女主播av| 欧美国产亚洲另类动漫| 国产日韩一级二级三级| 国产视频一区在线观看| 久久久一区二区三区捆绑**| 久久久久久久久久电影| 国产日韩精品一区二区三区| 久久久一区二区| 国产亚洲欧美一区在线观看| 中文字幕高清一区| 国产精品伦理一区二区| 亚洲欧美日韩在线播放| 亚洲激情在线激情| 亚洲国产精品久久久久秋霞影院| 亚洲图片有声小说| 午夜精品国产更新| 美女视频黄免费的久久| 国产一区二区在线观看免费| 国产91丝袜在线观看| 99精品欧美一区二区蜜桃免费| 91成人在线观看喷潮| 欧美另类高清zo欧美| 日韩欧美一级二级| 久久久五月婷婷| 日韩理论在线观看| 亚洲国产一区在线观看| 免费高清视频精品| 国内不卡的二区三区中文字幕| 国产乱码精品一区二区三区av| 成人免费视频一区| 色视频欧美一区二区三区| 欧美日韩一区在线观看| 日韩一区二区在线看| 久久九九久精品国产免费直播| 国产精品福利一区二区| 性欧美疯狂xxxxbbbb| 久久91精品国产91久久小草| 99热99精品| 欧美日韩日日夜夜| 久久久综合网站| 亚洲精品国产无天堂网2021| 日韩高清欧美激情| 福利视频网站一区二区三区| 91久久精品日日躁夜夜躁欧美| 日韩欧美国产午夜精品| 中文字幕亚洲欧美在线不卡| 日韩国产欧美视频| 成人av网址在线观看| 欧美激情在线看| 一区二区三区免费看视频| 韩国精品在线观看| 色哟哟精品一区| 26uuu精品一区二区| 亚洲成人免费电影| 成人免费视频视频| 欧美一二三区在线| 亚洲一区视频在线观看视频| 国产精品88888| 欧美精品一卡两卡| 亚洲色欲色欲www在线观看| 国产综合色视频| 3atv一区二区三区| 一区二区高清视频在线观看| 国产米奇在线777精品观看| 欧美视频一区二区三区在线观看| 国产亚洲成aⅴ人片在线观看 | 麻豆精品视频在线观看免费| 色婷婷av一区| 国产免费久久精品| 精品一区二区免费在线观看| 欧美福利一区二区| 亚洲精品一二三| av中文一区二区三区| 久久亚洲精品国产精品紫薇| 奇米四色…亚洲| 欧美日韩一本到| 亚洲综合一区在线| 日本高清不卡在线观看| 国产精品久久久久久久久图文区 | 丝袜美腿亚洲色图| 色婷婷综合激情| 国产精品成人在线观看| 成人视屏免费看| 国产欧美日韩三级| 国产精品91xxx| 国产三级一区二区三区| 国产一区二区三区高清播放| 日韩女优制服丝袜电影| 青娱乐精品视频| 91精品在线观看入口| 天天色天天操综合| 91精品国产综合久久精品app| 亚洲电影一级黄| 欧美高清性hdvideosex| 亚洲成av人片| 91精品啪在线观看国产60岁| 日韩电影在线免费看| 欧美精品18+| 日韩精品电影在线观看| 欧美电影免费提供在线观看| 老司机精品视频一区二区三区| 精品久久久久香蕉网| 狠狠色狠狠色综合| 国产婷婷色一区二区三区| 国产激情一区二区三区桃花岛亚洲| 久久精品一区二区三区不卡牛牛| 高清beeg欧美| 亚洲欧美视频在线观看| 欧美日韩中文字幕精品| 日韩高清欧美激情| 精品动漫一区二区三区在线观看| 国产精品1024| 国产精品久久久久一区二区三区| 99视频有精品| 香蕉久久一区二区不卡无毒影院 | 麻豆精品精品国产自在97香蕉| 日韩欧美色综合| 91免费视频观看| 亚洲va韩国va欧美va精品 | 成人国产视频在线观看| 亚洲精品国产视频| 91精品在线免费观看| 国产成人免费在线| 日韩美女精品在线| 在线91免费看| 夫妻av一区二区| 亚洲福利视频一区| 26uuu欧美日本| 91丨国产丨九色丨pron| 日本欧美一区二区三区乱码|