Re: Lack of length checking in USB configuration may allow buffer overflow

2019-05-14 Thread Greg KH
On Mon, May 13, 2019 at 07:14:38PM -0700, Rick Mark wrote: > Hey All, > > I was seeing a linux VM crash due to malformed USB configuration > payloads being malformed. I'm testing this patch now which should > provide better security checking (but this is my first patch so be > kind if I have thin

[PATCH v2 6/8] ARM: dts: imx7ulp: add imx7ulp USBOTG1 support

2019-05-14 Thread Peter Chen
Add imx7ulp USBOTG1 support. Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx7ulp.dtsi | 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot/dts/imx7ulp.dtsi index fca6e50f37c8..60c9ea116d0a 100644 --- a/arch/arm/bo

[PATCH v2 4/8] doc: dt-binding: usbmisc-imx: add compatible string for imx7ulp

2019-05-14 Thread Peter Chen
Add compatible string for imx7ulp Reviewed-by: Rob Herring 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/usbmi

[PATCH v2 5/8] usb: chipidea: imx: add imx7ulp support

2019-05-14 Thread Peter Chen
Add imx7ulp support Signed-off-by: Peter Chen --- drivers/usb/chipidea/ci_hdrc_imx.c | 28 +++- drivers/usb/chipidea/usbmisc_imx.c | 4 include/linux/usb/chipidea.h | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/ci_

[PATCH v2 3/8] doc: dt-binding: ci-hdrc-usb2: add compatible string for imx7ulp

2019-05-14 Thread Peter Chen
Add compatible string for imx7ulp. Reviewed-by: Rob Herring 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

[PATCH v2 7/8] ARM: dts: imx7ulp-evk: enable USBOTG1 support

2019-05-14 Thread Peter Chen
Enable USBOTG1 support for evk board, it is dual-role function port. Signed-off-by: Peter Chen --- arch/arm/boot/dts/imx7ulp-evk.dts | 35 +++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/imx7ulp-evk.dts b/arch/arm/boot/dts/imx7ulp-evk.dts ind

[PATCH v2 8/8] usb: chipidea: imx: "fsl,usbphy" phandle is not mandatory now

2019-05-14 Thread Peter Chen
Since the chipidea common code support get the USB PHY phandle from "phys", the glue layer is not mandatory to get the "fsl,usbphy" phandle any more. Signed-off-by: Peter Chen --- drivers/usb/chipidea/ci_hdrc_imx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH v2 1/8] doc: dt-binding: mxs-usb-phy: add compatible for 7ulp

2019-05-14 Thread Peter Chen
Add compatible for 7ulp USB PHY. Reviewed-by: Rob Herring Signed-off-by: Peter Chen --- Documentation/devicetree/bindings/phy/mxs-usb-phy.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/mxs-usb-phy.txt b/Documentation/devicetree/bindings/phy/mxs-us

[PATCH v2 2/8] usb: phy: phy-mxs-usb: add imx7ulp support

2019-05-14 Thread Peter Chen
At imx7ulp, the USB related analog register is located in PHY register region too, so we need to control PLL at PHY driver directly. Signed-off-by: Peter Chen --- drivers/usb/phy/phy-mxs-usb.c | 76 ++- 1 file changed, 75 insertions(+), 1 deletion(-) diff

[PATCH v2 0/8] Add imx7ulp USBOTG1 support

2019-05-14 Thread Peter Chen
Changes for v2: - Use common 'phys' property [Patch 6/8] - Add the last patch that "fsl,usbphy" phandle is not mandatory now [Patch 8/8] - Add Reviewed-by from Rob. There is a dual-role USB controller at imx7ulp, we add support for it in this patch set, and the dual-role function is tested at imx7

Re: [PATCH v2 2/8] usb: phy: phy-mxs-usb: add imx7ulp support

