> -----Original Message-----
> From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb-
> ow...@vger.kernel.org] On Behalf Of Valentin Yakovenkov
> Sent: Tuesday, March 22, 2016 11:12
> To: linux-usb@vger.kernel.org
> Subject: [PATCH] Add DCD line support to CP210x driver
[...]

>  static struct usb_serial_driver * const serial_drivers[] = {
> @@ -460,6 +471,11 @@ static int cp210x_open(struct tty_struct *tty, struct
> usb_serial_port *port)
>  {
>       int result;
> 
> +     struct usb_serial *serial = port->serial;
> +     struct cp210x_serial_private *spriv = usb_get_serial_data(serial);
> +
> +     spriv->cp210x_tstate = CP210X_STATE_IDLE;
> +
>       result = cp210x_set_config_single(port, CP210X_IFC_ENABLE,
> 
>       UART_ENABLE);
>       if (result) {
> @@ -474,6 +490,15 @@ static int cp210x_open(struct tty_struct *tty, struct
> usb_serial_port *port)
>       if (tty)
>               cp210x_change_speed(tty, port, NULL);
> 
> +     /* Enable events embedding to data stream */
> +     result = cp210x_set_config_single(port, CP210X_EMBED_EVENTS,
> +
>       CP210X_ESCCHAR);
> +     if (result) {
> +             dev_err(&port->dev, "%s - Unable to enable event
> embedding on UART\n",
> +                             __func__);
> +             return result;
> +     }
> +

This unconditionally enables the behavior every time the device is opened. 
Instead it needs to be enabled by the application explicitly, otherwise it'll 
hurt people who don't except it.

[...]
N�����r��y����b�X��ǧv�^�)޺{.n�+����{������^n�r���z���h�����&���G���h�(�階�ݢj"���m������z�ޖ���f���h���~�m�

Reply via email to