From: Jason Wessel <jason.wessel@windriver.com>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 1/2] pl2303 usb_serial: implement sysrq handling on break
Date: Fri, 29 May 2009 13:34:16 -0500 [thread overview]
Message-ID: <1243622057-17671-2-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1243622057-17671-1-git-send-email-jason.wessel@windriver.com>
Add callbacks to process the sysrq when using a pl2303 usb device as a
console.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
drivers/usb/serial/pl2303.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 751a533..c5a8745 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -946,6 +946,8 @@ static void pl2303_update_line_status(struct usb_serial_port *port,
spin_lock_irqsave(&priv->lock, flags);
priv->line_status = data[status_idx];
spin_unlock_irqrestore(&priv->lock, flags);
+ if (priv->line_status & UART_BREAK_ERROR)
+ usb_serial_handle_break(port);
wake_up_interruptible(&priv->delta_msr_wait);
}
@@ -1056,7 +1058,8 @@ static void pl2303_read_bulk_callback(struct urb *urb)
if (line_status & UART_OVERRUN_ERROR)
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
for (i = 0; i < urb->actual_length; ++i)
- tty_insert_flip_char(tty, data[i], tty_flag);
+ if (!usb_serial_handle_sysrq_char(port, data[i]))
+ tty_insert_flip_char(tty, data[i], tty_flag);
tty_flip_buffer_push(tty);
}
tty_kref_put(tty);
--
1.6.3.1.9.g95405b
next prev parent reply other threads:[~2009-05-29 18:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 18:34 [PATCH 0/2] more usb sysrq improvements Jason Wessel
2009-05-29 18:34 ` Jason Wessel [this message]
2009-05-29 18:34 ` [PATCH 2/2] usb_serial: only allow sysrq on a console port Jason Wessel
2009-06-01 13:35 ` Alan Cox
2009-07-05 16:54 ` Robin Getz
2009-07-05 18:17 ` Alan Cox
2009-07-06 4:38 ` Robin Getz
2009-07-06 4:56 ` Mike Frysinger
2009-07-06 5:33 ` Robin Getz
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=1243622057-17671-2-git-send-email-jason.wessel@windriver.com \
--to=jason.wessel@windriver.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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
all inboxes | Powered by JetHome®