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

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

?? zs.c

?? linux和2410結合開發 用他可以生成2410所需的zImage文件
?? C
?? 第 1 頁 / 共 5 頁
字號:
		tty->hw_stopped = 0;		zs_start(tty);	}}/* * ------------------------------------------------------------ * zs_close() *  * This routine is called when the serial port gets closed.  First, we * wait for the last remaining data to be sent.  Then, we unlink its * ZILOG structure from the interrupt chain if necessary, and we free * that IRQ if nothing is left in the chain. * ------------------------------------------------------------ */static void zs_close(struct tty_struct *tty, struct file * filp){	struct sun_serial * info = (struct sun_serial *) tty->driver_data;	unsigned long flags;	if (!info || serial_paranoia_check(info, tty->device, "zs_close"))		return;		save_flags(flags); cli();		if (tty_hung_up_p(filp)) {		restore_flags(flags);		return;	}	#ifdef SERIAL_DEBUG_OPEN	printk("zs_close tty-%d, count = %d\n", info->line, info->count);#endif	if ((tty->count == 1) && (info->count != 1)) {		/*		 * Uh, oh.  tty->count is 1, which means that the tty		 * structure will be freed.  Info->count should always		 * be one in these conditions.  If it's greater than		 * one, we've got real problems, since it means the		 * serial port won't be shutdown.		 */		printk("zs_close: bad serial port count; tty->count is 1, "		       "info->count is %d\n", info->count);		info->count = 1;	}	if (--info->count < 0) {		printk("zs_close: bad serial port count for ttys%d: %d\n",		       info->line, info->count);		info->count = 0;	}	if (info->count) {		restore_flags(flags);		return;	}	info->flags |= ZILOG_CLOSING;	/*	 * Save the termios structure, since this port may have	 * separate termios for callout and dialin.	 */	if (info->flags & ZILOG_NORMAL_ACTIVE)		info->normal_termios = *tty->termios;	if (info->flags & ZILOG_CALLOUT_ACTIVE)		info->callout_termios = *tty->termios;	/*	 * Now we wait for the transmit buffer to clear; and we notify 	 * the line discipline to only process XON/XOFF characters.	 */	tty->closing = 1;	if (info->closing_wait != ZILOG_CLOSING_WAIT_NONE)		tty_wait_until_sent(tty, info->closing_wait);	/*	 * At this point we stop accepting input.  To do this, we	 * disable the receive line status interrupts, and tell the	 * interrupt driver to stop checking the data ready bit in the	 * line status register.	 */	/** if (!info->iscons) ... **/	info->curregs[3] &= ~RxENAB;	write_zsreg(info->zs_channel, 3, info->curregs[3]);	info->curregs[1] &= ~(RxINT_MASK);	write_zsreg(info->zs_channel, 1, info->curregs[1]);	ZS_CLEARFIFO(info->zs_channel);	shutdown(info);	if (tty->driver.flush_buffer)		tty->driver.flush_buffer(tty);	if (tty->ldisc.flush_buffer)		tty->ldisc.flush_buffer(tty);	tty->closing = 0;	info->event = 0;	info->tty = 0;	if (tty->ldisc.num != ldiscs[N_TTY].num) {		if (tty->ldisc.close)			(tty->ldisc.close)(tty);		tty->ldisc = ldiscs[N_TTY];		tty->termios->c_line = N_TTY;		if (tty->ldisc.open)			(tty->ldisc.open)(tty);	}	if (info->blocked_open) {		if (info->close_delay) {			current->state = TASK_INTERRUPTIBLE;			schedule_timeout(info->close_delay);		}		wake_up_interruptible(&info->open_wait);	}	info->flags &= ~(ZILOG_NORMAL_ACTIVE|ZILOG_CALLOUT_ACTIVE|			 ZILOG_CLOSING);	wake_up_interruptible(&info->close_wait);#ifdef SERIAL_DEBUG_OPEN	printk("zs_close tty-%d exiting, count = %d\n", info->line, info->count);#endif	restore_flags(flags);}/* * zs_hangup() --- called by tty_hangup() when a hangup is signaled. */void zs_hangup(struct tty_struct *tty){	struct sun_serial * info = (struct sun_serial *) tty->driver_data;	if (serial_paranoia_check(info, tty->device, "zs_hangup"))		return;	if (info->is_cons)		return;#ifdef SERIAL_DEBUG_OPEN	printk("zs_hangup<%p: tty-%d, count = %d bye\n",		__builtin_return_address(0), info->line, info->count);#endif	zs_flush_buffer(tty);	shutdown(info);	info->event = 0;	info->count = 0;	info->flags &= ~(ZILOG_NORMAL_ACTIVE|ZILOG_CALLOUT_ACTIVE);	info->tty = 0;	wake_up_interruptible(&info->open_wait);}/* * * line_info - returns information about each channel * */static inline int line_info(char *buf, struct sun_serial *info){	unsigned char status;	char stat_buf[30];	int ret;	ret = sprintf(buf, "%d: uart:Zilog8530 port:%x irq:%d",		info->line, info->port, info->irq);	cli();	status = sbus_readb(&info->zs_channel->control);	ZSDELAY();	ZSLOG(REGCTRL, status, 0);	sti();	stat_buf[0] = 0;	stat_buf[1] = 0;	if (info->curregs[5] & RTS)		strcat(stat_buf, "|RTS");	if (status & CTS)		strcat(stat_buf, "|CTS");	if (info->curregs[5] & DTR)		strcat(stat_buf, "|DTR");	if (status & SYNC)		strcat(stat_buf, "|DSR");	if (status & DCD)		strcat(stat_buf, "|CD");	ret += sprintf(buf + ret, " baud:%d %s\n", info->zs_baud, stat_buf + 1);	return ret;}/* * * zs_read_proc() - called when /proc/tty/driver/serial is read. * */int zs_read_proc(char *page, char **start, off_t off, int count,                 int *eof, void *data){	char *revision = "$Revision: 1.68.2.2 $";	char *version, *p;	int i, len = 0, l;	off_t begin = 0;	version = strchr(revision, ' ');	p = strchr(++version, ' ');	*p = '\0';	len += sprintf(page, "serinfo:1.0 driver:%s\n", version);	*p = ' ';	for (i = 0; i < NUM_CHANNELS && len < 4000; i++) {		l = line_info(page + len, &zs_soft[i]);		len += l;		if (len+begin > off+count)			goto done;		if (len+begin < off) {			begin += len;			len = 0;		}	}	*eof = 1;done:	if (off >= len+begin)		return 0;	*start = page + (off-begin);	return ((count < begin+len-off) ? count : begin+len-off);}/* * ------------------------------------------------------------ * zs_open() and friends * ------------------------------------------------------------ */static int block_til_ready(struct tty_struct *tty, struct file * filp,			   struct sun_serial *info){	DECLARE_WAITQUEUE(wait, current);	int retval, do_clocal = 0;	unsigned char r0;	/*	 * If the device is in the middle of being closed, then block	 * until it's done, and then try again.	 */	if (info->flags & ZILOG_CLOSING) {		interruptible_sleep_on(&info->close_wait);#ifdef SERIAL_DO_RESTART		if (info->flags & ZILOG_HUP_NOTIFY)			return -EAGAIN;		else			return -ERESTARTSYS;#else		return -EAGAIN;#endif	}	/*	 * If this is a callout device, then just make sure the normal	 * device isn't being used.	 */	if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {		if (info->flags & ZILOG_NORMAL_ACTIVE)			return -EBUSY;		if ((info->flags & ZILOG_CALLOUT_ACTIVE) &&		    (info->flags & ZILOG_SESSION_LOCKOUT) &&		    (info->session != current->session))		    return -EBUSY;		if ((info->flags & ZILOG_CALLOUT_ACTIVE) &&		    (info->flags & ZILOG_PGRP_LOCKOUT) &&		    (info->pgrp != current->pgrp))		    return -EBUSY;		info->flags |= ZILOG_CALLOUT_ACTIVE;		return 0;	}		/*	 * If non-blocking mode is set, or the port is not enabled,	 * then make the check up front and then exit.	 */	if ((filp->f_flags & O_NONBLOCK) ||	    (tty->flags & (1 << TTY_IO_ERROR))) {		if (info->flags & ZILOG_CALLOUT_ACTIVE)			return -EBUSY;		info->flags |= ZILOG_NORMAL_ACTIVE;		return 0;	}	if (info->flags & ZILOG_CALLOUT_ACTIVE) {		if (info->normal_termios.c_cflag & CLOCAL)			do_clocal = 1;	} else {		if (tty->termios->c_cflag & CLOCAL)			do_clocal = 1;	}		/*	 * Block waiting for the carrier detect and the line to become	 * free (i.e., not in use by the callout).  While we are in	 * this loop, info->count is dropped by one, so that	 * zs_close() knows when to free things.  We restore it upon	 * exit, either normal or abnormal.	 */	retval = 0;	add_wait_queue(&info->open_wait, &wait);#ifdef SERIAL_DEBUG_OPEN	printk("block_til_ready before block: ttys%d, count = %d\n",	       info->line, info->count);#endif	cli();	if(!tty_hung_up_p(filp))		info->count--;	sti();	info->blocked_open++;	while (1) {		cli();		if (!(info->flags & ZILOG_CALLOUT_ACTIVE))			zs_rtsdtr(info, 1);		sti();		set_current_state(TASK_INTERRUPTIBLE);		if (tty_hung_up_p(filp) ||		    !(info->flags & ZILOG_INITIALIZED)) {#ifdef SERIAL_DEBUG_OPEN			printk("block_til_ready hup-ed: ttys%d, count = %d\n",				info->line, info->count);#endif#ifdef SERIAL_DO_RESTART			if (info->flags & ZILOG_HUP_NOTIFY)				retval = -EAGAIN;			else				retval = -ERESTARTSYS;	#else			retval = -EAGAIN;#endif			break;		}		cli();		r0 = read_zsreg(info->zs_channel, R0);		sti();		if (!(info->flags & ZILOG_CALLOUT_ACTIVE) &&		    !(info->flags & ZILOG_CLOSING) &&		    (do_clocal || (DCD & r0)))			break;		if (signal_pending(current)) {			retval = -ERESTARTSYS;			break;		}#ifdef SERIAL_DEBUG_OPEN		printk("block_til_ready blocking: ttys%d, count = %d\n",		       info->line, info->count);#endif		schedule();	}	current->state = TASK_RUNNING;	remove_wait_queue(&info->open_wait, &wait);	if (!tty_hung_up_p(filp))		info->count++;	info->blocked_open--;#ifdef SERIAL_DEBUG_OPEN	printk("block_til_ready after blocking: ttys%d, count = %d\n",	       info->line, info->count);#endif	if (retval)		return retval;	info->flags |= ZILOG_NORMAL_ACTIVE;	return 0;}	/* * This routine is called whenever a serial port is opened.  It * enables interrupts for a serial port, linking in its ZILOG structure into * the IRQ chain.   It also performs the serial-specific * initialization for the tty structure. */int zs_open(struct tty_struct *tty, struct file * filp){	struct sun_serial *info;	int retval, line;	line = MINOR(tty->device) - tty->driver.minor_start;	/* The zilog lines for the mouse/keyboard must be	 * opened using their respective drivers.	 */	if ((line < 0) || (line >= NUM_CHANNELS))		return -ENODEV;	if((line == KEYBOARD_LINE) || (line == MOUSE_LINE))		return -ENODEV;	info = zs_soft + line;	/* Is the kgdb running over this line? */	if (info->kgdb_channel)		return -ENODEV;	if (serial_paranoia_check(info, tty->device, "zs_open"))		return -ENODEV;#ifdef SERIAL_DEBUG_OPEN	printk("zs_open %s%d, count = %d\n", tty->driver.name, info->line,	       info->count);#endif	if (info->tty != 0 && info->tty != tty) {		/* Never happen? */		printk("zs_open %s%d, tty overwrite.\n", tty->driver.name, info->line);		return -EBUSY;	}	if (!tmp_buf) {		unsigned long page = get_free_page(GFP_KERNEL);		if (!page)			return -ENOMEM;		if (tmp_buf)			free_page(page);		else			tmp_buf = (unsigned char *) page;	}	info->count++;	tty->driver_data = info;	info->tty = tty;	/*	 * Start up serial port	 */	retval = startup(info);	if (retval)		return retval;	retval = block_til_ready(tty, filp, info);	if (retval) {#ifdef SERIAL_DEBUG_OPEN		printk("zs_open returning after block_til_ready with %d\n",		       retval);#endif		return retval;	}	if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) {		if (tty->driver.subtype == SERIAL_TYPE_NORMAL)			*tty->termios = info->normal_termios;		else 			*tty->termios = info->callout_termios;		change_speed(info);	}#ifdef CONFIG_SERIAL_CONSOLE	if (zs_console.cflag && zs_console.index == line) {		tty->termios->c_cflag = zs_console.cflag;		zs_console.cflag = 0;		change_speed(info);	}#endif	info->session = current->session;	info->pgrp = current->pgrp;#ifdef SERIAL_DEBUG_OPEN	printk("zs_open ttys%d successful...", info->line);#endif	return 0;}/* Finally, routines used to initialize the serial driver. */static void show_serial_version(void){	char *revision = "$Revision: 1.68.2.2 $";	char *version, *p;	version = strchr(revision, ' ');	p = strchr(++version, ' ');	*p = '\0';	printk("Sparc Zilog8530 serial driver version %s\n", version);	*p = ' ';}/* Probe the PROM for the request zs chip number. * * Note: The Sun Voyager shows two addresses and two intr for it's *       Zilogs, what the second does, I don't know. It does work *       with using only the first number of each property.  Also *       we have a special version for sun4u. */#ifdef __sparc_v9__static struct sun_zslayout * __init get_zs(int chip){	unsigned int vaddr[2] = { 0, 0 };	unsigned long mapped_addr = 0;	int busnode, seen, zsnode, sun4u_ino;	static int irq = 0;	if(chip < 0 || chip >= NUM_SERIAL) {		prom_printf("get_zs bogon zs chip number");		prom_halt();	}	if(central_bus)		busnode = central_bus->child->prom_node;	else		busnode = prom_searchsiblings(prom_getchild(prom_root_node), "sbus");	if(busnode == 0 || busnode == -1) {		prom_printf("get_zs: no zs bus to search");		prom_halt();	}	zsnode = prom_getchild(busnode);	seen = 0;	while(zsnode) {		int slave;		zsnode = prom_searchsiblings(zsnode, "zs");		slave = prom_getintdefault(zsnode, "slave", -1);		if((slave == chip) || (seen == chip)) {			int len = prom_getproperty(zsnode, "address",						   (void *) vaddr, sizeof(vaddr));			if(len == -1 || central_bus != NULL) {				struct sbus_bus *sbus = NULL;				struct sbus_dev *sdev = NULL;				/* "address" property is not guarenteed,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费人成网站在线观看欧美高清| 午夜电影一区二区三区| 中文字幕亚洲视频| 日本成人在线视频网站| 99在线精品一区二区三区| 777午夜精品视频在线播放| 日本一区二区动态图| 日韩制服丝袜先锋影音| eeuss影院一区二区三区| 欧美精品一区二区三区很污很色的| 亚洲色图都市小说| 高清不卡在线观看| 日韩一区二区精品在线观看| 中文字幕日韩一区二区| 黄色成人免费在线| 欧美电影在线免费观看| 亚洲综合无码一区二区| 91免费版在线| 国产欧美精品国产国产专区| 久久99精品视频| 日韩三级中文字幕| 欧美aaaaa成人免费观看视频| 在线国产电影不卡| 一区二区三区中文在线观看| 99久久er热在这里只有精品15| 久久久国产精品不卡| 精东粉嫩av免费一区二区三区| 制服丝袜亚洲播放| 午夜久久久影院| 欧美日韩不卡一区二区| 亚洲一区二区精品视频| 欧美丰满高潮xxxx喷水动漫| 亚洲一区二区三区精品在线| 一本一道综合狠狠老| 亚洲欧洲一区二区三区| caoporen国产精品视频| 成人欧美一区二区三区在线播放| 国产suv精品一区二区三区| 欧美激情在线一区二区三区| 国精品**一区二区三区在线蜜桃| 精品成人一区二区三区| 国产成人免费高清| 国产精品三级电影| 色婷婷综合久久久中文一区二区| 一区二区三区**美女毛片| 欧美精选午夜久久久乱码6080| 亚洲国产综合色| 欧美一区二区三区免费视频| 日日噜噜夜夜狠狠视频欧美人| 欧美一二三四区在线| 国产一区二区三区四区在线观看 | av电影一区二区| 亚洲欧美另类小说| 欧美精品在欧美一区二区少妇| 人禽交欧美网站| 国产欧美日韩在线视频| 91香蕉国产在线观看软件| 视频一区二区三区在线| 色狠狠一区二区| 丝袜亚洲另类欧美| 日本一区二区三区四区在线视频 | 日本道免费精品一区二区三区| 亚洲在线中文字幕| 精品国产伦理网| 99麻豆久久久国产精品免费| 图片区小说区国产精品视频| 久久中文娱乐网| 日本丰满少妇一区二区三区| 毛片不卡一区二区| 亚洲欧美日韩一区| 欧美一区二区福利视频| 91女厕偷拍女厕偷拍高清| 午夜精品久久久| 国产精品毛片a∨一区二区三区| 欧美午夜电影一区| 韩国精品在线观看| 亚洲乱码国产乱码精品精可以看| 欧美丰满高潮xxxx喷水动漫| 国产成a人亚洲精品| 欧美a级一区二区| 亚洲色图清纯唯美| 久久久777精品电影网影网| 在线免费av一区| 狠狠网亚洲精品| 日韩av电影免费观看高清完整版在线观看| 久久久另类综合| 在线不卡一区二区| 色美美综合视频| 成人av资源网站| 国内精品在线播放| 图片区小说区区亚洲影院| 国产精品欧美一级免费| 精品久久久久一区| 欧美理论片在线| 在线观看中文字幕不卡| eeuss鲁一区二区三区| 国产寡妇亲子伦一区二区| 日本欧美大码aⅴ在线播放| 亚洲午夜私人影院| 亚洲男同性视频| 中文字幕一区二区三区乱码在线| 国产日韩精品久久久| 精品国产伦一区二区三区观看体验 | 欧美主播一区二区三区| 成人av片在线观看| 国产白丝精品91爽爽久久| 久久er99热精品一区二区| 日本美女一区二区| 日本免费新一区视频| 免费人成网站在线观看欧美高清| 午夜欧美2019年伦理| 午夜久久电影网| 亚洲一区二区视频在线观看| 一区二区三区四区av| 亚洲欧美偷拍另类a∨色屁股| 中文字幕免费一区| 国产精品美女久久久久aⅴ| 久久久国产精品不卡| 国产喂奶挤奶一区二区三区| 久久精品男人的天堂| 国产欧美综合色| 中文字幕一区免费在线观看| 日韩一区欧美小说| 一区二区三区视频在线观看| 亚洲夂夂婷婷色拍ww47 | 亚洲精品国产无天堂网2021 | 色婷婷久久久亚洲一区二区三区| 99国产欧美久久久精品| 91美女在线看| 在线国产亚洲欧美| 欧美一级在线视频| 精品国产污污免费网站入口| 久久久精品一品道一区| 中文字幕一区av| 午夜精品影院在线观看| 极品少妇xxxx精品少妇| 懂色av噜噜一区二区三区av| 99久久精品国产麻豆演员表| 欧美日韩一区中文字幕| 日韩精品专区在线影院重磅| 国产亚洲美州欧州综合国| 中文字幕亚洲在| 天天综合色天天综合色h| 麻豆国产精品视频| 成人午夜精品在线| 欧美日韩成人一区二区| 久久综合九色综合欧美98| 国产精品初高中害羞小美女文| 亚洲国产精品麻豆| 国产一区 二区 三区一级| 97久久超碰国产精品| 91精品国产综合久久久蜜臀图片| 久久免费看少妇高潮| 亚洲永久免费视频| 国产成人综合在线| 欧美欧美欧美欧美首页| 精品国产一区二区在线观看| 亚洲三级视频在线观看| 蜜桃传媒麻豆第一区在线观看| 岛国精品在线观看| 欧美一二三区在线观看| 亚洲美女屁股眼交| 国产一区二区影院| 91成人在线免费观看| 久久综合色鬼综合色| 亚洲一区二区三区中文字幕在线| 国产传媒一区在线| 欧美一区二区三区性视频| 国产精品久久久久久久久快鸭| 日韩精品亚洲专区| 色美美综合视频| 国产免费观看久久| 日本亚洲免费观看| 在线看一区二区| 国产精品高潮呻吟| 国产一区欧美一区| 日韩欧美亚洲一区二区| 伊人开心综合网| 成人午夜激情在线| 2023国产精品| 日韩精品久久理论片| 在线一区二区三区| 国产精品久久久久四虎| 国产精品1区2区| 日韩精品专区在线影院观看| 亚洲国产va精品久久久不卡综合| 972aa.com艺术欧美| 欧美极品另类videosde| 蜜臀av一区二区在线免费观看| 91国产免费观看| 一区二区三区毛片| 日本韩国一区二区三区视频| 欧美国产精品专区| 成人性生交大合| 亚洲欧洲成人自拍| 成人午夜电影网站| 综合电影一区二区三区 | 亚洲日本乱码在线观看| 99久久综合精品| 国产精品久久久久影院亚瑟|