Re: [RESEND PATCH] leds: ledtrig-pattern: Use last_repeat when applying hw pattern

2023-12-20 Thread Johan Hovold
he sysfs property > clearly presents a value of `-1`. > > Signed-off-by: Marijn Suijten > Reviewed-by: Bjorn Andersson > Tested-by: Bjorn Andersson Looks correct to me: Reviewed-by: Johan Hovold

Re: [PATCH v4 2/2] leds: qcom-lpg: Add PM660L configuration and compatible

2023-12-20 Thread Johan Hovold
On Tue, Dec 19, 2023 at 11:06:08AM +0100, Marijn Suijten wrote: > On 2023-12-19 10:33:25, Johan Hovold wrote: > > On Tue, Dec 19, 2023 at 10:17:16AM +0100, Marijn Suijten wrote: > > > > > Note that I have one more unmerged leds patch around, that hasn't been > > &g

Re: [PATCH v4 2/2] leds: qcom-lpg: Add PM660L configuration and compatible

2023-12-19 Thread Johan Hovold
On Tue, Dec 19, 2023 at 10:17:16AM +0100, Marijn Suijten wrote: > Note that I have one more unmerged leds patch around, that hasn't been looked > at either. Would it help to send this once again, perhaps with more > reviewers/ > testing (Johan, would you mind taking a look too)? > >

Re: [PATCH v4 2/2] leds: qcom-lpg: Add PM660L configuration and compatible

2023-12-19 Thread Johan Hovold
Hi Marijn and Lee, On Tue, Jul 19, 2022 at 11:18:48PM +0200, Marijn Suijten wrote: > Inherit PM660L PMIC LPG/triled block configuration from downstream > drivers and DT sources, consisting of a triled block with automatic > trickle charge control and source selection, three colored led channels >

Re: [PATCH v9] USB: serial: cp210x: Add support for GPIOs on CP2108

2021-04-19 Thread Johan Hovold
ue. You left out a few changes here. You changed how the altfunctions were detected and fixed the gpio_init error handling. Please include all relevant changes in your changelogs. > 03/12/2021: Patch v4 used git send-mail instead of send patch by manual > follow the instructions of Johan Hovold . &g

Re: [PATCH 2/3] serial: stm32: fix threaded interrupt handling

2021-04-16 Thread Johan Hovold
On Fri, Apr 16, 2021 at 10:35:25PM +0800, dillon min wrote: > Hi Johan > > Thanks for share your patch. > > Johan Hovold 于2021年4月16日 周五22:11写道: > > > When DMA is enabled the receive handler runs in a threaded handler, but > > the primary handler up until

Re: [PATCH 2/3] serial: stm32: fix threaded interrupt handling

2021-04-16 Thread Johan Hovold
On Fri, Apr 16, 2021 at 04:05:56PM +0200, Johan Hovold wrote: > When DMA is enabled the receive handler runs in a threaded handler, but > the primary handler up until very recently neither disabled interrupts Scratch the "up until very recently" bit here since the driver still

[PATCH 2/3] serial: stm32: fix threaded interrupt handling

2021-04-16 Thread Johan Hovold
Cc: Gerald Baeza Signed-off-by: Johan Hovold --- drivers/tty/serial/stm32-usart.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 4d277804c63e..3524ed2c0c73 100644 --- a/drivers/

[PATCH 1/3] serial: do not restore interrupt state in sysrq helper

2021-04-16 Thread Johan Hovold
heck_sysrq() and update its callers to no longer explicitly disable interrupts in their interrupt handlers. Cc: Joel Stanley Cc: Andrew Jeffery Cc: Andy Gross Cc: Bjorn Andersson Signed-off-by: Johan Hovold --- drivers/tty/serial/8250/8250_aspeed_vuart.c | 5 ++--- drivers/tty/serial/8250/

[PATCH 3/3] serial: stm32: defer sysrq processing

2021-04-16 Thread Johan Hovold
makes the console code work with PREEMPT_RT by no longer relying on local_irq_save(). Signed-off-by: Johan Hovold --- drivers/tty/serial/stm32-usart.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32

[PATCH 0/3] serial: sysrq cleanup and stm32 fixes

2021-04-16 Thread Johan Hovold
commit. The third patch cleans up the stm32 console implementation by switching to deferred sysrq processing, thereby making the console code more robust and allowing it to be used with PREEMPT_RT. This series is against tty-next and and have only been compile tested. Johan Johan Hovold (3

Re: [PATCH v3] serial: stm32: optimize spin lock usage

2021-04-16 Thread Johan Hovold
> uart_unlock_and_check_sysrq(); > spin_unlock_irqrestore(); > handle_sysrq(sysrq_ch); > stm32_usart_threaded_interrupt()//stm32_usart_interrupt() return > > Cc: Johan Hovold > Cc: Alexandre Torgue > Cc: Maxime Coquelin > Cc: Gerald Baeza

Re: [PATCH v2] serial: stm32: optimize spin lock usage

2021-04-16 Thread Johan Hovold
[ Please avoid top-posting. ] On Thu, Apr 15, 2021 at 07:09:14PM +0200, Erwan LE RAY wrote: > Hi Dillon, > > STM32MP151 is mono-core, but both STM32MP153 and STM32MP157 are > dual-core (see >

Re: [PATCH v2] serial: stm32: optimize spin lock usage

2021-04-16 Thread Johan Hovold
On Tue, Apr 13, 2021 at 07:44:39AM +0800, dillon min wrote: > Hi Johan, Erwan > > It seems still a bit of a problem in the current version, not deadlock > but access register at the same time. > > For driver , we should consider it running under smp, let's think > about it for this case: > >

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: >

Re: [PATCH v2] USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet

2021-04-12 Thread Johan Hovold
On Mon, Apr 12, 2021 at 09:05:20PM +0800, Kai-Heng Feng wrote: > This is another branded 8153 device that doesn't work well with LPM > enabled: > [ 400.597506] r8152 5-1.1:1.0 enx482ae3a2a6f0: Tx status -71 > > So disable LPM to resolve the issue. > > BugLink:

Re: [PATCH v2] serial: stm32: optimize spin lock usage

2021-04-12 Thread Johan Hovold
On Mon, Apr 12, 2021 at 05:31:38PM +0800, dillon.min...@gmail.com wrote: > From: dillon min > > To avoid potential deadlock in spin_lock usage, use spin_lock_irqsave, > spin_trylock_irqsave(), spin_unlock_irqrestore() in process context. This doesn't make much sense as console_write can be

Re: [PATCH] USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet

2021-04-12 Thread Johan Hovold
On Mon, Apr 12, 2021 at 08:37:52PM +0800, Kai-Heng Feng wrote: > This is another branded 8153 device that doesn't work well with LPM > enabled: > [ 400.597506] r8152 5-1.1:1.0 enx482ae3a2a6f0: Tx status -71 > > So disable LPM to resolve the issue. > BugLink:

Re: [PATCH 0/2] USB: serial: cp210x: provide gpio valid mask

2021-04-12 Thread Johan Hovold
On Fri, Apr 09, 2021 at 07:23:11PM +0300, Andy Shevchenko wrote: > On Fri, Apr 9, 2021 at 6:52 PM Johan Hovold wrote: > > > > Use the new GPIO valid-mask feature to inform gpiolib which pins are > > available for use instead of handling that in a request callback. > >

[PATCH 11/12] USB: serial: xr: add copyright notice

2021-04-12 Thread Johan Hovold
Add another copyright notice for the work done in 2021. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index 1b7b3c70a9b3..6853cd56d8dc 100644 --- a/drivers/usb

[PATCH 12/12] USB: cdc-acm: add more Maxlinear/Exar models to ignore list

2021-04-12 Thread Johan Hovold
ial driver is enabled. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5155887a764cbc11f8da0217fe08a24a77d120b4.1616571453.git.mchehab+hua...@kernel.org [ johan: rewrite commit message, clean up entries ] Cc: Oliver Neukum Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-

[PATCH 10/12] USB: serial: xr: reset FIFOs on open

2021-04-12 Thread Johan Hovold
Reset the transmit and receive FIFOs before enabling the UARTs as part of open() in order to flush any stale data. Note that the XR21V141X needs a type-specific implementation due to its UART Manager registers. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 51

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

2021-04-12 Thread Johan Hovold
at 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 01/12] USB: serial: xr: add support for XR21V1412 and XR21V1414

2021-04-12 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-04-12 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 02/12] USB: serial: xr: rename GPIO-mode defines

2021-04-12 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 07/12] USB: serial: xr: add support for XR21B1421, XR21B1422 and XR21B1424

2021-04-12 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 08/12] USB: serial: xr: add support for XR21B1411

2021-04-12 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-04-12 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 Hovold

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

2021-04-12 Thread Johan Hovold
e recently posted multi-interface-function series. Johan Johan Hovold (11): USB: serial: xr: add support for XR21V1412 and XR21V1414 USB: serial: xr: rename GPIO-mode defines USB: serial: xr: rename GPIO-pin defines USB: serial: xr: move pin configuration to probe USB: serial: xr: drop t

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

2021-04-12 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

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

2021-04-12 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 3/4] USB: serial: ti_usb_3410_5052: reduce drain delay to one char

2021-04-12 Thread Johan Hovold
meout (e.g. 33 ms at 300 bps) should be enough to compensate for the lack of a transmitter empty bit in the TUSB5052 line-status register. Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/

[PATCH 0/4] USB: serial: closing-wait fixes and cleanups

2021-04-12 Thread Johan Hovold
for two other uses where such a delay is needed to let the transmitter shift register clear. As it turns out, this is really only needed for one of the two device types handled by the ti_usb_3410_5052 driver. Johan Johan Hovold (4): USB: serial: f81232: drop time-based drain delay USB: serial

[PATCH 1/4] USB: serial: f81232: drop time-based drain delay

2021-04-12 Thread Johan Hovold
The f81232 driver now waits for the transmit FIFO to drain during close so there is no need to keep the time-based drain delay, which would add up to two seconds on every close for low line speeds. Fixes: 98405f81036d ("USB: serial: f81232: add tx_empty function") Signed-off-by: Jo

[PATCH 4/4] USB: serial: ti_usb_3410_5052: drop drain delay for 3410

2021-04-12 Thread Johan Hovold
needed (e.g. 90 ms at 110 bps). Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 8ed64115987f..d9bffb2de8bf

[PATCH 2/4] USB: serial: io_ti: document reason for drain delay

2021-04-12 Thread Johan Hovold
Document that the device line-status register doesn't tell when the transmitter shift register has emptied and that this is why the one-character drain delay is needed. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb

Re: [PATCH 2/2] USB: serial: cp210x: add gpio-configuration debug printk

2021-04-09 Thread Johan Hovold
On Fri, Apr 09, 2021 at 07:22:26PM +0300, Andy Shevchenko wrote: > On Fri, Apr 9, 2021 at 6:52 PM Johan Hovold wrote: > > > > Add a debug printk to dump the GPIO configuration stored in EEPROM > > during probe. > > > > Signed-off-by: Johan Hovold > > -

[PATCH 0/2] USB: serial: cp210x: provide gpio valid mask

2021-04-09 Thread Johan Hovold
Use the new GPIO valid-mask feature to inform gpiolib which pins are available for use instead of handling that in a request callback. This also allows user space to figure out which pins are available through the chardev interface without having to request each pin in turn. Johan Johan

[PATCH 2/2] USB: serial: cp210x: add gpio-configuration debug printk

2021-04-09 Thread Johan Hovold
Add a debug printk to dump the GPIO configuration stored in EEPROM during probe. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index ceb3a656a075..ee595d1bea0a

[PATCH 1/2] USB: serial: cp210x: provide gpio valid mask

2021-04-09 Thread Johan Hovold
value when requesting an unavailable pin will now be -EINVAL instead of -ENODEV. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c

Re: [PATCH v8] USB: serial: cp210x: Add support for GPIOs on CP2108

2021-04-09 Thread Johan Hovold
On Wed, Apr 07, 2021 at 01:25:00AM +0300, Andy Shevchenko wrote: > On Tuesday, April 6, 2021, Pho Tran wrote: > > Because CP2108 has 16 GPIO pins, the parameter passed by cp210x functions > > will be different from other CP210x devices. So need to check part number > > of the device to use

[PATCH] tty: clarify that not all ttys have a class device

2021-04-09 Thread Johan Hovold
s device (e.g. pseudoterminals and serdev) in which case the device pointer will be set to NULL, something which have bit driver authors over the years. In retrospect perhaps this field should never have been added, but let's at least document the current behaviour. Signed-off-by: Johan Hovold --- include/li

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

2021-04-09 Thread Johan Hovold
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: > > On Thu, Apr 08, 2021 at 02:51:21PM +0200, Greg Kroah-Hartman wrote: > > > Turns out there is a lot of tty-internal stuff in include/linux/t

[PATCH] USB: serial: do not use tty class device for debugging

2021-04-08 Thread Johan Hovold
Signed-off-by: Johan Hovold --- drivers/usb/serial/metro-usb.c | 4 ++-- drivers/usb/serial/upd78f0730.c | 7 +++ drivers/usb/serial/usb-serial.c | 32 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/drivers/usb/serial/metro-usb.c b/drivers/

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

2021-04-08 Thread Johan Hovold
On Thu, Apr 08, 2021 at 02:51:21PM +0200, Greg Kroah-Hartman wrote: > Turns out there is a lot of tty-internal stuff in include/linux/tty.h > that do not belong there. Create a internal-to-the-tty-layer .h file > for these types of things and move function prototypes to it instead of > being in

[PATCH v2 1/3] Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL"

2021-04-08 Thread Johan Hovold
, but this is hardly something we need to worry about. Cc: Anthony Mallet Cc: sta...@vger.kernel.org Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index

[PATCH v2 0/3] TIOCSSERIAL fixes

2021-04-08 Thread Johan Hovold
and that the current line speed can still be retrieved through the standard termios interfaces (3/3) Johan Hovold (3): Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL" USB: cdc-acm: fix unprivileged TIOCCSERIAL USB: cdc-acm: fix TIOCGSERIAL implementation drivers/usb

[PATCH v2 2/3] USB: cdc-acm: fix unprivileged TIOCCSERIAL

2021-04-08 Thread Johan Hovold
: ba2d8ce9db0a ("cdc-acm: implement TIOCSSERIAL to avoid blocking close(2)") Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 96e221803fa6..43e31dad4831 100644 --- a/d

[PATCH v2 3/3] USB: cdc-acm: fix TIOCGSERIAL implementation

2021-04-08 Thread Johan Hovold
that the current line speed can still be retrieved through the standard termios interfaces. Fixes: 18c75720e667 ("USB: allow users to run setserial with cdc-acm") Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH 3/3] USB: cdc-acm: fix TIOCGSERIAL implementation

2021-04-08 Thread Johan Hovold
On Thu, Apr 08, 2021 at 01:34:12PM +0200, Oliver Neukum wrote: > Am Donnerstag, den 08.04.2021, 11:48 +0200 schrieb Johan Hovold: > > On Thu, Apr 08, 2021 at 10:36:46AM +0200, Oliver Neukum wrote: > > > Am Mittwoch, den 07.04.2021, 12:28 +0200 schrieb Johan Hovold: > &g

Re: [PATCH 3/3] USB: cdc-acm: fix TIOCGSERIAL implementation

2021-04-08 Thread Johan Hovold
On Thu, Apr 08, 2021 at 10:36:46AM +0200, Oliver Neukum wrote: > Am Mittwoch, den 07.04.2021, 12:28 +0200 schrieb Johan Hovold: > > TIOCSSERIAL is a horrid, underspecified, legacy interface which for most > > serial devices is only useful for setting the close_delay and > > cl

Re: [PATCH 2/3] USB: cdc-acm: fix unprivileged TIOCCSERIAL

2021-04-08 Thread Johan Hovold
On Thu, Apr 08, 2021 at 09:48:38AM +0200, Oliver Neukum wrote: > Am Mittwoch, den 07.04.2021, 12:28 +0200 schrieb Johan Hovold: > > TIOCSSERIAL is a horrid, underspecified, legacy interface which for most > > serial devices is only useful for setting the close_delay and > > cl

Re: [PATCH 0/4] USB: serial: closing-wait cleanups

2021-04-08 Thread Johan Hovold
On Wed, Apr 07, 2021 at 05:24:52PM +0200, Greg Kroah-Hartman wrote: > On Wed, Apr 07, 2021 at 12:45:25PM +0200, Johan Hovold wrote: > > Now that all USB serial drivers supports changing the closing_wait > > parameter through TIOCSSERIAL (setserial), we can remove the related >

Re: [PATCH 1/3] Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL"

2021-04-07 Thread Johan Hovold
On Wed, Apr 07, 2021 at 01:04:31PM +0200, Anthony Mallet wrote: > On Wednesday 7 Apr 2021, at 12:28, Johan Hovold wrote: > > With HZ=250, the default 0.5 second value of close_delay is converted to > > 125 jiffies when set and is converted back to 50 centiseconds by > > TI

[PATCH net-next] net: wan: z85230: drop unused async state

2021-04-07 Thread Johan Hovold
According to the changelog, asynchronous mode was dropped sometime before v2.2. Let's get rid of the unused driver-specific async state as well so that it doesn't show up when doing tree-wide tty work. Signed-off-by: Johan Hovold --- drivers/net/wan/z85230.h | 39

[PATCH 0/4] USB: serial: closing-wait cleanups

2021-04-07 Thread Johan Hovold
Now that all USB serial drivers supports changing the closing_wait parameter through TIOCSSERIAL (setserial), we can remove the related driver-specific module parameters and settings. These depend on the recently posted TIOCSSERIAL series. Johan Johan Hovold (4): USB: serial: io_ti: drop

[PATCH 4/4] USB: serial: ti_usb_3410_5052: switch to 30-second closing wait

2021-04-07 Thread Johan Hovold
Switch to using the system-wide default 30-second closing-wait timeout instead of the driver specific 40-second timeout. The timeout can be changed per port using TIOCSSERIAL (setserial) if needed. Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 3 --- 1 file changed, 3

[PATCH 3/4] USB: serial: ti_usb_3410_5052: drop closing_wait module parameter

2021-04-07 Thread Johan Hovold
The ti_usb_3410_5052 has supported changing the closing_wait parameter through TIOCSSERIAL (setserial) for about a decade and commit f1175daa5312 ("USB: ti_usb_3410_5052: kill custom closing_wait"). It's time to drop the corresponding driver-specific module parameter. Signed-off-by: Jo

[PATCH 1/4] USB: serial: io_ti: drop closing_wait module parameter

2021-04-07 Thread Johan Hovold
Now that all USB serial drivers supports setting the closing_wait parameter through TIOCSSERIAL (setserial) it's time to drop the corresponding io_ti module parameter. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[PATCH 2/4] USB: serial: io_ti: switch to 30-second closing wait

2021-04-07 Thread Johan Hovold
Switch to using the system-wide default 30-second closing-wait timeout instead of the driver specific 40-second timeout. The timeout can be changed per port using TIOCSSERIAL (setserial) if needed. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_ti.c | 3 --- 1 file changed, 3 deletions

[PATCH 21/24] USB: serial: stop reporting legacy UART types

2021-04-07 Thread Johan Hovold
e unlikely event that this do cause problems, this should be fixed tree-wide anyway (e.g. for all USB serial drivers and also CDC-ACM). Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 7 --- drivers/usb/serial/f81232.c | 1 - drivers/usb/serial/f81534.c

[PATCH 19/24] USB: serial: fix return value for unsupported ioctls

2021-04-07 Thread Johan Hovold
ng methods. Note that the TIOCMGET and TIOCMSET helpers predate git and do not get a corresponding Fixes tag below. Fixes: d281da7ff6f7 ("tty: Make tiocgicount a handler") Signed-off-by: Johan Hovold --- drivers/usb/serial/usb-serial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 dele

[PATCH 20/24] USB: serial: add generic support for TIOCSSERIAL

2021-04-07 Thread Johan Hovold
interface; an interface which only the FTDI driver actually implements. Some drivers have also been reporting back a fake UART type, something which should no longer be needed and will be dropped by a follow-on patch. Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 9

[PATCH 24/24] USB: serial: ftdi_sio: clean up TIOCSSERIAL

2021-04-07 Thread Johan Hovold
The TIOCSSERIAL implementation needs to compare the old flag and divisor settings with the new to detect ASYNC_SPD changes, but there's no need to copy all driver state to the stack for that. While at it, unbreak the function parameter list. Signed-off-by: Johan Hovold --- drivers/usb/serial

[PATCH 22/24] USB: serial: ftdi_sio: ignore baud_base changes

2021-04-07 Thread Johan Hovold
for consistency. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 16d3e50487e6..3fd7875200b9 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c

[PATCH 23/24] USB: serial: ftdi_sio: simplify TIOCGSERIAL permission check

2021-04-07 Thread Johan Hovold
for ASYNC flags so there's no need to try to retain any other bits when updating the flags. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c

[PATCH 11/24] USB: serial: quatech2: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver") Signed-off-by: Johan Hovold --- drivers/

[PATCH 18/24] USB: serial: whiteheat: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Signed-off-by: Johan Hovold --- drivers/usb/serial/whiteheat.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial

[PATCH 15/24] USB: serial: usb_wwan: fix TIOCSSERIAL jiffies conversions

2021-04-07 Thread Johan Hovold
avoid blocking close(2)") Cc: sta...@vger.kernel.org # 2.6.38 Signed-off-by: Johan Hovold --- drivers/usb/serial/usb_wwan.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 46d46a4f99c9..4e9c994a9

[PATCH 16/24] USB: serial: usb_wwan: fix unprivileged TIOCCSERIAL

2021-04-07 Thread Johan Hovold
: 02303f73373a ("usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)") Signed-off-by: Johan Hovold --- drivers/usb/serial/usb_wwan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c index 4e9c994a972a..e7

[PATCH 17/24] USB: serial: usb_wwan: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
, respectively. Fixes: 02303f73373a ("usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)") Signed-off-by: Johan Hovold --- drivers/usb/serial/usb_wwan.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_ww

[PATCH 12/24] USB: serial: ssu100: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: 52af95459939 ("USB: add USB serial ssu100 driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/ss

[PATCH 14/24] USB: serial: ti_usb_3410_5052: fix TIOCSSERIAL permission check

2021-04-07 Thread Johan Hovold
Changing the port closing-wait parameter is a privileged operation so make sure to return -EPERM if a regular user tries to change it. Cc: sta...@vger.kernel.org Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions

[PATCH 13/24] USB: serial: ti_usb_3410_5052: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
not yet support changing close_delay, but let's report back the default value actually used (0.5 seconds). Signed-off-by: Johan Hovold --- drivers/usb/serial/ti_usb_3410_5052.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers

[PATCH 08/24] USB: serial: mos7840: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7840.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 1bf0d066f55a..77cbe18a1

[PATCH 04/24] USB: serial: ftdi_sio: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
, respectively). Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index c867592477c9..f8a0911f90ea 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial

[PATCH 09/24] USB: serial: opticon: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: faac64ad9c7b ("USB: serial: opticon: add serial line ioctls") Signed-off-by: Johan Hovold --- drivers/

[PATCH 03/24] USB: serial: f81534: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
Signed-off-by: Johan Hovold --- drivers/usb/serial/f81534.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c index a763b362f081..c9f90d437e3a 100644 --- a/drivers/usb/serial/f81534.c +++ b/drivers/usb/serial/f81534.c

[PATCH 10/24] USB: serial: pl2303: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
values actually used (0.5 and 30 seconds, respectively). Signed-off-by: Johan Hovold --- drivers/usb/serial/pl2303.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index eed9acd1ae08..0455add8593a 100644

[PATCH 05/24] USB: serial: io_edgeport: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 68401adcffde..471a1a04c9c3 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb

[PATCH 01/24] USB: serial: ark3116: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
values actually used (0.5 and 30 seconds, respectively). Fixes: 2f430b4bbae7 ("USB: ark3116: Add TIOCGSERIAL and TIOCSSERIAL ioctl calls.") Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH 06/24] USB: serial: io_ti: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds (not jiffies). The driver does not yet support changing close_delay, but let's report back the default value actually used (0.5 seconds). Signed-off-by: Johan Hovold

[PATCH 02/24] USB: serial: f81232: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
Signed-off-by: Johan Hovold --- drivers/usb/serial/f81232.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index 6a8f39147d8e..af0fe2a82eb2 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial/f81232.c

[PATCH 00/24] USB: serial: TIOCSSERIAL fixes and generic support

2021-04-07 Thread Johan Hovold
serial drivers. Johan Johan Hovold (24): USB: serial: ark3116: fix TIOCGSERIAL implementation USB: serial: f81232: fix TIOCGSERIAL implementation USB: serial: f81534: fix TIOCGSERIAL implementation USB: serial: ftdi_sio: fix TIOCGSERIAL implementation USB: serial: io_edgeport: fix

[PATCH 07/24] USB: serial: mos7720: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
: 0f64478cbc7a ("USB: add USB serial mos7720 driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/mos7720.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index bb3d39307d93..db90ce560d42 100644 ---

[PATCH 0/3] USB: cdc-acm: TIOCSSERIAL fixes

2021-04-07 Thread Johan Hovold
This series fixes up a few issues with cdc-acm TIOCSSERIAL implementation. Johan Johan Hovold (3): Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL" USB: cdc-acm: fix unprivileged TIOCCSERIAL USB: cdc-acm: fix TIOCGSERIAL implementation drivers/usb/class/cdc-

[PATCH 2/3] USB: cdc-acm: fix unprivileged TIOCCSERIAL

2021-04-07 Thread Johan Hovold
: ba2d8ce9db0a ("cdc-acm: implement TIOCSSERIAL to avoid blocking close(2)") Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 96e221803fa6..43e31dad4831 100644 --- a/d

[PATCH 1/3] Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL"

2021-04-07 Thread Johan Hovold
. Cc: Anthony Mallet Cc: sta...@vger.kernel.org Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 3fda1ec961d7..96e221803fa6 100644 --- a/drivers

[PATCH 3/3] USB: cdc-acm: fix TIOCGSERIAL implementation

2021-04-07 Thread Johan Hovold
users to run setserial with cdc-acm") Signed-off-by: Johan Hovold --- drivers/usb/class/cdc-acm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 43e31dad4831..b74713518b3a 100644 --- a/drivers/usb/class

[PATCH 16/16] tty: synclink_gt: drop redundant tty-port initialisation

2021-04-07 Thread Johan Hovold
The port close_delay and closing_wait parameters have already been by tty_port_init() so drop the redundant driver initialisation to the default values. Signed-off-by: Johan Hovold --- drivers/tty/synclink_gt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/synclink_gt.c b

[PATCH 15/16] pcmcia: synclink_cs: drop redundant tty-port initialisation

2021-04-07 Thread Johan Hovold
The port close_delay and closing_wait parameters have already been by tty_port_init() so drop the redundant driver initialisation to the default values. Signed-off-by: Johan Hovold --- drivers/char/pcmcia/synclink_cs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/char/pcmcia

[PATCH 14/16] tty: mxser: fix TIOCSSERIAL permission check

2021-04-07 Thread Johan Hovold
Signed-off-by: Johan Hovold --- drivers/tty/mxser.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 914b23071961..2d8e76263a25 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c @@ -1270,6 +1270,7 @@ static int

[PATCH 13/16] tty: mxser: fix TIOCSSERIAL jiffies conversions

2021-04-07 Thread Johan Hovold
-by: Johan Hovold --- drivers/tty/mxser.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 4203b64bccdb..914b23071961 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c @@ -1208,19 +1208,26 @@ static

[PATCH 11/16] tty: moxa: fix TIOCSSERIAL permission check

2021-04-07 Thread Johan Hovold
Changing the port close delay or type are privileged operations so make sure to return -EPERM if a regular user tries to change them. Cc: sta...@vger.kernel.org Signed-off-by: Johan Hovold --- drivers/tty/moxa.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git

[PATCH 12/16] tty: moxa: fix TIOCSSERIAL implementation

2021-04-07 Thread Johan Hovold
consistently. Signed-off-by: Johan Hovold --- drivers/tty/moxa.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index 63e440d900ff..4d4f15b5cd29 100644 --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c @@ -2055,11 +2055,6 @@ static int moxa_set_serial_info

[PATCH 09/16] tty: amiserial: add missing TIOCSSERIAL jiffies conversions

2021-04-07 Thread Johan Hovold
is not 100. Signed-off-by: Johan Hovold --- drivers/tty/amiserial.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index ec6802ba2bf8..ca48ce5a0862 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty

[PATCH 08/16] tty: amiserial: fix TIOCSSERIAL permission check

2021-04-07 Thread Johan Hovold
Changing the port closing_wait parameter is a privileged operation. Add the missing check to TIOCSSERIAL so that -EPERM is returned in case an unprivileged user tries to change the closing-wait setting. Cc: sta...@vger.kernel.org Signed-off-by: Johan Hovold --- drivers/tty/amiserial.c | 1 + 1

[PATCH 07/16] staging: greybus: uart: clean up TIOCGSERIAL

2021-04-07 Thread Johan Hovold
drivers like ftdi_sio have been using PORT_UNKNOWN for twenty years without any problems. Drop the bogus values provided by the greybus implementation. Signed-off-by: Johan Hovold --- drivers/staging/greybus/uart.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/greybus/uart.c

[PATCH 10/16] tty: moxa: fix TIOCSSERIAL jiffies conversions

2021-04-07 Thread Johan Hovold
The port close_delay parameter set by TIOCSSERIAL is specified in jiffies, while the value returned by TIOCGSERIAL is specified in centiseconds. Add the missing conversions so that TIOCGSERIAL works as expected also when HZ is not 100. Cc: sta...@vger.kernel.org Signed-off-by: Johan Hovold

  1   2   3   4   5   6   7   8   9   10   >