From: Ed Vance <EdV@macrolink.com>
To: "'root@chaos.analogic.com'" <root@chaos.analogic.com>
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: RE: Linux-2.4.20 modem control
Date: Thu, 20 Mar 2003 16:45:03 -0800 [thread overview]
Message-ID: <11E89240C407D311958800A0C9ACF7D1A33DF0@EXCHANGE> (raw)
On Thu, Mar 20, 2003 at 2:14 PM, Richard B. Johnson wrote:
>
> [SNIPPED...]
>
> This patch works (no other promises).
>
> --- linux-2.4.20/drivers/char/serial.c.orig 2003-03-20
> 16:21:55.000000000 -0500
> +++ linux-2.4.20/drivers/char/serial.c 2003-03-20
> 16:31:23.000000000 -0500
> @@ -1538,8 +1538,12 @@
> 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);
> + {
> + serial_outp(info, UART_MCR,info->MCR &
> ~(UART_MCR_DTR|UART_MCR_RTS));
> + set_current_state(TASK_INTERRUPTIBLE);
> + schedule_timeout(HZ/2); /*
> Disconnect modem */
> + }
> + serial_outp(info, UART_MCR, info->MCR); /* Don't keep it off */
>
> /* disable FIFO's */
> serial_outp(info, UART_FCR, (UART_FCR_ENABLE_FIFO |
>
Hi Richard,
I'm not sure it's a Good Thing(tm) to call schedule_timeout() with
the interrupts disabled. The shutdown function is framed by
save_flags();cli and restore_flags(). Don't know exactly what the
downside of that could be.
Is the re-enable of DTR actually necessary to get agetty to work?
DTR is supposed to stay off until the next open.
Still, if it works for you, it works.
Cheers,
Ed
----------------------------------------------------------------
Ed Vance edv (at) macrolink (dot) com
Macrolink, Inc. 1500 N. Kellogg Dr Anaheim, CA 92807
----------------------------------------------------------------
next reply other threads:[~2003-03-21 0:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-21 0:45 Ed Vance [this message]
2003-03-21 12:24 ` Richard B. Johnson
2003-03-21 12:56 ` Winbond 83697hf support? Kirk Reiser
-- strict thread matches above, loose matches on Subject: below --
2003-03-19 23:50 Linux-2.4.20 modem control Ed Vance
2003-03-20 1:18 ` Richard B. Johnson
2003-03-20 22:13 ` Richard B. Johnson
2003-03-19 16:51 Ed Vance
2003-03-19 17:03 ` Richard B. Johnson
2003-03-19 22:32 ` Richard B. Johnson
2003-03-18 0:34 Ed Vance
2003-03-17 23:07 Ed Vance
2003-03-18 0:33 ` Richard B. Johnson
2003-03-18 18:34 ` Steve Lee
2003-03-18 19:17 ` Richard B. Johnson
2003-03-18 19:34 ` Steve Lee
2003-03-18 20:03 ` Richard B. Johnson
2003-03-20 18:51 ` Krzysztof Halasa
2003-03-17 20:07 Ed Vance
2003-03-17 21:33 ` Richard B. Johnson
2003-03-17 16:19 Richard B. Johnson
2003-03-17 19:56 ` Jamie Lokier
2003-03-17 21:12 ` Richard B. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11E89240C407D311958800A0C9ACF7D1A33DF0@EXCHANGE \
--to=edv@macrolink.com \
--cc=linux-kernel@vger.kernel.org \
--cc=root@chaos.analogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®