Commit 22e88b06 authored by Bart Hartgers's avatar Bart Hartgers Committed by Greg Kroah-Hartman

USB: ark3116 initialisation fix

commit 583182ba upstream.

This patch for the usb serial ark3116 driver fixes an initialisation
ordering bug that gets triggered on hotplug when using at least recent
debian/ubuntu userspace. Without it, ark3116 serial cables don't work.
Signed-off-by: default avatarBart Hartgers <bart.hartgers@gmail.com>
Tested-by: law_ence.dev@ntlworld.com
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 43e3b323
...@@ -42,7 +42,7 @@ static int debug; ...@@ -42,7 +42,7 @@ static int debug;
* Version information * Version information
*/ */
#define DRIVER_VERSION "v0.6" #define DRIVER_VERSION "v0.7"
#define DRIVER_AUTHOR "Bart Hartgers <bart.hartgers+ark3116@gmail.com>" #define DRIVER_AUTHOR "Bart Hartgers <bart.hartgers+ark3116@gmail.com>"
#define DRIVER_DESC "USB ARK3116 serial/IrDA driver" #define DRIVER_DESC "USB ARK3116 serial/IrDA driver"
#define DRIVER_DEV_DESC "ARK3116 RS232/IrDA" #define DRIVER_DEV_DESC "ARK3116 RS232/IrDA"
...@@ -380,10 +380,6 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -380,10 +380,6 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)
goto err_out; goto err_out;
} }
/* setup termios */
if (tty)
ark3116_set_termios(tty, port, NULL);
/* remove any data still left: also clears error state */ /* remove any data still left: also clears error state */
ark3116_read_reg(serial, UART_RX, buf); ark3116_read_reg(serial, UART_RX, buf);
...@@ -406,6 +402,10 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -406,6 +402,10 @@ static int ark3116_open(struct tty_struct *tty, struct usb_serial_port *port)
/* enable DMA */ /* enable DMA */
ark3116_write_reg(port->serial, UART_FCR, UART_FCR_DMA_SELECT); ark3116_write_reg(port->serial, UART_FCR, UART_FCR_DMA_SELECT);
/* setup termios */
if (tty)
ark3116_set_termios(tty, port, NULL);
err_out: err_out:
kfree(buf); kfree(buf);
return result; return result;
......
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