2019-05-14 Thread Chunfeng Yun
On Tue, 2019-05-14 at 07:38 +, Peter Chen wrote: > At imx7ulp, the USB related analog register is located in PHY register > region too, so we need to control PLL at PHY driver directly. > > Signed-off-by: Peter Chen > --- > drivers/usb/phy/phy-mxs-usb.c | 76 > ++

Re: [BUG REPORT] usb: dwc3: "failed to enable ep0out" when enabling mass storage mode

2019-05-14 Thread Felipe Balbi
Hi, e...@gnarbox.com writes: > Hi Felipe, > > I'm picking up a bug my coworker Rob touched on in this thread: > https://marc.info/?l=linux-usb&m=155349928622570&w=2 > > We occasionally see the following dmesg when enabling mass storage mode: > > dwc3 dwc3.1.auto: failed to enable ep0out >

[v5 PATCH 0/6] add USB Type-B GPIO connector driver

2019-05-14 Thread Chunfeng Yun
Because the USB Connector is introduced and the requirement of usb-connector.txt binding, the old way using extcon to support USB Dual-Role switch is now deprecated, meanwhile there is no available common driver when use Type-B connector, typically using an input GPIO to detect USB ID pin. This pat

[PATCH v5 2/6] dt-bindings: usb: add binding for Type-B GPIO connector driver

2019-05-14 Thread Chunfeng Yun
It's used to support dual role switch via GPIO when use Type-B receptacle, typically the USB ID pin is connected to an input GPIO pin Signed-off-by: Chunfeng Yun --- v5 changes: 1. treat type-B connector as child device of USB controller's, but not as a separate virtual device, suggested by

[PATCH v5 6/6] usb: mtu3: register a USB Role Switch for dual role mode

2019-05-14 Thread Chunfeng Yun
Because extcon is not allowed for new bindings, and the dual role switch is supported by USB Role Switch, especially for Type-C drivers, so register a USB Role Switch to support the new way Signed-off-by: Chunfeng Yun --- v5 no change v4 changes: 1. assign fwnode member of usb_role_switch stru

[PATCH v5 5/6] usb: roles: add USB Type-B GPIO connector driver

2019-05-14 Thread Chunfeng Yun
Due to the requirement of usb-connector.txt binding, the old way using extcon to support USB Dual-Role switch is now deprecated when use Type-B connector. This patch introduces a driver of Type-B connector which typically uses an input GPIO to detect USB ID pin, and try to replace the function prov

[PATCH v5 3/6] dt-bindings: usb: mtu3: add properties about USB Role Switch

2019-05-14 Thread Chunfeng Yun
Now the USB Role Switch is supported, so add properties about it, and modify some description related. Signed-off-by: Chunfeng Yun --- v5 changes 1. modify decription about extcon and vbus-supply properties 2. make this patch depend on [1] [1]: [v3] dt-binding: usb: add usb-role-switch proper

[PATCH v5 1/6] dt-bindings: connector: add optional properties for Type-B

2019-05-14 Thread Chunfeng Yun
Add id-gpios, vbus-gpios, vbus-supply and pinctrl properties for usb-b-connector Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring --- v5 no changes v4 no changes v3 changes: 1. add GPIO direction, and use fixed-regulator for GPIO controlled VBUS regulator suggested by Rob; v2 changes:

[PATCH v5 4/6] usb: roles: add API to get usb_role_switch by node

2019-05-14 Thread Chunfeng Yun
Add fwnode_usb_role_switch_get() to make easier to get usb_role_switch by fwnode which register it. It's useful when there is not device_connection registered between two drivers and only knows the fwnode which register usb_role_switch. Signed-off-by: Chunfeng Yun Tested-by: Biju Das --- v5 chan

Re: [REGRESSION] usb: gadget: f_fs: Allow scatter-gather buffers

2019-05-14 Thread Andrzej Pietrasiewicz
Hi, W dniu 13.05.2019 o 20:09, John Stultz pisze: On Mon, May 13, 2019 at 7:08 AM Andrzej Pietrasiewicz wrote: Do you get "functionfs read size 512 > requested size 24, splitting request into multiple reads" message when problems happen? Unfortunately no. Actually that's a fortunate o

