mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: greg@kroah.com
Cc: stern@rowland.harvard.edu, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 4/4] ftd_sio usb: implement sysrq handling on break
Date: Mon, 11 May 2009 15:24:10 -0500	[thread overview]
Message-ID: <1242073450-3794-5-git-send-email-jason.wessel@windriver.com> (raw)
In-Reply-To: <1242073450-3794-4-git-send-email-jason.wessel@windriver.com>

Change driver to make use of the new functions in
include/linux/usb/serial.h so as to allow the driver to handle the
sysrq when the .config has CONFIG_USB_SERIAL_SYSRQ=y.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 drivers/usb/serial/ftdi_sio.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 3a1b84d..a93b76a 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1991,6 +1991,7 @@ static void ftdi_process_read(struct work_struct *work)
 		if (data[packet_offset+1] & FTDI_RS_BI) {
 			error_flag = TTY_BREAK;
 			dbg("BREAK received");
+			usb_serial_handle_break(port);
 		}
 		if (data[packet_offset+1] & FTDI_RS_PE) {
 			error_flag = TTY_PARITY;
@@ -2005,8 +2006,11 @@ static void ftdi_process_read(struct work_struct *work)
 				/* Note that the error flag is duplicated for
 				   every character received since we don't know
 				   which character it applied to */
-				tty_insert_flip_char(tty,
-					data[packet_offset + i], error_flag);
+				if (!usb_serial_handle_sysrq_char(port,
+						data[packet_offset + i]))
+					tty_insert_flip_char(tty,
+						data[packet_offset + i],
+						error_flag);
 			}
 			need_flip = 1;
 		}
-- 
1.6.3.rc0.1.gf800


  reply	other threads:[~2009-05-11 20:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 20:24 [PATCH 0/4] usb_debug serial, ftdi_sio serial and sysrq Jason Wessel
2009-05-11 20:24 ` [PATCH 1/4] usb_debug, usb_generic_serial: implement multi urb write Jason Wessel
2009-05-11 20:24   ` [PATCH 2/4] ftd_sio usb: move status check Jason Wessel
2009-05-11 20:24     ` [PATCH 3/4] usb_debug,usb_generic_serial: implement sysrq and serial break Jason Wessel
2009-05-11 20:24       ` Jason Wessel [this message]
2009-05-12 17:02       ` Greg KH

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=1242073450-3794-5-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 \
    --cc=stern@rowland.harvard.edu \
    /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

Powered by JetHome