From: Johan Hovold <jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
Cc: Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>,
Peter Hurley
<peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>,
Alan Stern
<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Johan Hovold <jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH v3 0/6] TTY: port hangup and close fixes
Date: Thu, 7 Mar 2013 15:55:47 +0100 [thread overview]
Message-ID: <1362668153-10972-1-git-send-email-jhovold@gmail.com> (raw)
In-Reply-To: <51361724.4050107-AlSwsSmVLrQ@public.gmane.org>
These patches against 3.9-rc1 fix a few issues with tty-port hangup and
close.
The first and fifth patch are essentially clean ups.
The second and third patch fix the fact that DTR could get raised
(rather than dropped) at hangup if there are blocked opens. [ Note that
the second patch has been separated into its own patch and that the
third patch is new in v3 of this series. ]
The fourth patch makes sure DTR is dropped also on hangup and that DTR
is only dropped for initialised ports (where it could have been raised
in the first place).
The sixth and final patch, makes sure no tty callbacks are made from
tty_port_close_start when the port has not been initialised (successfully
opened). This was previously only done for wait_until_sent but there's
no reason to call flush_buffer or to honour port drain delay either.
The latter could cause a failed open to stall for up to two seconds.
As a side-effect, these patches also fix an issue in USB-serial where we
could get tty-port callbacks on an uninitialised port after having hung
up and unregistered a device after disconnect.
Johan
v3:
- amend series with fix of DTR sometimes being raised on hang-up
- do not lower DTR on hangup if port tty is gone
- make sure tty in call to shutdown is refcounted
- use cflag-macros throughout
v2:
- reuse tty reference from hangup and close in shutdown. Both call sites
guarantee tty is either NULL or has a kref.
Changes since RFC-series:
- fix up the two driver relying on tty_port_close_start directly but
that did not manage DTR themselves
Johan Hovold (6):
TTY: clean up port shutdown
TTY: wake up processes last at hangup
TTY: fix DTR being raised on hang up
TTY: fix DTR not being dropped on hang up
TTY: clean up port drain-delay handling
TTY: fix close of uninitialised ports
drivers/tty/mxser.c | 4 +++
drivers/tty/n_gsm.c | 4 +++
drivers/tty/tty_port.c | 77 ++++++++++++++++++++++++++++++--------------------
3 files changed, 54 insertions(+), 31 deletions(-)
--
1.8.1.1
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-03-07 14:55 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1362085054.3337.20.camel@thor.lan>
2013-03-05 16:02 ` [Fwd: [PATCH v2 0/4] TTY: port hangup and close fixes] Jiri Slaby
2013-03-05 17:06 ` Peter Hurley
[not found] ` <1362503170.18799.33.camel-AsKIXgLx6sE@public.gmane.org>
2013-03-05 21:56 ` Jiri Slaby
2013-03-05 22:02 ` Peter Hurley
2013-03-05 22:10 ` Jiri Slaby
2013-03-05 22:32 ` Peter Hurley
2013-03-06 16:23 ` Jiri Slaby
2013-03-06 16:52 ` Johan Hovold
2013-03-06 19:14 ` Peter Hurley
[not found] ` <1362597296.18799.198.camel-AsKIXgLx6sE@public.gmane.org>
2013-03-07 9:43 ` Johan Hovold
2013-03-07 21:52 ` Peter Hurley
[not found] ` <51361724.4050107-AlSwsSmVLrQ@public.gmane.org>
2013-03-07 14:55 ` Johan Hovold [this message]
[not found] ` <1362668153-10972-1-git-send-email-jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-03-07 14:55 ` [PATCH v3 1/6] TTY: clean up port shutdown Johan Hovold
2013-03-07 14:55 ` [PATCH v3 2/6] TTY: wake up processes last at hangup Johan Hovold
2013-03-07 14:55 ` [PATCH v3 3/6] TTY: fix DTR being raised on hang up Johan Hovold
2013-03-13 19:43 ` Peter Hurley
[not found] ` <1363203823.25976.102.camel-AsKIXgLx6sE@public.gmane.org>
2013-03-15 9:24 ` Johan Hovold
2013-03-15 11:03 ` Peter Hurley
2013-03-15 11:30 ` Johan Hovold
2013-03-15 11:57 ` Peter Hurley
2013-03-07 14:55 ` [PATCH v3 4/6] TTY: fix DTR not being dropped " Johan Hovold
2013-03-07 14:55 ` [PATCH v3 5/6] TTY: clean up port drain-delay handling Johan Hovold
2013-03-07 14:55 ` [PATCH v3 6/6] TTY: fix close of uninitialised ports Johan Hovold
2013-03-13 19:50 ` [PATCH v3 0/6] TTY: port hangup and close fixes Peter Hurley
2013-03-15 9:29 ` Johan Hovold
2013-03-15 19:05 ` Greg Kroah-Hartman
2013-03-15 19:42 ` Johan Hovold
2013-03-18 23:28 ` Greg Kroah-Hartman
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=1362668153-10972-1-git-send-email-jhovold@gmail.com \
--to=jhovold-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=jslaby-AlSwsSmVLrQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).