Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: ark3116 initialisation fix

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: Bart Hartgers <bart.hartgers@gmail.com>
Tested-by: law_ence.dev@ntlworld.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Bart Hartgers and committed by
Greg Kroah-Hartman
583182ba ab570da2

+5 -5
+5 -5
drivers/usb/serial/ark3116.c
··· 42 42 * Version information 43 43 */ 44 44 45 - #define DRIVER_VERSION "v0.6" 45 + #define DRIVER_VERSION "v0.7" 46 46 #define DRIVER_AUTHOR "Bart Hartgers <bart.hartgers+ark3116@gmail.com>" 47 47 #define DRIVER_DESC "USB ARK3116 serial/IrDA driver" 48 48 #define DRIVER_DEV_DESC "ARK3116 RS232/IrDA" ··· 380 380 goto err_out; 381 381 } 382 382 383 - /* setup termios */ 384 - if (tty) 385 - ark3116_set_termios(tty, port, NULL); 386 - 387 383 /* remove any data still left: also clears error state */ 388 384 ark3116_read_reg(serial, UART_RX, buf); 389 385 ··· 401 405 402 406 /* enable DMA */ 403 407 ark3116_write_reg(port->serial, UART_FCR, UART_FCR_DMA_SELECT); 408 + 409 + /* setup termios */ 410 + if (tty) 411 + ark3116_set_termios(tty, port, NULL); 404 412 405 413 err_out: 406 414 kfree(buf);