[PATCH 2/6] leds: da903x: fix use-after-free on unbind

2020-06-01 Thread Johan Hovold
while still being registered. Fixes: eed16255d66b ("leds: da903x: Use devm_led_classdev_register") Cc: stable # 4.6 Cc: Amitoj Kaur Chawla Signed-off-by: Johan Hovold --- drivers/leds/leds-da903x.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dr

[PATCH 5/6] leds: wm831x-status: fix use-after-free on unbind

2020-06-01 Thread Johan Hovold
while still being registered. Fixes: 8d3b6a4001ce ("leds: wm831x-status: Use devm_led_classdev_register") Cc: stable # 4.6 Cc: Amitoj Kaur Chawla Signed-off-by: Johan Hovold --- drivers/leds/leds-wm831x-status.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-)

[PATCH 6/6] leds: drop redundant struct-device pointer casts

2020-06-01 Thread Johan Hovold
Drop the pointless and needlessly confusing casts of struct-device pointers. Signed-off-by: Johan Hovold --- drivers/leds/leds-lm355x.c | 9 +++-- drivers/leds/leds-lm3642.c | 9 +++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/leds/leds-lm355x.c b/drivers

[PATCH 4/6] leds: lm36274: fix use-after-free on unbind

2020-06-01 Thread Johan Hovold
registered. Fixes: 11e1bbc116a7 ("leds: lm36274: Introduce the TI LM36274 LED driver") Cc: stable # 5.3 Cc: Dan Murphy Signed-off-by: Johan Hovold --- drivers/leds/leds-lm36274.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/leds/leds-l

[PATCH 0/6] leds: fix broken devres usage

2020-06-01 Thread Johan Hovold
devices. All but the lm3533 one have only been compile tested. Johan Johan Hovold (6): leds: 88pm860x: fix use-after-free on unbind leds: da903x: fix use-after-free on unbind leds: lm3533: fix use-after-free on unbind leds: lm36274: fix use-after-free on unbind leds: wm831x-status: fix use

[PATCH 1/6] leds: 88pm860x: fix use-after-free on unbind

2020-06-01 Thread Johan Hovold
while still being registered. Fixes: 375446df95ee ("leds: 88pm860x: Use devm_led_classdev_register") Cc: stable # 4.6 Cc: Amitoj Kaur Chawla Signed-off-by: Johan Hovold --- drivers/leds/leds-88pm860x.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 0/6] leds: fix broken devres usage

2020-06-01 Thread Johan Hovold
On Mon, Jun 01, 2020 at 04:51:01PM +0300, Andy Shevchenko wrote: > On Mon, Jun 1, 2020 at 4:42 PM Johan Hovold wrote: > > > > Several MFD child drivers register their class devices directly under > > the parent device (about half of the MFD LED drivers do so). > >

Re: [PATCH 0/6] leds: fix broken devres usage

2020-06-01 Thread Johan Hovold
On Mon, Jun 01, 2020 at 05:08:40PM +0300, Andy Shevchenko wrote: > On Mon, Jun 1, 2020 at 5:01 PM Johan Hovold wrote: > > > > On Mon, Jun 01, 2020 at 04:51:01PM +0300, Andy Shevchenko wrote: > > > On Mon, Jun 1, 2020 at 4:42 PM Johan Hovold wrote: > > > &g

Re: [PATCH 0/6] leds: fix broken devres usage

2020-06-01 Thread Johan Hovold
On Mon, Jun 01, 2020 at 06:09:23PM +0300, Andy Shevchenko wrote: > On Mon, Jun 1, 2020 at 5:29 PM Johan Hovold wrote: > > On Mon, Jun 01, 2020 at 05:08:40PM +0300, Andy Shevchenko wrote: > > > On Mon, Jun 1, 2020 at 5:01 PM Johan Hovold wrote: > > > > On Mon, Ju

Re: [PATCH 2/2] usb: serial: xr_serial: Add gpiochip support

2020-05-19 Thread Johan Hovold
On Wed, Apr 29, 2020 at 06:19:18PM +0530, Manivannan Sadhasivam wrote: > On Wed, Apr 29, 2020 at 02:12:24PM +0200, Linus Walleij wrote: > > On Tue, Apr 28, 2020 at 9:57 PM wrote: > > > > > From: Manivannan Sadhasivam > > > > > > Add gpiochip support for Maxlinear/Exar USB to serial converter >

Re: [PATCH 2/2] usb: serial: xr_serial: Add gpiochip support

2020-05-19 Thread Johan Hovold
On Wed, Apr 29, 2020 at 11:17:27PM +0530, Manivannan Sadhasivam wrote: > On Wed, Apr 29, 2020 at 01:26:51AM +0530, m...@kernel.org wrote: > > From: Manivannan Sadhasivam > > > > Add gpiochip support for Maxlinear/Exar USB to serial converter > > for controlling the available gpios. > > > > Cc:

Re: [PATCH v3 1/2] usb: serial: Add MaxLinear/Exar USB to Serial driver

2020-05-19 Thread Johan Hovold
On Fri, May 01, 2020 at 12:19:23AM +0530, m...@kernel.org wrote: > From: Manivannan Sadhasivam > > Add support for MaxLinear/Exar USB to Serial converters. This driver > only supports XR21V141X series but it can be extended to other series > from Exar as well in future. > > This driver is inspir

Re: [PATCH v3 2/2] usb: serial: xr_serial: Add gpiochip support

2020-05-19 Thread Johan Hovold
On Fri, May 01, 2020 at 12:19:24AM +0530, m...@kernel.org wrote: > From: Manivannan Sadhasivam > > Add gpiochip support for Maxlinear/Exar USB to serial converter > for controlling the available gpios. You should mention that you've based this implementation on the other usb-serial gpio-chip imp

Re: [PATCH 5.8 137/232] USB: serial: ftdi_sio: fix break and sysrq handling

2020-08-20 Thread Johan Hovold
This was never intended for stable as it is not a critical fix and has never worked properly in the first place. Please drop this one and the preparatory clean ups from all stable trees. Johan

Re: [PATCH][next] greybus: Use fallthrough pseudo-keyword

2020-08-05 Thread Johan Hovold
On Wed, Aug 05, 2020 at 08:14:47AM -0500, Alex Elder wrote: > On 7/28/20 5:37 PM, Alex Elder wrote: > > On 7/27/20 1:32 PM, Gustavo A. R. Silva wrote: > >> Replace the existing /* fall through */ comments and its variants with > >> the new pseudo-keyword macro fallthrough[1]. > >> > >> [1] > >> ht

[PATCH net] net: phy: fix memory leak in device-create error path

2020-08-06 Thread Johan Hovold
A recent commit introduced a late error path in phy_device_create() which fails to release the device name allocated by dev_set_name(). Fixes: 13d0ab6750b2 ("net: phy: check return code when requesting PHY driver module") Cc: Heiner Kallweit Signed-off-by: Johan Hovold --- drive

Re: [RESEND PATCH v4 1/3] usb: serial: Add MaxLinear/Exar USB to Serial driver

2020-08-06 Thread Johan Hovold
On Sun, Jul 26, 2020 at 09:19:28PM +0530, Manivannan Sadhasivam wrote: > Hi, > > Sorry for the late reply! No worries at all. > On Wed, Jul 01, 2020 at 12:34:33PM +0200, Johan Hovold wrote: > > On Sun, Jun 07, 2020 at 09:53:48PM +0530, Manivannan Sadhasivam wrote: >

Re: [RESEND PATCH v4 2/3] usb: serial: xr_serial: Add gpiochip support

2020-08-06 Thread Johan Hovold
On Sun, Jul 26, 2020 at 09:22:23PM +0530, Manivannan Sadhasivam wrote: > On Wed, Jul 01, 2020 at 03:02:06PM +0200, Johan Hovold wrote: > > On Sun, Jun 07, 2020 at 09:53:49PM +0530, Manivannan Sadhasivam wrote: > > > Add gpiochip support for Maxlinear/Exar USB to serial c

Re: [PATCH V2] USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter

2020-08-06 Thread Johan Hovold
On Thu, Aug 06, 2020 at 01:55:47PM +0200, Patrick Riphagen wrote: > From: Patrick Riphagen > > The device added has an FTDI chip inside. > The device is used to connect Xsens USB Motion Trackers. > > Cc: sta...@vger.kernel.org > Signed-off-by: Patrick Riphagen > --- Thanks for the update. I've

Re: [PATCH] USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter

2020-08-06 Thread Johan Hovold
On Thu, Aug 06, 2020 at 11:02:34AM +0200, Patrick Riphagen wrote: > The device added has an FTDI chip inside. > The device is used to connect Xsens USB Motion Trackers. > > Cc: sta...@vger.kernel.org > Signed-off-by: Patrick Riphagen > --- Almost there; would you mind resending with an added Fro

Re: [PATCH -next] drivers: gnss: simplify the gnss code return expression

2021-01-11 Thread Johan Hovold
On Thu, Dec 10, 2020 at 09:51:42PM +0800, Zheng Yongjun wrote: > Simplify the return expression at diffrent .c file, fix this all. > > Signed-off-by: Zheng Yongjun > --- > drivers/gnss/core.c | 7 +-- > drivers/gnss/mtk.c | 14 ++ > drivers/gnss/ubx.c | 14 ++ > 3

Re: [PATCH] USB: otg: Fix error 32 when enable hardware flow control.

2021-01-11 Thread Johan Hovold
On Mon, Jan 11, 2021 at 04:55:22AM +, Pho Tran wrote: > When hardware flow control is enabled, > don't allow host send MHS command to cp210x. You're commit message needs to explain *why* this is needed (and not just say *what* the patch does). > Signed-off-by: Pho Tran Also fix up the Subje

Re: [PATCH] USB: serial: mos7720: improve handling of a kmalloc failure in read_mos_reg()

2021-01-12 Thread Johan Hovold
On Mon, Jan 11, 2021 at 02:09:04PM -0800, t...@redhat.com wrote: > From: Tom Rix > > clang static analysis reports this problem > > mos7720.c:352:2: warning: Undefined or garbage value returned to caller > return d; > ^~~~ > > In the parport_mos7715_read_data()'s call to rea

Re: [PATCH v2 0/7] tty: add flag to suppress ready signalling on open

2020-12-11 Thread Johan Hovold
On Thu, Dec 10, 2020 at 11:41:24AM +0100, Maarten Brock wrote: > Hello Mychaela, > > On 2020-12-09 23:49, Mychaela Falconia wrote: > > But the problem is that the current status quo is fundamentally broken > > for those hardware devices in which DTR and/or RTS have been repurposed > > for somethi

Re: [PATCH v2 0/7] tty: add flag to suppress ready signalling on open

2020-12-11 Thread Johan Hovold
On Thu, Dec 10, 2020 at 02:01:30PM +0100, Greg Kroah-Hartman wrote: > O_DIRECT is an interesting hack, has anyone seen if it violates the > posix rules for us to use it on a character device like this? Jiri only mentioned O_DIRECT as an example of a flag which we might be able to repurpose/abuse f

Re: [PATCH -next] greybus/audio_helper: Add missing unlock to avoid mismatched lock

2020-12-21 Thread Johan Hovold
On Mon, Dec 21, 2020 at 09:02:46PM +0800, Zheng Yongjun wrote: > Fix a missing unlock in the error branch. > > Signed-off-by: Zheng Yongjun > --- > drivers/staging/greybus/audio_helper.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/greybus/audio_helper.c > b/drivers

[PATCH] module: drop semicolon from version macro

2020-12-07 Thread Johan Hovold
Drop the trailing semicolon from the MODULE_VERSION() macro definition which was left when removing the array-of-pointer indirection. Signed-off-by: Johan Hovold --- include/linux/module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/module.h b/include/linux

[PATCH] earlycon: drop semicolon from earlycon macro

2020-12-07 Thread Johan Hovold
Drop the trailing semicolon from the OF_EARLYCON_DECLARE() macro definition which was left when removing the array-of-pointer indirection. Signed-off-by: Johan Hovold --- include/linux/serial_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/serial_core.h

Re: [PATCH 0/4] USB: ftdio_sio: GPIO validity fixes

