[GIT PULL] USB-serial fix for v4.20-rc6

2018-12-06 Thread Johan Hovold
-standing bug in the console implementation. The patch has been in linux-next over night with no reported issues. Signed-off-by: Johan Hovold Johan Hovold (1): USB: serial: console: fix reported terminal settings drivers/tty

Re: [PATCH] USB: qcaux: Add Motorola modem UARTs

2018-12-05 Thread Johan Hovold
On Wed, Dec 05, 2018 at 05:54:07PM -0800, Tony Lindgren wrote: > Hi, > > * Johan Hovold [181205 06:17]: > > On Sun, Dec 02, 2018 at 05:34:24PM -0800, Tony Lindgren wrote: > > > On Motorola Mapphone devices such as Droid 4 there are five USB ports > > > that do n

Re: [PATCH] USB: qcaux: Add Motorola modem UARTs

2018-12-04 Thread Johan Hovold
On Sun, Dec 02, 2018 at 05:34:24PM -0800, Tony Lindgren wrote: > On Motorola Mapphone devices such as Droid 4 there are five USB ports > that do not use the same layout as Gobi 1K/2K/etc devices listed in > qcserial.c. So we should use qcaux.c or option.c as noted by > Dan Williams . > > The

Re: pl2303 regression after v4.17. Bisected to 7041d9c3f01b

2018-12-04 Thread Johan Hovold
On Mon, Nov 26, 2018 at 02:29:53PM +0200, Jarkko Nikula wrote: > On 11/24/18 7:32 PM, Florian Zumbiehl wrote: > > Hi, > > > >> Requested baud setting looks odd to me. Maybe related to this > >> --keep-baud flag in "/sbin/agetty -o -p -- \u --keep-baud > >> 115200,38400,9600 ttyUSB0 vt220"? That

Re: [PATCH v2] USB: serial: ftdi_sio: Use rounding instead of truncating when calculating baud rate divisors.

2018-11-23 Thread Johan Hovold
On Thu, Nov 22, 2018 at 09:27:46PM +0100, Nikolaj Fogh wrote: > Improve baud-rate generation by using rounding-to-closest instead of > truncation in divisor calculation. > > Results have been verified by logic analyzer on an FT232RT (232BM) chip. > The following table shows the wanted baud rate,

Re: pl2303 regression after v4.17. Bisected to 7041d9c3f01b

2018-11-23 Thread Johan Hovold
On Fri, Nov 23, 2018 at 04:19:49AM +0100, Florian Zumbiehl wrote: > Hi, > > > T: Bus=01 Lev=02 Prnt=03 Port=01 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 > > D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 > > P: Vendor=0557 ProdID=2008 Rev=03.00 > > S: Manufacturer=Prolific Technology Inc.

Re: [PATCH v2] USB: serial: ftdi_sio: Improve the accuracy of the baud rate generator by using round-to-closest instead of truncating when calculating baud rate divisors.

2018-11-20 Thread Johan Hovold
On Fri, Nov 16, 2018 at 10:44:21PM +0100, Nikolaj Fogh wrote: > Improve baud-rate generation by using rounding-to-closest instead of > truncation in divisor calculation. > > Results have been verified by logic analyzer on an FT232RT (232BM) chip. > The following table shows the wanted baud rate,

Re: pl2303 regression after v4.17. Bisected to 7041d9c3f01b

2018-11-20 Thread Johan Hovold
On Tue, Nov 20, 2018 at 01:17:34PM +0200, Jarkko Nikula wrote: > Hi > > I'm using PL2303 based USB serial adapter for the kernel and getty > serial console. I noticed getty console stopped working in v4.18 and > bisected this into commit 7041d9c3f01b ("USB: serial: pl2303: add > support for tx

Re: [PATCH] Improve the accuracy of the baud rate generator by using round-to-closest instead of truncating when calculating baud rate divisors.

2018-11-16 Thread Johan Hovold
On Thu, Nov 15, 2018 at 03:16:04PM +0100, Nikolaj Fogh wrote: > On 11/15/18 9:24 AM, Johan Hovold wrote: > > On Tue, Nov 13, 2018 at 08:19:44PM +0100, Nikolaj Fogh wrote: > >> On 11/12/18 10:54 AM, Johan Hovold wrote: > >>> On Wed, Oct 31, 2018 at 09:16:48PM +0100

Re: [PATCH] Improve the accuracy of the baud rate generator by using round-to-closest instead of truncating when calculating baud rate divisors.

2018-11-15 Thread Johan Hovold
On Thu, Nov 15, 2018 at 09:24:49AM +0100, Johan Hovold wrote: > On Tue, Nov 13, 2018 at 08:19:44PM +0100, Nikolaj Fogh wrote: > > On 11/12/18 10:54 AM, Johan Hovold wrote: > > > On Wed, Oct 31, 2018 at 09:16:48PM +0100, Nikolaj Fogh wrote: > > >> I have experienced

Re: [PATCH] Improve the accuracy of the baud rate generator by using round-to-closest instead of truncating when calculating baud rate divisors.

2018-11-15 Thread Johan Hovold
On Tue, Nov 13, 2018 at 08:19:44PM +0100, Nikolaj Fogh wrote: > On 11/12/18 10:54 AM, Johan Hovold wrote: > > On Wed, Oct 31, 2018 at 09:16:48PM +0100, Nikolaj Fogh wrote: > >> I have experienced that the ftdi_sio driver gives less-than-optimal > >> baud rates as t

Re: Adding NovAtel USB vendor & device ID to Kernel

2018-11-12 Thread Johan Hovold
On Thu, Nov 08, 2018 at 01:07:47AM +, SNELL James wrote: > Hello, > We produce extremely high-end GNSS (GPS, etc) receivers that are often > used for a very wide range of applications. Our receivers can be > connected to via USB, which will provide 3 USB-to-serial ports that > can be used to

Re: [PATCH] Improve the accuracy of the baud rate generator by using round-to-closest instead of truncating when calculating baud rate divisors.

2018-11-12 Thread Johan Hovold
On Wed, Oct 31, 2018 at 09:16:48PM +0100, Nikolaj Fogh wrote: > I have experienced that the ftdi_sio driver gives less-than-optimal baud > rates as the driver truncates instead of rounds to nearest during baud rate > divisor calculation. Please break your lines at 72 cols or so, and use the

Re: [PATCH -next] USB: serial: quatech2: remove set but not used variable 'port_priv'

2018-11-12 Thread Johan Hovold
On Thu, Oct 11, 2018 at 07:44:33AM +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/usb/serial/quatech2.c: In function 'qt2_process_read_urb': > drivers/usb/serial/quatech2.c:503:27: warning: > variable 'port_priv' set but not used [-Wunused-but-set-variable]

Re: Prolific: PL2303G Linux driver ( new USB to UART chip)

2018-10-29 Thread Johan Hovold
On Mon, Oct 29, 2018 at 10:24:26AM +, Yeh.Charles [葉榮鑫] wrote: > Hi Greg, > Because the "confidential" message is auto add by Prolific's > email server. I will use "charlesyeh...@gmail.com" to avoid > "confidential message". Sounds good. > And I will use Linux kernel 4.4

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

2018-10-18 Thread Johan Hovold
: - support for CBUS GPIO on FTDI devices (FTX and FT232R) - fix of a long-standing transfer-length bug Included are also various clean ups. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold Colin Ian King

Re: [PATCH v2 -next] USB: cypress_m8: remove set but not used variables 'iflag'

2018-10-05 Thread Johan Hovold
On Thu, Oct 04, 2018 at 07:09:53AM +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/usb/serial/cypress_m8.c: In function 'cypress_set_termios': > drivers/usb/serial/cypress_m8.c:866:18: warning: > variable 'iflag' set but not used [-Wunused-but-set-variable]

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

2018-09-30 Thread Johan Hovold
to support all such interface permutations at least for the Quectel EP06. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold Johan Hovold (2): USB: serial: option: add two-endpoints device-id flag

[PATCH] USB: serial: cypress_m8: fix interrupt-out transfer length

2018-09-30 Thread Johan Hovold
where appropriate") Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 31c6091be46a..5aaab8f4dd8f 100644 --- a/drivers/usb/serial/cypress_

Re: [PATCH -next] USB: cypress_m8: remove set but not used variables 'actual_size, iflag'

2018-09-30 Thread Johan Hovold
On Sat, Sep 29, 2018 at 09:54:03AM +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/usb/serial/cypress_m8.c: In function 'cypress_send': > drivers/usb/serial/cypress_m8.c:689:33: warning: > variable 'actual_size' set but not used [-Wunused-but-set-variable] >

[PATCH] USB: serial: simple: add Motorola Tetra MTP6550 id

2018-09-24 Thread Johan Hovold
bMaxPacketSize064 bNumConfigurations 1 Device Status: 0x (Bus Powered) Reported-by: Hans Hult Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial-simple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/usb-serial

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

2018-09-05 Thread Johan Hovold
handlers due to insufficient sanity checks. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold Johan Hovold (2): USB: serial: io_ti: fix array underflow in completion handler USB: serial

Re: [PATCH v3] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-09-05 Thread Johan Hovold
On Wed, Sep 05, 2018 at 08:44:12AM +0200, Loic Poulain wrote: > Thanks for review, I'm fine with that and I'll review the other patch. > Karoly can use chunks of my patch if useful. Thanks a lot. And if chunks can be reused, that would be great. Johan

Re: [PATCH v3] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-09-04 Thread Johan Hovold
> #include > #include > #include > +#include > #include > #include > #include > @@ -40,12 +41,21 @@ > #include > #include > #include > + Unrelated change. > #include "ftdi_sio.h" > #include "ftdi_sio_ids.h" > >

