From: Brian King <brking@linux.vnet.ibm.com>
To: gregkh@linuxfoundation.org
Cc: Brian King <brking@linux.vnet.ibm.com>,
mmc@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
linux-serial@vger.kernel.org, brking@pobox.com
Subject: [PATCH v3 4/5] hvcs: Use vhangup in hotplug remove
Date: Fri, 3 Feb 2023 09:58:01 -0600 [thread overview]
Message-ID: <20230203155802.404324-5-brking@linux.vnet.ibm.com> (raw)
In-Reply-To: <20230203155802.404324-1-brking@linux.vnet.ibm.com>
When hotplug removing an hvcs device, we need to ensure the
hangup processing is done prior to exiting the remove function,
so use tty_vhangup to do the hangup processing directly
rather than using tty_hangup which simply schedules the hangup
work for later execution.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---
drivers/tty/hvc/hvcs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 8d40b20de277..ecf24195b1e9 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -810,12 +810,11 @@ static void hvcs_remove(struct vio_dev *dev)
tty_port_put(&hvcsd->port);
/*
- * The hangup is a scheduled function which will auto chain call
- * hvcs_hangup. The tty should always be valid at this time unless a
+ * The tty should always be valid at this time unless a
* simultaneous tty close already cleaned up the hvcs_struct.
*/
if (tty) {
- tty_hangup(tty);
+ tty_vhangup(tty);
tty_kref_put(tty);
}
--
2.31.1
next prev parent reply other threads:[~2023-02-03 16:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 15:57 [PATCH v3 0/5] hvcs: Various hvcs device hotplug fixes Brian King
2023-02-03 15:57 ` [PATCH v3 1/5] hvcs: Use dev_groups to manage hvcs device attributes Brian King
2023-02-03 15:57 ` [PATCH v3 2/5] hvcs: Use driver groups to manage driver attributes Brian King
2023-02-03 15:58 ` [PATCH v3 3/5] hvcs: Get reference to tty in remove Brian King
2023-02-03 15:58 ` Brian King [this message]
2023-02-03 15:58 ` [PATCH v3 5/5] hvcs: Synchronize hotplug remove with port free Brian King
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=20230203155802.404324-5-brking@linux.vnet.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=brking@pobox.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mmc@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).