[PATCH] usb: cp210x: Add cp2108 GPIOs support

2019-05-14 Thread Serge Semin
Each chip from the cp210x series got GPIOs on board. This commit provides the support for sixteen ones placed on the cp2108 four-ports serial console controller. All of the GPIOs are equally distributed to four USB interfaces in accordance with GPIOs alternative functions attachment. cp2108 GPIOs

Re: [PATCH 1/2] usbip: Remove repeated setting of hcd->state in vhci_bus_suspend()

2019-05-14 Thread Suwan Kim
On Wed, May 08, 2019 at 11:28:05AM -0600, shuah wrote: > On 5/7/19 9:49 AM, Suwan Kim wrote: > > Hi Shuah, > > > > On Mon, May 06, 2019 at 09:13:02AM -0600, shuah wrote: > > > On 5/6/19 6:55 AM, Suwan Kim wrote: > > > > When hcd suspends execution, hcd_bus_suspend() calls vhci_bus_suspend() > > >

Re: [PATCH v2 5/8] usb: chipidea: imx: add imx7ulp support

2019-05-14 Thread Fabio Estevam
Hi Peter, On Tue, May 14, 2019 at 4:39 AM Peter Chen wrote: > > Add imx7ulp support Since you are adding a new flag CI_HDRC_PMQOS, it would be nice to expand the commit log a bit to explain about it.

Re: USB fuzzing with syzbot

2019-05-14 Thread Andrey Konovalov
From: Greg Kroah-Hartman Date: Thu, Apr 25, 2019 at 4:25 PM To: Andrey Konovalov Cc: Alan Stern, Gustavo A. R. Silva, USB list, Dmitry Vyukov, Kostya Serebryany, Alexander Potapenko > On Thu, Apr 25, 2019 at 02:44:11PM +0200, Andrey Konovalov wrote: > > On Wed, Apr 24, 2019 at 6:05 PM Andrey Kono

Re: [PATCH 1/5] USB: serial: fix unthrottle races

2019-05-14 Thread Sasha Levin
On Mon, May 13, 2019 at 02:59:09PM +0200, Johan Hovold wrote: On Mon, May 13, 2019 at 02:51:31PM +0200, Greg Kroah-Hartman wrote: On Mon, May 13, 2019 at 01:46:01PM +0200, Johan Hovold wrote: > Thanks. The issue has been there since v3.3 so I guess you could queue > it for all stable trees.

Re: [PATCH 1/5] USB: serial: fix unthrottle races

2019-05-14 Thread Johan Hovold
On Tue, May 14, 2019 at 08:53:53AM -0400, Sasha Levin wrote: > On Mon, May 13, 2019 at 02:59:09PM +0200, Johan Hovold wrote: > >On Mon, May 13, 2019 at 02:51:31PM +0200, Greg Kroah-Hartman wrote: > >> On Mon, May 13, 2019 at 01:46:01PM +0200, Johan Hovold wrote: > > > >> > Thanks. The issue has bee

Re: Lack of length checking in USB configuration may allow buffer overflow

2019-05-14 Thread Alan Stern
On Mon, 13 May 2019, Rick Mark wrote: > Hey All, > > I was seeing a linux VM crash due to malformed USB configuration > payloads being malformed. Can you provide more information about this crash? I would like to know exactly what errors are occurring. As far as I can tell, the existing code

[RFC PATCH v2 2/3] usb: host: ohci-sm501: init genalloc for local memory

2019-05-14 Thread laurentiu . tudor
From: Laurentiu Tudor In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. For context, see thr

[RFC PATCH v2 0/3] prerequisites for device reserved local mem rework

2019-05-14 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. Current implementation was relying on a short c

[RFC PATCH v2 1/3] USB: use genalloc for USB HCs with local memory

2019-05-14 Thread laurentiu . tudor
From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. Current implementation was relying on a short c