Re: [PATCH] USB: change dev_WARN to dev_err triggerable from user space

2018-09-04 Thread Johan Hovold
On Tue, Sep 04, 2018 at 12:21:09PM +0200, Oliver Neukum wrote: > On Di, 2018-09-04 at 11:31 +0200, Johan Hovold wrote: > > On Tue, Sep 04, 2018 at 10:44:41AM +0200, Oliver Neukum wrote: > > > For those people who run with panic_on_warn a WARN() triggered > > > from user

Re: [PATCH] USB: change dev_WARN to dev_err triggerable from user space

2018-09-04 Thread Johan Hovold
On Tue, Sep 04, 2018 at 10:44:41AM +0200, Oliver Neukum wrote: > For those people who run with panic_on_warn a WARN() triggered > from user space is a DOS. It is worth returning to dev_err() I think this should be dev_warn() unless you want to bring back the returning of errors on these

[PATCH 1/2] USB: serial: io_ti: fix array underflow in completion handler

2018-08-21 Thread Johan Hovold
(and ignore bits 0xb0 which are typically set to 0x30). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Reported-by: Dan Carpenter Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/io_ti.h

[PATCH 2/2] USB: serial: ti_usb_3410_5052: fix array underflow in completion handler

2018-08-21 Thread Johan Hovold
the port number (and ignore bits 0xb0 which are typically set to 0x30). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/serial/ti_usb_3

Re: [PATCH] USB: serial: io_ti: array underflow in edge_interrupt_callback()

2018-08-21 Thread Johan Hovold
On Tue, Aug 14, 2018 at 12:07:15PM +0300, Dan Carpenter wrote: > A malicious USB device could set port_number to -3 and we would > underflow the edge_serial->serial->port[] array. Good catch! > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Signed-off-by: Dan Carpenter > > diff --git

Re: [PATCH v3] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-08-20 Thread Johan Hovold
On Mon, Aug 20, 2018 at 05:19:40PM +0200, Loic Poulain wrote: > Hi Johan, > > On 4 August 2018 at 12:17, Loic Poulain wrote: > > Some FTDI devices like FTX or FT232R support CBUS Bit Bang mode on CBUS > > pins, allowing host to control them via simple USB control transfers. > > To make use of a

Re: cdc-acm linux kernel

2018-08-20 Thread Johan Hovold
A: No. Q: Should I include quotations after my reply? On Mon, Aug 20, 2018 at 05:57:57PM +0300, Алексей Болдырев wrote: > > Ok, and what makes you believe this chip exposes serial ports? Why > > did you think CDC-ACM would work in the first place? > > This chipset avaible from mobile phome

Re: cdc-acm linux kernel

2018-08-20 Thread Johan Hovold
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? http://daringfireball.net/2007/07/on_top On Mon, Aug 20, 2018 at 04:57:23PM +0300, Алексей Болдырев wrote: > 20.08.2018, 16:54, "Johan Hovold" : > > [ Please res

Re: cdc-acm linux kernel

2018-08-20 Thread Johan Hovold
[ Please respond inline instead of top-posting. ] On Mon, Aug 20, 2018 at 04:50:25PM +0300, Алексей Болдырев wrote: > 20.08.2018, 16:46, "Johan Hovold" : > > [ Reshuffling your reply, and responding inline below ] > > > > On Mon, Aug 20, 2018 at 04:27:37P

Re: cdc-acm linux kernel

2018-08-20 Thread Johan Hovold
[ Reshuffling your reply, and responding inline below ] On Mon, Aug 20, 2018 at 04:27:37PM +0300, Алексей Болдырев wrote: > > 20.08.2018, 11:42, "Johan Hovold" : > >> [ Adding linux-usb on CC. ] > >> > >> On Fri, Aug 17, 2018 at 10:41:20PM +0300, Алексе

Re: cdc-acm linux kernel

2018-08-20 Thread Johan Hovold
[ Adding linux-usb on CC. ] On Fri, Aug 17, 2018 at 10:41:20PM +0300, Алексей Болдырев wrote: > please add support to device from cdc-acm: > > Bus 004 Device 003: ID 1782:3d00 Spreadtrum Communications Inc. Can you please post the output of "lsusb -v" for this device? Thanks, Johan

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

2018-07-20 Thread Johan Hovold
, and with no reported issues. Signed-off-by: Johan Hovold Chengguang Xu (1): USB: serial: cast sizeof() to int when comparing with error code Colin Ian King (1): USB: serial: mos7720: remove redundant variables iflag

Re: [PATCH 5/5] USB: serial: cp210x: improve line-speed handling for CP2104 and CP2105

2018-07-18 Thread Johan Hovold
On Wed, Jul 18, 2018 at 03:26:30PM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 18, 2018 at 02:25:01PM +0200, Johan Hovold wrote: > > CP2104 and the ECI interface of CP2105 support further baud rates than > > the ones specified in AN205 table 1, and we can use the

