Re: Re: usb : serial : ch341 : set tty baud speed according to tty struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johan Hovold <johan@xxxxxxxxxx> wrote:
> On Wed, Feb 18, 2015 at 11:32:38AM +0700, Johan Hovold wrote:
> > On Tue, Feb 17, 2015 at 10:45:11PM -0500, Nicolas PLANEL wrote:
> 
> > I believe the fix should be implemented slightly differently however.
> > Most usb-serial driver call set_termios from open to handle this issue.
> > It looks like you could simply replace the calls to set baudrate and
> > "handshake" in open with
> > 
> > 	ch341_set_termios(tty, port, NULL);
> 
> You currently need to make sure tty is not NULL in case the device is
> being used as a console by the way. Just skip the set_termios call in
> that case.

I've already got most of this working in my branch overhauling this
driver.  I agree, the open call shouldn't be doing all the hard
resetting of settings that it currently does.  I've implemented more of
set termios / get termios.

It's not ready for submission yet, I've got a lot of debug added that
needs to be rebased and squished out, and I still want to do more
testing with hardware flow control and the rest of the modem status
lines.

https://github.com/karlp/linux/commits/ch341-3.18.6

By implementing proper reading of settings from the device, a lot of the
private copies can just be dropped out altogether.

Sincerely,
Karl Palsson

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux