[PATCH 1/2] dt-binding: usb: ci-hdrc-usb2: add imx7ulp compatible

2019-08-19 Thread Peter Chen
Add imx7ulp and imx8qm compatible Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt index a25438

[PATCH 2/2] dt-binding: usb: usbmisc-imx: add imx7ulp compatible

2019-08-19 Thread Peter Chen
Add imx7ulp compatible Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt index a85a631ec434..b353b9

[PATCH 1/1] usb: chipidea: udc: don't do hardware access if gadget has stopped

2019-08-19 Thread Peter Chen
After _gadget_stop_activity is executed, we can consider the hardware operation for gadget has finished, and the udc can be stopped and enter low power mode. So, any later hardware operations (from usb_ep_ops APIs or usb_gadget_ops APIs) should be considered invalid, any deinitializatons has been c

[PATCH 0/1] usb: chipidea: fix for v5.3-rc

2019-08-19 Thread Peter Chen
Hi Greg, When the driver enables runtime pm, it may cause the system hang when plug out the cable from PC. The patch fixes this issue by avoiding hardware accessing at this situation. Peter Chen (1): usb: chipidea: udc: don't do hardware access if gadget has stopped drivers/usb/chipidea/udc.c

[PATCH 3/4] usb: dwc3: gadget: Set BESL config parameter

2019-08-19 Thread Thinh Nguyen
When operating with LPM signals, the controller asserts the deep low-power signal (utmi_l1_suspend_n) to the phy when the BESL value of the LPM token is equal to or greater than DCTL.HIRD_Thres[3:0] (and with DCTL.HIRD_Thres[4] set). Otherwise, the shallow low-power signal (utmi_sleep_n) is asserte

[PATCH 4/4] usb: gadget: composite: Set recommended BESL values

2019-08-19 Thread Thinh Nguyen
Set the recommended BESL deep and baseline values based on the gadget's configuration parameters to the extended BOS descriptor. This feature helps to optimize power savings by maximizing the opportunity for longer L1 residency time. Signed-off-by: Thinh Nguyen --- drivers/usb/gadget/composite.c

[PATCH 2/4] usb: dwc3: Separate field holding multiple properties

2019-08-19 Thread Thinh Nguyen
dwc->hird_threshold field should store "snps,hird_threshold" property only and not a combination of multiple properties. Remove the value of "snps,is-utmi-l1-suspend" property from the field dwc->hird_threshold. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/core.c | 3 +-- drivers/usb/dwc3/

[PATCH 0/4] usb: gadget: Report recommended BESL

2019-08-19 Thread Thinh Nguyen
This patch series add an option for the gadget driver to export recommended BESL value to improve power saving for devices operating with LPM feature. Thinh Nguyen (4): usb: gadget: Export recommended BESL values usb: dwc3: Separate field holding multiple properties usb: dwc3: gadget: Set

[PATCH 1/4] usb: gadget: Export recommended BESL values

2019-08-19 Thread Thinh Nguyen
Currently there's no option for the controller driver to report the recommended Best Effort Service Latency (BESL) when operating with LPM support. Add new fields in usb_dcd_config_params to export the recommended baseline and deep BESL values for the function drivers to set the proper BESL value i

Re: WARNING in wdm_write/usb_submit_urb

2019-08-19 Thread syzbot
syzbot has found a reproducer for the following crash on: HEAD commit:e06ce4da usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=14a8c0b660 kernel config: https://syzkaller.ap

RE: [PATCH v2] usb: typec: ucsi: add support for separate DP altmode devices

2019-08-19 Thread Ajay Gupta
Hi Heikki > On Mon, Aug 05, 2019 at 11:24:13AM -0700, Ajay Gupta wrote: > > From: Ajay Gupta > > > > CCGx controller used on NVIDIA GPU card has two separate display > > altmode for two DP pin assignments. UCSI specification doesn't > > prohibits using separate display altmode. > > > > Current UC

Re: WARNING in kmem_cache_alloc_trace

