Commit 430eb0d2 authored by Jason Wessel's avatar Jason Wessel Committed by Greg Kroah-Hartman

USB: pl2303 usb_serial: implement sysrq handling on break

Add callbacks to process the sysrq when using a pl2303 usb device as a
console.
Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 830d1b18
...@@ -927,6 +927,8 @@ static void pl2303_update_line_status(struct usb_serial_port *port, ...@@ -927,6 +927,8 @@ static void pl2303_update_line_status(struct usb_serial_port *port,
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
priv->line_status = data[status_idx]; priv->line_status = data[status_idx];
spin_unlock_irqrestore(&priv->lock, flags); 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); wake_up_interruptible(&priv->delta_msr_wait);
} }
...@@ -1037,7 +1039,8 @@ static void pl2303_read_bulk_callback(struct urb *urb) ...@@ -1037,7 +1039,8 @@ static void pl2303_read_bulk_callback(struct urb *urb)
if (line_status & UART_OVERRUN_ERROR) if (line_status & UART_OVERRUN_ERROR)
tty_insert_flip_char(tty, 0, TTY_OVERRUN); tty_insert_flip_char(tty, 0, TTY_OVERRUN);
for (i = 0; i < urb->actual_length; ++i) 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_flip_buffer_push(tty);
} }
tty_kref_put(tty); tty_kref_put(tty);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment