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

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

?? su.c

?? 講述linux的初始化過程
?? C
?? 第 1 頁 / 共 5 頁
字號:
	if (info->xmit_cnt < WAKEUP_CHARS)		su_sched_event(info, RS_EVENT_WRITE_WAKEUP);#ifdef SERIAL_DEBUG_INTR	printk("T%d...", info->xmit_cnt);#endif	if (intr_done)		*intr_done = 0;	if (info->xmit_cnt <= 0) {		info->IER &= ~UART_IER_THRI;		serial_out(info, UART_IER, info->IER);	}}static __inline__ voidcheck_modem_status(struct su_struct *info){	int	status;	struct	async_icount *icount;	status = serial_in(info, UART_MSR);	if (status & UART_MSR_ANY_DELTA) {		icount = &info->icount;		/* update input line counters */		if (status & UART_MSR_TERI)			icount->rng++;		if (status & UART_MSR_DDSR)			icount->dsr++;		if (status & UART_MSR_DDCD) {			icount->dcd++;#ifdef CONFIG_HARD_PPS			if ((info->flags & ASYNC_HARDPPS_CD) &&			    (status & UART_MSR_DCD))				hardpps();#endif		}		if (status & UART_MSR_DCTS)			icount->cts++;		wake_up_interruptible(&info->delta_msr_wait);	}	if ((info->flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {#if (defined(SERIAL_DEBUG_OPEN) || defined(SERIAL_DEBUG_INTR))		printk("ttys%d CD now %s...", info->line,		       (status & UART_MSR_DCD) ? "on" : "off");#endif				if (status & UART_MSR_DCD)			wake_up_interruptible(&info->open_wait);		else if (!((info->flags & ASYNC_CALLOUT_ACTIVE) &&			   (info->flags & ASYNC_CALLOUT_NOHUP))) {#ifdef SERIAL_DEBUG_OPEN			printk("doing serial hangup...");#endif			if (info->tty)				tty_hangup(info->tty);	}	}	if (info->flags & ASYNC_CTS_FLOW) {		if (info->tty->hw_stopped) {			if (status & UART_MSR_CTS) {#if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW))				printk("CTS tx start...");#endif				info->tty->hw_stopped = 0;				info->IER |= UART_IER_THRI;				serial_out(info, UART_IER, info->IER);				su_sched_event(info, RS_EVENT_WRITE_WAKEUP);				return;			}		} else {			if (!(status & UART_MSR_CTS)) {#if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW))				printk("CTS tx stop...");#endif				info->tty->hw_stopped = 1;				info->IER &= ~UART_IER_THRI;				serial_out(info, UART_IER, info->IER);			}		}	}}/* * This is the kbd/mouse serial driver's interrupt routine */static voidsu_kbd_ms_interrupt(int irq, void *dev_id, struct pt_regs * regs){	struct su_struct *info = (struct su_struct *)dev_id;	unsigned char status;#ifdef SERIAL_DEBUG_INTR	printk("su_kbd_ms_interrupt(%s)...", __irq_itoa(irq));#endif	if (!info)		return;	if (serial_in(info, UART_IIR) & UART_IIR_NO_INT)		return;	status = serial_inp(info, UART_LSR);#ifdef SERIAL_DEBUG_INTR	printk("status = %x...", status);#endif	if ((status & UART_LSR_DR) || (status & UART_LSR_BI))		receive_kbd_ms_chars(info, regs,				     (status & UART_LSR_BI) != 0);#ifdef SERIAL_DEBUG_INTR	printk("end.\n");#endif}/* * This is the serial driver's generic interrupt routine */static voidsu_serial_interrupt(int irq, void *dev_id, struct pt_regs * regs){	int status;	struct su_struct *info;	int pass_counter = 0;#ifdef SERIAL_DEBUG_INTR	printk("su_serial_interrupt(%s)...", __irq_itoa(irq));#endif	info = (struct su_struct *)dev_id;	if (!info || !info->tty) {#ifdef SERIAL_DEBUG_INTR		printk("strain\n");#endif		return;	}	do {		status = serial_inp(info, UART_LSR);#ifdef SERIAL_DEBUG_INTR		printk("status = %x...", status);#endif		if (status & UART_LSR_DR)			receive_serial_chars(info, &status, regs);		check_modem_status(info);		if (status & UART_LSR_THRE)			transmit_chars(info, 0);		if (pass_counter++ > RS_ISR_PASS_LIMIT) {#ifdef SERIAL_DEBUG_INTR			printk("rs loop break");#endif			break; 	/* Prevent infinite loops */		}	} while (!(serial_in(info, UART_IIR) & UART_IIR_NO_INT));	info->last_active = jiffies;#ifdef SERIAL_DEBUG_INTR	printk("end.\n");#endif}/* * ------------------------------------------------------------------- * Here ends the serial interrupt routines. * ------------------------------------------------------------------- *//* * This routine is used to handle the "bottom half" processing for the * serial driver, known also the "software interrupt" processing. * This processing is done at the kernel interrupt level, after the * su_interrupt() has returned, BUT WITH INTERRUPTS TURNED ON.  This * is where time-consuming activities which can not be done in the * interrupt driver proper are done; the interrupt driver schedules * them using su_sched_event(), and they get done here. */static void do_serial_bh(void){	run_task_queue(&tq_serial);}static void do_softint(void *private_){	struct su_struct	*info = (struct su_struct *) private_;	struct tty_struct	*tty;	tty = info->tty;	if (!tty)		return;	if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &info->event)) {		if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&		    tty->ldisc.write_wakeup)			(tty->ldisc.write_wakeup)(tty);		wake_up_interruptible(&tty->write_wait);	}}/* * --------------------------------------------------------------- * Low level utility subroutines for the serial driver:  routines to * figure out the appropriate timeout for an interrupt chain, routines * to initialize and startup a serial port, and routines to shutdown a * serial port.  Useful stuff like that. * --------------------------------------------------------------- */static intstartup(struct su_struct *info){	unsigned long flags;	int	retval=0;	unsigned long page;	save_flags(flags);	if (info->tty) {		page = get_free_page(GFP_KERNEL);		if (!page)			return -ENOMEM;		cli();		if (info->flags & ASYNC_INITIALIZED) {			free_page(page);			goto errout;		}		if (info->port == 0 || info->type == PORT_UNKNOWN) {			set_bit(TTY_IO_ERROR, &info->tty->flags);			free_page(page);			goto errout;		}		if (info->xmit_buf)			free_page(page);		else			info->xmit_buf = (unsigned char *) page;	}	cli();#ifdef SERIAL_DEBUG_OPEN	printk("starting up ttys%d (irq %s)...", info->line,	       __irq_itoa(info->irq));#endif	if (uart_config[info->type].flags & UART_STARTECH) {		/* Wake up UART */		serial_outp(info, UART_LCR, 0xBF);		serial_outp(info, UART_EFR, UART_EFR_ECB);		serial_outp(info, UART_IER, 0);		serial_outp(info, UART_EFR, 0);		serial_outp(info, UART_LCR, 0);	}	if (info->type == PORT_16750) {		/* Wake up UART */		serial_outp(info, UART_IER, 0);	}	/*	 * Clear the FIFO buffers and disable them	 * (they will be reenabled in change_speed())	 */	if (uart_config[info->type].flags & UART_CLEAR_FIFO)		serial_outp(info, UART_FCR, (UART_FCR_CLEAR_RCVR |					     UART_FCR_CLEAR_XMIT));	/*	 * At this point there's no way the LSR could still be 0xFF;	 * if it is, then bail out, because there's likely no UART	 * here.	 */	if (serial_inp(info, UART_LSR) == 0xff) {		if (capable(CAP_SYS_ADMIN)) {			if (info->tty)				set_bit(TTY_IO_ERROR, &info->tty->flags);		} else			retval = -ENODEV;		goto errout;	}	/*	 * Allocate the IRQ if necessary	 */	if (info->port_type != SU_PORT_PORT) {		retval = request_irq(info->irq, su_kbd_ms_interrupt,				     SA_SHIRQ, info->name, info);	} else {		retval = request_irq(info->irq, su_serial_interrupt,				     SA_SHIRQ, info->name, info);	}	if (retval) {		if (capable(CAP_SYS_ADMIN)) {			if (info->tty)				set_bit(TTY_IO_ERROR, &info->tty->flags);			retval = 0;		}		goto errout;	}	/*	 * Clear the interrupt registers.	 */	(void) serial_inp(info, UART_RX);	(void) serial_inp(info, UART_IIR);	(void) serial_inp(info, UART_MSR);	/*	 * Now, initialize the UART 	 */	serial_outp(info, UART_LCR, UART_LCR_WLEN8);	/* reset DLAB */	info->MCR = 0;	if (info->tty && info->tty->termios->c_cflag & CBAUD)		info->MCR = UART_MCR_DTR | UART_MCR_RTS;	if (info->irq != 0)		info->MCR |= UART_MCR_OUT2;	serial_outp(info, UART_MCR, info->MCR);	/*	 * Finally, enable interrupts	 */	info->IER = UART_IER_MSI | UART_IER_RLSI | UART_IER_RDI;	serial_outp(info, UART_IER, info->IER);	/* enable interrupts */	/*	 * And clear the interrupt registers again for luck.	 */	(void)serial_inp(info, UART_LSR);	(void)serial_inp(info, UART_RX);	(void)serial_inp(info, UART_IIR);	(void)serial_inp(info, UART_MSR);	if (info->tty)		clear_bit(TTY_IO_ERROR, &info->tty->flags);	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;	/*	 * Set up the tty->alt_speed kludge	 */	if (info->tty) {		if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)			info->tty->alt_speed = 57600;		if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)			info->tty->alt_speed = 115200;		if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI)			info->tty->alt_speed = 230400;		if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP)			info->tty->alt_speed = 460800;	}	/*	 * and set the speed of the serial port	 */	change_speed(info, 0);	info->flags |= ASYNC_INITIALIZED;	restore_flags(flags);	return 0;errout:	restore_flags(flags);	return retval;}/* * This routine will shutdown a serial port; interrupts are disabled, and * DTR is dropped if the hangup on close termio flag is on. */static voidshutdown(struct su_struct *info){	unsigned long	flags;	if (!(info->flags & ASYNC_INITIALIZED))		return;	save_flags(flags); cli(); /* Disable interrupts */	/*	 * clear delta_msr_wait queue to avoid mem leaks: we may free the irq	 * here so the queue might never be waken up	 */	wake_up_interruptible(&info->delta_msr_wait);		/*	 * Free the IRQ, if necessary	 */	free_irq(info->irq, info);	if (info->xmit_buf) {		free_page((unsigned long) info->xmit_buf);		info->xmit_buf = 0;	}	info->IER = 0;	serial_outp(info, UART_IER, 0x00);	/* disable all intrs */	info->MCR &= ~UART_MCR_OUT2;	/* disable break condition */	serial_out(info, UART_LCR, serial_inp(info, UART_LCR) & ~UART_LCR_SBC);	if (!info->tty || (info->tty->termios->c_cflag & HUPCL))		info->MCR &= ~(UART_MCR_DTR|UART_MCR_RTS);	serial_outp(info, UART_MCR, info->MCR);	/* disable FIFO's */		serial_outp(info, UART_FCR, (UART_FCR_CLEAR_RCVR |				     UART_FCR_CLEAR_XMIT));	(void)serial_in(info, UART_RX);    /* read data port to reset things */	if (info->tty)		set_bit(TTY_IO_ERROR, &info->tty->flags);	if (uart_config[info->type].flags & UART_STARTECH) {		/* Arrange to enter sleep mode */		serial_outp(info, UART_LCR, 0xBF);		serial_outp(info, UART_EFR, UART_EFR_ECB);		serial_outp(info, UART_IER, UART_IERX_SLEEP);		serial_outp(info, UART_LCR, 0);	}	if (info->type == PORT_16750) {		/* Arrange to enter sleep mode */		serial_outp(info, UART_IER, UART_IERX_SLEEP);	}	info->flags &= ~ASYNC_INITIALIZED;	restore_flags(flags);}static __inline__ intsu_get_baud_rate(struct su_struct *info){	static int baud_table[] = {		0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400,		4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 0	};	int i;	if (info->tty)		return tty_get_baud_rate(info->tty);	i = info->cflag & CBAUD;	if (i & CBAUDEX) {		i &= ~(CBAUDEX);		if (i < 1 || i > 4)			info->cflag &= ~(CBAUDEX);		else			i += 15;	}	return baud_table[i];}/* * This routine is called to set the UART divisor registers to match * the specified baud rate for a serial port. */static voidchange_speed(struct su_struct *info,	     struct termios *old_termios){	int		quot = 0, baud;	unsigned int	cval, fcr = 0;	int		bits;	unsigned long	flags;	if (info->port_type == SU_PORT_PORT) {		if (!info->tty || !info->tty->termios)			return;		if (!info->port)			return;		info->cflag = info->tty->termios->c_cflag;	}	/* byte size and parity */	switch (info->cflag & CSIZE) {	      case CS5: cval = 0x00; bits = 7; break;	      case CS6: cval = 0x01; bits = 8; break;	      case CS7: cval = 0x02; bits = 9; break;	      case CS8: cval = 0x03; bits = 10; break;		/* Never happens, but GCC is too dumb to figure it out */	      default:  cval = 0x00; bits = 7; break;	}	if (info->cflag & CSTOPB) {		cval |= 0x04;		bits++;	}	if (info->cflag & PARENB) {		cval |= UART_LCR_PARITY;		bits++;	}	if (!(info->cflag & PARODD))		cval |= UART_LCR_EPAR;#ifdef CMSPAR	if (info->cflag & CMSPAR)		cval |= UART_LCR_SPAR;#endif	/* Determine divisor based on baud rate */	baud = su_get_baud_rate(info);	if (baud == 38400 &&	    ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST))		quot = info->custom_divisor;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本91福利区| 成人免费三级在线| www.视频一区| 精品国产青草久久久久福利| 亚洲欧美日韩国产中文在线| 捆绑变态av一区二区三区| 色悠久久久久综合欧美99| 久久久久成人黄色影片| 午夜天堂影视香蕉久久| 成人av综合在线| 久久只精品国产| 蜜桃一区二区三区四区| 在线免费观看视频一区| 国产精品美女久久久久久| 国产在线不卡一卡二卡三卡四卡| 在线播放国产精品二区一二区四区| 中文字幕中文字幕一区二区 | 日韩欧美国产一二三区| 一区二区欧美精品| 波多野结衣亚洲| 日本一区二区久久| 成人中文字幕电影| 国产三级精品三级在线专区| 激情综合亚洲精品| 2017欧美狠狠色| 国精产品一区一区三区mba桃花 | 亚洲婷婷综合久久一本伊一区 | 免费精品视频最新在线| 91福利视频网站| 亚洲影院久久精品| 欧美午夜精品一区二区蜜桃 | 色综合久久中文字幕| 久久一区二区视频| 国产一区二区按摩在线观看| 欧美mv日韩mv| 在线日韩av片| 亚洲123区在线观看| 欧洲一区在线电影| 香蕉久久一区二区不卡无毒影院| 欧美午夜宅男影院| 日韩综合一区二区| 欧美成人video| 国产精品一区一区三区| 中文字幕国产精品一区二区| 99久久精品99国产精品| 亚洲一二三四在线观看| 欧美丝袜丝交足nylons图片| 首页国产欧美日韩丝袜| 2024国产精品| 94-欧美-setu| 五月天国产精品| 精品国产乱码久久久久久老虎| 国产精品一卡二卡| 最新成人av在线| 欧美肥胖老妇做爰| 国产又黄又大久久| 国产精品电影一区二区| 精品视频全国免费看| 九九国产精品视频| 亚洲欧美综合另类在线卡通| 欧美日韩免费一区二区三区视频| 九色综合狠狠综合久久| 国产精品高潮呻吟久久| 欧美一区午夜精品| 国产999精品久久久久久| 亚洲图片欧美色图| 欧美成人r级一区二区三区| 不卡在线视频中文字幕| 免费在线成人网| 国产精品护士白丝一区av| 制服丝袜成人动漫| 91视频国产资源| 麻豆成人久久精品二区三区小说| 中文字幕日韩精品一区| 日韩欧美区一区二| 色婷婷av久久久久久久| 国产一区在线看| 亚洲一区二区成人在线观看| 国产无人区一区二区三区| 欧美日韩精品专区| 99久久综合狠狠综合久久| 日韩电影在线观看网站| 亚洲特黄一级片| 久久精品人人做人人爽人人| 欧美精品亚洲一区二区在线播放| 不卡av在线免费观看| 久久电影网电视剧免费观看| 亚洲乱码精品一二三四区日韩在线 | 一区二区三区成人| 久久精品在线免费观看| 日韩欧美一级二级三级| 欧美写真视频网站| 99re这里只有精品视频首页| 国产精品一区免费视频| 久久99国产精品久久99果冻传媒| 亚洲一区二区在线播放相泽| 国产精品毛片高清在线完整版 | 亚洲嫩草精品久久| 国产人妖乱国产精品人妖| 日韩精品一区二区三区中文精品| 欧美日韩一区小说| 欧美性猛交xxxx黑人交| 色综合久久综合网欧美综合网 | 亚洲人妖av一区二区| 国产亚洲一区二区三区在线观看| 欧美一区二区三区播放老司机| 欧美色综合网站| 欧美怡红院视频| 色哟哟国产精品免费观看| 91浏览器在线视频| 99久久免费视频.com| 91免费观看在线| 91激情五月电影| 欧美这里有精品| 欧美日韩三级视频| 欧美日韩成人激情| 日韩欧美一级二级三级久久久| 日韩一级大片在线| 日韩欧美一区在线| 精品国产1区2区3区| 久久久久久久久久美女| 亚洲国产精品精华液2区45| 国产精品美女一区二区三区 | 精品一区二区国语对白| 免播放器亚洲一区| 国产在线播精品第三| 成人国产精品免费| 99视频超级精品| 欧美三级乱人伦电影| 日韩免费性生活视频播放| 久久久久久久一区| 国产精品成人一区二区三区夜夜夜| 亚洲精品中文字幕乱码三区 | 欧美成人乱码一区二区三区| 久久久久国产精品厨房| 亚洲天堂2014| 奇米精品一区二区三区四区 | 高清在线观看日韩| 99re66热这里只有精品3直播 | 久久精品人人做人人爽97| 中文字幕中文字幕一区二区| 亚洲国产精品综合小说图片区| 美女网站色91| 99精品视频中文字幕| 欧美日韩精品高清| 久久精品一级爱片| 亚洲成a人v欧美综合天堂下载| 久久不见久久见免费视频1| 成人黄动漫网站免费app| 欧美日韩在线观看一区二区| 久久久久青草大香线综合精品| 一区二区三区视频在线观看| 国产一区在线视频| 欧美三级资源在线| 日本一区二区三区免费乱视频| 亚洲图片欧美一区| 成人免费视频视频| 日韩欧美一区二区视频| 亚洲激情图片小说视频| 国产呦精品一区二区三区网站| 欧美色涩在线第一页| 欧美国产日韩在线观看| 免费成人小视频| 欧美综合亚洲图片综合区| 久久九九国产精品| 男女男精品网站| 91福利在线观看| 国产精品卡一卡二卡三| 久久精品国产一区二区三| 色综合色综合色综合色综合色综合| 久久免费的精品国产v∧| 亚洲成人免费电影| 91视视频在线观看入口直接观看www | 欧美一二三在线| 国产乱码精品一区二区三| 一区二区三区在线视频免费观看| 免播放器亚洲一区| 色综合久久88色综合天天6 | 久久综合九色欧美综合狠狠| 亚洲亚洲人成综合网络| 成人v精品蜜桃久久一区| 久久亚洲精华国产精华液| 无码av免费一区二区三区试看 | av亚洲精华国产精华| 精品少妇一区二区三区视频免付费 | 亚洲午夜久久久久| av不卡在线播放| 欧美激情综合在线| 国产美女一区二区| 精品国产乱码久久| 国产在线精品一区二区三区不卡 | 欧美一区二区日韩| 一区二区三区日韩在线观看| 成人18精品视频| 国产精品美女久久久久久久| 久久99精品国产.久久久久| 日韩三级中文字幕| 麻豆精品视频在线观看| 日韩一卡二卡三卡| 琪琪一区二区三区|