[PATCH 2/3] USB: serial: cp210x: Relocated private data from USB interface to port

2015-10-22 Thread Konstantin Shkolnyy
is trivial. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 43 +++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 8

[PATCH 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-22 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

[PATCH 1/3] USB: serial: cp210x: Workaround cp2108 Tx queue bug

2015-10-22 Thread Konstantin Shkolnyy
the close() callback. This change is applied to all cp210x devices. Clearing internal queues on close is generally good. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drive

Re: [PATCH v4 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-29 Thread Konstantin Shkolnyy
>> On Tue, Oct 27, 2015 at 04:53:34PM -0500, Konstantin Shkolnyy wrote: >> > cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. >> > However, SET_LINE_CTL functions properly. When the driver tries to modify >> > the register, it reads it, m

[PATCH v4 1/3] USB: serial: cp210x: Workaround cp2108 Tx queue bug

2015-10-27 Thread Konstantin Shkolnyy
the close() callback. This change is applied to all cp210x devices. Clearing internal queues on close is generally good. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drive

[PATCH v4 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-27 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

[PATCH v4 2/3] USB: serial: cp210x: Relocated private data from USB interface to port

2015-10-27 Thread Konstantin Shkolnyy
is trivial. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 43 +++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 8

[PATCH v5 2/3] USB: serial: cp210x: Relocated private data from USB interface to port

2015-10-28 Thread Konstantin Shkolnyy
is trivial. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 43 +++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 8

[PATCH v5 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-28 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

[PATCH v5 1/3] USB: serial: cp210x: Workaround cp2108 Tx queue bug

2015-10-28 Thread Konstantin Shkolnyy
the close() callback. This change is applied to all cp210x devices. Clearing internal queues on close is generally good. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drive

[PATCH] USB: serial: cp210x: Remove CP2110 ID from compatibility list

2015-11-10 Thread Konstantin Shkolnyy
CP2110 ID (0x10c4, 0xea80) doesn't belong here because it's a HID and completely different from CP210x devices. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/serial/cp21

[PATCH RESEND] USB: serial: cp210x: Add tx_empty()

2015-11-11 Thread Konstantin Shkolnyy
Without this function, when the port is closed the data in the chip's transmit FIFO are lost. If the actual byte count is reported the close can be delayed until all data are sent. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

Re: [PATCH v4 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-11-03 Thread Konstantin Shkolnyy
[...] Hi Johan, I'd like to add tx_empty() and replace cp210x_get/set_config with simpler functions, as we discussed before. While the tx_empty patch could be made against the current kernel, the latter would have to be made against my previous patch set. How should this be done? Thanks,

[PATCH] USB: serial: cp210x: Add tx_empty()

2015-11-04 Thread Konstantin Shkolnyy
Without this function, when the port is closed the data in the chip's transmit FIFO are lost. If the actual byte count is reported the close can be delayed until all data are sent. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

Re: [PATCH v4 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-31 Thread Konstantin Shkolnyy
On Sat, Oct 31, 2015 at 7:16 AM, Johan Hovold <jo...@kernel.org> wrote: > [ Please avoid top-posting. ] > > On Thu, Oct 29, 2015 at 08:39:04AM -0500, Konstantin Shkolnyy wrote: >> I tested it on cp2102, cp2105 and cp2108. >> I'm a little worried about that extra PURG

Re: [PATCH] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-19 Thread Konstantin Shkolnyy
On Mon, Oct 19, 2015 at 4:14 AM, Oliver Neukum <oneu...@suse.com> wrote: > On Thu, 2015-10-15 at 17:06 -0500, Konstantin Shkolnyy wrote: >> cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. >> However, SET_LINE_CTL functions properly. When the d

[PATCH] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-07 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

[PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-07 Thread Konstantin Shkolnyy
. Adding tx_empty() has no adverse effect on other cp210x devices. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/

[PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-15 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

[PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-15 Thread Konstantin Shkolnyy
. Adding tx_empty() has no adverse effect on other cp210x devices. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/

[PATCH] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-15 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Konstantin Shkolnyy
Hello, On Fri, Oct 16, 2015 at 6:19 AM, Sergei Shtylyov wrote: [...] >> >> @@ -249,6 +251,16 @@ static struct usb_serial_driver * const >> serial_drivers[] = { >> #define CP210X_GET_CHARS 0x0E >> #define CP210X_GET_PROPS 0x0F >> #define

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Konstantin Shkolnyy
On Fri, Oct 16, 2015 at 7:55 AM, Johan Hovold <jo...@kernel.org> wrote: > On Thu, Oct 15, 2015 at 05:07:08PM -0500, Konstantin Shkolnyy wrote: >> Occasionally, writing data and immediately closing the port makes cp2108 >> stop responding. The device had to be unplugg

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Konstantin Shkolnyy
On Fri, Oct 16, 2015 at 8:27 AM, Johan Hovold <jo...@kernel.org> wrote: > On Thu, Oct 15, 2015 at 06:23:31PM -0500, Konstantin Shkolnyy wrote: >> cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. >> However, SET_LINE_CTL functions properly. When the d

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Konstantin Shkolnyy
On Fri, Oct 16, 2015 at 10:27 AM, Johan Hovold <jo...@kernel.org> wrote: > On Fri, Oct 16, 2015 at 10:11:12AM -0500, Konstantin Shkolnyy wrote: >> On Fri, Oct 16, 2015 at 8:27 AM, Johan Hovold <jo...@kernel.org> wrote: >> > On Thu, Oct 15, 2015 at 06:23:31PM -0

[PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions

2015-10-19 Thread Konstantin Shkolnyy
Existing register access functions cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new functions specifically for 16-bit registers that read and write simple u16 values. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drive

[PATCH 2/2] USB: serial: cp210x: Workaround for occasional cp2108 hangs.

2015-10-19 Thread Konstantin Shkolnyy
condition is avoided by issuing PURGE command from the close() callback. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 79 +++-- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/dr

Re: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions

2015-10-20 Thread Konstantin Shkolnyy
On Tue, Oct 20, 2015 at 1:45 AM, Oliver Neukum <oneu...@suse.com> wrote: > On Mon, 2015-10-19 at 17:01 -0500, Konstantin Shkolnyy wrote: [...] >> +static int cp210x_read_u16_reg(struct usb_serial *serial, u8 req, u16 *pval) >> +{ >> + struct cp210x_serial_private *

Re: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions

2015-10-20 Thread Konstantin Shkolnyy
On Tue, Oct 20, 2015 at 2:45 AM, Johan Hovold wrote: [...] > Instead of adding the new helpers to read u16 as a prerequisite for > fixing the broken cp2108 support, just reuse the current config register > helpers for now (in order to keep the fixes minimal and potentially >

Re: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions

2015-10-20 Thread Konstantin Shkolnyy
On Tue, Oct 20, 2015 at 8:02 AM, Johan Hovold <jo...@kernel.org> wrote: > On Tue, Oct 20, 2015 at 07:52:31AM -0500, Konstantin Shkolnyy wrote: >> On Tue, Oct 20, 2015 at 2:45 AM, Johan Hovold <jo...@kernel.org> wrote: >> [...] >> > Instead of adding the new h

Re: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions

2015-10-20 Thread Konstantin Shkolnyy
On Tue, Oct 20, 2015 at 11:22 AM, Johan Hovold <jo...@kernel.org> wrote: > On Tue, Oct 20, 2015 at 09:19:05AM -0500, Konstantin Shkolnyy wrote: >> On Tue, Oct 20, 2015 at 8:02 AM, Johan Hovold <jo...@kernel.org> wrote: >> > On Tue, Oct 20, 2015 at 07:52:31AM -0

Re: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions

2015-10-20 Thread Konstantin Shkolnyy
On Tue, Oct 20, 2015 at 11:22 AM, Johan Hovold <jo...@kernel.org> wrote: > On Tue, Oct 20, 2015 at 09:19:05AM -0500, Konstantin Shkolnyy wrote: >> On Tue, Oct 20, 2015 at 8:02 AM, Johan Hovold <jo...@kernel.org> wrote: >> > On Tue, Oct 20, 2015 at 07:52:31AM -0

[PATCH] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-08 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

[PATCH v2 3/3] USB: serial: cp210x: New register access functions for large registers

2015-12-13 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change switches large register access to use new block functions. The old functions are removed because now they become unused. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp

[PATCH v2 2/3] USB: serial: cp210x: New 8-bit and 32-bit register access functions.

2015-12-13 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 8 and 32-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

[PATCH v2 1/3] USB: serial: cp210x: New 16-bit register access functions.

2015-12-13 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 16-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c

[PATCH v3 1/4] USB: serial: cp210x: New register access functions.

2016-01-01 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions to replace them. New functions are not yet called - the switch is done gradually in following changes. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> ---

[PATCH v3 4/4] USB: serial: cp210x: Switch to new register access functions for large registers

2016-01-01 Thread Konstantin Shkolnyy
Change to use new large register access functions instead of cp210x_get_config and cp210x_set_config and remove the old functions since they are now unused. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v3: Presented new function addition as a separate pa

[PATCH v3 3/4] USB: serial: cp210x: Switch to new 8-bit and 32-bit register access functions.

2016-01-01 Thread Konstantin Shkolnyy
Change to use new 8-bit and 32-bit register access functions instead of cp210x_get_config and cp210x_set_config. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v3: Presented new function addition as a separate patch #1, to simplify code review. drive

[PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register access functions.

2016-01-01 Thread Konstantin Shkolnyy
Change to use new 16-bit register access functions instead of cp210x_get_config and cp210x_set_config. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v3: Presented new function addition as a separate patch #1, to simplify code review. drivers/usb/

[PATCH v2 2/3 RESEND] USB: serial: cp210x: New 8-bit and 32-bit register access functions.

2015-12-22 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 8 and 32-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.

[PATCH v2 3/3 RESEND] USB: serial: cp210x: New register access functions for large registers

2015-12-22 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change switches large register access to use new block functions. The old functions are removed because now they become unused. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp

[PATCH v2 1/3 RESEND] USB: serial: cp210x: New 16-bit register access functions.

2015-12-22 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 16-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c

[PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-24 Thread Konstantin Shkolnyy
the close can be delayed until all data are sent. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- Code style corrections and using sizeof instead of a defined constant. drivers/usb/serial/cp210x.c | 58 + 1 file changed, 58 inse

[PATCH] USB: serial: cp210x: Cleaned up USB access functions.

2015-11-30 Thread Konstantin Shkolnyy
introduces separate register accessor functions for single 8, 16 and 32-bit values, with endian conversion, as well as "block" access functions without conversion. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/seria

Re: [PATCH v2] USB: serial: cp210x: Add tx_empty()

2015-11-26 Thread Konstantin Shkolnyy
On Wed, Nov 25, 2015 at 2:26 PM, Andy Shevchenko <andy.shevche...@gmail.com> wrote: > On Wed, Nov 25, 2015 at 12:28 AM, Konstantin Shkolnyy > <konstantin.shkol...@gmail.com> wrote: >> +static bool cp210x_tx_empty(struct usb_serial_port *port) >> +{ >> +

RE: [EXT] [PATCH v4] r8152: Add support for setting pass through MAC address on RTL8153-AD

2016-06-06 Thread Konstantin Shkolnyy
> -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Mario Limonciello > Sent: Monday, June 06, 2016 12:19 > To: hayesw...@realtek.com > Cc: LKML; Netdev; Linux USB; pali.ro...@gmail.com; > anthony.w...@canonical.com; Greg

[PATCH v4 2/3] USB: serial: cp210x: New 8-bit and 32-bit register access functions.

2016-02-07 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 8 and 32-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v4: Instead of adding all new fun

[PATCH v4 1/3] USB: serial: cp210x: New 16-bit register access functions.

2016-02-07 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 16-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v4: Instead of adding all new functions

[PATCH v4 3/3] USB: serial: cp210x: New access functions for large registers

2016-02-07 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change switches large register access to use new block functions. The old functions are removed because now they become unused. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v4: I

[PATCH v5 3/3] USB: serial: cp210x: New access functions for large registers

2016-02-28 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change switches large register access to use new block functions. The old functions are removed because now they become unused. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v5: Same

[PATCH v5 1/3] USB: serial: cp210x: New 16-bit register access functions.

2016-02-28 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 16-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v5: Same patch, regenerated against curre

[PATCH v5 2/3] USB: serial: cp210x: New 8-bit and 32-bit register access functions.

2016-02-28 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 8 and 32-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v5: Same patch, regenerated against c

[PATCH v4 3/3 RESEND] USB: serial: cp210x: New access functions for large registers

2016-02-27 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change switches large register access to use new block functions. The old functions are removed because now they become unused. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v4: I

[PATCH v4 2/3 RESEND] USB: serial: cp210x: New 8-bit and 32-bit register access functions.

2016-02-27 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 8 and 32-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v4: Instead of adding all new fun

[PATCH v4 1/3 RESEND] USB: serial: cp210x: New 16-bit register access functions.

2016-02-27 Thread Konstantin Shkolnyy
cp210x_get_config and cp210x_set_config are cumbersome to use. This change introduces new register access functions for 16-bit values, instead of the above functions. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- change in v4: Instead of adding all new functions

[PATCH 2/5] USB: serial: cp210x: Made sure SERIAL_XOFF_CONTINUE flag is clear.

2016-03-21 Thread Konstantin Shkolnyy
The CRTCTS flag code intended to clear the SERIAL_XOFF_CONTINUE flag, but did it inconsistently. This change is non-functional for existing chips because the driver never set the flag and it's clear by default. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drive

[PATCH 1/5] USB: serial: cp210x: Fixed RTS mode setting by the CRTSCTS flag.

2016-03-21 Thread Konstantin Shkolnyy
A bug in the CRTSCT handling caused RTS to alternate between CRTSCTS=0 => "RTS transmits active signal" and CRTSCTS=1 => "RTS receives flow control" instead of CRTSCTS=0 => "RTS is statically active" and CRTSCTS=1 => "RTS receives flow control"

[PATCH 5/5] USB: serial: cp210x: Added more error handling to open()

2016-03-21 Thread Konstantin Shkolnyy
Added error handling to register accesses made by open(), so it doesn't succeed if anything goes wrong. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 41 - 1 file changed, 28 insertions(

[PATCH 4/5] USB: serial: cp210x: Prepared get_termios() for adding error handling

2016-03-21 Thread Konstantin Shkolnyy
Replaced several register write calls with one, to simplify adding error handling. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/cp21

[PATCH 3/5] USB: serial: cp210x: Added comments to CRTSCT flag code.

2016-03-21 Thread Konstantin Shkolnyy
Documented "magic numbers" used in the CRTSCT flag code in terms of register bit names from the chip specification. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 38 ++ 1 file changed, 34

[PATCH RESEND 4/5] USB: serial: cp210x: Prepared get_termios() for adding error handling

2016-04-24 Thread Konstantin Shkolnyy
Replaced several register write calls with one, to simplify adding error handling. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/cp21

[PATCH RESEND 2/5] USB: serial: cp210x: Made sure SERIAL_XOFF_CONTINUE flag is clear.

2016-04-24 Thread Konstantin Shkolnyy
The CRTCTS flag code intended to clear the SERIAL_XOFF_CONTINUE flag, but did it inconsistently. This change is non-functional for existing chips because the driver never set the flag and it's clear by default. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drive

[PATCH RESEND 5/5] USB: serial: cp210x: Added more error handling to open()

2016-04-24 Thread Konstantin Shkolnyy
Added error handling to register accesses made by open(), so it doesn't succeed if anything goes wrong. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 41 - 1 file changed, 28 insertions(

[PATCH RESEND 1/5] USB: serial: cp210x: Fixed RTS mode setting by the CRTSCTS flag.

2016-04-24 Thread Konstantin Shkolnyy
A bug in the CRTSCT handling caused RTS to alternate between CRTSCTS=0 => "RTS transmits active signal" and CRTSCTS=1 => "RTS receives flow control" instead of CRTSCTS=0 => "RTS is statically active" and CRTSCTS=1 => "RTS receives flow control"

[PATCH RESEND 3/5] USB: serial: cp210x: Added comments to CRTSCT flag code.

2016-04-24 Thread Konstantin Shkolnyy
Documented "magic numbers" used in the CRTSCT flag code in terms of register bit names from the chip specification. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 38 ++ 1 file changed, 34

RE: [EXT] Re: [PATCH RESEND 3/5] USB: serial: cp210x: Added comments to CRTSCT flag code.

2016-04-25 Thread Konstantin Shkolnyy
; __le32 ulXoffLimit; } __packed; > -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Johan Hovold > Sent: Monday, April 25, 2016 05:17 > To: Konstantin Shkolnyy > Cc: jo...@kernel.org; linux-...@vger.kernel

RE: [EXT] Re: [PATCH RESEND 3/5] USB: serial: cp210x: Added comments to CRTSCT flag code.

2016-04-27 Thread Konstantin Shkolnyy
> -Original Message- > From: Johan Hovold [mailto:jhov...@gmail.com] On Behalf Of Johan Hovold > Sent: Tuesday, April 26, 2016 02:26 > To: Konstantin Shkolnyy > Cc: Johan Hovold; Konstantin Shkolnyy; linux-...@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject:

[PATCH v2 3/3] USB: serial: cp210x: Cleaned up CRTSCTS flag code.

2016-04-29 Thread Konstantin Shkolnyy
The CRTSCTS flag code cleared (and inconsistently) bits unrelated to CRTSCTS functionality. It was also harder than necessary to read. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- Changes in v2: Improved CRTSCTS fix based on feedback. Dropped get_termios error ha

[PATCH v2 2/3] USB: serial: cp210x: Added comments to CRTSCTS flag code.

2016-04-29 Thread Konstantin Shkolnyy
Replaced magic numbers used in the CRTSCTS flag code with symbolic names from the chip specification. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- Changes in v2: Improved CRTSCTS fix based on feedback. Dropped get_termios error handling. drivers/usb/serial/cp

[PATCH v2 1/3] USB: serial: cp210x: Fixed RTS mode setting by the CRTSCTS flag.

2016-04-29 Thread Konstantin Shkolnyy
" This only happened after first having enabled CRTSCTS. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- Changes in v2: Improved CRTSCTS fix based on feedback. Dropped get_termios error handling. drivers/usb/serial/cp210x.c | 7 +-- 1 file changed, 1 insertion(+),

[PATCH v3 1/3] USB: serial: cp210x: Fixed RTS mode setting by the CRTSCTS flag.

2016-04-30 Thread Konstantin Shkolnyy
" This only happened after first having enabled CRTSCTS. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- v3: Regenerated the patches correctly against the latest usb-next branch. v2 Improved CRTSCTS fix by feedback. Dropped get_termios error handling fix. drivers/usb/

[PATCH v3 2/3] USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code.

2016-04-30 Thread Konstantin Shkolnyy
Replaced magic numbers used in the CRTSCTS flag code with symbolic names from the chip specification. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- v3: Regenerated the patches correctly against the latest usb-next branch. v2 Improved CRTSCTS fix by feedback. D

[PATCH v3 3/3] USB: serial: cp210x: Cleaned up CRTSCTS flag code.

2016-04-30 Thread Konstantin Shkolnyy
The CRTSCTS flag code cleared (and inconsistently) bits unrelated to CRTSCTS functionality. It was also harder than necessary to read. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- v3: Regenerated the patches correctly against the latest usb-next branch. v2 Im

RE: [EXT] RE: [PATCH v2 2/3] USB: serial: cp210x: Added comments to CRTSCTS flag code.

2016-05-03 Thread Konstantin Shkolnyy
> -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of David Laight > Sent: Tuesday, May 03, 2016 04:44 > To: 'Konstantin Shkolnyy'; jo...@kernel.org > Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.o

[PATCH v4 2/3] USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code.

2016-05-03 Thread Konstantin Shkolnyy
Replaced magic numbers used in the CRTSCTS flag code with symbolic names from the chip specification. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- v4: Same series of patches, fixed names and defines by feedback. v3: Regenerated the patches correctly against the

[PATCH v4 3/3] USB: serial: cp210x: Cleaned up CRTSCTS flag code.

2016-05-03 Thread Konstantin Shkolnyy
The CRTSCTS flag code cleared (and inconsistently) bits unrelated to CRTSCTS functionality. It was also harder than necessary to read. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- v4: Same series of patches, fixed names and defines by feedback. v3: Regen

[PATCH v4 1/3] USB: serial: cp210x: Fixed RTS mode setting by the CRTSCTS flag.

2016-05-03 Thread Konstantin Shkolnyy
" This only happened after first having enabled CRTSCTS. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- v4: Same series of patches, fixed names and defines by feedback. v3: Regenerated the patches correctly against the latest usb-next branch. v2 Improved CRTSCTS fix by f

RE: [EXT] Re: [PATCH v4 2/3] USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code.

2016-05-04 Thread Konstantin Shkolnyy
> -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Johan Hovold > Sent: Wednesday, May 04, 2016 02:29 > To: Konstantin Shkolnyy > Cc: jo...@kernel.org; linux-...@vger.kernel.org; linux- > ker...@vger

RE: [EXT] Re: [PATCH v4 2/3] USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code.

2016-05-04 Thread Konstantin Shkolnyy
> -Original Message- > From: Johan Hovold [mailto:jhov...@gmail.com] On Behalf Of Johan Hovold > Sent: Wednesday, May 04, 2016 07:55 > To: Konstantin Shkolnyy > Cc: Johan Hovold; Konstantin Shkolnyy; linux-...@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject:

[PATCH v5 1/3] USB: serial: cp210x: Fixed RTS mode setting by the CRTSCTS flag.

2016-05-04 Thread Konstantin Shkolnyy
" This only happened after first having enabled CRTSCTS. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index

[PATCH v5 2/3] USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code.

2016-05-04 Thread Konstantin Shkolnyy
Replaced magic numbers used in the CRTSCTS flag code with symbolic names from the chip specification. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 109 ++-- 1 file changed, 84 insertions(

[PATCH v5 0/3] USB: serial: cp210x: Bugfixes and cleanup in CRTSCTS flag code

2016-05-04 Thread Konstantin Shkolnyy
. v2 Improved CRTSCTS fix by feedback. Dropped get_termios error handling fix. Konstantin Shkolnyy (3): USB: serial: cp210x: Fixed RTS mode setting by the CRTSCTS flag. USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code. USB: serial: cp210x: Cleaned up CRTSCTS flag code

[PATCH v5 3/3] USB: serial: cp210x: Cleaned up CRTSCTS flag code.

2016-05-04 Thread Konstantin Shkolnyy
The CRTSCTS flag code cleared (and inconsistently) bits unrelated to CRTSCTS functionality. It was also harder than necessary to read. Signed-off-by: Konstantin Shkolnyy <konstantin.shkol...@gmail.com> --- drivers/usb/serial/cp210x.c | 32 ++-- 1 file chang

[PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-07 Thread Konstantin Shkolnyy
. Adding tx_empty() has no adverse effect on other cp210x devices. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index eac7cca..0189e64

[PATCH] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-07 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 58

[PATCH v4 1/3] USB: serial: cp210x: Workaround cp2108 Tx queue bug

2015-10-27 Thread Konstantin Shkolnyy
the close() callback. This change is applied to all cp210x devices. Clearing internal queues on close is generally good. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb

[PATCH v4 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-27 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 70

[PATCH v4 2/3] USB: serial: cp210x: Relocated private data from USB interface to port

2015-10-27 Thread Konstantin Shkolnyy
is trivial. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 43 +++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 8ba1005..352fe63 100644 --- a/drivers/usb

[PATCH v5 2/3] USB: serial: cp210x: Relocated private data from USB interface to port

2015-10-28 Thread Konstantin Shkolnyy
is trivial. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 43 +++ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 8ba1005..352fe63 100644 --- a/drivers/usb

[PATCH v5 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-28 Thread Konstantin Shkolnyy
. In turn, this causes cp2108 respond with a stall. The stall sometimes doesn't clear properly and cp2108 starts responding to following valid commands also with stalls, effectively failing. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 71

[PATCH v5 1/3] USB: serial: cp210x: Workaround cp2108 Tx queue bug

2015-10-28 Thread Konstantin Shkolnyy
the close() callback. This change is applied to all cp210x devices. Clearing internal queues on close is generally good. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb

Re: [PATCH v4 3/3] USB: serial: cp210x: Workaround cp2108 GET_LINE_CTL bug

2015-10-29 Thread Konstantin Shkolnyy
015 at 04:53:34PM -0500, Konstantin Shkolnyy wrote: >> > cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. >> > However, SET_LINE_CTL functions properly. When the driver tries to modify >> > the register, it reads it, modifies some bits and writes ba

RE: [EXT] Re: [PATCH v4 2/3] USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code.

2016-05-04 Thread Konstantin Shkolnyy
> -Original Message- > From: Johan Hovold [mailto:jhov...@gmail.com] On Behalf Of Johan Hovold > Sent: Wednesday, May 04, 2016 07:55 > To: Konstantin Shkolnyy > Cc: Johan Hovold; Konstantin Shkolnyy; linux-...@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject:

RE: [EXT] Re: [PATCH v4 2/3] USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code.

2016-05-04 Thread Konstantin Shkolnyy
> -Original Message- > From: linux-usb-ow...@vger.kernel.org [mailto:linux-usb- > ow...@vger.kernel.org] On Behalf Of Johan Hovold > Sent: Wednesday, May 04, 2016 02:29 > To: Konstantin Shkolnyy > Cc: jo...@kernel.org; linux-...@vger.kernel.org; linux- > ker...@vger

[PATCH v5 1/3] USB: serial: cp210x: Fixed RTS mode setting by the CRTSCTS flag.

2016-05-04 Thread Konstantin Shkolnyy
" This only happened after first having enabled CRTSCTS. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index dd47823..fef7a51 100644 --- a/drivers/u

[PATCH v5 2/3] USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code.

2016-05-04 Thread Konstantin Shkolnyy
Replaced magic numbers used in the CRTSCTS flag code with symbolic names from the chip specification. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 109 ++-- 1 file changed, 84 insertions(+), 25 deletions(-) diff --git a/drivers

[PATCH v5 0/3] USB: serial: cp210x: Bugfixes and cleanup in CRTSCTS flag code

2016-05-04 Thread Konstantin Shkolnyy
. v2 Improved CRTSCTS fix by feedback. Dropped get_termios error handling fix. Konstantin Shkolnyy (3): USB: serial: cp210x: Fixed RTS mode setting by the CRTSCTS flag. USB: serial: cp210x: Got rid of magic numbers in CRTSCTS flag code. USB: serial: cp210x: Cleaned up CRTSCTS flag code

[PATCH v5 3/3] USB: serial: cp210x: Cleaned up CRTSCTS flag code.

2016-05-04 Thread Konstantin Shkolnyy
The CRTSCTS flag code cleared (and inconsistently) bits unrelated to CRTSCTS functionality. It was also harder than necessary to read. Signed-off-by: Konstantin Shkolnyy --- drivers/usb/serial/cp210x.c | 32 ++-- 1 file changed, 10 insertions(+), 22 deletions

RE: [EXT] Re: [PATCH RESEND 3/5] USB: serial: cp210x: Added comments to CRTSCT flag code.

2016-04-27 Thread Konstantin Shkolnyy
> -Original Message- > From: Johan Hovold [mailto:jhov...@gmail.com] On Behalf Of Johan Hovold > Sent: Tuesday, April 26, 2016 02:26 > To: Konstantin Shkolnyy > Cc: Johan Hovold; Konstantin Shkolnyy; linux-...@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject:

  1   2   >