From: Michael Reed <mreed@linux.vnet.ibm.com>
To: linux-serial@vger.kernel.org
Cc: Breno Leitao <leitao@linux.vnet.ibm.com>,
Michael Reed <mreed@linux.vnet.ibm.com>
Subject: [PATCH][RESEND] 8250: Fix capabilities when changing the port type
Date: Tue, 31 May 2011 12:06:29 -0500 [thread overview]
Message-ID: <1306861589-17617-2-git-send-email-mreed@linux.vnet.ibm.com> (raw)
In-Reply-To: <1306861589-17617-1-git-send-email-mreed@linux.vnet.ibm.com>
When changing the port type, the capabilities flags should be
changed also, otherwise the capabilities will not correspond
to the port type, which make set_sleep() crash on rmmod.
This patch just assign the correct capabilites when the port
changes.
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
CC: Michael Reed <mreed@linux.vnet.ibm.com>
---
drivers/tty/serial/8250.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index 6611535..8e771cb 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
@@ -3282,6 +3282,7 @@ void serial8250_unregister_port(int line)
uart->port.flags &= ~UPF_BOOT_AUTOCONF;
uart->port.type = PORT_UNKNOWN;
uart->port.dev = &serial8250_isa_devs->dev;
+ uart->capabilities = uart_config[uart->port.type].flags;
uart_add_one_port(&serial8250_reg, &uart->port);
} else {
uart->port.dev = NULL;
--
1.7.1
prev parent reply other threads:[~2011-05-31 17:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-31 17:06 [PATCH][RESEND] 8250_pci Add EEH support to the 8250 driver for IBM/Digi PCIe 2-port Adapter Michael Reed
2011-05-31 17:06 ` Michael Reed [this message]
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=1306861589-17617-2-git-send-email-mreed@linux.vnet.ibm.com \
--to=mreed@linux.vnet.ibm.com \
--cc=leitao@linux.vnet.ibm.com \
--cc=linux-serial@vger.kernel.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).