Re: [PATCH] USB: serial: xr: fix NULL-deref on disconnect

2021-03-01 Thread Johan Hovold
On Fri, Feb 26, 2021 at 11:54:47AM +0100, Mauro Carvalho Chehab wrote: > Em Fri, 26 Feb 2021 11:08:26 +0100 > Johan Hovold escreveu: > > > Claiming the sibling control interface is a bit more involved and > > specifically requires adding support to USB-serial core fo

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

2021-03-12 Thread Johan Hovold
f changelog follow feedback > from Jonhan Hovold mailto:jo...@kernel.org>>. > 03/04/2021: Patch v2 modified format patch as comment from > Johan Hovold mailto:jo...@kernel.org>>: > 1. Break commit message lines at 80 cols > 2. Use kernel u8 and u16 types instead of the c99

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

2021-03-12 Thread Johan Hovold
ption from Device Tree") Cc: sta...@vger.kernel.org # 4.17 Signed-off-by: Johan Hovold --- arch/x86/kernel/apic/apic.c | 5 + 1 file changed, 5 insertions(+) It's been over three months so resending. Can someone please pick this up for 5.12 or -next? Again, my use case for th

Re: [PATCH] usbip: fix vhci races in connection tear down

2021-03-12 Thread Johan Hovold
On Thu, Mar 11, 2021 at 07:27:37PM -0700, Shuah Khan wrote: > vhci_shutdown_connection() references connection state (tcp_socket, > tcp_rx, tcp_tx, sockfd) saved in usbpip_device without holding the > lock. > > Current connection tear down sequence: > Step 1: shutdown the socket > Step 2: stop rx

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

2021-03-15 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 v5 1/3] usb: serial: Add MaxLinear/Exar USB to Serial driver

2021-01-21 Thread Johan Hovold
On Sun, Nov 22, 2020 at 10:38:20PM +0530, Manivannan Sadhasivam wrote: > 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. There are still a few issues with this driver, but I

Re: [PATCH v5 3/3] usb: cdc-acm: Ignore Exar XR21V141X when serial driver is built

2021-01-21 Thread Johan Hovold
On Sun, Nov 22, 2020 at 10:38:22PM +0530, Manivannan Sadhasivam wrote: > From: Mauro Carvalho Chehab > > The RTS/CTS line discipline for this device doesn't follow > the standard. So, in order to properly support TX, a separate > driver is needed. This took a bit of effort to understand, but I t

[PATCH 03/10] USB: serial: xr: use subsystem usb_device at probe

2021-01-21 Thread Johan Hovold
Use the subsystem struct usb_device pointer at probe instead of deriving it from the interface pointer. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial

[PATCH] USB: serial: cp210x: suppress modem-control error on open and close

2021-01-21 Thread Johan Hovold
-RTS when RTS is deasserted and re-asserted). Reported-by: Pho Tran Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index d813a052738f

[PATCH 01/10] USB: serial: xr: fix NULL-deref at probe

