[PATCH 17/24] USB: serial: mos7840: remove unused write URB

2017-01-03 Thread Johan Hovold
Remove code to manage a write URB that was never allocated. Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index bb933c6321e5..c03cd511669a 100644 --- a/drivers

[PATCH 12/24] USB: serial: mos7720: fix use-after-free on probe errors

2017-01-03 Thread Johan Hovold
ned-off-by: Johan Hovold --- drivers/usb/serial/mos7720.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 3220d0bc767b..9170ae856b34 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial

[PATCH 22/24] USB: serial: quatech2: fix sleep-while-atomic in close

2017-01-03 Thread Johan Hovold
sb to serial driver") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/quatech2.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index 659cb8606bd9..5709cc93b083 100644 --- a/drivers/usb/serial/quatech2.c +++

[PATCH 09/24] USB: serial: keyspan_pda: verify endpoints at probe

2017-01-03 Thread Johan Hovold
write-urb as free. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable # < v3.3 Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan_pda.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_p

[PATCH 13/24] USB: serial: mos7720: fix parport use-after-free on probe errors

2017-01-03 Thread Johan Hovold
allel port on moschip 7715") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7720.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 9170ae856b34..e494821ae528 100644 ---

[PATCH 18/24] USB: serial: mos7840: fix misleading interrupt-URB comment

2017-01-03 Thread Johan Hovold
The interrupt URB is killed at final port close since commit 0de9a7024e7a ("USB: overhaul of mos7840 driver"). Fixes: 0de9a7024e7a ("USB: overhaul of mos7840 driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c | 4 +--- 1 file changed, 1 insertion(+),

[PATCH 14/24] USB: serial: mos7720: fix parallel probe

2017-01-03 Thread Johan Hovold
MCS7715 devices in attach() instead. We may want to use two usb-serial driver instances for the two types later. Fixes: fb088e335d78 ("USB: serial: add support for serial port on the moschip 7715") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7

[PATCH 10/24] USB: serial: kobil_sct: fix NULL-deref in write

2017-01-03 Thread Johan Hovold
ned-off-by: Johan Hovold --- drivers/usb/serial/kobil_sct.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 2363654cafc9..813035f51fe7 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.

[PATCH 19/24] USB: serial: omninet: fix NULL-derefs at open and disconnect

2017-01-03 Thread Johan Hovold
ual address 0234 ... [] (omninet_disconnect [omninet]) from [] (usb_serial_disconnect+0xe4/0x100 [usbserial]) Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/omninet.c | 13 + 1 file changed, 13 insertions(+) diff --

[PATCH 16/24] USB: serial: mos7840: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 9a220b8e810f..bb933c6321e5 10

[PATCH 11/24] USB: serial: mos7720: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
[usbserial]) from [] (tty_port_open+0x9c/0xe8) [] (tty_port_open) from [] (serial_open+0x48/0x6c [usbserial]) [] (serial_open [usbserial]) from [] (tty_open+0xcc/0x5cc) Fixes: 0f64478cbc7a ("USB: add USB serial mos7720 driver") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/mos

[PATCH 07/24] USB: serial: io_ti: bind to interface after fw download

2017-01-03 Thread Johan Hovold
Bind to the interface, but do not register any ports, after having downloaded the firmware. The device will still disconnect and re-enumerate, but this way we avoid an error messages from being logged as part of the process: io_ti: probe of 1-1.3:1.0 failed with error -5 Signed-off-by: Johan

[PATCH 05/24] USB: serial: io_ti: fix another NULL-deref at open

2017-01-03 Thread Johan Hovold
a177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index bf8a4f432f4b..3b1cfba0ec84 100644 --- a/driver

[PATCH 04/24] USB: serial: io_ti: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
]) [] (serial_port_activate [usbserial]) from [] (tty_port_open+0x9c/0xe8) [] (tty_port_open) from [] (serial_open+0x48/0x6c [usbserial]) [] (serial_open [usbserial]) from [] (tty_open+0xcc/0x5cc) Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold --- drivers/

[PATCH 20/24] USB: serial: oti6858: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
: 49cdee0ed0fc ("USB: oti6858 usb-serial driver (in Nokia CA-42 cable)") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/oti6858.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index a4

[PATCH 06/24] USB: serial: io_ti: fix I/O after disconnect

2017-01-03 Thread Johan Hovold
from disconnecting") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 3b1cfba0ec84..4b0b978fb356 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/seri

[PATCH 00/24] USB: serial: fix NULL-derefs on missing endpoints

2017-01-03 Thread Johan Hovold
-while-atomic). Johan Johan Hovold (24): USB: serial: cyberjack: fix NULL-deref at open USB: serial: garmin_gps: fix memory leak on failed URB submit USB: serial: io_edgeport: fix NULL-deref at open USB: serial: io_ti: fix NULL-deref at open USB: serial: io_ti: fix another NULL-deref at

[PATCH 02/24] USB: serial: garmin_gps: fix memory leak on failed URB submit

2017-01-03 Thread Johan Hovold
Make sure to free the URB transfer buffer in case submission fails (e.g. due to a disconnect). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/garmin_gps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/ga

[PATCH 21/24] USB: serial: pl2303: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index ae682e4eeaef..46fca6b75846 100644 --- a/drivers/

[PATCH 24/24] USB: serial: ti_usb_3410_5052: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 8db9d071d940..64b85b8dedf3 100644 --- a/drivers/

[PATCH 23/24] USB: serial: spcp8x5: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
ned-off-by: Johan Hovold --- drivers/usb/serial/spcp8x5.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index ef0dbf0703c5..475e6c31b266 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c

[PATCH 08/24] USB: serial: iuu_phoenix: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 344b4eea4bd5..d57fb5199218 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++

[PATCH 03/24] USB: serial: io_edgeport: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
required sanity checks so this makes those checks partially redundant. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/serial/io_edgeport.c b/d

[PATCH 01/24] USB: serial: cyberjack: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
ned-off-by: Johan Hovold --- drivers/usb/serial/cyberjack.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 5f17a3b9916d..80260b08398b 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.

Re: [PATCH 01/24] USB: serial: cyberjack: fix NULL-deref at open

2017-01-03 Thread Johan Hovold
On Tue, Jan 03, 2017 at 05:27:07PM +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 03, 2017 at 04:39:40PM +0100, Johan Hovold wrote: > > Fix NULL-pointer dereference when clearing halt at open should the device > > lack a bulk-out endpoint. > > > > Unable to handle kern

[GIT PULL] USB-serial fixes for v4.10-rc3

2017-01-05 Thread Johan Hovold
-atomic). A compiler warning revealed an error-handling issue in the new f81534 driver which is also fixed. Signed-off-by: Johan Hovold Geert Uytterhoeven (1): USB: serial: f81534: detect errors from f81534_logic_to_phy_port

[PATCH v2 01/14] USB: serial: ch341: fix initial modem-control state

2017-01-06 Thread Johan Hovold
ned-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 2597b83a8ae2..d133e72fe888 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c @@ -258,7 +258,6 @@

[PATCH v2 00/14] USB: serial: ch341: fixes and improved CH340 support

2017-01-06 Thread Johan Hovold
for 4.11. Thanks, Johan Changes in v2 - revert to using direct register writes to update line settings for all device types (avoids toggling DTR/RTS) - use GFP_NOIO in reset_resume - rename lcr variable in set_termios - update a few commit messages Johan Hovold (14): USB: serial: ch341

[PATCH v2 10/14] USB: serial: ch341: clean up control debug messages

2017-01-06 Thread Johan Hovold
Clean up the control-transfer debug messages by dropping redundant information and unnecessary casts. Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c

[PATCH v2 04/14] USB: serial: ch341: fix open error handling

2017-01-06 Thread Johan Hovold
Make sure to stop the interrupt URB before returning on errors during open. Fixes: 664d5df92e88 ("USB: usb-serial ch341: support for DTR/RTS/CTS") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletion

[PATCH v2 09/14] USB: serial: ch341: fix control-message error handling

2017-01-06 Thread Johan Hovold
A short control transfer would currently fail to be detected, something which could lead to stale buffer data being used as valid input. Check for short transfers, and make sure to log any transfer errors. Fixes: 6ce76104781a ("USB: Driver for CH341 USB-serial adaptor") Signed-off

[PATCH v2 14/14] USB: serial: ch341: change initial line-control settings

2017-01-06 Thread Johan Hovold
Some CH340 devices appear unable to change the initial LCR settings, so set a sane 8N1 default during probe to enable basic support for such devices. Also drop a redundant LCR read during device initialisation. Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 14 +- 1

[PATCH v2 06/14] USB: serial: ch341: fix line settings after reset-resume

2017-01-06 Thread Johan Hovold
reopened. Fixes: ba781bdf8662 ("USB: serial: ch341: add support for parity, frame length, stop bits") Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch3

[PATCH v2 07/14] USB: serial: ch341: fix baud rate and line-control handling

2017-01-06 Thread Johan Hovold
) something which for example could cause problems in setups where DTR is used to trigger a reset. Fixes: 4e46c410e050 ("USB: serial: ch341: reinitialize chip on reconfiguration") Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 24 +--- 1 file changed, 17

[PATCH v2 08/14] USB: serial: ch341: fix modem-status handling

2017-01-06 Thread Johan Hovold
(reset-resume). Fix this by dropping the redundant reconfiguration of the port at every open, and only read the MSR after the interrupt URB has been submitted. Fixes: 664d5df92e88 ("USB: usb-serial ch341: support for DTR/RTS/CTS") Signed-off-by: Johan Hovold --- drivers/usb/serial/ch

[PATCH v2 13/14] USB: serial: ch341: rename LCR variable in set_termios

2017-01-06 Thread Johan Hovold
Rename the line-control-register variable in set_termios to "lcr" and use u8 type to match the shadow register. Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/usb/serial

[PATCH v2 11/14] USB: serial: ch341: rename shadow modem-control register

2017-01-06 Thread Johan Hovold
Rename the shadow modem-control register currently named "line_control" to the less confusing "mcr". Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/usb/seri

[PATCH v2 05/14] USB: serial: ch341: fix resume after reset

2017-01-06 Thread Johan Hovold
: serial: ch341: remove reset_resume callback") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 8f41d4385f1c..5343d

[PATCH v2 03/14] USB: serial: ch341: fix modem-control and B0 handling

2017-01-06 Thread Johan Hovold
R/RTS/CTS") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 6279df905c14..0cc5056b304d 100644 --- a/drivers/usb/serial/ch3

[PATCH v2 02/14] USB: serial: ch341: fix open and resume after B0

2017-01-06 Thread Johan Hovold
("USB: usb-serial ch341: support for DTR/RTS/CTS") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index d133e72fe888..6279df905c14 1006

[PATCH v2 12/14] USB: serial: ch341: rename modem-status register

2017-01-06 Thread Johan Hovold
Rename the shadow modem-status register currently named "line_status" to the less confusing "msr". Also rename the helper function used to parse the interrupt data. Signed-off-by: Johan Hovold --- drivers/usb/serial/ch341.c | 16 1 file changed, 8 insert

Re: [PATCH 06/13] USB: serial: ch341: fix initial line settings

2017-01-09 Thread Johan Hovold
On Tue, Dec 20, 2016 at 09:49:00PM +0100, Johan Hovold wrote: > On Tue, Dec 20, 2016 at 12:09:55PM -0800, Russell Senior wrote: > > On Tue, Dec 20, 2016 at 8:07 AM, Johan Hovold wrote: > > > > > Perhaps we should determine what else is working or broken first, > >

Re: [PATCH V1 1/2] usb:serial: Implement Fintek F81232 break on/off

2017-01-09 Thread Johan Hovold
On Fri, Dec 09, 2016 at 01:39:33PM +0800, Ji-Ze Hong (Peter Hong) wrote: > Implement Fintek F81232 break on/off with LCR register, > it's the same with 16550A LCR register layout. > > Signed-off-by: Ji-Ze Hong (Peter Hong) > --- > drivers/usb/serial/f81232.c | 40

Re: [PATCH V1 2/2] usb:serial: Implement Fintek f81534 break on/off