Re: [PATCH 4/5] USB: serial: cp210x: generalise CP2102N line-speed handling

2018-07-18 Thread Johan Hovold
On Wed, Jul 18, 2018 at 03:34:34PM +0300, Andy Shevchenko wrote: > On Wed, Jul 18, 2018 at 3:25 PM, Johan Hovold wrote: > > The CP2102N equations for determining the actual baud rate can be used > > also for other device types, so let's factor it out. > > > > Note that

[PATCH 0/5] USB: serial: cp210x: improve line-speed handling

2018-07-18 Thread Johan Hovold
This was all triggered by a patch from Karoly to enable line-speeds higher than 2 Mbaud for CP2102N devices. The end result is support for further baud rates for CP2104, CP2105 and CP2102N devices with the actual baud rates used now being properly reported back to user space. Johan Johan

[PATCH 2/5] USB: serial: cp210x: honour device-type maximum line speed

2018-07-18 Thread Johan Hovold
- ECI port 2 Mbaud - SCI port 921.6 kbaud while keeping the maximum 2 Mbaud for unknown device types in order to avoid any regressions. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 41 ++--- 1 file changed, 38 insertions(+), 3

[PATCH 5/5] USB: serial: cp210x: improve line-speed handling for CP2104 and CP2105

2018-07-18 Thread Johan Hovold
a different base clock. There appears to be an error in the CP2108 equations which needs to be confirmed on actual hardware first however (specifically, the subtraction of one from the divisor appears to be incorrect as it introduces larger errors). Signed-off-by: Johan Hovold --- drivers/usb/serial

[PATCH 4/5] USB: serial: cp210x: generalise CP2102N line-speed handling

2018-07-18 Thread Johan Hovold
The CP2102N equations for determining the actual baud rate can be used also for other device types, so let's factor it out. Note that this removes the now unused cp210x_is_cp2102n() helper. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 50

[PATCH 1/5] USB: serial: cp210x: make line-speed quantisation data driven

2018-07-18 Thread Johan Hovold
Older cp210x devices only support a fixed set of line speeds to which a requested speed is mapped. Reimplement this mapping using a table instead of a long if-else construct. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 99 + 1 file changed

[PATCH 3/5] USB: serial: cp210x: improve baudrate support for CP2102N

2018-07-18 Thread Johan Hovold
on a physical device. This patch adds support for all baudrates supported by the CP2102N. Signed-off-by: Karoly Pados [ johan: rework on top of an205 and max-speed patches ] Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 39 - 1 file changed, 34

Re: [PATCH 0/2] USB: serial: cp210x: clean up line-speed handling

2018-07-18 Thread Johan Hovold
Hi Karoly, and sorry for not getting back to you sooner on this. On Thu, Jul 05, 2018 at 04:12:17PM +, Karoly Pados wrote: > Hi, > > > Karoly, how did your line-speed tests with cp2102n go? > > I indeed tested this. I first built a version of the module where I skip > calling

Re: [PATCH v6] USB: serial: ftdi_sio: Add MTP NVM support

2018-07-16 Thread Johan Hovold
On Sun, Jul 15, 2018 at 10:30:39PM +0200, Loic Poulain wrote: > Hi Johan, > > Thanks for the review. > > On 10 July 2018 at 11:19, Johan Hovold wrote: > > The CBUS configuration is stored in just a couple of words at a known > > offset and could easily be

Re: [PATCH 2/2] USB: iuu_phoenix: drop redundant input-speed re-encoding

2018-07-16 Thread Johan Hovold
On Mon, Jul 16, 2018 at 01:56:46PM +0200, Greg Kroah-Hartman wrote: > On Mon, Jul 16, 2018 at 01:51:56PM +0200, Johan Hovold wrote: > > Drop redundant input-speed re-encoding at every open(). The output and > > input speeds are initialised to the same value and are kept in sync

[PATCH 2/2] USB: iuu_phoenix: drop redundant input-speed re-encoding

2018-07-16 Thread Johan Hovold
Drop redundant input-speed re-encoding at every open(). The output and input speeds are initialised to the same value and are kept in sync on termios updates. Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb

[PATCH 1/2] USB: serial: iuu_phoenix: drop unused driver-data baud rate

2018-07-16 Thread Johan Hovold
Drop unused driver-data baud rate. Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 2fb71303ec3a..87c8dd064205 100644 --- a/drivers/usb/serial

Re: [PATCH v6] USB: serial: ftdi_sio: Add MTP NVM support

2018-07-10 Thread Johan Hovold
Hi, I finally found some time to dig into the ftdi eeprom handling. On Tue, Jun 26, 2018 at 02:54:48PM +0200, Loic Poulain wrote: > Most of FTDI's devices have an EEPROM which records FTDI devices > configuration setting (e.g. the VID, PID, I/O config...) and user > data. For example, FT232R and

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

2018-07-06 Thread Johan Hovold
could lead to uninitialised slab data leaking to user space. Included is also a new device id for cp210x. All but the final two patches have been in linux-next with no reported issues. Signed-off-by: Johan Hovold Dan Carpenter (1

[PATCH 2/2] USB: serial: cp210x: honour device-type maximum line speed

2018-07-05 Thread Johan Hovold
- ECI port 2 Mbaud - SCI port 921.6 kbaud while keeping the maximum 2 Mbaud for unknown device types in order to avoid any regressions. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 41 ++--- 1 file changed, 38 insertions(+), 3

[PATCH 0/2] USB: serial: cp210x: clean up line-speed handling

2018-07-05 Thread Johan Hovold
just handle the higher cp2102n rates as we do with cp2104/8, that is by mapping the lower rates to the rates supported by legacy devices, while allowing any higher rates (up to the device maximum) to be requested without trying to report back the actual rate chosen (for now). Johan Johan Hovold

[PATCH 1/2] USB: serial: cp210x: make line-speed quantisation data driven

2018-07-05 Thread Johan Hovold
Older cp210x devices only support a fixed set of line speeds to which a requested speed is mapped. Reimplement this mapping using a table instead of a long if-else construct. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 99 + 1 file changed

Re: cp20x GPIO from user application

2018-07-05 Thread Johan Hovold
[ Adding linux-usb as other may be interested in this. ] On Thu, Jul 05, 2018 at 01:57:29PM +0100, Antonio Santagiuliana wrote: > Thank you for the information. > What I don't understand is that if I use the CP2105 are its GPIOs usable by > this driver ? Yes, they should be. But if I remember

Re: Incorrect PID in drivers/usb/serial/kl5kusb105.h

2018-07-05 Thread Johan Hovold
t; Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x83 EP 3 IN > bmAttributes 3 > Transfer TypeInterrupt > Synch Type None > Usag

Re: Incorrect PID in drivers/usb/serial/kl5kusb105.h

2018-07-04 Thread Johan Hovold
[ Please avoid using html when posting the lists. Including full mail below in case this did not reach the list. ] On Wed, Jul 04, 2018 at 03:05:24PM +0100, Chris Jakob wrote: > The PID definitions fro VID 05e9 are listed in > http://www.linux-usb.org/usb.ids as: > > > 05e9 Kawasaki LSI >

[PATCH 1/4] USB: serial: keyspan_pda: fix modem-status error handling

2018-07-04 Thread Johan Hovold
Fix broken modem-status error handling which could lead to bits of slab data leaking to user space. Fixes: 3b36a8fd6777 ("usb: fix uninitialized variable warning in keyspan_pda") Cc: stable # 2.6.27 Cc: Benny Halevy Signed-off-by: Johan Hovold --- drivers/usb/serial/keyspan

[PATCH 2/4] USB: serial: mos7840: fix status-register error handling

2018-07-04 Thread Johan Hovold
Add missing transfer-length sanity check to the status-register completion handler to avoid leaking bits of uninitialised slab data to user space. Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver") Cc: stable # 2.6.19 Cc: Paul B Schroeder Signed-off-by: Johan Hovold --

[PATCH 4/4] USB: serial: kobil_sct: add missing version error handling

2018-07-04 Thread Johan Hovold
Add missing version-request error handling and suppress printing of the (zeroed) transfer-buffer content in case of errors. Signed-off-by: Johan Hovold --- drivers/usb/serial/kobil_sct.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial

Re: [PATCH] cp210x: add another USB ID for Qivicon ZigBee stick

2018-07-04 Thread Johan Hovold
On Wed, Jul 04, 2018 at 02:07:42PM +0300, Olli Salonen wrote: > There are two versions of the Qivicon Zigbee stick in circulation. This adds > the second USB ID to the cp210x driver. > > Signed-off-by: Olli Salonen Now applied, thanks. Johan -- To unsubscribe from this list: send the line

Re: [PATCH] USB: serial: ch341: type promotion bug in ch341_control_in()

2018-07-04 Thread Johan Hovold
On Wed, Jul 04, 2018 at 12:29:38PM +0300, Dan Carpenter wrote: > The "r" variable is an int and "bufsize" is an unsigned int so the > comparison is type promoted to unsigned. If usb_control_msg() returns a > negative that is treated as a high positive value and the error handling > doesn't work.

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

2018-06-27 Thread Johan Hovold
with no reported issues. Signed-off-by: Johan Hovold Johan Hovold (1): USB: serial: cp210x: add CESINEL device ids Karoly Pados (1): USB: serial: cp210x: add Silicon Labs IDs for Windows Update drivers/usb/serial/cp210x.c | 14

Re: [PATCH] USB: serial: digi_acceleport: rename tty flag variable

2018-06-27 Thread Johan Hovold
On Tue, Jun 26, 2018 at 10:12:28PM +0800, Greg Kroah-Hartman wrote: > On Tue, Jun 26, 2018 at 03:43:13PM +0200, Johan Hovold wrote: > > Add a "tty_" prefix to the tty "flag" variable to avoid any future > > mixups with the recently added irq-mask "flags&qu

Re: [PATCH 3/3] Fixed simple typo from ELCOM to ELECOM.

2018-06-26 Thread Johan Hovold
Where did patches 2 and 3 go? If this is the only USB serial patch, you can send it on it's own. Also, please use the common prefix for the subsystem you're changing (see git log). In this case, add "USB: serial: pl2303: " to your Subject. On Tue, Jun 26, 2018 at 07:07:59PM -0500, Guy Chronister

[PATCH] USB: serial: digi_acceleport: rename tty flag variable

2018-06-26 Thread Johan Hovold
Add a "tty_" prefix to the tty "flag" variable to avoid any future mixups with the recently added irq-mask "flags" one. Signed-off-by: Johan Hovold --- drivers/usb/serial/digi_acceleport.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) d