2020-12-07 Thread Johan Hovold
On Fri, Dec 04, 2020 at 04:47:35PM +, Marc Zyngier wrote: > Having recently tried to use the CBUS GPIOs that come thanks to the > ftdio_sio driver, it occurred to me that the driver has a couple of > usability issues: > > - it advertises potential GPIOs that are reserved to other uses (LED >

Re: [PATCH 1/4] gpiolib: cdev: Flag invalid GPIOs as used

2020-12-07 Thread Johan Hovold
On Fri, Dec 04, 2020 at 04:47:36PM +, Marc Zyngier wrote: > When reporting the state of a GPIO to userspace, we never check > for the actual validity of the line, meaning we report invalid > lines as being usable. A subsequent request will fail though, > which is an inconsistent behaviour from

Re: [PATCH 3/4] USB: serial: ftdi_sio: Log the CBUS GPIO validity

2020-12-07 Thread Johan Hovold
On Fri, Dec 04, 2020 at 04:47:38PM +, Marc Zyngier wrote: > The validity of the ftdi CBUS GPIO is pretty hidden so far, > and finding out *why* some GPIOs don't work is sometimes > hard to identify. So let's help the user by displaying the > map of the CBUS pins that are valid for a GPIO. > >

Re: [PATCH 0/4] USB: ftdio_sio: GPIO validity fixes

2020-12-07 Thread Johan Hovold
On Mon, Dec 07, 2020 at 02:41:03PM +, Marc Zyngier wrote: > On 2020-12-07 14:01, Johan Hovold wrote: > > On Fri, Dec 04, 2020 at 04:47:35PM +, Marc Zyngier wrote: > >> Having recently tried to use the CBUS GPIOs that come thanks to the > >> ftdio_sio driver,

Re: [PATCH 3/4] USB: serial: ftdi_sio: Log the CBUS GPIO validity

2020-12-07 Thread Johan Hovold
On Mon, Dec 07, 2020 at 03:00:37PM +, Marc Zyngier wrote: > On 2020-12-07 14:29, Johan Hovold wrote: > > On Fri, Dec 04, 2020 at 04:47:38PM +, Marc Zyngier wrote: > >> + if (!bitmap_full(valid_mask, ngpios)) > >> + dev_warn_once(&port->d

Re: [PATCH 0/4] USB: ftdio_sio: GPIO validity fixes

2020-12-07 Thread Johan Hovold
On Mon, Dec 07, 2020 at 03:34:23PM +, Marc Zyngier wrote: > On 2020-12-07 15:08, Johan Hovold wrote: > > On Mon, Dec 07, 2020 at 02:41:03PM +, Marc Zyngier wrote: > >> On 2020-12-07 14:01, Johan Hovold wrote: > >> > On Fri, Dec 04, 2020 at 04:47:

Re: [PATCH 0/5] tty: add flag to suppress ready signalling on open

2020-12-08 Thread Johan Hovold
On Fri, Dec 04, 2020 at 07:58:53AM +0100, Jiri Slaby wrote: > On 02. 12. 20, 12:48, Johan Hovold wrote: > >>> but I question the > >>> usefulness of doing so, as it is a chicken and egg problem: one needs > >>> to open the tty device in order to do termios

Re: [PATCH] staging: greybus: audio: Fix possible leak free widgets in gbaudio_dapm_free_controls

2020-12-08 Thread Johan Hovold
found\n", > widget->name); > - return -EINVAL; > + widget++; > + continue; > } > widget++; > #ifdef CONFIG_DEBUG_FS Not sure if we can ever have the widget lookup fail, but at least this looks consistent now. Reviewed-by: Johan Hovold Johan

Re: [PATCH v5 2/3] usb: serial: xr_serial: Add gpiochip support

2020-12-08 Thread Johan Hovold
On Sat, Dec 05, 2020 at 11:21:09PM +0100, Linus Walleij wrote: > On Tue, Dec 1, 2020 at 4:50 PM Johan Hovold wrote: > > On Tue, Dec 01, 2020 at 03:37:38PM +0100, Linus Walleij wrote: > > > On Sun, Nov 22, 2020 at 6:08 PM Manivannan Sadhasivam > > > wrote: > > &

Re: [PATCH] x86/apic: Fix CPU devicetree-node lookups

2020-12-08 Thread Johan Hovold
On Tue, Nov 24, 2020 at 02:42:47PM +0100, Johan Hovold wrote: > Fix CPU devicetree-node lookups by implementing > arch_match_cpu_phys_id(). > > This allows using of_get_cpu_node() and of_cpu_device_node_get() to look > up CPU devicetree nodes and specifically makes sure that CPU s

Re: [PATCH] drivers: add new VID/PID for supporting Teraoka AD2000

2021-01-13 Thread Johan Hovold
On Wed, Jan 13, 2021 at 09:03:36AM +, Jin ChenXin wrote: Thanks for the patch. I've applied it now after fixing up some minor nits (so you don't need to resend), but for next time please consider the following comments. > From 905036e81e0d32705379c40acddb634428aff0a6 Mon Sep 17 00:00:00 2001

[PATCH] greybus: es2: drop short control-transfer checks

2021-01-18 Thread Johan Hovold
There's no need to check for short USB control transfers when sending data using so remove the redundant sanity checks. Signed-off-by: Johan Hovold --- drivers/greybus/es2.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/greybus/es2.c b/drivers/greybu

Re: [PATCH] USB: serial: cp210x: Fix error 32 when hardware flow control is enabled.

2021-01-19 Thread Johan Hovold
lso from tiocmset() so that a request to deassert DTR/RTS always does just that, that is, also when hw flow control is enabled. Similarly, reasserting RTS should re-enable flow control. > + > return cp210x_write_u16_reg(port, CP210X_SET_MHS, control); > } I think we should leave TIOCM

Re: [PATCH v2 05/15] usb: misc: emi26: update to use usb_control_msg_send()

2021-01-08 Thread Johan Hovold
On Thu, Jan 07, 2021 at 07:43:54PM +0530, Anant Thazhemadam wrote: > On 04/12/20 8:11 pm, Johan Hovold wrote: > > On Mon, Nov 30, 2020 at 06:58:47AM +0530, Anant Thazhemadam wrote: > >> The newer usb_control_msg_{send|recv}() API are an improvement on the > >> exist

[PATCH] gnss: drop stray semicolons

2021-01-08 Thread Johan Hovold
Drop semicolons after function definitions that have managed to sneak in and get reproduced. Signed-off-by: Johan Hovold --- drivers/gnss/mtk.c| 2 +- drivers/gnss/serial.c | 2 +- drivers/gnss/sirf.c | 2 +- drivers/gnss/ubx.c| 2 +- 4 files changed, 4 insertions(+), 4 deletions

Re: [PATCH] tty: serial: samsung_tty: remove spinlock flags in interrupt handlers

2021-03-19 Thread Johan Hovold
On Fri, Mar 19, 2021 at 06:36:39AM +, Song Bao Hua (Barry Song) wrote: > > > > -Original Message- > > From: Andy Shevchenko [mailto:andy.shevche...@gmail.com] > > Sent: Tuesday, March 16, 2021 10:41 PM > > To: Johan Hovold ; Finn Thain > > ; &

Re: [PATCH] tty: serial: samsung_tty: remove spinlock flags in interrupt handlers

2021-03-19 Thread Johan Hovold
On Fri, Mar 19, 2021 at 12:09:34PM +0200, Andy Shevchenko wrote: > On Fri, Mar 19, 2021 at 10:09 AM Johan Hovold wrote: > > > I think it is almost always wrong to call spin_lock_irqsave in > > > hardirq. > > > > Again, no. It's even been a requirement due

Re: [PATCH] sound/i2c: Simplify the return expression of snd_i2c_bit_sendbyte()

2021-03-23 Thread Johan Hovold
On Tue, Mar 23, 2021 at 08:14:43PM +0800, caizhichao wrote: > From: Zhichao Cai > > Simplify the return expression. > > Signed-off-by: Zhichao Cai > --- > sound/i2c/i2c.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/sound/i2c/i2c.c b/sound/i2c/i2c.c > index 847e

Re: [PATCH] serial: imx: drop workaround for forced irq threading

2021-03-23 Thread Johan Hovold
On Mon, Mar 22, 2021 at 02:40:32PM +0100, Uwe Kleine-König wrote: > Hello Johan, > > On Mon, Mar 22, 2021 at 02:20:57PM +0100, Johan Hovold wrote: > > On Mon, Mar 22, 2021 at 12:55:36PM +0100, Uwe Kleine-König wrote: > > > On Mon, Mar 22, 2021 at 12:39:18PM +0100, Sebasti

Re: [PATCH] usb: serial: io_edgeport: fix memory leak in edge_startup

2021-03-05 Thread Johan Hovold
On Tue, Mar 02, 2021 at 02:01:52AM +0300, Pavel Skripkin wrote: > sysbot found memory leak in edge_startup(). > The problem was that when an error was received from the usb_submit_urb(), > nothing was cleaned up. > > Reported-by: syzbot+59f777bdcbdd7eea5...@syzkaller.appspotmail.com > Signed-off-b

Re: [PATCH] USB: serial: cp210x: Make the CP210x driver work with GPIOs of CP2108

2021-03-05 Thread Johan Hovold
On Thu, Mar 04, 2021 at 09:50:47AM +, Pho Tran wrote: > Similar to other CP210x devices, GPIO interfaces (gpiochip) should be > supported for CP2108. > > CP2108 has 4 serial interfaces but only 1 set of GPIO pins are shared > to all of those interfaces. So, just need to initialize GPIOs of CP2

Re: [PATCH 5.10 491/663] USB: serial: option: update interface mapping for ZTE P685M

2021-03-05 Thread Johan Hovold
Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > > I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan > > E: Ad=87(I) Atr=03(Int.) MxPS= 8 Ivl=32ms > > E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > > E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > > I:* I

Re: [PATCH 37/44] USB: serial/keyspan, drop unneeded forward declarations

2021-03-05 Thread Johan Hovold
ove > > forward declarations which are not really needed, i.e. when the > > definition of the function is before its first use. > > > > Signed-off-by: Jiri Slaby > > Cc: Johan Hovold > > --- > > drivers/usb/serial/keyspan.c | 20 >

Re: [PATCH 44/44] tty: make everyone's write_room return >= 0

2021-03-05 Thread Johan Hovold
On Tue, Mar 02, 2021 at 07:22:14AM +0100, Jiri Slaby wrote: > The tty line disciplines don't expect tty_operations::write_room to > return negative values. Fix the five drivers which violate this. > > Signed-off-by: Jiri Slaby > --- > drivers/staging/gdm724x/gdm_tty.c | 2 +- > drivers/tty/ipwir

Re: [PATCH v2] USB: serial: cp210x: Make the CP210x driver work with GPIOs of CP2108

2021-03-05 Thread Johan Hovold
g should go here (after the '---', not after the diff). > 3/4/2021: Patch v2 Modify format patch as comment form Johan Hovold > mailto:jo...@kernel.org>> As I told when you submitted a previous patch; you need to be more specific in your changelog. This doesn't say *wh

Re: [PATCH 3/6] dt-bindings: serdev: ngsm: Add binding for GNSS child node

2021-03-05 Thread Johan Hovold
On Fri, Mar 05, 2021 at 11:46:35AM +0100, Pavel Machek wrote: > Hi! > > > > > For motorola modem case, we may have a GNSS device on channel 4. > > > > Let's add that to the binding and example. > > > > > > > > Signed-off-by: Tony Lindgren > > > > --- > > > > .../devicetree/bindings/serdev/serde

Re: [PATCH v2 0/7] Add support for the other MaxLinear/Exar UARTs

2021-03-30 Thread Johan Hovold
On Wed, Mar 24, 2021 at 08:41:04AM +0100, Mauro Carvalho Chehab wrote: > The current version of the xr_serial driver handles one one of the several > MaxLinear/Exar UARTs and UART bridges. There are currently 12 such > models. Only one is currently supported. As I mentioned earlier, proper handlin

[PATCH] USB: serial: xr: fix CSIZE handling

2021-03-30 Thread Johan Hovold
Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index 0ca04906da4b..c59c8b47a120 100644 --- a/drivers/usb/serial/xr_serial.c +++ b/drivers/usb/serial/xr_serial.c

[PATCH 0/4] USB: serial: add support for multi-interface functions

2021-03-30 Thread Johan Hovold
interface. The interface could easily be extended to allow claiming further interfaces if ever needed. The final patch uses the new interface to properly claim both the control and data interface of Maxlinear/Exar devices. Johan Johan Hovold (4): USB: serial: drop unused suspending flag USB: serial

[PATCH 4/4] USB: serial: xr: claim both interfaces