2017-01-09 Thread Johan Hovold
On Fri, Dec 09, 2016 at 01:39:34PM +0800, Ji-Ze Hong (Peter Hong) wrote: > Implement Fintek f81534 break on/off with LCR register > It's the same with 16550A LCR register layout > > We'll add a shadow LCR variable to save the final LCR we > had set due to the "read ep0" operations maybe slow down

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

2017-01-09 Thread Johan Hovold
On Thu, Dec 08, 2016 at 10:13:37PM +0300, Maksim Salau wrote: > The adaptor can be found on development boards for 78k, RL78 and V850 > microcontrollers produced by Renesas Electronics Corporation. > > This is not a full-featured USB to serial converter, however it allows > basic communication and

[PATCH 6/6] USB: serial: kl5kusb105: fix port-settings error handling

2017-01-10 Thread Johan Hovold
Fix port-settings error handling in order to detect a short transfer. Note that this currently only implies that an error is logged. Signed-off-by: Johan Hovold --- drivers/usb/serial/kl5kusb105.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial

[PATCH 2/6] USB: serial: kl5kusb105: make logging less verbose

2017-01-10 Thread Johan Hovold
Replace a couple of dev_info with dev_dbg and remove another. Also use the port device for logging, and include a radix prefix when logging the baudrate. Signed-off-by: Johan Hovold --- drivers/usb/serial/kl5kusb105.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[PATCH 3/6] USB: serial: kl5kusb105: remove dead code

2017-01-10 Thread Johan Hovold
Remove dead and broken code that only served as a reminder to one day implement modem control. Signed-off-by: Johan Hovold --- drivers/usb/serial/kl5kusb105.c | 76 + 1 file changed, 8 insertions(+), 68 deletions(-) diff --git a/drivers/usb/serial

[PATCH 4/6] USB: serial: kl5kusb105: clean up struct definition

2017-01-10 Thread Johan Hovold
Drop redundant packed attribute from the port-settings struct which is already 1-byte aligned. Also replace __u8 with u8 for the field types as this is not a structure we share with user space. Signed-off-by: Johan Hovold --- drivers/usb/serial/kl5kusb105.c | 12 ++-- 1 file changed, 6

[PATCH 5/6] USB: serial: kl5kusb105: remove unused termios structure

2017-01-10 Thread Johan Hovold
Remove unused termios structure from private data that was left by an earlier purge by commit b1cff285ae8d ("usb serial: Eliminate bogus ioctl code"). Signed-off-by: Johan Hovold --- drivers/usb/serial/kl5kusb105.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/d

[PATCH 1/6] USB: serial: kl5kusb105: fix line-state error handling

2017-01-10 Thread Johan Hovold
ot;Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/kl5kusb105.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 0ee190fc1bf8..6cb45757818f 100644 --- a/drivers/u

[PATCH 0/6] USB: serial: kl5kusb105: fixes and clean ups

2017-01-10 Thread Johan Hovold
This series fixes an information leak, and cleans up the driver somewhat. Johan Johan Hovold (6): USB: serial: kl5kusb105: fix line-state error handling USB: serial: kl5kusb105: make logging less verbose USB: serial: kl5kusb105: remove dead code USB: serial: kl5kusb105: clean up struct

Re: [PATCH 0/6] USB: serial: kl5kusb105: fixes and clean ups

2017-01-10 Thread Johan Hovold
On Tue, Jan 10, 2017 at 04:42:25PM +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 10, 2017 at 12:05:36PM +0100, Johan Hovold wrote: > > This series fixes an information leak, and cleans up the driver > > somewhat. > > All look good to me: > > Reviewed-by: Greg Kro

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

2017-01-11 Thread Johan Hovold
On Wed, Jan 11, 2017 at 10:49:22AM +0300, Maksim Salau wrote: > 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 vers

Re: [PATCH v2 09/14] USB: serial: ch341: fix control-message error handling

2017-01-11 Thread Johan Hovold
On Fri, Jan 06, 2017 at 07:15:18PM +0100, Johan Hovold wrote: > A short control transfer would currently fail to be detected, something > which could lead to stale buffer data being used as valid input. > > Check for short transfers, and make sure to log any transfer errors

