Re: [PATCH] usb/serial/ch341: Add parity support

2014-04-16 Thread Johan Hovold
On Tue, Apr 15, 2014 at 11:26:52PM +, Karl P wrote: On 04/15/2014 05:34 PM, Johan Hovold wrote: On Tue, Apr 15, 2014 at 04:06:11PM +0200, Johan Hovold wrote: Specifically, I asked if you are able to make sense of the values of register 0x2518. The reason I ask is that your patch

Re: [PATCH] usb/serial/ch341: Add parity support

2014-04-16 Thread Karl Palsson
On Wed, Apr 16, 2014 at 10:17:29AM +0200, Johan Hovold wrote: This is an excerpt from drivers/usb/serial/mct_u232.h but the definition is standard. Maybe it's setting data bits to 8? (the ch340 doesn't support variable data bits, the ch341 does) Data bit support / stop bit support is

Re: [PATCH] usb/serial/ch341: Add parity support

2014-04-16 Thread Johan Hovold
On Wed, Apr 16, 2014 at 10:42:41AM +, Karl Palsson wrote: On Wed, Apr 16, 2014 at 10:17:29AM +0200, Johan Hovold wrote: Fair enough. I don't mind keeping some of those magic constants for now, but I think we should at least assume that we're dealing with a fairly standard LCR register

Re: [PATCH] usb/serial/ch341: Add parity support

2014-04-15 Thread Johan Hovold
On Mon, Apr 14, 2014 at 07:54:17PM +, Karl Palsson wrote: Based on wireshark packet traces from a windows machine. ch340 and ch341 both seem to support all parity modes, but only the ch341 appears to support variable data bits and variable stop bits, so those are left unimplemented, as

Re: [PATCH] usb/serial/ch341: Add parity support

2014-04-15 Thread Johan Hovold
On Tue, Apr 15, 2014 at 04:06:11PM +0200, Johan Hovold wrote: On Mon, Apr 14, 2014 at 07:54:17PM +, Karl Palsson wrote: + if (C_PARENB(tty)) { + if (C_PARODD(tty)) { + if (C_CMSPAR(tty)) { Thanks for fixing the C_CMSPAR macro, but you didn't address my

Re: [PATCH] usb/serial/ch341: Add parity support

2014-04-15 Thread Karl P
On 04/15/2014 05:34 PM, Johan Hovold wrote: On Tue, Apr 15, 2014 at 04:06:11PM +0200, Johan Hovold wrote: Specifically, I asked if you are able to make sense of the values of register 0x2518. The reason I ask is that your patch changes the value of that register from 0x50 (set in

[PATCH] usb/serial/ch341: Add parity support

2014-04-14 Thread Karl Palsson
Based on wireshark packet traces from a windows machine. ch340 and ch341 both seem to support all parity modes, but only the ch341 appears to support variable data bits and variable stop bits, so those are left unimplemented, as before. Tested on a generic usb-rs485 dongle with the chip label

Re: [PATCH] usb/serial/ch341: Add parity support

2014-04-14 Thread Kijam López
Apply this patch because I have a device that uses even parity. It is a tax machine, it worked perfect in that case. I want to thank you again, though I did in my thread, I write only to support you and implement this PATCH soon. Based on wireshark packet traces from a windows machine. ch340

Re: [PATCH] usb/serial/ch341: Add parity support

2014-04-01 Thread Johan Hovold
On Mon, Mar 31, 2014 at 11:38:43PM +, Karl Palsson wrote: Based on wireshark packet traces from a windows machine. ch340 and ch341 both seem to support all parity modes, but only the ch341 appears to support variable data bits and variable stop bits, so those are left unimplemented, as

Patch: usb/serial/ch341: Add parity support

2014-03-31 Thread Karl Palsson
I originally sent this to fr...@kingswood-consulting.co.uk who is listed as the maintainer for this driver, but I haven't heard a reply, so I'm posting to the list. This is my first patch for a driver, so I've tried to follow the existing style, but if there are any changes that should be made,

[PATCH] usb/serial/ch341: Add parity support

2014-03-31 Thread Karl Palsson
Based on wireshark packet traces from a windows machine. ch340 and ch341 both seem to support all parity modes, but only the ch341 appears to support variable data bits and variable stop bits, so those are left unimplemented, as before. Tested on a generic usb-rs485 dongle with the chip label

Re: Patch: usb/serial/ch341: Add parity support

2014-03-31 Thread Greg KH
On Mon, Mar 31, 2014 at 11:38:42PM +, Karl Palsson wrote: I originally sent this to fr...@kingswood-consulting.co.uk who is listed as the maintainer for this driver, but I haven't heard a reply, so I'm posting to the list. That's good, in the future, you can use the kernel script,