2019-08-19 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: WARNING in yurex_write/usb_submit_urb [ cut here ] URB c866c77d submitted while active WARNING: CPU: 1 PID: 2816 at drivers/usb/core/urb.c:362 usb_submit_urb+0x10c1/0x13b0 d

Re: WARNING in kmem_cache_alloc_trace

2019-08-19 Thread Alan Stern
On Mon, 19 Aug 2019, Andrey Konovalov wrote: > On Mon, Aug 19, 2019 at 6:18 PM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver > > git tree: https://github.com/google/kasan.git usb-fuzzer

Re: KASAN: use-after-free Read in device_del

2019-08-19 Thread Andrey Konovalov
On Mon, Jun 3, 2019 at 1:41 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:69bbe8c7 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=1684d

Re: BUG: unable to handle kernel paging request in osq_lock

2019-08-19 Thread Andrey Konovalov
On Thu, Apr 18, 2019 at 2:36 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:d34f9519 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan/tree/usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=133

Re: WARNING in kmem_cache_alloc_trace

2019-08-19 Thread Andrey Konovalov
On Mon, Aug 19, 2019 at 6:18 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.txt?x=1694

WARNING in kmem_cache_alloc_trace

2019-08-19 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=16947fce60 kernel config: https://syzkaller.appspot.com/x/.

Re: TL-MR3420 with OpenWRT with a huawei E353 usb dongle

2019-08-19 Thread Dan Williams
On Wed, 2019-08-14 at 22:09 +0200, Greg KH wrote: > On Wed, Aug 14, 2019 at 11:42:53AM -0300, Francisco Ferreiro wrote: > > Hi guys, this is me trying to setup a tp-link TL-MR3420 with > > OpenWRT > > with a huawei E353 usb dongle > > > > hopefully I will try to setup a multiwan along with this t

[PATCH] ARM: s3c64xx: squash samsung_usb_phy.h into setup-usb-phy.c