2021-01-21 Thread Johan Hovold
Make sure that the probed device has an interface 0 to avoid dereferencing a NULL pointer in case of a malicious device or during USB-descriptor fuzzing. Fixes: a8f54b7bd132 ("USB: serial: add MaxLinear/Exar USB to Serial driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/x

[PATCH 07/10] USB: serial: xr: simplify line-speed logic

2021-01-21 Thread Johan Hovold
Simplify the changed-line-speed conditional expression. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index 2000277bacc1..fc727f4283f2 100644

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

2021-01-21 Thread Johan Hovold
On Sun, Nov 22, 2020 at 10:38:21PM +0530, Manivannan Sadhasivam wrote: > Add gpiochip support for Maxlinear/Exar USB to serial converter > for controlling the available gpios. > > Inspired from cp210x usb to serial converter driver. > > Cc: Linus Walleij > Cc: linux-g...@vger.kernel.org > Signed

Re: [PATCH] USB: serial: option: Adding support for Cinterion MV31

2021-01-21 Thread Johan Hovold
On Wed, Jan 20, 2021 at 12:49:02PM +, SCHEMMEL Hans-Christoph wrote: > Adding support for Cinterion device MV31 for enumeration with PID 0x00B3 and > 0x00B7. Please resend this without using S/MIME encoding and remember to CC linux-...@vger.kernel.org Try sending it to yourself first and make

Re: [PATCH v2] greybus/operation: Drop reference when message has been sent

2021-03-10 Thread Johan Hovold
On Wed, Mar 10, 2021 at 06:17:36AM -0800, Lv Yunlong wrote: > In gb_operation_response_send, get an extra reference > before gb_message_send() with this comment "/* Reference will > be dropped when message has been sent. */". Therefore, we > should drop the got reference not only in the error branc

Re: [PATCH] USB: serial: cp210x: suppress modem-control error on open and close

2021-01-21 Thread Johan Hovold
On Thu, Jan 21, 2021 at 11:29:12AM +0100, Johan Hovold wrote: > The CP210X_SET_MHS request cannot be used to control DTR/RTS when > hardware flow control is enabled and instead returns an error which is > currently logged as: > > cp210x ttyUSB0: failed set request 0x7 status:

[PATCH 04/10] USB: serial: xr: use termios flag helpers

2021-01-21 Thread Johan Hovold
Use the termios flag helpers consistently, including for CRTSCTS. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index 8f81f866d681..52909dccb4dc

[PATCH 10/10] USB: serial: xr: fix B0 handling

2021-01-21 Thread Johan Hovold
: add MaxLinear/Exar USB to Serial driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index f67e7dba9509..483d07dee

[PATCH 09/10] USB: serial: xr: fix pin configuration

2021-01-21 Thread Johan Hovold
t;USB: serial: add MaxLinear/Exar USB to Serial driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index 183731cd2ef7..f67e7dba9509 100644 --- a/d

[PATCH 06/10] USB: serial: xr: clean up line-settings handling

2021-01-21 Thread Johan Hovold
Shift the line-setting values when defining them rather than in set_termios() for consistency and improved readability. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers

[PATCH 08/10] USB: serial: xr: fix gpio-mode handling

2021-01-21 Thread Johan Hovold
Fix the gpio-mode handling so that all the pins are under driver control (i.e. in gpio mode) when hardware flow control is disabled. This is specifically needed to be able to control RTS. Fixes: a8f54b7bd132 ("USB: serial: add MaxLinear/Exar USB to Serial driver") Signed-off-by: Jo

[PATCH 02/10] USB: serial: xr: fix interface leak at disconnect

2021-01-21 Thread Johan Hovold
Make sure to release the control interface at disconnect so that the driver can be unbound without leaking resources (and later rebound). Fixes: a8f54b7bd132 ("USB: serial: add MaxLinear/Exar USB to Serial driver") Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_ser

[PATCH 00/10] USB: serial: xr: fix up remaining issues in new driver

2021-01-21 Thread Johan Hovold
This series fixes the remaining issues in the new MaxLinear driver that were pointed out here: https://lore.kernel.org/r/yalvloqzx8otp...@hovoldconsulting.com Johan Johan Hovold (10): USB: serial: xr: fix NULL-deref at probe USB: serial: xr: fix interface leak at disconnect USB

[PATCH 05/10] USB: serial: xr: document vendor-request recipient

2021-01-21 Thread Johan Hovold
Add the missing device-recipient define to the vendor control requests for completeness. Signed-off-by: Johan Hovold --- drivers/usb/serial/xr_serial.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c

[PATCH 2/7] USB: serial: cp210x: fix modem-control handling

2021-01-25 Thread Johan Hovold
/RTS when opening a port with the line speed set to B0. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 7e4a09b42c99..9378b4bba34b

[PATCH 5/7] USB: serial: cp210x: clean up printk zero padding

2021-01-25 Thread Johan Hovold
Use the 0-flag and a field width to specify zero-padding consistently in printk messages. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index

[PATCH 1/7] USB: serial: cp210x: suppress modem-control errors

2021-01-25 Thread Johan Hovold
crtscts flag to keep track of the hardware flow-control setting and use it to suppress any request to change RTS when auto-RTS is enabled. Note that RTS is still deasserted when disabling the UART as part of close. Reported-by: Pho Tran Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c

[PATCH 7/7] USB: serial: cp210x: clean up auto-RTS handling

2021-01-25 Thread Johan Hovold
Clear the RTS bits of the flow-control request before determining the new value when updating the settings. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c

[PATCH 4/7] USB: serial: cp210x: clean up flow-control debug message

2021-01-25 Thread Johan Hovold
Shorten the flow-control debug message by abbreviating the field names and reducing the value width to two characters. The latter improves readability since all but the least significant byte will almost always be zero anyway. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 4

[PATCH 6/7] USB: serial: cp210x: fix RTS handling

2021-01-25 Thread Johan Hovold
during close (when HUPCL is set). Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 47 +++-- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 4ba3fb096bf1..f00b736f3cd3 100644

Re: [PATCH 00/10] USB: serial: xr: fix up remaining issues in new driver

2021-01-26 Thread Johan Hovold
On Thu, Jan 21, 2021 at 11:29:11AM +0100, Johan Hovold wrote: > This series fixes the remaining issues in the new MaxLinear driver that > were pointed out here: > > https://lore.kernel.org/r/yalvloqzx8otp...@hovoldconsulting.com > Johan Hovold (10): > USB: serial: xr:

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

2021-01-26 Thread Johan Hovold
On Tue, Jan 26, 2021 at 09:16:04PM +0530, Manivannan Sadhasivam wrote: > On Thu, Jan 21, 2021 at 11:19:24AM +0100, Johan Hovold wrote: > > On Sun, Nov 22, 2020 at 10:38:20PM +0530, Manivannan Sadhasivam wrote: > > > Add support for MaxLinear/Exar USB to Serial converters. This

[PATCH 3/7] USB: serial: cp210x: drop shift macros

2021-01-26 Thread Johan Hovold
Drop the macros used to shift the flow-control settings to make the code more readable for consistency with the other requests. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers

Re: [PATCH v3] tty: resolve loopback wait problem for aging serial port

2021-01-04 Thread Johan Hovold
On Wed, Dec 30, 2020 at 02:57:14PM +0100, Greg Kroah-Hartman wrote: > On Wed, Dec 30, 2020 at 09:45:29PM +0800, zhangqiumi...@huawei.com wrote: > > From: Qiumiao Zhang > > > > Because serial port is low-speed device, serial port writing will be > > suspended > > when the buffer of driver layer i

Re: [PATCH] USB: serial: option: add LongSung M5710 module support

2021-01-04 Thread Johan Hovold
On Sun, Dec 27, 2020 at 12:17:16PM +0900, Daniel Palmer wrote: > Add a vendor id for LongSung and a product id for the M5710 module. > > Signed-off-by: Daniel Palmer > --- > drivers/usb/serial/option.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/usb/serial/option.c b/d

Re: [PATCH v3 09/24] wfx: add hwio.c/hwio.h

2021-01-04 Thread Johan Hovold
On Mon, Jan 04, 2021 at 03:34:10PM +0300, Dan Carpenter wrote: > There is a Smatch warning for this, but I hadn't looked at the results > in a while. :/ I'm not sure how many are valid. Some kind of > annotation would be nice. > drivers/usb/class/usblp.c:593 usblp_ioctl() error: doing dma on th

Re: [PATCH] USB: serial: option: add LongSung M5710 module support

2021-01-04 Thread Johan Hovold
On Mon, Jan 04, 2021 at 11:29:39PM +0900, Daniel Palmer wrote: > Hi Johan, > > On Mon, 4 Jan 2021 at 19:32, Johan Hovold wrote: > > > Also, would you mind posting the "lsusb -v" output for this device for > > reference? > > The lsusb from busybox on this

Re: [PATCH v7] usb-serial:cp210x: add support to software flow control

2021-01-18 Thread Johan Hovold
The two kinds of flow control commonly used in serial communication are hardware flow control and software flow control. In serial communication, If you only use RX/TX/GND Pins, you can't do hardware flow. So we often used software flow control and prevent data loss. The user sets th

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

2021-01-25 Thread Johan Hovold
are flow control is being used. > > Signed-off-by: Pho Tran > --- > 01/21/2021: Patch v3 modified based on comment from Greg Kroah-Hartman > > 01/19/2021: Patch v2 Modified based on comment from Johan Hovold > > and Greg Kroah-Hartman Giving credit in the commit log is

[PATCH 0/7] USB: serial: cp210x: modem-control fixes

2021-01-25 Thread Johan Hovold
This series fixes the modem-control handling and its interaction with hardware flow control in the cp210x driver. Johan Johan Hovold (7): USB: serial: cp210x: suppress modem-control errors USB: serial: cp210x: fix modem-control handling USB: serial: cp210x: drop shift macros USB: serial

Re: [PATCH] USB: serial: cp210x: Add pid/vid for WSDA-200-USB

2021-01-25 Thread Johan Hovold
On Mon, Jan 25, 2021 at 09:26:54AM +, Pho Tran wrote: > Information pid/vid of WSDA-200-USB, Lord corporation company: > vid: 199b > pid: ba30 > > Signed-off-by: Pho Tran Applied, thanks. Johan

Re: [PATCH v3 01/12] usb: misc: appledisplay: update to use the usb_control_msg_{send|recv}() API

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 12:03:52AM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated As I mentioned in my comments on v2, a short write has always been treated as an

Re: [PATCH v3 02/12] usb: misc: cypress_cy7c63: update to use usb_control_msg_recv()

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 12:03:53AM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated Short write has always been an error (I won't repeat for the remaining patches).

Re: [PATCH v3 03/12] usb: misc: cytherm: update to use usb_control_msg_recv()

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 12:03:54AM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated > as an error, data can be used off the stack, and raw usb pipes need not be > cre

Re: [PATCH v3 04/12] usb: misc: ehset: update to use the usb_control_msg_{send|recv}() API

2021-01-27 Thread Johan Hovold
ant to mention that in the commit message. And the buffer is small enough that moving it to the stack also for the other test cases isn't an issue (and the redundant memcpy() introduced by the helper is in the noise). So, this looks ok (with an amended commit message dropping the short write bit): Reviewed-by: Johan Hovold Johan

Re: [PATCH v3 05/12] usb: misc: ezusb: update to use usb_control_msg_send()

2021-01-27 Thread Johan Hovold
000); > - > - kfree(transfer_buffer); > - return result; > + address, 0, data, length, 3000, GFP_KERNEL); > } > > static int ezusb_set_reset(struct usb_device *dev, unsigned short cpucs_reg, This is a prime example of how the new helpers should be used. With the short-write bit dropped from the commit message: Reviewed-by: Johan Hovold Johan

Re: [PATCH v3 06/12] usb: misc: iowarrior: update to use the usb_control_msg_{send|recv}() API

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 12:03:57AM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated > as an error, data can be used off the stack, and raw usb pipes need not be > cre

Re: [PATCH v3 08/12] usb: misc: ldusb: update to use usb_control_msg_send()

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 12:03:59AM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated > as an error, data can be used off the stack, and raw usb pipes need not be > cre

Re: [PATCH v3 09/12] usb: misc: lvstest: update to use the usb_control_msg_{send|recv}() API

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 12:09:43AM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated > as an error, data can be used off the stack, and raw usb pipes need not be > cre

Re: [PATCH v3 10/12] usb: misc: trancevibrator: update to use usb_control_msg_send()

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 12:10:10AM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated > as an error, data can be used off the stack, and raw usb pipes need not be > cre

Re: [PATCH v3 07/12] usb: misc: isight_firmware: update to use usb_control_msg_send()

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 12:03:58AM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated > as an error, data can be used off the stack, and raw usb pipes need not be > cre

Re: [PATCH v3 11/12] usb: misc: usbsevseg: update to use usb_control_msg_send()

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 12:10:30AM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated > as an error, data can be used off the stack, and raw usb pipes need not be > cre

Re: [RESEND PATCH v3 12/12] usb: misc: usbtest: update to use the usb_control_msg_{send|recv}() API

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 05:42:47PM +0530, Anant Thazhemadam wrote: > The newer usb_control_msg_{send|recv}() API are an improvement on the > existing usb_control_msg() as it ensures that a short read/write is treated > as an error, data can be used off the stack, and raw usb pipes need not be > cre

Re: [PATCH v3 01/12] usb: misc: appledisplay: update to use the usb_control_msg_{send|recv}() API

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 08:12:21PM +0530, Anant Thazhemadam wrote: > > On 27/01/21 7:28 pm, Johan Hovold wrote: > > On Wed, Jan 27, 2021 at 12:03:52AM +0530, Anant Thazhemadam wrote: > >> The newer usb_control_msg_{send|recv}() API are an improvement on the > >> ex

Re: [PATCH] USB: serial: option: Adding support for Cinterion MV31

2021-01-27 Thread Johan Hovold
On Wed, Jan 27, 2021 at 08:58:46PM +0100, Christoph Schemmel wrote: > Adding support for Cinterion device MV31 for enumeration with > PID 0x00B3 and 0x00B7. > > usb-devices output for 0x00B3 > T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=5000 MxCh= 0 > D: Ver= 3.20 Cls=ef(misc ) Sub=02 P

Re: [PATCH 1/2] staging: greybus: vibrator: use proper API for vibrator devices

2021-01-06 Thread Johan Hovold
On Wed, Jan 06, 2021 at 01:04:04PM +0100, Johan Hovold wrote: > On Tue, Jan 05, 2021 at 04:19:02PM +0100, Greg Kroah-Hartman wrote: > > The correct user/kernel api for vibrator devices is the Input rumble > > api, not a random sysfs file like the greybus vibrator driver cur

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

2020-12-14 Thread Johan Hovold
On Sat, Dec 12, 2020 at 01:03:32AM +0100, Linus Walleij wrote: > On Thu, Dec 10, 2020 at 9:53 AM Johan Hovold wrote: > > On Wed, Dec 09, 2020 at 05:25:32PM +0100, Linus Walleij wrote: > > > I just replied to that thread, but to summarize, you can't rely on > >

Re: [PATCH] gpio: sysfs: Try numbered exports if symbolic names fail

2020-12-14 Thread Johan Hovold
On Sat, Dec 12, 2020 at 12:41:50AM +0100, Linus Walleij wrote: > On Thu, Dec 10, 2020 at 9:33 AM Johan Hovold wrote: > > > I suggested having the driver set a flag which determines whether to use > > the line names in sysfs or not. > > Aha I get it. > > I need to

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

2020-12-14 Thread Johan Hovold
On Mon, Dec 14, 2020 at 10:19:07AM +0100, Linus Walleij wrote: > On Mon, Dec 14, 2020 at 9:58 AM Johan Hovold wrote: > > On Sat, Dec 12, 2020 at 01:03:32AM +0100, Linus Walleij wrote: > > > > If I google for the phrase "Detected name collision for GPIO name"

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

2020-12-14 Thread Johan Hovold
On Fri, Dec 11, 2020 at 08:29:22PM +0800, wanghai (M) wrote: > > 在 2020/12/8 17:35, Johan Hovold 写道: > > On Sat, Dec 05, 2020 at 06:38:27PM +0800, Wang Hai wrote: > >> In gbaudio_dapm_free_controls(), if one of the widgets is not found, an > >> error > >>

Re: [PATCH v5 0/3] Add support for MaxLinear/Exar USB to serial converters

2020-12-14 Thread Johan Hovold
On Tue, Dec 08, 2020 at 04:21:28PM +0530, Manivannan Sadhasivam wrote: > On Sun, Nov 22, 2020 at 10:38:19PM +0530, Manivannan Sadhasivam wrote: > > From: Manivannan Sadhasivam > > > > Hello, > > > > This series adds support for MaxLinear/Exar USB to serial converters. > > This driver only suppor

[PATCH] USB: yurex: fix control-URB timeout handling

2020-12-14 Thread Johan Hovold
+e87ebe0f7913f71f2...@syzkaller.appspotmail.com Fixes: 6bc235a2e24a ("USB: add driver for Meywa-Denki & Kayac YUREX") Cc: stable # 2.6.37 Signed-off-by: Johan Hovold --- drivers/usb/misc/yurex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/misc/yurex.c b/dr

Re: [PATCH] USB: yurex: fix control-URB timeout handling

2020-12-14 Thread Johan Hovold
On Mon, Dec 14, 2020 at 11:44:44AM +0100, Johan Hovold wrote: > Make sure to always cancel the control URB in write() so that it can be > reused after a timeout or spurious CMD_ACK. > > Currently any further write requests after a timeout would fail after > triggering a WARN() in

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

2020-12-14 Thread Johan Hovold
On Thu, Dec 10, 2020 at 10:59:41AM -0800, Mychaela Falconia wrote: > Maarten Brock wrote: > > Personally, I would prefer the VID:PID to enforce the quirk and an > > O_DIRECT (or other) flag used on open() as general backup plan. To > > me a sysfs solution seems illogical. > > A sysfs solution co

Re: WARNING in yurex_write/usb_submit_urb

2020-12-14 Thread Johan Hovold
On Mon, Dec 14, 2020 at 06:48:03AM -0800, syzbot wrote: > Hello, > > syzbot has tested the proposed patch but the reproducer is still triggering > an issue: > WARNING in yurex_write/usb_submit_urb It appears syzbot never tested the patch from the thread. Probably using it's mail interface incorr

Re: WARNING in yurex_write/usb_submit_urb

2020-12-14 Thread Johan Hovold
On Mon, Dec 14, 2020 at 04:06:49PM +0100, Andrey Konovalov wrote: > On Mon, Dec 14, 2020 at 4:02 PM Johan Hovold wrote: > > > > On Mon, Dec 14, 2020 at 06:48:03AM -0800, syzbot wrote: > > > Hello, > > > > > > syzbot has tested the proposed patch but th

Re: [PATCH 0/8] linker-section array fix and clean ups

2020-11-27 Thread Johan Hovold
On Wed, Nov 25, 2020 at 03:51:20PM +0100, Jessica Yu wrote: > I've queued up patches 3, 4, 6, 7, 8 for testing before pushing them > out to modules-next. Thanks, Jessica. Perhaps you can consider taking also the one for setup parameters (patch 5/8) through your tree since its related to the modu

Re: [PATCH v6] usb-serial:cp210x: add support to software flow control

2020-11-27 Thread Johan Hovold
[ Again, please do not top-post. Quoting Greg: A: http://en.wikipedia.org/wiki/Top_post Q: Were do I find info about this thing called top-posting? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is t

Re: [PATCH] tty: serial: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-11-21 Thread Johan Hovold
On Fri, Nov 20, 2020 at 08:00:05PM +, David Laight wrote: > From: Johan Hovold > > Sent: 20 November 2020 12:50 > > > > On Fri, Nov 20, 2020 at 07:25:03PM +0800, tiantao (H) wrote: > > > 在 2020/11/20 16:23, Johan Hovold 写道: > > > > On Thu, Nov 19

[PATCH v2 1/8] of: fix linker-section match-table corruption

2020-11-23 Thread Johan Hovold
OF match table declarations") Fixes: f6e916b82022 ("irqchip: add basic infrastructure") Cc: stable # 3.9 Signed-off-by: Johan Hovold --- include/linux/of.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/of.h b/include/linux/of.h index 5d51891cbf1a..af655d264

[PATCH v2 5/8] init: use type alignment for kernel parameters

2020-11-23 Thread Johan Hovold
akage with the current 4-byte alignment. Signed-off-by: Johan Hovold --- include/linux/init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/init.h b/include/linux/init.h index 7b53cb3092ee..e668832ef66a 100644 --- a/include/linux/init.h +++ b/include/linux/i

[PATCH v2 8/8] params: clean up module-param macros

2020-11-23 Thread Johan Hovold
Clean up the module-param macros by adding some indentation and using the __aligned() macro to improve readability. Signed-off-by: Johan Hovold --- include/linux/moduleparam.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/moduleparam.h b/include/linux

[PATCH v2 2/8] earlycon: simplify earlycon-table implementation

2020-11-23 Thread Johan Hovold
parameters for 16 years and it indeed hasn't changed since the introduction of the aligned attribute in gcc-3.1. Signed-off-by: Johan Hovold --- drivers/of/fdt.c | 7 ++- drivers/tty/serial/earlycon.c | 6 ++ include/linux/serial_core.h | 20 +++- 3 fi

[PATCH v2 7/8] params: use type alignment for kernel parameters

2020-11-23 Thread Johan Hovold
with the current 4-byte alignment. Signed-off-by: Johan Hovold --- include/linux/moduleparam.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 742074ad9f6e..15ecc6cc3a3b 100644 --- a/include/linux/modulepa

[PATCH v2 3/8] module: drop version-attribute alignment

2020-11-23 Thread Johan Hovold
on attribute entries. And with the pointer indirection in place there's no need to increase the alignment of the type. 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/mo

[PATCH v2 4/8] module: simplify version-attribute handling

2020-11-23 Thread Johan Hovold
aviour for kernel parameters for 16 years and it indeed hasn't changed since the introduction of the aligned attribute in gcc-3.1. Signed-off-by: Johan Hovold --- include/linux/module.h | 26 +- kernel/params.c| 10 -- 2 files changed, 17 insertions(+

[PATCH v2 0/8] linker-section array fix and clean ups

2020-11-23 Thread Johan Hovold
when declaring variables v1 - https://lore.kernel.org/r/20201103175711.10731-1-jo...@kernel.org Johan Hovold (8): of: fix linker-section match-table corruption earlycon: simplify earlycon-table implementation module: drop version-attribute alignment module: simplify version-attribute

[PATCH v2 6/8] params: drop redundant "unused" attributes

2020-11-23 Thread Johan Hovold
Drop the redundant "unused" attributes from module-parameter structures already marked "used". Signed-off-by: Johan Hovold --- include/linux/moduleparam.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/moduleparam.h b/include/linux

Re: [PATCH 0/8] linker-section array fix and clean ups

2020-11-23 Thread Johan Hovold
On Fri, Nov 13, 2020 at 03:18:36PM +0100, Johan Hovold wrote: > On Wed, Nov 11, 2020 at 04:47:16PM +0100, Jessica Yu wrote: > > > Thanks for providing the links and references. Your explanation and > > this reply from Jakub [1] clarified things for me. I was not aware of >

Re: [PATCH] cdc-acm: some enhancement on acm delayed write

2014-04-08 Thread Johan Hovold
On Tue, Apr 08, 2014 at 11:05:20AM +0800, Xiao Jin wrote: > We find two problems on acm tty write delayed mechanism. Then you should split this into two patches. > (1) When acm resume, the delayed wb will be started. But now > only one write can be saved during acm suspend. More acm write > may b

Re: usb-serial lockdep trace in linus' current tree.

2013-11-07 Thread Johan Hovold
at /home/johan/src/linux/linux-nu/mm/dmapool.c:310 with usb-next when using a usb-serial console as you seem to do be doing as well. Could be related. Care to give the fix below a try? Thanks, Johan >From 7caaef75ebba3cfa3916b53ce1aee95291802ac4 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date

[PATCH v3 2/3] ARM: at91: fix hanged boot due to early rtt-interrupt

2013-10-16 Thread Johan Hovold
sufficient. Signed-off-by: Johan Hovold --- arch/arm/mach-at91/at91sam9260.c | 2 ++ arch/arm/mach-at91/at91sam9261.c | 2 ++ arch/arm/mach-at91/at91sam9263.c | 3 +++ arch/arm/mach-at91/at91sam9g45.c | 1 + arch/arm/mach-at91/at91sam9rl.c | 1 + arch/arm/mach-at91/generic.h | 1 + arch/arm

[PATCH v3 0/3] ARM: at91: fix hanged boot

2013-10-16 Thread Johan Hovold
sure write has reached the devices - split fix in two patches for RTC and RTT, respectively Johan Hovold (3): ARM: at91: fix hanged boot due to early rtc-interrupt ARM: at91: fix hanged boot due to early rtt-interrupt ARM: at91/rtc: disable interrupts at shutdown arch/arm/mach-at91

[PATCH v3 3/3] ARM: at91/rtc: disable interrupts at shutdown

2013-10-16 Thread Johan Hovold
been installed at next boot. Let us be well-behaved and disable them on clean shutdowns at least (as do the RTT-based rtc-at91sam9 driver). Signed-off-by: Johan Hovold --- drivers/rtc/rtc-at91rm9200.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/rtc/rtc-at91rm9200.c b

[PATCH v3 1/3] ARM: at91: fix hanged boot due to early rtc-interrupt

2013-10-16 Thread Johan Hovold
particular, a user reset is not sufficient. Signed-off-by: Johan Hovold --- arch/arm/mach-at91/Makefile | 2 +- arch/arm/mach-at91/at91sam9g45.c | 2 ++ arch/arm/mach-at91/at91sam9n12.c | 6 arch/arm/mach-at91/at91sam9rl.c | 2

Re: [PATCH 2/9] backlight: atmel-pwm-bl: fix gpio polarity in remove

2013-10-29 Thread Johan Hovold
On Fri, Oct 25, 2013 at 01:09:28PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 11:55 Wed 23 Oct , Johan Hovold wrote: > > Make sure to honour gpio polarity also at remove so that the backlight > > is actually disabled on boards with active-low enable pin. &

Re: [PATCH 4/9] backlight: atmel-pwm-bl: clean up probe error handling

2013-10-29 Thread Johan Hovold
On Fri, Oct 25, 2013 at 01:11:25PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 11:55 Wed 23 Oct , Johan Hovold wrote: > > Clean up probe error handling by checking parameters before any > > allocations and removing an obsolete error label. Also remove > > unneces

Re: [PATCH 9/9] backlight: atmel-pwm-bl: use gpio_request_one

2013-10-29 Thread Johan Hovold
On Fri, Oct 25, 2013 at 01:15:43PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 11:55 Wed 23 Oct , Johan Hovold wrote: > > Use devm_gpio_request_one rather than requesting and setting direction > > in two calls. > > this is the same I do not see any advantage

Re: [PATCH 1/9] backlight: atmel-pwm-bl: fix reported brightness

2013-10-29 Thread Johan Hovold
On Fri, Oct 25, 2013 at 01:08:36PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 11:55 Wed 23 Oct , Johan Hovold wrote: > > The driver supports 16-bit brightness values, but the value returned > > from get_brightness was truncated to eight bits. > > > >

[PATCH v2 2/9] backlight: atmel-pwm-bl: fix gpio polarity in remove

2013-10-29 Thread Johan Hovold
Make sure to honour gpio polarity also at remove so that the backlight is actually disabled on boards with active-low enable pin. Cc: sta...@vger.kernel.org Acked-by: Jingoo Han Signed-off-by: Johan Hovold --- drivers/video/backlight/atmel-pwm-bl.c | 6 -- 1 file changed, 4 insertions

[PATCH v2 5/9] backlight: atmel-pwm-bl: clean up get_intensity

2013-10-29 Thread Johan Hovold
Clean up get_intensity to increase readability. Acked-by: Jingoo Han Signed-off-by: Johan Hovold --- drivers/video/backlight/atmel-pwm-bl.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/video/backlight/atmel-pwm-bl.c b/drivers/video/backlight/atmel

[PATCH v2 0/9] backlight: atmel-pwm-bl: fixes and clean ups

2013-10-29 Thread Johan Hovold
These patches fix a few issues and clean up the atmel-pwm-bl driver somewhat. Acks from Jingoo Han retained on all patches but the slightly modified first patch. Johan v2: - mask returned brightness rather than cast it to u16 (patch 1/9) Johan Hovold (9): backlight: atmel-pwm-bl: fix

[PATCH v2 6/9] backlight: atmel-pwm-bl: remove unused include

2013-10-29 Thread Johan Hovold
Remove unused include of clk.h. Acked-by: Jingoo Han Signed-off-by: Johan Hovold --- drivers/video/backlight/atmel-pwm-bl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/backlight/atmel-pwm-bl.c b/drivers/video/backlight/atmel-pwm-bl.c index abfaada..bfd6a96 100644 --- a

[PATCH v2 8/9] backlight: atmel-pwm-bl: refactor gpio_on handling

2013-10-29 Thread Johan Hovold
Add helper function to control the gpio_on signal. Acked-by: Jingoo Han Signed-off-by: Johan Hovold --- drivers/video/backlight/atmel-pwm-bl.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/video/backlight/atmel-pwm-bl.c b/drivers/video

[PATCH v2 3/9] backlight: atmel-pwm-bl: fix module autoload

2013-10-29 Thread Johan Hovold
Add missing module alias which is needed for module autoloading. Acked-by: Jingoo Han Signed-off-by: Johan Hovold --- drivers/video/backlight/atmel-pwm-bl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/atmel-pwm-bl.c b/drivers/video/backlight/atmel-pwm-bl.c

[PATCH v2 4/9] backlight: atmel-pwm-bl: clean up probe error handling

2013-10-29 Thread Johan Hovold
Clean up probe error handling by checking parameters before any allocations and removing an obsolete error label. Also remove unnecessary reset of private gpio number. Acked-by: Jingoo Han Signed-off-by: Johan Hovold --- drivers/video/backlight/atmel-pwm-bl.c | 31

[PATCH v2 9/9] backlight: atmel-pwm-bl: use gpio_request_one

2013-10-29 Thread Johan Hovold
Use devm_gpio_request_one rather than requesting and setting direction in two calls. Acked-by: Jingoo Han Signed-off-by: Johan Hovold --- drivers/video/backlight/atmel-pwm-bl.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/video/backlight/atmel-pwm

[PATCH v2 7/9] backlight: atmel-pwm-bl: use gpio_is_valid

2013-10-29 Thread Johan Hovold
Use gpio_is_valid rather than open coding the more restrictive != -1 test. Acked-by: Jingoo Han Signed-off-by: Johan Hovold --- drivers/video/backlight/atmel-pwm-bl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/atmel-pwm-bl.c b/drivers

[PATCH v2 1/9] backlight: atmel-pwm-bl: fix reported brightness

2013-10-29 Thread Johan Hovold
The driver supports 16-bit brightness values, but the value returned from get_brightness was truncated to eight bits. Cc: sta...@vger.kernel.org Signed-off-by: Johan Hovold --- drivers/video/backlight/atmel-pwm-bl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

Re: [PATCH] tty: Add C_MSPAR(tty)

2013-10-29 Thread Johan Hovold
On Wed, Oct 23, 2013 at 01:18:21PM +0200, Andrew Lunn wrote: > Add the missing C_MSPAR(tty) macro. Please rename the macro C_CMSPAR to be consistent with the other termios-flag macros (with C_BAUD being the exception that confirms the rule). Thanks, Johan > Signed-off-by: Andrew Lunn > --- > i

Re: [PATCH 2/2] misc: atmel_pwm: set initcall level to subsys

2013-10-30 Thread Johan Hovold
On Tue, Oct 29, 2013 at 04:22:49PM -0700, Greg KH wrote: > On Tue, Oct 22, 2013 at 06:32:40PM +0200, Johan Hovold wrote: > > Even with the atmel_pwm driver and the atmel-pwm-bl backlight driver > > supporting deferred probing, we still want to make sure that any > > pwm-dev

<    6   7   8   9   10   11   12   13   14   15   >