Re: [PATCH 08/12] usb: serial: sierra: disable irq's for portdata lock

2018-06-26 Thread Johan Hovold
On Sun, Jun 24, 2018 at 12:32:11AM +0200, Sebastian Andrzej Siewior wrote: > From: John Ogness > > The portdata spinlock can be taken in interrupt context (via > sierra_outdat_callback()). > Disable interrupts when taking the portdata spinlock. Good catch! As this fixes a potential deadlock,

Re: [PATCH 02/12] usb: serial: digi_acceleport: use irqsave() in USB's complete callback

2018-06-26 Thread Johan Hovold
it is required for the callback > handler to disable the interrupts while acquiring the lock. > The callback may be invoked either in IRQ or BH context depending on the > USB host controller. > Use the _irqsave() variant of the locking primitives. > > Cc: Johan Hovold >

Re: [PATCH] usb: serial: qcserial: add support for the Dell DW5821e module

2018-06-26 Thread Johan Hovold
> > So this doesn't really match the Sierra layout in qcserial, where the > > QMI interface is documented as interface 8 (but perhaps we have other > > examples of that already). > > > > Do you know what these serial ports are used for? > > You know what, I kind of missed that. This Dell device

Re: [PATCH] usb: serial: qcserial: add support for the Dell DW5821e module

2018-06-26 Thread Johan Hovold
On Tue, Jun 26, 2018 at 09:40:24AM +0200, Bjørn Mork wrote: > Johan Hovold writes: > > On Sat, Jun 23, 2018 at 11:24:08PM +0200, Aleksander Morgado wrote: > >> This module exposes two USB configurations: a QMI+AT capable setup on > >> USB config #1 and a MBIM cap

Re: [PATCH] usb: serial: qcserial: add support for the Dell DW5821e module

2018-06-26 Thread Johan Hovold
On Tue, Jun 26, 2018 at 09:32:32AM +0200, Aleksander Morgado wrote: > On Tue, Jun 26, 2018 at 8:09 AM, Johan Hovold wrote: > > On Sat, Jun 23, 2018 at 11:24:08PM +0200, Aleksander Morgado wrote: > >> This module exposes two USB configurations: a QMI+AT capable setup on

Re: [PATCH] usb: serial: qcserial: add support for the Dell DW5821e module

2018-06-26 Thread Johan Hovold
On Sat, Jun 23, 2018 at 11:24:08PM +0200, Aleksander Morgado wrote: > This module exposes two USB configurations: a QMI+AT capable setup on > USB config #1 and a MBIM capable setup on USB config #2. > > By default the kernel will choose the MBIM capable configuration as > long as the cdc_mbim

Re: [PATCH v3] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread Johan Hovold
On Mon, Jun 25, 2018 at 10:35:31AM +0200, Loic Poulain wrote: > Hi Andy, > > On 25 June 2018 at 09:36, Andy Shevchenko wrote: > > On Fri, Jun 22, 2018 at 5:22 PM, Loic Poulain > > wrote: > >> +#define EEPROM_SZ_FTX 2048 /* cf FTDI AN_201 */ > >> +#define EEPROM_SZ_FT232RL 128 /* cf FTDI

Re: [PATCH] usb: cast sizeof() to int when comparing with error code