2019-08-19 Thread Masahiro Yamada
This is only used by arch/arm/mach-s3c64xx/setup-usb-phy.c $ git grep samsung_usb_phy_type include/linux/usb/samsung_usb_phy.h:enum samsung_usb_phy_type { $ git grep USB_PHY_TYPE_DEVICE arch/arm/mach-s3c64xx/setup-usb-phy.c: if (type == USB_PHY_TYPE_DEVICE) arch/arm/mach-s3c64xx/setup-usb-phy.c:

Re: divide error in usbtmc_generic_read

2019-08-19 Thread Andrey Konovalov
On Mon, Aug 19, 2019 at 3:49 PM Oliver Neukum wrote: > > Am Montag, den 19.08.2019, 15:18 +0200 schrieb Andrey Konovalov: > > On Mon, Aug 19, 2019 at 3:09 PM Oliver Neukum wrote: > > > > > > Am Montag, den 19.08.2019, 14:43 +0200 schrieb Andrey Konovalov: > > > > On Mon, Aug 19, 2019 at 2:37 PM O

Re: KASAN: use-after-free Read in iowarrior_disconnect

2019-08-19 Thread syzbot
Hello, syzbot has tested the proposed patch but the reproducer still triggered crash: possible deadlock in usb_deregister_dev usb 4-1: USB disconnect, device number 2 == WARNING: possible circular locking dependency detected 5.3.0-rc4+ #1 No

Re: KASAN: use-after-free Read in iowarrior_disconnect

2019-08-19 Thread Oliver Neukum
Am Montag, den 19.08.2019, 07:48 -0700 schrieb syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver > git tree: https://github.com/google/kasan.git usb-fuzzer > console output: https://syzkaller.appspot.com/x/log.tx

KASAN: use-after-free Read in iowarrior_disconnect

2019-08-19 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=139be30260 kernel config: https://syzkaller.appspot.com/x/.

WARNING in wdm_write/usb_submit_urb

2019-08-19 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=16462bba60 kernel config: https://syzkaller.appspot.com/x/.

KASAN: use-after-free Read in wdm_out_callback

2019-08-19 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=136553ba60 kernel config: https://syzkaller.appspot.com/x/.

KASAN: use-after-free Read in iowarrior_release

2019-08-19 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=14ff437260 kernel config: https://syzkaller.appspot.com/x/.

KASAN: invalid-free in iowarrior_disconnect

2019-08-19 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=15fb03ba60 kernel config: https://syzkaller.appspot.com/x/.

KASAN: use-after-free Read in iowarrior_callback

2019-08-19 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d0847550 usb-fuzzer: main usb gadget fuzzer driver git tree: https://github.com/google/kasan.git usb-fuzzer console output: https://syzkaller.appspot.com/x/log.txt?x=1160577260 kernel config: https://syzkaller.appspot.com/x/.

Re: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-08-19 Thread Alan Stern
On Mon, 19 Aug 2019, Roger Quadros wrote: > On 15/08/2019 17:39, Alan Stern wrote: > > On Thu, 15 Aug 2019, Roger Quadros wrote: > > > >> Felipe & Alan, > >> > >> On 21/07/2019 21:32, Pawel Laszczak wrote: > >>> This patch introduce new Cadence USBSS DRD driver to linux kernel. > >>> > >>> The Ca

Re: Duplicated code in hiddev_open()

2019-08-19 Thread Alan Stern
On Mon, 19 Aug 2019, Oliver Neukum wrote: > Am Freitag, den 16.08.2019, 13:10 -0400 schrieb Alan Stern: > > Oliver and Jiri: > > > > Why is there duplicated code in > > drivers/hid/usbhid/hiddev.c:hiddev_open()? > > > > Line 267: > > /* > > * no need for locking because the USB major nu

Re: reeze while write on external usb 3.0 hard disk [Bug 204095]

2019-08-19 Thread Alan Stern
Let's bring this to the attention of some more people. It looks like the bug that was supposed to be fixed by commit d74ffae8b8dd ("usb-storage: Add a limitation for blk_queue_max_hw_sectors()"), which is part of 5.2.5, but apparently the bug still occurs. Alan Stern On Sat, 17 Aug 2019, Piergio

Re: divide error in usbtmc_generic_read

2019-08-19 Thread Oliver Neukum
Am Montag, den 19.08.2019, 15:18 +0200 schrieb Andrey Konovalov: > On Mon, Aug 19, 2019 at 3:09 PM Oliver Neukum wrote: > > > > Am Montag, den 19.08.2019, 14:43 +0200 schrieb Andrey Konovalov: > > > On Mon, Aug 19, 2019 at 2:37 PM Oliver Neukum wrote: > > > > The original error was a divide by z

Re: divide error in usbtmc_generic_read

2019-08-19 Thread Andrey Konovalov
On Mon, Aug 19, 2019 at 3:09 PM Oliver Neukum wrote: > > Am Montag, den 19.08.2019, 14:43 +0200 schrieb Andrey Konovalov: > > On Mon, Aug 19, 2019 at 2:37 PM Oliver Neukum wrote: > > > > The original error was a divide by zero. The first fix fixed that > > > but still another error showed up. If

Re: divide error in usbtmc_generic_read

2019-08-19 Thread Oliver Neukum
Am Montag, den 19.08.2019, 14:43 +0200 schrieb Andrey Konovalov: > On Mon, Aug 19, 2019 at 2:37 PM Oliver Neukum wrote: > > The original error was a divide by zero. The first fix fixed that > > but still another error showed up. If I propose a fix there are > > other possibilities besides it work

Re: divide error in usbtmc_generic_read

2019-08-19 Thread Andrey Konovalov
On Mon, Aug 19, 2019 at 2:37 PM Oliver Neukum wrote: > > Am Montag, den 19.08.2019, 14:17 +0200 schrieb Andrey Konovalov: > > On Thu, Aug 15, 2019 at 3:31 PM Oliver Neukum wrote: > > > > > > Am Mittwoch, den 14.08.2019, 06:38 -0700 schrieb syzbot: > > > > syzbot has tested the proposed patch but

Re: divide error in usbtmc_generic_read

2019-08-19 Thread Oliver Neukum
Am Montag, den 19.08.2019, 14:17 +0200 schrieb Andrey Konovalov: > On Thu, Aug 15, 2019 at 3:31 PM Oliver Neukum wrote: > > > > Am Mittwoch, den 14.08.2019, 06:38 -0700 schrieb syzbot: > > > syzbot has tested the proposed patch but the reproducer still triggered > > > crash: > > > KASAN: use-afte

Re: [PATCH v2] dt-bindings: usb: renesas_gen3: Rename bindings documentation file to reflect IP block

2019-08-19 Thread Simon Horman
On Sat, Aug 10, 2019 at 01:14:55PM +0200, Greg Kroah-Hartman wrote: > On Sat, Aug 10, 2019 at 08:40:15AM +0200, Geert Uytterhoeven wrote: > > Hi Simon, > > > > On Fri, Aug 9, 2019 at 11:37 PM Simon Horman > > wrote: > > > For consistency with the naming of (most) other documentation files for DT

AW: AW: AW: Strange behaviour of D-Link DUB-1312 USB 3.0 Adapters

2019-08-19 Thread Schmid, Carsten
Hi all, we had a look at the adapters, and it's really a HW issue. Nothing we can follow up here anymore. Let's close it. Thanks! Best regards Carsten Von: Oliver Neukum Gesendet: Montag, 19. August 2019 14:11 An: Schmid, Carsten; f.faine...@gmail.com C

Re: divide error in usbtmc_generic_read

2019-08-19 Thread Andrey Konovalov
On Thu, Aug 15, 2019 at 3:31 PM Oliver Neukum wrote: > > Am Mittwoch, den 14.08.2019, 06:38 -0700 schrieb syzbot: > > syzbot has tested the proposed patch but the reproducer still triggered > > crash: > > KASAN: use-after-free Read in usbtmc_disconnect > > I am afraid that is a difficiency in KASA

Re: AW: AW: Strange behaviour of D-Link DUB-1312 USB 3.0 Adapters

2019-08-19 Thread Oliver Neukum
Am Donnerstag, den 15.08.2019, 12:02 + schrieb Schmid, Carsten : > > > I don't think its a regression. > > > > It would be better to know than to assume. > > > > Happens with kernel 4.14.102 also, not only with 4.14.129. > Looks more HW related. > > > > > > Is there something i can do to

Re: [PATCH v10 0/6] Introduced new Cadence USBSS DRD Driver.

2019-08-19 Thread Roger Quadros
On 15/08/2019 17:39, Alan Stern wrote: > On Thu, 15 Aug 2019, Roger Quadros wrote: > >> Felipe & Alan, >> >> On 21/07/2019 21:32, Pawel Laszczak wrote: >>> This patch introduce new Cadence USBSS DRD driver to linux kernel. >>> >>> The Cadence USBSS DRD Controller is a highly configurable IP Cor

Re: [PATCH] USB: rio500: Fix lockdep violation

2019-08-19 Thread Oliver Neukum
Am Donnerstag, den 15.08.2019, 14:48 +0200 schrieb Greg KH: > On Thu, Aug 08, 2019 at 02:23:00PM -0400, Alan Stern wrote: > > On Thu, 8 Aug 2019, Greg KH wrote: > > > > > On Thu, Aug 08, 2019 at 01:34:08PM -0400, Alan Stern wrote: > > > > The syzbot fuzzer found a lockdep violation in the rio500 d

Re: dwc2 / Raspberry Pi - hardware bug for small transfers results in memory corruption

2019-08-19 Thread Oliver Neukum
Am Freitag, den 16.08.2019, 23:18 +0100 schrieb Jonathan Bell: > On Thu, Aug 15, 2019 at 3:52 PM Oliver Neukum wrote: > > That is an accident waiting to happen. Please make a patch using > > a bounce buffer allocated with knalloc() in > > drivers/media/usb/uvc/uvc_ctrl.c:uvc_ctrl_populate_cache()

Re: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-19 Thread Roger Quadros
Pawel, On 19/08/2019 13:30, Pawel Laszczak wrote: > Hi, > >> >> On 21/07/2019 21:32, Pawel Laszczak wrote: >>> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >>> >>> The Cadence USBSS DRD Controller is a highly configurable IP Core which >>> can be instantiated as Dual-Role De

Re: [PATCH] usb: usb251xb: drop some unused defines

2019-08-19 Thread Uwe Kleine-König
On Mon, Aug 19, 2019 at 12:41:04PM +0200, Greg KH wrote: > On Mon, Aug 19, 2019 at 12:02:11PM +0200, Uwe Kleine-König wrote: > > Signed-off-by: Uwe Kleine-König > > --- > > drivers/usb/misc/usb251xb.c | 5 - > > 1 file changed, 5 deletions(-) > > I can't take a patch without any changelog te

Re: [PATCH] usb: usb251xb: drop some unused defines

2019-08-19 Thread Greg KH
On Mon, Aug 19, 2019 at 12:02:11PM +0200, Uwe Kleine-König wrote: > Signed-off-by: Uwe Kleine-König > --- > drivers/usb/misc/usb251xb.c | 5 - > 1 file changed, 5 deletions(-) I can't take a patch without any changelog text. And you forgot to cc: the usb maintainer, so there's no way this w

Re: Duplicated code in hiddev_open()

2019-08-19 Thread Oliver Neukum
Am Freitag, den 16.08.2019, 13:10 -0400 schrieb Alan Stern: > Oliver and Jiri: > > Why is there duplicated code in > drivers/hid/usbhid/hiddev.c:hiddev_open()? > > Line 267: > /* >* no need for locking because the USB major number >* is shared which usbcore guards against di

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-19 Thread Pawel Laszczak
Hi, > >On 21/07/2019 21:32, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and >> Host Only (XHCI)configurati

[PATCH] usb: usb251xb: drop some unused defines

2019-08-19 Thread Uwe Kleine-König
Signed-off-by: Uwe Kleine-König --- drivers/usb/misc/usb251xb.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index 5f7734c729b1..e2d36da52663 100644 --- a/drivers/usb/misc/usb251xb.c +++ b/drivers/usb/misc/usb251xb.c @@ -25,10 +

RE: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver

2019-08-19 Thread Pawel Laszczak
Hi Roger, > >On 21/07/2019 21:32, Pawel Laszczak wrote: >> This patch introduce new Cadence USBSS DRD driver to Linux kernel. >> >> The Cadence USBSS DRD Controller is a highly configurable IP Core which >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and >> Host Only (XHCI)confi

[PATCH] usb: phy: phy-fsl-usb: Make structure fsl_otg_initdata constant

2019-08-19 Thread Nishka Dasgupta
Static structure fsl_otg_initdata, of type fsl_otg_config, is used only once, when the value of its field otg_port is assigned to another variable. As fsl_otg_initdata.otg_port is of type u8, any changes to its copy do not affect the original, and fsl_otg_initdata itself is never modified. Hence ma

[PATCH] usb: dwc3: qcom: Add of_node_put() before return in register function

2019-08-19 Thread Nishka Dasgupta
The variable dwc3_np in the function dwc3_qcom_of_register_core takes the value returned by of_get_child_by_name, which gets a node but does not put it. This may cause a memory leak. Hence create a new label, err_node_put, that puts dwc3_np and returns the required value, and modify two return stat

[PATCH 1/2] usb: dwc3: st: Add of_node_put() before return in probe function

2019-08-19 Thread Nishka Dasgupta
The local variable child in the function st_dwc3_probe takes the return value of of_get_child_by_name, which gets a node and does not put it. If the function returns without releasing child, this could cause a memory error. Hence put child as soon as there is no more use for it. Also create a new l

[PATCH 2/2] usb: dwc3: st: Add of_dev_put() in probe function

2019-08-19 Thread Nishka Dasgupta
In function st_dwc3_probe, variable child_pdev takes the value returned by of_find_device_by_node, which gets a device pointer but does not put it. If child_pdev is not put before the probe function returns, it may cause a reference leak. Hence put child_pdev after its last usage. Issue found with