From 23545515b23889b35a0cd9f0f6db4da88a0f5f0f Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Sat, 19 Sep 2009 13:13:13 -0700 Subject: [PATCH] --- yaml --- r: 163809 b: refs/heads/master c: 174e6fe01e7881caaa350b5e98e4c6189b6cb593 h: refs/heads/master i: 163807: d7b282a4e528d845f645f30d684bd1ed0ad1391b v: v3 --- [refs] | 2 +- trunk/drivers/char/cyclades.c | 23 ++++++----------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index d2ed6b123cef..c4150811f096 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f0eefdc30e55e761facf645bd1be1339b21c30e6 +refs/heads/master: 174e6fe01e7881caaa350b5e98e4c6189b6cb593 diff --git a/trunk/drivers/char/cyclades.c b/trunk/drivers/char/cyclades.c index 7a7092ae5d39..226175d605c3 100644 --- a/trunk/drivers/char/cyclades.c +++ b/trunk/drivers/char/cyclades.c @@ -1290,11 +1290,10 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip, } if ((mdm_change & CyDCD) && (info->port.flags & ASYNC_CHECK_CD)) { - if (!(mdm_status & CyDCD)) { + if (mdm_status & CyDCD) + wake_up_interruptible(&info->port.open_wait); + else tty_hangup(tty); - info->port.flags &= ~ASYNC_NORMAL_ACTIVE; - } - wake_up_interruptible(&info->port.open_wait); } if ((mdm_change & CyCTS) && (info->port.flags & ASYNC_CTS_FLOW)) { if (tty->hw_stopped) { @@ -1655,13 +1654,10 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo) if (info->port.flags & ASYNC_CHECK_CD) { u32 dcd = fw_ver > 241 ? param : readl(&info->u.cyz.ch_ctrl->rs_status); - if (dcd & C_RS_DCD) { + if (dcd & C_RS_DCD) wake_up_interruptible(&info->port.open_wait); - } else { + else tty_hangup(tty); - wake_up_interruptible(&info->port.open_wait); - info->port.flags &= ~ASYNC_NORMAL_ACTIVE; - } } break; case C_CM_MCTS: @@ -4009,14 +4005,7 @@ static void cy_hangup(struct tty_struct *tty) cy_flush_buffer(tty); cy_shutdown(info, tty); - info->port.count = 0; -#ifdef CY_DEBUG_COUNT - printk(KERN_DEBUG "cyc:cy_hangup (%d): setting count to 0\n", - current->pid); -#endif - tty_port_tty_set(&info->port, NULL); - info->port.flags &= ~ASYNC_NORMAL_ACTIVE; - wake_up_interruptible(&info->port.open_wait); + tty_port_hangup(&info->port); } /* cy_hangup */ static int cyy_carrier_raised(struct tty_port *port)