lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <496f2cc77b4d4c3a9b49410ac318b927@siemens.com>
Date:   Mon, 23 Nov 2020 01:11:24 +0000
From:   "Wang, Sheng Long" <shenglong.wang.ext@...mens.com>
To:     Johan Hovold <johan@...nel.org>
CC:     Sheng Long Wang <china_shenglong@....com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "lkp@...el.com" <lkp@...el.com>
Subject: RE: [PATCH v6] usb-serial:cp210x: add support to software flow
 control

Hi,  Johan

Do I add my  software flow control  patch directly to the branch you gave me now ? 
https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git/log/?h=cp210x-termios

Then, I also need the cp210x_ get_ terminus()  add ixoff / iXon handling?

Thanks!


With best regards,
Wang Sheng Long
Siemens Ltd., China
RC-CN DI FA R&D SW
Tianyuan road No.99
611731 CHENGDU, China
Mobil: +86 15281074996
mailto:shenglong.wang.ext@...mens.com
www.siemens.com/ingenuityforlife


-----Original Message-----
From: Johan Hovold <johan@...nel.org> 
Sent: Tuesday, November 17, 2020 12:38 AM
To: Wang, Sheng Long (EXT) (RC-CN DI FA BL IPC&C PRC4) <shenglong.wang.ext@...mens.com>
Cc: Johan Hovold <johan@...nel.org>; Sheng Long Wang <china_shenglong@....com>; gregkh@...uxfoundation.org; linux-usb@...r.kernel.org; linux-kernel@...r.kernel.org; lkp@...el.com
Subject: Re: [PATCH v6] usb-serial:cp210x: add support to software flow control

[ Please avoid top posting. ]

On Mon, Nov 16, 2020 at 07:56:10AM +0000, Wang, Sheng Long wrote:
> Hi, Johan
> 
> Thank you very much for your reply!
> 
> You mean if we call cp210x_open()  When opening the device, because 
> IXON  is set by default, the cp210x_get_termios() does not process 
> IXON, So it is invalid IXON at this time.

Right, with the current implementation you need to make sure that termios reflects the device state on open or your changes will never actually enable software flow control in the device.

> As you said, It is very strange in cp210x_get_termios()  In the "get"
> function to "set"  IXON.  In addition, the best way is to disable the 
> IXON bit as you said.  If the user needs IXON, call set_ termios 
> function, So I'm now in cp210x_get_termios()  Is it a temporary 
> solution for terminos to handle IXON ?  I'm afraid it will need to be 
> adjusted.

No, I didn't mean that IXON should be disabled by default. I meant that the driver should make sure that the device settings matches termios on open, not the other way round.

This unusual implementation has caused a number of issues in the past and it's been on my list fix up for some time. I finally got around to that today and I just CCed you on the result. That should simplify adding software flow control and allow more code to be shared with the hardware flow-control handling.

I've pushed a branch for you here:

	https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git/log/?h=cp210x-termios

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