[RFC PATCH v2 3/3] usb: host: ohci-tmio: init genalloc for local memory

2019-05-14 Thread laurentiu . tudor
From: Laurentiu Tudor In preparation for dropping the existing "coherent" dma mem declaration APIs, replace the current dma_declare_coherent_memory() based mechanism with the creation of a genalloc pool that will be used in the OHCI subsystem as replacement for the DMA APIs. For context, see thr

Re: [RFC PATCH v2 1/3] USB: use genalloc for USB HCs with local memory

2019-05-14 Thread Christoph Hellwig
> @@ -136,6 +137,10 @@ void *hcd_buffer_alloc( > if (size <= pool_max[i]) > return dma_pool_alloc(hcd->pool[i], mem_flags, dma); > } > + > + if (hcd->driver->flags & HCD_LOCAL_MEM) > + return gen_pool_dma_alloc(hcd->localmem_pool, size, dma)

[BUG] usb: xhci: Possible resource leaks when xhci_run() fails

2019-05-14 Thread Jia-Ju Bai
xhci_pci_setup() is assigned to hc_driver.reset; xhci_run() is assigned to hc_driver.start(); xhci_stop() is assigned to hc_driver.stop(). xhci_pci_setup() calls xhci_gen_setup, which calls xhci_init(). And xhci_init() calls xhci_mem_init() to allocate resources. xhci_stop() calls xhci_mem_cle

[PATCH v3 04/15] dt-bindings: rcar-gen3-phy-usb2: Document use of usb_x1

2019-05-14 Thread Chris Brandt
Document the USB_X1 input and add clock-names to identify functional and USB_X1 clocks. Signed-off-by: Chris Brandt --- v3: * added clock names v2: * removed 'use_usb_x1' option * document that 'usb_x1' clock node will be detected to determine if 48MHz clock exists --- Documentation/device

[PATCH v3 02/15] ARM: dts: rza2mevb: Add 48MHz USB clock

2019-05-14 Thread Chris Brandt
The RZ/A2M EVB has a 48MHz clock attached to USB_X1. Signed-off-by: Chris Brandt Reviewed-by: Simon Horman --- v2: * added reviewed-by --- arch/arm/boot/dts/r7s9210-rza2mevb.dts | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/r7s9210-rza2mevb.dts b/arch/arm/boot/dts

[PATCH v3 12/15] dt-bindings: usb: renesas_usbhs: Add support for r7s9210

2019-05-14 Thread Chris Brandt
Add support for r7s9210 (RZ/A2M) SoC Signed-off-by: Chris Brandt --- Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt in

[PATCH v3 08/15] usb: renesas_usbhs: move flags to param

2019-05-14 Thread Chris Brandt
Move options from 'flags' field in private structure to param structure where other options are already being kept. Signed-off-by: Chris Brandt --- drivers/usb/renesas_usbhs/common.c | 23 +++ drivers/usb/renesas_usbhs/common.h | 2 -- include/linux/usb/renesas_usbhs.h | 1

[PATCH v3 11/15] usb: renesas_usbhs: Add support for RZ/A2

2019-05-14 Thread Chris Brandt
The RZ/A2 is similar to the R-Car Gen3 with some small differences. Signed-off-by: Chris Brandt --- v3: * Removed check for CONFIG_GENERIC_PHY * rebase on top of Shimoda-san (v2) patch v2: * combined RZA1 and RZA2 for fifo setting * added braces to make code easier to read * fixed and clean

[PATCH v3 00/15] usb: Add host and device support for RZ/A2

2019-05-14 Thread Chris Brandt
NOTE: This series requires the follow patch from Shimoda-san. [PATCH v2] usb: renesas_usbhs: Use specific struct instead of USBHS_TYPE_* enums For the most part, the RZ/A2 has the same USB 2.0 host and device HW as the R-Car Gen3, so we can reuse a lot of the code. However, there are a coup