2018-06-25 Thread Johan Hovold
On Mon, Jun 25, 2018 at 03:35:18PM +0800, Chengguang Xu wrote: > Negative error code will be larger than sizeof(). Good catch! I was gonna ask you to submit this as three separate patches to facilitate stable backports, but fortunately it appears none of these have any bad implications (besides

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-21 Thread Johan Hovold
On Thu, Jun 21, 2018 at 11:17:36AM +0300, Roger Quadros wrote: > On 21/06/18 01:55, Rafael J. Wysocki wrote: > > On Thu, Jun 21, 2018 at 12:32 AM, Rafael J. Wysocki > > wrote: > >> On Wed, Jun 20, 2018 at 5:46 PM, Johan Hovold wrote: > >>> On Wed, Jun 20

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-21 Thread Johan Hovold
On Thu, Jun 21, 2018 at 12:55:26AM +0200, Rafael J. Wysocki wrote: > On Thu, Jun 21, 2018 at 12:32 AM, Rafael J. Wysocki wrote: > > On Wed, Jun 20, 2018 at 5:46 PM, Johan Hovold wrote: > >> On Wed, Jun 20, 2018 at 02:54:10PM +0200, Rafael J. Wysocki wrote: > >>> On

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-21 Thread Johan Hovold
On Thu, Jun 21, 2018 at 12:32:59AM +0200, Rafael J. Wysocki wrote: > On Wed, Jun 20, 2018 at 5:46 PM, Johan Hovold wrote: > > On Wed, Jun 20, 2018 at 02:54:10PM +0200, Rafael J. Wysocki wrote: > >> On Wednesday, June 20, 2018 2:23:46 PM CEST Johan Hovold wrote: > >> &

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-20 Thread Johan Hovold
On Wed, Jun 20, 2018 at 02:54:10PM +0200, Rafael J. Wysocki wrote: > On Wednesday, June 20, 2018 2:23:46 PM CEST Johan Hovold wrote: > > On Wed, Jun 20, 2018 at 02:16:59AM -0700, Tony Lindgren wrote: > > > Hi, > > > > > > Adding Rafael and linux-pm to Cc

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-20 Thread Johan Hovold
On Wed, Jun 20, 2018 at 02:16:59AM -0700, Tony Lindgren wrote: > Hi, > > Adding Rafael and linux-pm to Cc as well. > > * Felipe Balbi [180619 01:23]: > > This is a direct consequence of not paying attention to the order of > > things. If driver were to assume that pm_domain->activate() would do

Re: [PATCH] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-19 Thread Johan Hovold
On Tue, Jun 19, 2018 at 02:32:11PM +0200, Loic Poulain wrote: > Hi Johan, Srini, > > On 18 June 2018 at 11:47, Srinivas Kandagatla > wrote: > > On 18/06/18 09:46, Johan Hovold wrote: > >> I'm not necessarily against the idea, but nvmem core needs to be fixed

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-18 Thread Johan Hovold
On Mon, Jun 18, 2018 at 12:33:44PM +0300, Felipe Balbi wrote: > Johan Hovold writes: > > I suggest merging this fix for 4.18-rc, and then Roger can rework the > > driver so that it works also on OMAP. > > omap has its own glue layer for several reasons. If you're tal

Re: Inquiry for adding PID to Cp2102 driver

2018-06-18 Thread Johan Hovold
On Mon, Jun 18, 2018 at 11:29:51AM +0200, Carlos Barcala Lara wrote: > Thanks again, Johan. > > Should I have a user to do the git-am (if needed in the future)? That would only be needed if you ever want to add further device ids. Then you can create a patch (e.g. by committing you changes to a

Re: Inquiry for adding PID to Cp2102 driver

2018-06-18 Thread Johan Hovold
On Mon, Jun 18, 2018 at 10:53:35AM +0200, Carlos Barcala Lara wrote: > Thank you very much, Johan. > > The PIDs are all right. Thanks for checking. > I´m sorry, but I don´t know how to use the patch, if needed in the > future. It would need to be applied (e.g. using git-am) to the kernel

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-18 Thread Johan Hovold
On Mon, Jun 18, 2018 at 11:15:41AM +0300, Felipe Balbi wrote: > I don't use this glue layer, actually. As long as there are no > regressions, you can change it to your heart's content. I still it's > best to start with pm runtime blocked and let userspace decide what and > when should have pm

Re: [PATCH] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-18 Thread Johan Hovold
On Thu, Jun 14, 2018 at 10:08:46PM +0200, Loic Poulain wrote: > Most of FTDI's devices have an EEPROM which records FTDI devices > configuration setting (e.g. the VID, PID, I/O config...) and user > data. FT230R chip integrates a 128-byte eeprom, FT230X a 2048-byte > eeprom... > > This patch adds

Re: Inquiry for adding PID to Cp2102 driver

2018-06-18 Thread Johan Hovold
atch and double check that I got all the entries right? If you ever need to add more ids you you could use that patch as a basis. Thanks, Johan >From c4e9e567fadd76cfe9f70fc9377598a6b7187c38 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Mon, 18 Jun 2018 10:09:44 +0200 Subject: [PATCH] USB

Re: [PATCH] USB: serial: cp210x: add Silicon Labs IDs for Windows Update

2018-06-18 Thread Johan Hovold
On Mon, Jun 18, 2018 at 07:26:24AM +, Karoly Pados wrote: > The way this works is that the chips still come with the standard > SiLabs IDs. When the chip is integrated into an end-user product, the > product manufacturer has the choice to reprogram the IDs. If they are > left on the factory

Re: [PATCH] USB: serial: cp210x: add Silicon Labs IDs for Windows Update

2018-06-18 Thread Johan Hovold
On Sat, Jun 09, 2018 at 01:26:08PM +0200, Karoly Pados wrote: > Silicon Labs defines alternative VID/PID pairs for some chips that when > used will automatically install drivers for Windows users without manual > intervention. Unfortunately, these IDs are not recognized by the Linux > module, so

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-06-13 Thread Johan Hovold
On Wed, Jun 13, 2018 at 12:39:18PM +0300, Felipe Balbi wrote: > Roger Quadros writes: > > I'm still trying to get my head around this. > > > > in probe() we do > > { > > enable all clocks; > > pm_runtime_set_active(dev); > > pm_runtime_enable(dev); > >

Re: 4.16.14: kernel tried to execute NX-protected page [after USB device went to charging state]

2018-06-11 Thread Johan Hovold
[ +CC: linux-usb, even if this does not look like a USB issue ] On Sat, Jun 09, 2018 at 11:50:34AM +0200, Udo van den Heuvel wrote: > Hello, > > My Holus GPSport 245 was used to download a gpx track. Afterwards I > turned the device off while it was attached to USB so it could charge. > Later

Re: [PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-05-31 Thread Johan Hovold
On Thu, May 31, 2018 at 04:45:52PM +0200, Johan Hovold wrote: > The clocks have already been explicitly disabled and put as part of > remove() so the runtime suspend callback must not be run when balancing > the runtime PM usage count before returning. > > Fixes: 16adc674d0d6 (

[PATCH] usb: dwc3: of-simple: fix use-after-free on remove

2018-05-31 Thread Johan Hovold
The clocks have already been explicitly disabled and put as part of remove() so the runtime suspend callback must not be run when balancing the runtime PM usage count before returning. Fixes: 16adc674d0d6 ("usb: dwc3: add generic OF glue layer") Signed-off-by: Johan Hovold --- Cha

Re: [PATCH] ftdi_sio: add Id for Physik Instrumente E-870

2018-05-31 Thread Johan Hovold
On Thu, May 31, 2018 at 12:39:41PM +0200, Greg Kroah-Hartman wrote: > On Thu, Mar 29, 2018 at 08:39:37AM +0200, Teichmann, Martin wrote: > > This adds support for the Physik Instrumente E-870 PIShift Drive > > Electronics, a Piezo motor driver. > > > > Signed-off-by: Martin Teichmann > > --- > >

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

2018-05-31 Thread Johan Hovold
only Included are also various clean ups. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold Florian Zumbiehl (1): USB: serial: pl2303: add support for tx xon/xoff flow control Giuseppe Lippolis

Re: [PATCH 2/2] usb: dwc3: of_simple: don't call pm_runtime_set_active()

2018-05-28 Thread Johan Hovold
enable(dev); > - pm_runtime_get_sync(dev); > - > return 0; > > err_resetc_assert: Also note that there's currently a use-after-free in remove(), where pm_runtime_put_sync() is called after the clocks have been put. Something like the below (untested) patch should fix i

Re: Serdev: USB device and sysdev probing ala i2c

2018-05-28 Thread Johan Hovold
On Fri, May 25, 2018 at 10:17:20AM -0500, Rob Herring wrote: > On Fri, May 25, 2018 at 7:08 AM, Johan Hovold <jo...@kernel.org> wrote: > > On Thu, May 24, 2018 at 11:49:24AM -0500, Rob Herring wrote: > >> On Thu, May 24, 2018 at 7:18 AM, Ricardo Ribalda Delgado > &g

[RFC PATCH 2/3] USB: serial: enable serdev support

2018-05-25 Thread Johan Hovold
not support hotplugging (e.g. tty port hangups) Not-signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/usb/serial/bus.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index eb0195cf37dd..5f574a418c52

[RFC PATCH 0/3] USB: serial: add device tree (and serdev) support

2018-05-25 Thread Johan Hovold
kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git/log/?h=usb-serial-of Johan Johan Hovold (3): USB: serial: add device-tree support USB: serial: enable serdev support dbg: ARM: dts: boneblack: add USB topology and serdev nodes arch/arm/boot/dts/am335x-

[RFC PATCH 3/3] dbg: ARM: dts: boneblack: add USB topology and serdev nodes

2018-05-25 Thread Johan Hovold
the same address size. Also note that serial ports have a standardised node name in ePAPR. Not-signed-off-by: Johan Hovold <jo...@kernel.org> --- arch/arm/boot/dts/am335x-boneblack.dts | 57 ++ 1 file changed, 57 insertions(+) diff --git a/arch/arm/boot/dts/

[RFC PATCH 1/3] USB: serial: add device-tree support

2018-05-25 Thread Johan Hovold
#address-cells = <1>; #size-cells = <0>; serial@0 { reg = <0>; }; }; FIXME: binding doc Not-signed-off-by: Johan Hovold <jo...@kernel.org> --- drivers/usb/serial/usb-serial.c | 28

  1   2   3   4   5   6   7   8   9   10   >