2021-03-30 Thread Johan Hovold
Communication Class interfaces and use the Union functional descriptor to determine the corresponding data interface. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/xr_serial.c

[PATCH 1/4] USB: serial: drop unused suspending flag

2021-03-30 Thread Johan Hovold
The suspending flag was added back in 2009 but no users ever followed. Remove it. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 8 +--- include/linux/usb/serial.h | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/usb/serial/usb-serial.c b

[PATCH 3/4] USB: serial: add support for multi-interface functions

2021-03-30 Thread Johan Hovold
unbinding either interface will release the other interface while disconnect() is called precisely once. Similarly, suspend() is called when the first sibling interface is suspended and resume() is called when the last sibling interface is resumed by USB core. Signed-off-by: Johan Hovold --- drivers

[PATCH 2/4] USB: serial: refactor endpoint classification

2021-03-30 Thread Johan Hovold
Refactor endpoint classification and replace the build-time endpoint-array sanity checks with runtime checks in preparation for handling endpoints from a sibling interface. Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 51 - 1 file changed, 31

[PATCH 08/12] USB: serial: xr: add support for XR21B1411

2021-03-30 Thread Johan Hovold
except that most registers are offset by 0xc00 (corresponding to a channel index of 12 in the MSB of wIndex). As the device is single-port so that the derived channel index is 0, the current register accessors can be reused after simply changing the address width. Signed-off-by: Johan Hovold

[PATCH 04/12] USB: serial: xr: move pin configuration to probe

2021-03-30 Thread Johan Hovold
There's no need to configure the pins on every open and judging from the vendor driver and datasheet it can be done before enabling the UART. Move pin configuration from open() to port probe and make sure to deassert DTR and RTS after configuring all pins as GPIO. Signed-off-by: Johan H

[PATCH 01/12] USB: serial: xr: add support for XR21V1412 and XR21V1414

2021-03-30 Thread Johan Hovold
reside in separate blocks per channel, while the UART Manager functionality is implemented using per-channel registers. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 55 +++--- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/drivers/usb

[PATCH 06/12] USB: serial: xr: add type abstraction

2021-03-30 Thread Johan Hovold
registers and that these will need to be handled specifically. Similarly, XR21V141X is the only type which has the divisor registers and that needs to use the format register when configuring the line settings. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 128

[PATCH 09/12] USB: serial: xr: add support for XR22801, XR22802, XR22804

2021-03-30 Thread Johan Hovold
the device rather than interface, and 5 and 6-bit words are not supported. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index

[PATCH 02/12] USB: serial: xr: rename GPIO-mode defines

2021-03-30 Thread Johan Hovold
Rename the GPIO mode defines so that they reflect the datasheet and how they are used. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial

[PATCH 03/12] USB: serial: xr: rename GPIO-pin defines

2021-03-30 Thread Johan Hovold
Rename the GPIO-pin defines so that they reflect how they are used. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial

[PATCH 07/12] USB: serial: xr: add support for XR21B1421, XR21B1422 and XR21B1424

2021-03-30 Thread Johan Hovold
though it is otherwise supported. The UART enable sequence for XR21B142X does not involve explicitly enabling the FIFOs, but according to datasheet the UART must be disabled when writing any register but GPIO_SET, GPIO_CLEAR, TX_BREAK and ERROR_STATUS. Signed-off-by: Johan Hovold --- drivers/usb

[PATCH 00/12] USB: serial: xr: add support for more device types

2021-03-30 Thread Johan Hovold
layout for certain functionality. Expect for the above, most differences can be handled by simply using different set of register addresses. Note that this series depends on the recently posted multi-interface-function series. Johan Johan Hovold (11): USB: serial: xr: add support for XR2

[PATCH 05/12] USB: serial: xr: drop type prefix from shared defines

2021-03-30 Thread Johan Hovold
In preparation for adding support for further types, drop the type prefix from defines that are not specific to XR21V141X. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 122 - 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a

Re: [PATCH v2 2/7] USB: serial: xr: use a table for device-specific settings

2021-03-30 Thread Johan Hovold
On Wed, Mar 24, 2021 at 08:41:06AM +0100, Mauro Carvalho Chehab wrote: > The same driver is used by a wide range of MaxLinear devices. > > Other models are close enough to use the same driver, but they > use a different register set. > > So, instead of having the registers hardcoded at the driver

Re: [PATCH v2 3/7] USB: serial: xr: add support for multi-port XR21V141X variants

2021-03-30 Thread Johan Hovold
On Wed, Mar 24, 2021 at 08:41:07AM +0100, Mauro Carvalho Chehab wrote: > XR21V1412 and XR21V1414 have exactly the same interface, but > they support multiple 2 and 4 ports, respectively. > > On such devices, the "CDC Union" field shows how they're > grouped, as can be seen on those lsusb -v output

Re: [PATCH v2 4/7] USB: serial: xr: add support for XR21B142X devices