[PATCH v3 06/15] dt-bindings: rcar-gen3-phy-usb2: Document dr_mode

2019-05-14 Thread Chris Brandt
Document the optional dr_mode property Signed-off-by: Chris Brandt --- Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicetree/bindings/phy/rcar-ge

[PATCH v3 15/15] ARM: dts: rza2mevb: Add USB host support

2019-05-14 Thread Chris Brandt
Enable USB Host support for both the Type-C connector on the CPU board and the Type-A plug on the sub board. Both boards are also capable of USB Device operation as well after the appropriate Device Tree modifications. Signed-off-by: Chris Brandt --- v2: * added blank line between nodes * remo

[PATCH v3 10/15] usb: renesas_usbhs: support byte addressable CFIFO

2019-05-14 Thread Chris Brandt
Some SoC have a CFIFO register that is byte addressable. This means when the CFIFO access is set to 32-bit, you can write 8-bit values to addresses CFIFO+0, CFIFO+1, CFIFO+2, CFIFO+3. Signed-off-by: Chris Brandt --- v2: * options ahve moved from flags to param --- drivers/usb/renesas_usbhs/fifo

[PATCH v3 13/15] ARM: dts: r7s9210: Add USB Host support

2019-05-14 Thread Chris Brandt
Add EHCI and OHCI host support for RZ/A2. Signed-off-by: Chris Brandt --- v3: * add usb_x1 as a clock source * add clock-names v2: * changed to generic name usb@xxx * Add space between compatible strings --- arch/arm/boot/dts/r7s9210.dtsi | 66 ++ 1

[PATCH v3 01/15] ARM: dts: r7s9210: Add USB clock

2019-05-14 Thread Chris Brandt
Add USB clock node. If present, this clock input must be 48MHz. Signed-off-by: Chris Brandt Reviewed-by: Simon Horman --- v2: * added reviewed-by --- arch/arm/boot/dts/r7s9210.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/r7s9210.dtsi b/arch/arm/boot/dts/r7s

[PATCH v3 03/15] phy: renesas: rcar-gen3-usb2: detect usb_x1 clock

2019-05-14 Thread Chris Brandt
The RZ/A2 has an optional dedicated 48MHz clock input for the PLL. If a clock node named 'usb_x1' exists and set to non-zero, then we can assume we want it use it. Signed-off-by: Chris Brandt --- v3: * avoid magic number * use devm_clk_get and clk_get_rate v2: * use 'usb_x1' clock node instead

[PATCH v3 07/15] dt-bindings: rcar-gen3-phy-usb2: Add r7s9210 support

2019-05-14 Thread Chris Brandt
Document RZ/A2 (R7S9210) SoC bindings. Signed-off-by: Chris Brandt --- Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt b/Documentation/devicet

[PATCH v3 14/15] ARM: dts: r7s9210: Add USB Device support

2019-05-14 Thread Chris Brandt
Add USB Device support for RZ/A2. Signed-off-by: Chris Brandt --- v2: * changed to generic name usb@xxx * Add space between compatible strings --- arch/arm/boot/dts/r7s9210.dtsi | 24 1 file changed, 24 insertions(+) diff --git a/arch/arm/boot/dts/r7s9210.dtsi b/arch/

Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem rework

2019-05-14 Thread Robin Murphy
+Fredrik, Juergen On 14/05/2019 15:38, laurentiu.tu...@nxp.com wrote: From: Laurentiu Tudor For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. This is in preparation for dropping the existing "coherent"

[PATCH v3 09/15] usb: renesas_usbhs: add support for CNEN bit

