[PATCH] usb: cdc_acm: Add quirk for Elatec TWN3

2017-10-11 Thread Maksim Salau
-off-by: Maksim Salau --- `lsusb -v` of the device: Bus 001 Device 003: ID 09d8:0320 Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass2 Communications bDeviceSubClass 0 bDeviceProtocol 0

Re: [PATCH] USB: serial: ti_usb_3410_5052: Port uart_mode from io_ti.

2017-08-19 Thread Maksim Salau
Hi Stuart, > This introduces the `uart_mode` sysfs attribute as seen in the `io_ti` > USB serial driver, allowing this USB serial interface to be switched > between RS-232, 2-wire RS-485 and 4-wire RS-485. Recently I've discovered a blog post by Greg Kroah-Hartman on sysfs files [1]. I believe th

[PATCH v2] usb: misc: legousbtower: Fix memory leak

2017-05-13 Thread Maksim Salau
get_version_reply is not freed if function returns with success. Fixes: 942a48730faf ("usb: misc: legousbtower: Fix buffers on stack") Reported-by: Heikki Krogerus Signed-off-by: Maksim Salau --- v2: Changed tags to match guidelines. drivers/usb/misc/legousbtower.c | 1 + 1 file

[PATCH] usb: misc: legousbtower: Fix memory leak

2017-05-04 Thread Maksim Salau
get_version_reply is not freed if function returns with success. Memory leak was introduced by commit 942a48730faf149ccbf3e12ac718aee120bb3529 Signed-off-by: Heikki Krogerus Signed-off-by: Maksim Salau --- drivers/usb/misc/legousbtower.c | 1 + 1 file changed, 1 insertion(+) diff --git a

Re: [PATCH v3] usb: misc: legousbtower: Fix buffers on stack

2017-05-04 Thread Maksim Salau
> > @@ -913,6 +929,7 @@ static int tower_probe (struct usb_interface > > *interface, const struct usb_device > > Don't you need to free get_version_reply here? > > > return retval; > > > > error: > > + kfree(get_version_reply); > > tower_delete(dev); > > return retval; > > }

Re: [PATCH v3] usb: misc: legousbtower: Fix buffers on stack

2017-04-26 Thread Maksim Salau
> >* removed Tested-by: Alfredo Rafael Vicente Boix ; > > I added this back, as it matters, and your change from the previous > version was trivial. > > >* removed Cc: sta...@vger.kernel.org > > since this patch doesn't apply against v4.10.12 > > I added this back as well

[PATCH v3] usb: misc: legousbtower: Fix buffers on stack

2017-04-25 Thread Maksim Salau
Allocate buffers on HEAP instead of STACK for local structures that are to be received using usb_control_msg(). Signed-off-by: Maksim Salau --- Changes in v3: * rebased against usb-next; * removed Tested-by: Alfredo Rafael Vicente Boix ; * removed Cc: sta...@vger.kernel.org

Re: [PATCH v2] usb: misc: legousbtower: Fix buffers on stack

2017-04-25 Thread Maksim Salau
On Tue, 25 Apr 2017 20:04:24 +0200 Greg Kroah-Hartman wrote: > On Sat, Apr 22, 2017 at 07:24:37PM +0300, Maksim Salau wrote: > > Allocate buffers on HEAP instead of STACK for local structures > > that are to be received using usb_control_msg(). > > > > Signed-off-by:

Re: [PATCH v2] usb: core: Warn if an URB's transfer_buffer is on stack

2017-04-25 Thread Maksim Salau
> + } else if (object_is_on_stack(urb->transfer_buffer)) { > + WARN_ONCE(1, "transfer buffer is on stack\n"); > + ret = -EAGAIN; > } else { Hi, Has anyone considered a fail-safe mode? I.e.: if a buff

[PATCH] usb: serial: upd78f0730: Make constants static

2017-04-24 Thread Maksim Salau
Some local constants don't change from call to call and are good candidates to become static. This will prevent copying of these constants to stack during runtime. Signed-off-by: Maksim Salau --- drivers/usb/serial/upd78f0730.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH v2] usb: misc: legousbtower: Fix buffers on stack

2017-04-22 Thread Maksim Salau
Allocate buffers on HEAP instead of STACK for local structures that are to be received using usb_control_msg(). Signed-off-by: Maksim Salau Tested-by: Alfredo Rafael Vicente Boix Cc: sta...@vger.kernel.org --- Changes in v2: * made checkpatch happy with the format string passed to dev_info

[PATCH] USB: legousbtower: Fix buffers on stack

2017-04-21 Thread Maksim Salau
Allocate buffers on HEAP instead of STACK for local structures that are to be received using usb_control_msg(). Signed-off-by: Maksim Salau --- I took the liberty to fix the module if Greg don't mind. It is to be applied on vanilla v4.10.12 (without Greg's patch). Changes compared

Re: [PATCH] USB: serial: upd78f0730: sort device ids