2021-03-30 Thread Johan Hovold
On Wed, Mar 24, 2021 at 08:41:08AM +0100, Mauro Carvalho Chehab wrote: > Those devices can have 1, 2 or 4 ports. They're similar to > XR21B141X models, except for: > > - the register numbers and reqs are different; > - some settings are done via the control interface, by > using CDC commands. >

Re: [PATCH v2 5/7] USB: serial: xr: add support for XR21B1411

2021-03-30 Thread Johan Hovold
On Wed, Mar 24, 2021 at 08:41:09AM +0100, Mauro Carvalho Chehab wrote: > There's nothing special on this device: it has just one port. > > The only difference is that it uses a different register set. Not quite true. First, it uses 12-bit registers, which the driver isn't updated for. Similarly,

Re: [PATCH v2 6/7] USB: serial: xr: add support for XR2280X devices

2021-03-30 Thread Johan Hovold
On Wed, Mar 24, 2021 at 08:41:10AM +0100, Mauro Carvalho Chehab wrote: > There's nothing special on those devices either. They just > use a different set of registers. This device also use 16-bit addresses and doesn't support CS5 and CS6. Johan

Re: [PATCH v2 7/7] USB: cdc-acm: add other non-standard xr_serial models to ignore list

2021-03-30 Thread Johan Hovold
On Wed, Mar 24, 2021 at 08:41:11AM +0100, Mauro Carvalho Chehab wrote: > Now that the xr_serial got support for other models, add their > USB IDs as well, as those devices won't work with the standard > CDC driver. As far as I understand these devices should work also with the standard class drive

Re: [PATCH 3/4] USB: serial: add support for multi-interface functions

2021-03-30 Thread Johan Hovold
On Tue, Mar 30, 2021 at 04:44:32PM +0200, Oliver Neukum wrote: > Am Dienstag, den 30.03.2021, 16:38 +0200 schrieb Johan Hovold: > > @@ -1115,6 +1161,8 @@ static void usb_serial_disconnect(struct > > usb_interface *interface) > > if (serial->type->disconnect)

Re: [PATCH v5] USB: serial: cp210x: Make the CP210x driver work with GPIOs of CP2108

2021-03-31 Thread Johan Hovold
ed to say that's a driver). Use something like: USB: serial: cp210x: add support for GPIOs on CP2108 > Signed-off-by: Pho Tran > --- > > 03/12/2022: Patch v4 used git send-mail instead of send patch by manual > follow the instructions of Johan Hovold . > 03/05/2

Re: [PATCH v2 RESEND] x86/apic/of: Fix CPU devicetree-node lookups

2021-03-22 Thread Johan Hovold
On Fri, Mar 19, 2021 at 11:01:37PM +0100, Thomas Gleixner wrote: > On Fri, Mar 12 2021 at 10:20, Johan Hovold wrote: > > arch/x86/kernel/apic/apic.c | 5 + > > 1 file changed, 5 insertions(+) > > > > It's been over three months so resending. > > Sorry, w

[PATCH] serial: imx: drop workaround for forced irq threading

2021-03-22 Thread Johan Hovold
Peter Zijlstra Signed-off-by: Johan Hovold --- drivers/tty/serial/imx.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 8257597d034d..cca730fc2b0b 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx

[PATCH] USB: xhci: drop workaround for forced irq threading

2021-03-22 Thread Johan Hovold
ix lock-inversion problem"). Cc: Alan Stern Cc: Bart Van Assche Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: Peter Zijlstra Signed-off-by: Johan Hovold --- drivers/usb/host/xhci-ring.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-

[PATCH] USB: ehci: drop workaround for forced irq threading

2021-03-22 Thread Johan Hovold
deadlock when threadirqs option is used"). Cc: Stanislaw Gruszka Cc: Alan Stern Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: Peter Zijlstra Signed-off-by: Johan Hovold --- drivers/usb/host/ehci-hcd.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git

Re: [PATCH] tty: serial: samsung_tty: remove spinlock flags in interrupt handlers

2021-03-22 Thread Johan Hovold
sztof Kozlowski Interrupts are now disabled also with forced interrupt threading even if this never was an issue for this driver which currently doesn't take the port lock in the console paths. Reviewed-by: Johan Hovold Johan

Re: [PATCH] serial: imx: drop workaround for forced irq threading

2021-03-22 Thread Johan Hovold
On Mon, Mar 22, 2021 at 12:55:36PM +0100, Uwe Kleine-König wrote: > Hallo Sebastian, > > On Mon, Mar 22, 2021 at 12:39:18PM +0100, Sebastian Andrzej Siewior wrote: > > On 2021-03-22 12:34:02 [+0100], Uwe Kleine-König wrote: > > > On Mon, Mar 22, 2021 at 12:10:36PM +

Re: [PATCH 7/7] USB: cdc-acm: always claim data interface

2021-03-22 Thread Johan Hovold
On Mon, Mar 22, 2021 at 11:46:47AM +0100, Oliver Neukum wrote: > Am Donnerstag, den 18.03.2021, 16:52 +0100 schrieb Johan Hovold: > > Make sure to always claim the data interface and bail out if it's > > already bound to another driver or isn't authorised. > > Hi,

