mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: wangyanqing <udknight@gmail.com>
Cc: gregkh@suse.de, amworsley@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers:usb:serial:ftdi_sio.c: ftdi_set_termios make no sense some in a situation
Date: Mon, 5 Dec 2011 11:34:24 +0000	[thread overview]
Message-ID: <20111205113424.6225ddcb@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20111205074730.GA10142@udknight.homenetwork>

On Mon, 5 Dec 2011 15:47:30 +0800
wangyanqing <udknight@gmail.com> wrote:

> b1ffb4c851f185e9051ba837c16d9b84ef688d26 make a improvement to drop no sense reset
> termios. But it miss the situation, when call ftdi_set_termios with the value that
> same with the default settings all the time, then termios will take no effect any way,
> we need usb_control_msg to make effect. This patch try to resolve this question.
> 
> Signed-off-by: Wang YanQing <ukdnight@gmail.com>
> ---
>  drivers/usb/serial/ftdi_sio.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
> index 486769c..61f1be4 100644
> --- a/drivers/usb/serial/ftdi_sio.c
> +++ b/drivers/usb/serial/ftdi_sio.c
> @@ -2056,6 +2056,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
>  	struct ktermios *termios = tty->termios;
>  	unsigned int cflag = termios->c_cflag;
>  	__u16 urb_value; /* will hold the new flags */
> +	static int init_once = 1;

NACK

Think about what happens if you have two such ports or remove and re-add
it.

What code path is calling set_termios passing a termios data which has
never been set ?

Alan

  reply	other threads:[~2011-12-05 11:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-05  7:47 wangyanqing
2011-12-05 11:34 ` Alan Cox [this message]
2011-12-06  3:58   ` Wang YanQing

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=20111205113424.6225ddcb@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=amworsley@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=udknight@gmail.com \
    /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

all inboxes | Powered by JetHome®