2019-05-14 Thread Chris Brandt
For some SoC, CNEN must be set for USB Device mode operation. Signed-off-by: Chris Brandt --- v2: * options are now held in param --- drivers/usb/renesas_usbhs/common.c | 6 ++ drivers/usb/renesas_usbhs/common.h | 1 + include/linux/usb/renesas_usbhs.h | 1 + 3 files changed, 8 insertions(

[PATCH v3 05/15] phy: renesas: rcar-gen3-usb2: Check dr_mode when not using OTG

2019-05-14 Thread Chris Brandt
When not using OTG, the PHY will need to know if it should function as host or peripheral by checking dr_mode in the PHY node (not the parent controller node). Signed-off-by: Chris Brandt --- v3: * changed 'if' to 'switch' * use rcar_gen3_set_host_mode() instead of writel() v2: * added braces

Re: [BUG] usb: xhci: Possible resource leaks when xhci_run() fails

2019-05-14 Thread Greg KH
On Tue, May 14, 2019 at 10:58:05PM +0800, Jia-Ju Bai wrote: > xhci_pci_setup() is assigned to hc_driver.reset; > xhci_run() is assigned to hc_driver.start(); > xhci_stop() is assigned to hc_driver.stop(). > > xhci_pci_setup() calls xhci_gen_setup, which calls xhci_init(). And > xhci_init() calls x

Re: [PATCH v5 2/6] dt-bindings: usb: add binding for Type-B GPIO connector driver

2019-05-14 Thread Rob Herring
On Tue, May 14, 2019 at 04:47:19PM +0800, Chunfeng Yun wrote: > It's used to support dual role switch via GPIO when use Type-B > receptacle, typically the USB ID pin is connected to an input > GPIO pin > > Signed-off-by: Chunfeng Yun > --- > v5 changes: > 1. treat type-B connector as child devic

Re: [PATCH v5 3/6] dt-bindings: usb: mtu3: add properties about USB Role Switch

2019-05-14 Thread Rob Herring
On Tue, 14 May 2019 16:47:20 +0800, Chunfeng Yun wrote: > Now the USB Role Switch is supported, so add properties about it, > and modify some description related. > > Signed-off-by: Chunfeng Yun > --- > v5 changes > 1. modify decription about extcon and vbus-supply properties > 2. make this pat

Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem rework

2019-05-14 Thread Fredrik Noring
Thanks Robin! > > For HCs that have local memory, replace the current DMA API usage > > with a genalloc generic allocator to manage the mappings for these > > devices. > > This is in preparation for dropping the existing "coherent" dma > > mem declaration APIs. Current implementation was relying o

Re: [PATCH v3 04/15] dt-bindings: rcar-gen3-phy-usb2: Document use of usb_x1

2019-05-14 Thread Rob Herring
On Tue, 14 May 2019 09:55:54 -0500, Chris Brandt wrote: > Document the USB_X1 input and add clock-names to identify > functional and USB_X1 clocks. > > Signed-off-by: Chris Brandt > --- > v3: > * added clock names > v2: > * removed 'use_usb_x1' option > * document that 'usb_x1' clock node will

Re: [PATCH v3 06/15] dt-bindings: rcar-gen3-phy-usb2: Document dr_mode

2019-05-14 Thread Rob Herring
On Tue, 14 May 2019 09:55:56 -0500, Chris Brandt wrote: > Document the optional dr_mode property > > Signed-off-by: Chris Brandt > --- > Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Rob Herring

Re: [PATCH v3 07/15] dt-bindings: rcar-gen3-phy-usb2: Add r7s9210 support

2019-05-14 Thread Rob Herring
On Tue, 14 May 2019 09:55:57 -0500, Chris Brandt wrote: > Document RZ/A2 (R7S9210) SoC bindings. > > Signed-off-by: Chris Brandt > --- > Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > Reviewed-by: Rob Herring

Re: [PATCH v3 12/15] dt-bindings: usb: renesas_usbhs: Add support for r7s9210

2019-05-14 Thread Rob Herring
On Tue, 14 May 2019 09:56:02 -0500, Chris Brandt wrote: > Add support for r7s9210 (RZ/A2M) SoC > > Signed-off-by: Chris Brandt > --- > Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++ > 1 file changed, 2 insertions(+) > Reviewed-by: Rob Herring

[PATCH 2/2] usb: core: hub: Disable hub-initiated U1/U2

2019-05-14 Thread Thinh Nguyen
If the device rejects the control transfer to enable device-initiated U1/U2 entry, then the device will not initiate U1/U2 transition. To improve the performance, the downstream port should not initate transition to U1/U2 to avoid the delay from the device link command response (no packet can be tr

[PATCH 1/2] usb: core: hub: Enable/disable U1/U2 in configured state

2019-05-14 Thread Thinh Nguyen
SET_FEATURE(U1/U2_ENABLE) and CLEAR_FEATURE(U1/U2) only apply while the device is in configured state. Add proper check in usb_disable_lpm() and usb_enable_lpm() for enabling/disabling device-initiated U1/U2. Signed-off-by: Thinh Nguyen --- drivers/usb/core/hub.c | 4 ++-- 1 file changed, 2 inse

Re: [PATCH v2 3/3] usb: dwc3: gadget: Add support for disabling U1 and U2 entries

2019-05-14 Thread Thinh Nguyen
Hi Anurag, Anurag Kumar Vulisha wrote: > Hi Thinh, > >> -Original Message- >> From: Thinh Nguyen [mailto:thinh.ngu...@synopsys.com] >> Sent: Saturday, May 11, 2019 7:18 AM >> To: Anurag Kumar Vulisha ; Thinh Nguyen >> ; Greg Kroah-Hartman >> ; Rob Herring ; Mark Rutland >> ; Felipe Balbi ;

Re: [BUG] usb: xhci: Possible resource leaks when xhci_run() fails

2019-05-14 Thread Jia-Ju Bai
On 2019/5/15 0:55, Greg KH wrote: On Tue, May 14, 2019 at 10:58:05PM +0800, Jia-Ju Bai wrote: xhci_pci_setup() is assigned to hc_driver.reset; xhci_run() is assigned to hc_driver.start(); xhci_stop() is assigned to hc_driver.stop(). xhci_pci_setup() calls xhci_gen_setup, which calls xhci_ini

[PATCH] usb: xhci: Possible resource leaks when xhci_run() fails

2019-05-14 Thread Jia-Ju Bai
xhci_pci_setup() is assigned to hc_driver.reset; xhci_run() is assigned to hc_driver.start(); xhci_stop() is assigned to hc_driver.stop(). xhci_pci_setup() calls xhci_gen_setup, which calls xhci_init(). And xhci_init() calls xhci_mem_init() to allocate resources. xhci_stop() calls xhci_mem_cleanu

RE: [PATCH v2 5/8] usb: chipidea: imx: add imx7ulp support

2019-05-14 Thread Peter Chen
> > On Tue, May 14, 2019 at 4:39 AM Peter Chen wrote: > > > > Add imx7ulp support > > Since you are adding a new flag CI_HDRC_PMQOS, it would be nice to expand the > commit log a bit to explain about it. Ok, I will. Thanks. Peter

RE: [PATCH v2 2/8] usb: phy: phy-mxs-usb: add imx7ulp support

2019-05-14 Thread Peter Chen
> > Signed-off-by: Peter Chen > > --- > > drivers/usb/phy/phy-mxs-usb.c | 76 > > ++- > > 1 file changed, 75 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/usb/phy/phy-mxs-usb.c > > b/drivers/usb/phy/phy-mxs-usb.c index 1b1bb0ad40c3..90c96a8e93

RE: [PATCH v2] usb: renesas_usbhs: Use specific struct instead of USBHS_TYPE_* enums

2019-05-14 Thread Yoshihiro Shimoda
Hi Simon-san, > From: Simon Horman, Sent: Monday, May 13, 2019 9:01 PM > > On Mon, May 13, 2019 at 11:40:29AM +0900, Yoshihiro Shimoda wrote: > > This patch adds a specific struct "usbhs_of_data" to add a new SoC > > data easily instead of code basis in the future. > > > > Signed-off-by: Yoshihir