[PATCH 13/15] USB: serial: spcp8x5: fix modem-status handling

2017-01-12 Thread Johan Hovold
bits from the stack on short transfers. This also fixes the carrier-detect implementation which since the above mentioned commit unconditionally has returned true. Fixes: e1ed212d8593 ("USB: spcp8x5: add proper modem-status support") Cc: stable Signed-off-by: Johan Hovold --- drivers/

[PATCH 14/15] USB: serial: ssu100: fix control-message error handling

2017-01-12 Thread Johan Hovold
Make sure to detect short control-message transfers rather than continue with zero-initialised data when retrieving modem status and during device initialisation. Fixes: 52af95459939 ("USB: add USB serial ssu100 driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/ssu

[PATCH 04/15] USB: serial: ftdi_sio: fix latency-timer error handling

2017-01-12 Thread Johan Hovold
Make sure to detect short responses when reading the latency timer to avoid using stale buffer data. Note that no heap data would currently leak through sysfs as ASYNC_LOW_LATENCY is set by default. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Johan Hovold --- drivers/

[PATCH 09/15] USB: serial: mos7720: fix control-message error handling

2017-01-12 Thread Johan Hovold
Make sure to log an error on short transfers when reading a device register. Also clear the provided buffer (which if often an uninitialised automatic variable) on errors as the driver currently does not bother to check for errors. Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7720.c

[PATCH 15/15] USB: serial: ti_usb_3410_5052: fix control-message error handling

2017-01-12 Thread Johan Hovold
Linux-2.6.12-rc2") Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 64b85b8dedf3..3107bf5d1c96 100644 ---

[PATCH 07/15] USB: serial: iuu_phoenix: remove unused buffer from open

2017-01-12 Thread Johan Hovold
Remove code that allocated but never used a buffer during open. Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index

[PATCH 06/15] USB: serial: io_edgeport: fix descriptor error handling

2017-01-12 Thread Johan Hovold
.6.12-rc2") Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 993a36a3e557..8ab5f5b49ef3 100644 --- a/drivers/

[PATCH 10/15] USB: serial: mos7840: fix control-message error handling

2017-01-12 Thread Johan Hovold
Make sure to detect short transfers when reading a device register. The modem-status handling had sufficient error checks in place, but move handling of short transfers into the register accessor function itself for consistency. Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c | 19

[PATCH 11/15] USB: serial: pl2303: fix line-setting error handling

2017-01-12 Thread Johan Hovold
Make sure to return an error on zero-length transfers when retrieving the line settings even if the driver currently ignores the return value. Also remove a redundant check for short transfer when setting the line settings. Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 8

[PATCH 05/15] USB: serial: io_edgeport: fix epic-descriptor handling

2017-01-12 Thread Johan Hovold
Use a dedicated buffer for the DMA transfer and make sure to detect short transfers to avoid parsing a corrupt descriptor. Fixes: 6e8cf7751f9f ("USB: add EPIC support to the io_edgeport driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 24 +

[PATCH 08/15] USB: serial: mct_u232: fix modem-status error handling

2017-01-12 Thread Johan Hovold
: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Johan Hovold --- drivers/usb/serial/mct_u232.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 885655315de1..edbc81f205c2 100644 --- a/drivers/usb/seria

[PATCH 02/15] USB: serial: ark3116: fix open error handling

2017-01-12 Thread Johan Hovold
submitted and the register updates have not been made. Fixes: f4c1e8d597d1 ("USB: ark3116: Make existing functions 16450-aware and add close and release functions.") Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 25 +++-- 1 file changed, 19 insert

[PATCH 03/15] USB: serial: ftdi_sio: fix modem-status error handling

2017-01-12 Thread Johan Hovold
Make sure to detect short responses when fetching the modem status in order to avoid parsing uninitialised buffer data and having bits of it leak to user space. Note that we still allow for short 1-byte responses. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Jo

[PATCH 12/15] USB: serial: quatech2: fix control-message error handling

2017-01-12 Thread Johan Hovold
lacked appropriate error handling. Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/quatech2.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/usb/serial/qu

[PATCH 00/15] USB: serial: fix control-message error handling

2017-01-12 Thread Johan Hovold
removing an unnecessary allocation from iuu_phoenix. These are all intended for inclusion in 4.11. Johan Johan Hovold (15): USB: serial: ark3116: fix register-accessor error handling USB: serial: ark3116: fix open error handling USB: serial: ftdi_sio: fix modem-status error handling USB

[PATCH 01/15] USB: serial: ark3116: fix register-accessor error handling

2017-01-12 Thread Johan Hovold
: ark3116: Make existing functions 16450-aware and add close and release functions.") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/se

Re: [PATCH 06/13] USB: serial: ch341: fix initial line settings

2017-01-12 Thread Johan Hovold
On Mon, Jan 09, 2017 at 02:51:59PM +0100, Johan Hovold wrote: > On Tue, Dec 20, 2016 at 09:49:00PM +0100, Johan Hovold wrote: > > On Tue, Dec 20, 2016 at 12:09:55PM -0800, Russell Senior wrote: > > > On Tue, Dec 20, 2016 at 8:07 AM, Johan Hovold wrote: > > > > >

[GIT PULL] USB-serial fixes for v4.10-rc4

2017-01-12 Thread Johan Hovold
also prevented a certain class of CH340 devices from working with the driver. Included are also two fixes for two minor information leaks in kl5kusb105 and ch341 due to failures to detect short control transfers. Signed-off-by: Johan Hovold

[PATCH 1/2] HID: corsair: fix DMA buffers on stack

2017-01-12 Thread Johan Hovold
Not all platforms support DMA to the stack, and specifically since v4.9 this is no longer supported on x86 with VMAP_STACK either. Note that the macro-mode buffer was larger than necessary. Fixes: 6f78193ee9ea ("HID: corsair: Add Corsair Vengeance K90 driver") Cc: stable Signed-off

[PATCH 0/2] HID: corsair: fix DMA to stack and info leaks

2017-01-12 Thread Johan Hovold
These patches fix DMA buffers on stack and information leaks in the corsair HID driver. Note that this series has only been compile tested. Johan Johan Hovold (2): HID: corsair: fix DMA buffers on stack HID: corsair: fix control-transfer error handling drivers/hid/hid-corsair.c | 60

Re: [PATCH 00/15] USB: serial: fix control-message error handling

2017-01-12 Thread Johan Hovold
On Thu, Jan 12, 2017 at 06:19:53PM +0100, Greg Kroah-Hartman wrote: > On Thu, Jan 12, 2017 at 02:56:08PM +0100, Johan Hovold wrote: > > Several USB serial drivers failed to detect short control transfers, > > something which could lead to uninitialised data leaking to user spa

[PATCH 2/2] HID: corsair: fix control-transfer error handling

2017-01-12 Thread Johan Hovold
necessary. Fixes: 6f78193ee9ea ("HID: corsair: Add Corsair Vengeance K90 driver") Cc: stable Signed-off-by: Johan Hovold --- drivers/hid/hid-corsair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hid/hid-corsair.c b/drivers/hid/hid-corsa

Re: [bug report] USB: opticon: switch to generic read implementation

2017-01-13 Thread Johan Hovold
On Thu, Jan 12, 2017 at 11:39:14PM +0300, Dan Carpenter wrote: > Hello Johan Hovold, > > The patch 7a6ee2b02751: "USB: opticon: switch to generic read > implementation" from Nov 18, 2012, leads to the following static > checker warning: > > drivers/usb/se

[PATCH] USB: serial: opticon: fix CTS retrieval at open

2017-01-13 Thread Johan Hovold
an incorrect CTS state. Reported-by: Dan Carpenter Fixes: 7a6ee2b02751 ("USB: opticon: switch to generic read implementation") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/opticon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/

Re: [PATCH v2] USB: cypress_m8: remove unused variable

2017-01-16 Thread Johan Hovold
On Tue, Jan 03, 2017 at 09:01:10PM +, Sudip Mukherjee wrote: > From: Sudip Mukherjee > > The variable havedata was only being set but never used afterwards. > > Signed-off-by: Sudip Mukherjee > --- > > v2: changed the from line Now applied, thanks. Johan -- To unsubscribe from this list:

Re: [PATCH v2 09/14] USB: serial: ch341: fix control-message error handling

2017-01-16 Thread Johan Hovold
On Wed, Jan 11, 2017 at 12:08:23PM +0100, Johan Hovold wrote: > On Fri, Jan 06, 2017 at 07:15:18PM +0100, Johan Hovold wrote: > > A short control transfer would currently fail to be detected, something > > which could lead to stale buffer data being used as valid input. > >

Re: [PATCH 6/6] USB: serial: kl5kusb105: fix port-settings error handling

2017-01-16 Thread Johan Hovold
On Tue, Jan 10, 2017 at 12:05:42PM +0100, Johan Hovold wrote: > Fix port-settings error handling in order to detect a short transfer. > > Note that this currently only implies that an error is logged. > > Signed-off-by: Johan Hovold > > --- > drivers/usb/serial/kl5kus

Re: USB: OHCI: high softirq load

2017-01-16 Thread Johan Hovold
[ +CC: linux-usb ] On Mon, Jan 16, 2017 at 12:14:03PM +0100, Boris Brezillon wrote: > On Mon, 16 Jan 2017 11:54:23 +0100 > Antoine Aubert wrote: > > > Also, I made a big misunderstanding > > > > With EHCI + OHCI = high level of softirq (USB2.0) > > Well, the number of irqs and softirqs are lik

Re: [PATCH] USB: serial: opticon: fix CTS retrieval at open

2017-01-16 Thread Johan Hovold
On Fri, Jan 13, 2017 at 01:41:47PM +0100, Greg Kroah-Hartman wrote: > On Fri, Jan 13, 2017 at 01:21:08PM +0100, Johan Hovold wrote: > > The opticon driver used a control request at open to trigger a CTS > > status notification to be sent over the bulk-in pipe. When the driver >

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

2017-01-17 Thread Johan Hovold
On Tue, Jan 17, 2017 at 04:25:18PM +0300, Maksim Salau wrote: > 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 >

Re: [PATCH] USB: qcserial: add Dell DW5570 QDL

2017-01-19 Thread Johan Hovold
On Wed, Jan 18, 2017 at 09:31:31PM +0100, Aleksander Morgado wrote: > The Dell DW5570 is a re-branded Sierra Wireless MC8805 which will by > default boot with vid 0x413c and pid 0x81a3. When triggered QDL download > mode, the device switches to pid 0x81a6 and provides the standard TTY > used for fi

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

2017-01-23 Thread Johan Hovold
On Sun, Jan 22, 2017 at 12:32:16AM +0300, Maksim Salau wrote: > The adaptor can be found on development boards for 78k, RL78 and V850 > microcontrollers produced by Renesas Electronics Corporation. > > This is not a full-featured USB to serial converter, however it allows > basic communication and

Re: [PATCH] USB: option: add device ID for HP lt2523 (Novatel E371)

2017-01-24 Thread Johan Hovold
On Tue, Jan 24, 2017 at 10:31:18AM +0100, Bjørn Mork wrote: > Yet another laptop vendor rebranded Novatel E371. > > Cc: sta...@vger.kernel.org > Signed-off-by: Bjørn Mork Applied, thanks. Johan -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to m

[PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting

2017-01-25 Thread Johan Hovold
at since commit 0cbd81a9f6ba ("USB: ftdi_sio: remove tty->low_latency") the ASYNC_LOW_LATENCY flag has no other effects but to set a minimal latency timer. Reported-by: Antoine Aubert Fixes: 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag") Cc: stable # v2.6.31 Signed-

Re: [PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting

2017-01-25 Thread Johan Hovold
On Wed, Jan 25, 2017 at 04:06:47PM +0100, Greg Kroah-Hartman wrote: > On Wed, Jan 25, 2017 at 03:35:20PM +0100, Johan Hovold wrote: > > Since commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY > > flag") the FTDI driver has been using a receive latency-timer val

Re: [PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting

2017-01-25 Thread Johan Hovold
On Wed, Jan 25, 2017 at 04:42:01PM +0100, Greg Kroah-Hartman wrote: > On Wed, Jan 25, 2017 at 04:14:36PM +0100, Johan Hovold wrote: > > On Wed, Jan 25, 2017 at 04:06:47PM +0100, Greg Kroah-Hartman wrote: > > > On Wed, Jan 25, 2017 at 03:35:20PM +0100, Johan Hovold wrote: &g

[PATCH] USB: cdc-acm: fix TIOCGSERIAL flags

2017-01-25 Thread Johan Hovold
h removed the unconditional setting of the corresponding tty low_latency flag (something which had always been broken in itself). Since the driver does not have a low-latency mode, let's drop the flag. Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 1 - 1 file changed, 1 deletio

[PATCH 1/2] USB: serial: ftdi_sio: clean up ioctl handler

2017-01-25 Thread Johan Hovold
Clean up the ioctl handler and make sure to pass an unsigned-int rather than serial_struct pointer to the TIOCSERGETLSR helper as this it what the user argument really is. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 19 +++ 1 file changed, 7 insertions(+), 12

[PATCH 2/2] USB: serial: drop unused ASYNC flags

2017-01-25 Thread Johan Hovold
Do not report ASYNC_SKIP_TEST or ASYNC_AUTO_IRQ as being set in TIOCGSERIAL handlers as these flags are not supported and do not really make any sense for USB serial devices in the first place. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 1 - drivers/usb/serial/io_ti.c

Re: [PATCH 1/1] USB: serial: usb-serial-simple: add support for another Infineon flashloader

2016-09-12 Thread Johan Hovold
On Fri, Sep 02, 2016 at 10:37:56AM +0200, Daniele Palmas wrote: > This patch adds support for Infineon flashloader 0x8087/0x0801. > > The flashloader is used in Telit LE940B modem family with Telit > flashing application. > > Signed-off-by: Daniele Palmas Now applied, thanks. Johan -- To unsub

[PATCH] MAINTAINERS: add tree entry for USB Serial

2016-09-14 Thread Johan Hovold
Add tree entry for USB Serial. Signed-off-by: Johan Hovold --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6781a3febd59..c7131a91013a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12267,6 +12267,7 @@ F: drivers/net/usb/rtl8150.c USB

Re: 转发: [PATCH] usb: serial: update CH34x driver in drivers/usb/serial

2016-09-15 Thread Johan Hovold
On Thu, Sep 15, 2016 at 11:19:26AM +0100, Aidan Thornton wrote: > On Thu, Sep 15, 2016 at 6:56 AM, Greg KH wrote: > > On Thu, Sep 15, 2016 at 12:03:48AM +0100, Aidan Thornton wrote: > >> > >> It looks like someone by the name of Grigori Goronzy (CCed) had a patch > >> series > >> or four attempti

[GIT PULL] USB-serial fixes for v4.8-rc7

2016-09-16 Thread Johan Hovold
+0200) USB-serial fixes for v4.8-rc7 Here's another Infineon flashloader device id. Signed-off-by: Johan Hovold Daniele Palmas (1): USB: serial: simple: add support for another Infineon flashloader

[GIT PULL] USB-serial updates for v4.9-rc1

2016-09-16 Thread Johan Hovold
- USB-serial updates for v4.9-rc1 More clean ups, including a second set of changes from Mathieu as part of a major overhaul of the ti_usb_3410_5052 driver. Signed-off-by: Johan Hovold Javier Martinez Canillas (1): USB: serial

Re: [PATCH] mos7840: fix chars_in_buffer() return value

2016-09-29 Thread Johan Hovold
On Sat, Sep 24, 2016 at 06:00:57PM +0300, Stas Sergeev wrote: > The TIOCOUTQ ioctl calls chars_in_buffer(), and some apps depend on > a correct behaviour of that. > mos7840 implements it wrongly: if you write just one char, TIOCOUTQ > will return 32. > This patch should fix it by accounting the num

<    1   2   3   4   5   6   7   8   9   10   >