2017-02-13 Thread Maksim Salau
> Sort the device ids by vendor id. > > Signed-off-by: Johan Hovold Thanks for taking care of that. I didn't bothered about order before your comment about ftd_sio driver. Maksim. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.

[PATCH v2] USB: serial: upd78f0730: Add ID for EVAL-ADXL362Z

2017-02-13 Thread Maksim Salau
The adaptor on Analog Devices EVAL-ADXL362Z development board is used to flash and debug firmware of on-board Renesas RL78/G13 MCU. Also added support of the 153600 baud rate, since the stock firmware uses it. Signed-off-by: Maksim Salau --- Changes in v2: * mentioned additional baudrate in the

[PATCH] USB: serial: upd78f0730: Add ID for EVAL-ADXL362Z

2017-02-10 Thread Maksim Salau
The adaptor on Analog Devices EVAL-ADXL362Z development board is used to flash and debug firmware of on-board Renesas RL78/G13 MCU. Signed-off-by: Maksim Salau --- I have no access to such board to test the change, but the VID/PID pair is found in same Windows driver package. The stock firmware

Re: [PATCH v6] USB: serial: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-26 Thread Maksim Salau
> Now applied. Nice work with this one! Thanks! Regards, Maksim. -- 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

[PATCH v6] USB: serial: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-25 Thread Maksim Salau
rsion is supported. Signed-off-by: Maksim Salau --- Changes in v6: Changed commit message prefix to 'USB: serial:' Removed '__func__ - ' prefix from all WARN and ERR messages Removed the attach callback (duplicates functionality of generic driver) Refine

Re: [PATCH v5] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-25 Thread Maksim Salau
Hi Johan, > You made some further changes than what I suggested but forgot to > document those. Often better to explicitly list the changes made rather > than refer to review comments this way. Sorry for that, I'll try to describe changes more verbosely. > > + if (res < 0) > > + retu

[PATCH v5] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-21 Thread Maksim Salau
rsion is supported. Signed-off-by: Maksim Salau --- Changes in v5: Fixed a typo in assignment of opcode of the SET_DTR_RTS request Changes in v4: Addressed comments from Johan drivers/usb/serial/Kconfig | 9 + drivers/usb/serial/Makefile | 1 + drivers/usb/serial/upd78f0730.c

[PATCH v4] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-21 Thread Maksim Salau
rsion is supported. Signed-off-by: Maksim Salau --- drivers/usb/serial/Kconfig | 9 + drivers/usb/serial/Makefile | 1 + drivers/usb/serial/upd78f0730.c | 458 3 files changed, 468 insertions(+) create mode 100644 drivers/usb/serial/upd78f0

Re: [PATCH v3] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-19 Thread Maksim Salau
Hi Johan, > And keep the current modem-control-signal polarity. What are the levels > of these signals when coming out of reset (i.e. after having connected > the device, but not opened it yet)? Thanks. RTS is low (0V) after plugging the device in. Regards, Maksim. -- To unsubscribe from this li

Re: [PATCH v3] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-17 Thread Maksim Salau
Hi Johan, > I think it's right to keep them as in the current version of the patch > (i.e. active high) which is accordance with the datasheet, but if > possible you should verify the levels when using hardware flow control > to be certain that the polarity is not inverted when enabling hardware >

Re: [PATCH v3] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-10 Thread Maksim Salau
Hi Johan, Thanks for feedback. > > * Dropped inversion of DTR and RTS signals > > Did you figure out whether this was needed or not, for example by > comparing to the hardware flow control levels? The current version matches the Windows driver. I don't have any other adapters at the moment, bu

[PATCH v3] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2016-12-08 Thread Maksim Salau
rsion is supported. Signed-off-by: Maksim Salau --- PATCH v2 can be found here: http://thread.gmane.org/gmane.linux.usb.general/137999 Changes from v2: * Addressed all comments * Dropped inversion of DTR and RTS signals * Removed support of software flow control and added hardware flow control

Re: [PATCH v2] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2016-04-26 Thread Maksim Salau
Hi Johan, On Sun, 24 Apr 2016 15:36:35 +0200 Johan Hovold wrote: > On Mon, Feb 29, 2016 at 04:11:20PM +0300, Maksim Salau wrote: > > The adaptor can be found on development boards for 78k, RL78 and V850 > > microcontrollers produced by Renesas Electronics Corporation. > &g

[PATCH v2] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2016-02-29 Thread Maksim Salau
rsion is supported. Signed-off-by: Maksim Salau --- drivers/usb/serial/Kconfig | 9 + drivers/usb/serial/Makefile | 1 + drivers/usb/serial/upd78f0730.c | 543 3 files changed, 553 insertions(+) create mode 100644 drivers/usb/serial/upd78f0

[PATCH] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2016-02-26 Thread Maksim Salau
rsion is supported. Signed-off-by: Maksim Salau --- drivers/usb/serial/Kconfig | 9 + drivers/usb/serial/Makefile | 1 + drivers/usb/serial/upd78f0730.c | 537 3 files changed, 547 insertions(+) create mode 100644 drivers/usb/serial/upd78f0