[PATCH v2 2/8] USB: cdc-acm: fix use-after-free after probe failure

2021-03-22 Thread Johan Hovold
error handling in acm_probe()") Cc: sta...@vger.kernel.org # 3.9 Cc: Alexey Khoroshilov Acked-by: Oliver Neukum Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-a

[PATCH v2 0/8] USB: cdc-acm: probe fixes

2021-03-22 Thread Johan Hovold
- clarify that the driver already had a check for a bound data interface and remove the now redundant check (Oliver) (7/8) - add Oliver's ack to patches 1 through 6 - add new to avoid logging a successful probe message on late errors (8/8) Johan Hovold (8): USB: cdc-acm: fix double

[PATCH v2 3/8] USB: cdc-acm: drop redundant driver-data assignment

2021-03-22 Thread Johan Hovold
The interface driver data has already been set by usb_driver_claim_interface() so drop the redundant subsequent assignment. Acked-by: Oliver Neukum Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/class/cdc-acm.c b

[PATCH v2 8/8] USB: cdc-acm: do not log successful probe on later errors

2021-03-22 Thread Johan Hovold
Do not log the successful-probe message until the tty device has been registered. Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 914486d0f68c

[PATCH v2 4/8] USB: cdc-acm: drop redundant driver-data reset

2021-03-22 Thread Johan Hovold
There's no need to clear the interface driver data on failed probe (and driver core will clear it anyway). Acked-by: Oliver Neukum Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/clas

[PATCH v2 1/8] USB: cdc-acm: fix double free on probe failure

2021-03-22 Thread Johan Hovold
: cae2bc768d17 ("usb: cdc-acm: Decrement tty port's refcount if probe() fail") Cc: sta...@vger.kernel.org # 4.19 Cc: Jaejoong Kim Acked-by: Oliver Neukum Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/

[PATCH v2 7/8] USB: cdc-acm: always claim data interface

2021-03-22 Thread Johan Hovold
Make sure to always claim the data interface and bail out if binding fails. Note that the driver had a check to verify that the data interface was not already bound to a driver but would not detect other failures (e.g. if the interface was not authorised). Signed-off-by: Johan Hovold

[PATCH v2 5/8] USB: cdc-acm: clean up probe error labels

2021-03-22 Thread Johan Hovold
Name the probe error labels after what they do rather than using sequence numbers which is harder to review and maintain (e.g. may require renaming unrelated labels when a label is added or removed). Acked-by: Oliver Neukum Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 35

[PATCH v2 6/8] USB: cdc-acm: use negation for NULL checks

2021-03-22 Thread Johan Hovold
Use negation consistently throughout the driver for NULL checks. Acked-by: Oliver Neukum Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index

Re: [PATCH] tty: serial: samsung_tty: remove spinlock flags in interrupt handlers

2021-03-16 Thread Johan Hovold
On Mon, Mar 15, 2021 at 07:12:12PM +0100, Krzysztof Kozlowski wrote: > Since interrupt handler is called with disabled local interrupts, there > is no need to use the spinlock primitives disabling interrupts as well. This isn't generally true due to "threadirqs" and that can lead to deadlocks if t

Re: [PATCH] tty: serial: samsung_tty: remove spinlock flags in interrupt handlers

2021-03-16 Thread Johan Hovold
On Tue, Mar 16, 2021 at 10:47:53AM +0100, Krzysztof Kozlowski wrote: > On 16/03/2021 10:02, Johan Hovold wrote: > > On Mon, Mar 15, 2021 at 07:12:12PM +0100, Krzysztof Kozlowski wrote: > >> Since interrupt handler is called with disabled local interrupts, there > >> is

threadirqs deadlocks

2021-03-16 Thread Johan Hovold
Hi Thomas, We've gotten reports of lockdep splats correctly identifying a potential deadlock in serial drivers when running with forced interrupt threading. Typically, a serial driver takes the port spin lock in its interrupt handler, but unless also disabling interrupts the handler can be preemp

Re: [PATCH] tty: serial: samsung_tty: remove spinlock flags in interrupt handlers

2021-03-16 Thread Johan Hovold
On Tue, Mar 16, 2021 at 11:11:43AM +0100, Krzysztof Kozlowski wrote: > On 16/03/2021 10:56, Johan Hovold wrote: > > On Tue, Mar 16, 2021 at 10:47:53AM +0100, Krzysztof Kozlowski wrote: > >> On 16/03/2021 10:02, Johan Hovold wrote: > >>> On Mon, Mar 15, 2021 at 07:12:1

Re: [PATCH 00/13] tty.h cleanups

2021-04-15 Thread Johan Hovold
On Thu, Apr 15, 2021 at 10:21:54AM +0200, Greg Kroah-Hartman wrote: > On Fri, Apr 09, 2021 at 09:32:45AM +0200, Johan Hovold wrote: > > On Thu, Apr 08, 2021 at 08:01:08PM +0200, Greg Kroah-Hartman wrote: > > > On Thu, Apr 08, 2021 at 04:25:22PM +0200, Johan Hovold wrote: >

<    3   4   5   6   7   8   9   10   11   12   >