Re: Re: usb : serial : ch341 : set tty baud speed according to tty struct
Johan Hovold jo...@kernel.org 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
Re: Re: usb : serial : ch341 : set tty baud speed according to tty struct
On Wed, Feb 18, 2015 at 07:05:41PM -, Karl Palsson wrote: 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. Yes, there shouldn't be a need to store the baud rate in the driver (the tty layer will keep track of that), but you probably still want to store the state of the modem-control signals. Looks like we could get rid of that ch341_configure at every open too? Looking forward to seeing your patches when you're done. Thanks, Johan -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html