Re: usb: dwc2 continuously receiving BNA interrupts on ep0

2019-01-15 Thread Minas Harutyunyan
Hi Maynard, On 1/15/2019 3:36 AM, Maynard CABIENTE wrote: > Hi Minas and John, > > I'm hoping that one of you can help me devise a fix to a system hang issue > caused by BNA interrupts on USB Endpoint 0. > > Our system is using an Altera Cyclone V SoC FPGA on our board with linux > kernel 4.14

Re: [PATCH] USB: serial: cp210x: Fix GPIO in autosuspend

2019-01-15 Thread Johan Hovold
On Mon, Jan 14, 2019 at 08:43:52PM +0100, Karoly Pados wrote: > Current GPIO code in cp210x fails to take USB autosuspend into account, > making it practically impossible to use GPIOs with autosuspend enabled > without user configuration. Fix this like for ftdi_sio in a previous patch. > Tested on

Re: [PATCH] USB: serial: cp210x: Fix GPIO in autosuspend

2019-01-15 Thread Karoly Pados
> I think it's better to add the autopm call to gpio210x_gpio_get/set > only. This will allow for a simpler patch, and keeps the autopm handling > confined to the gpio paths. I'll submit a v2. >> @@ -1383,6 +1397,7 @@ static void cp210x_gpio_set(struct gpio_chip *gc, >> unsigned int gpio, int >>

Re: [PATCH] USB: serial: cp210x: Fix GPIO in autosuspend

2019-01-15 Thread Johan Hovold
On Tue, Jan 15, 2019 at 09:17:58AM +, Karoly Pados wrote: > > I think it's better to add the autopm call to gpio210x_gpio_get/set > > only. This will allow for a simpler patch, and keeps the autopm handling > > confined to the gpio paths. > > I'll submit a v2. > > >> @@ -1383,6 +1397,7 @@ sta

Re: [PATCH] USB: serial: cp210x: Fix GPIO in autosuspend

2019-01-15 Thread Johan Hovold
On Tue, Jan 15, 2019 at 10:26:07AM +0100, Johan Hovold wrote: > On Tue, Jan 15, 2019 at 09:17:58AM +, Karoly Pados wrote: > > > I think it's better to add the autopm call to gpio210x_gpio_get/set > > > only. This will allow for a simpler patch, and keeps the autopm handling > > > confined to th

[PATCH 3/3] usb: dwc3: gadget: remove req->started flag

2019-01-15 Thread Felipe Balbi
Now that we have req->status, we don't need this extra flag anymore. It's safe to remove it. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 2 -- drivers/usb/dwc3/gadget.c | 1 - drivers/usb/dwc3/gadget.h | 2 -- 3 files changed, 5 deletions(-) diff --git a/drivers/usb/dwc3/core.h

[PATCH 1/3] usb: dwc3: gadget: add dwc3_request status tracking

2019-01-15 Thread Felipe Balbi
This patch starts tracking dwc3_request status. A following patch will build on top of this to prevent a request from being queued twice. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 9 + drivers/usb/dwc3/gadget.c | 3 +++ drivers/usb/dwc3/gadget.h | 2 ++ 3 files changed,

[PATCH 2/3] usb: dwc3: gadget: prevent dwc3_request from being queued twice

2019-01-15 Thread Felipe Balbi
Queueing the same request twice can introduce hard-to-debug problems. At least one function driver - Android's f_mtp.c - is known to cause this problem. While that function is out-of-tree, this is a problem that's easy enough to avoid. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c |

[PATCH v2 1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping

2019-01-15 Thread Marco Felsch
Add optional binding to allow USB differential-pair (D+/D-) data lane swapping. The swapping can be specified for each port separately, default is no swapping. Signed-off-by: Marco Felsch --- Changes: v2: - rename property s/sw-dx-lanes-ports/swap-dx-lanes Documentation/devicetree/bindings/usb

[PATCH v2 2/2] usb: usb251xb: add usb data lane port swap feature

2019-01-15 Thread Marco Felsch
The HW can swap the USB differential-pair (D+/D-) for each port separately. So the USB signals can be re-aligned with a misplaced USB connector on the PCB. Signed-off-by: Marco Felsch --- Changes: v2: - rename property s/sw-dx-lanes-ports/swap-dx-lanes - add commentar for future users drivers

Re: [PATCH v2 2/2] usb: usb251xb: add usb data lane port swap feature

2019-01-15 Thread Marco Felsch
Hi, On 19-01-15 12:50, Marco Felsch wrote: > The HW can swap the USB differential-pair (D+/D-) for each port > separately. So the USB signals can be re-aligned with a misplaced > USB connector on the PCB. > > Signed-off-by: Marco Felsch > --- > Changes: > v2: > - rename property s/sw-dx-lanes-p

[PATCH 2/2] usb: chipidea: imx: set power polarity

2019-01-15 Thread Philipp Puschmann
This patch adds support to set the power line polarity for i.MX6q/dl. To let the USB controller control the power it may be necessary to configure the polarity of the power line. So far the polarity was configured by Bootloader or alternatively the power line was muxed as gpio and driven by a regu

[PATCH 1/2] dt-bindings: usb: ci-hdrc-usb2: add property power-active-high

2019-01-15 Thread Philipp Puschmann
Signed-off-by: Philipp Puschmann --- 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 adae82385dd6..8696e3eff6e7 100644

[PATCH] USB:Serial:pl2303:Add new PID to support PL2303TB(TYPE_HX)

2019-01-15 Thread Charles Yeh
Add new PID to support PL2303TB (TYPE_HX) Signed-off-by: Charles Yeh --- drivers/usb/serial/pl2303.c | 1 + drivers/usb/serial/pl2303.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 98e7a5df0f6d..bb3f9aa4a909 100644 --- a/

[PATCH] USB:Serial:pl2303:Add new Pull-UP Mode to support PL2303HXD(TYPE_HX)

2019-01-15 Thread Charles Yeh
The Pull-UP mode only support PL2303HXD,it needs to use addition schematic design. Signed-off-by: Charles Yeh --- drivers/usb/serial/pl2303.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 98e7a5df0f6d..72544e5c9

Re: [PATCH v2 3/4] usb: musb: Extract set toggle as a separate interface

2019-01-15 Thread Matthias Brugger
On 15/01/2019 02:43, min@mediatek.com wrote: > From: Min Guo > > Add a common interface for set data toggle > > Signed-off-by: Min Guo > --- > drivers/usb/musb/musb_host.c | 37 +++-- > 1 file changed, 23 insertions(+), 14 deletions(-) > > diff --git a/d

[PATCH] USB: Fix configuration selection issues introduced in v4.20.0

2019-01-15 Thread Nikolay Yakimov
Commit f13912d3f014a introduced changes to the usb_choose_configuration function to better support USB Audio UAC3-compatible devices. However, there are a few problems with this patch. First of all, it adds new "if" clauses in the middle of an existing "if"/"else if" tree, which obviously breaks pr

Re: [PATCH v2 3/4] usb: musb: Kconfig: Drop dependency on MACH_JZ4740 for jz4740

2019-01-15 Thread Bin Liu
Hi Paul, On Thu, Jan 10, 2019 at 10:36:59AM -0300, Paul Cercueil wrote: > Depending on MACH_INGENIC prevent us from creating a generic kernel that Again, did you mean MACH_JZ4740 instead? > works on more than one MIPS board. Instead, we just depend on MIPS being > set. > > Signed-off-by: Paul C

Re: [PATCH v2] usb: gadget: musb: fix short isoc packets with inventra dma

2019-01-15 Thread Bin Liu
Hi Paul, On Fri, Jan 11, 2019 at 12:31:59AM -0500, Paul Elder wrote: > Hi Bin, > > On Wed, Jan 09, 2019 at 09:02:15AM -0600, Bin Liu wrote: > > Hi Paul, > > > > On Wed, Jan 09, 2019 at 02:10:09AM -0500, Paul Elder wrote: > > > Handling short packets (length < max packet size) in the Inventra DMA

Re: [PATCH] USB: Fix configuration selection issues introduced in v4.20.0

2019-01-15 Thread Greg Kroah-Hartman
On Tue, Jan 15, 2019 at 07:13:54PM +0300, Nikolay Yakimov wrote: > Commit f13912d3f014a introduced changes to the usb_choose_configuration > function > to better support USB Audio UAC3-compatible devices. However, there are a few > problems with this patch. First of all, it adds new "if" clauses i

Re: [PATCH v2 1/6] dt-bindings: phy-qcom: Add support for msm8998 usb

2019-01-15 Thread Bjorn Andersson
On Mon 14 Jan 08:36 PST 2019, Jeffrey Hugo wrote: > USB on msm8998 utilizes the QUSB2 and QMP phys, similar to sdm845. > > Signed-off-by: Jeffrey Hugo > --- > Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 5 + > Documentation/devicetree/bindings/phy/qcom-qusb2-phy.txt | 1 + >

Re: [PATCH v2 2/6] dt-bindings: usb: Add support for msm8998

2019-01-15 Thread Bjorn Andersson
On Mon 14 Jan 08:36 PST 2019, Jeffrey Hugo wrote: > msm8998 USB has a dwc3 controller just like the existing sdm845 support > Reviewed-by: Bjorn Andersson > Signed-off-by: Jeffrey Hugo > --- > Documentation/devicetree/bindings/usb/qcom,dwc3.txt | 1 + > 1 file changed, 1 insertion(+) > > di

Re: [PATCH v2 3/6] phy: qcom-qusb2: Add QUSB2 PHY support for msm8998

2019-01-15 Thread Bjorn Andersson
On Mon 14 Jan 08:36 PST 2019, Jeffrey Hugo wrote: > MSM8998 contains one QUSB2 PHY which is very similar to the existing > sdm845 support. > Reviewed-by: Bjorn Andersson > Signed-off-by: Jeffrey Hugo > --- > drivers/phy/qualcomm/phy-qcom-qusb2.c | 41 > +++ >

Re: [PATCH] USB: Fix configuration selection issues introduced in v4.20.0

2019-01-15 Thread Nikolay Yakimov
tue, 15 jan. 2019 at 19:53, Greg Kroah-Hartman : > Were you able to test this on one of the devices that ff2a8c532c14 > ("usbcore: Select only first configuration for non-UAC3 compliant > devices") was created to fix? Yes, owning such a device (non-UAC3 with multiple configurations) was the motiva

Re: [PATCH v2 4/6] phy: qcom-qmp: Add QMP V3 USB3 PHY support for msm8998

2019-01-15 Thread Bjorn Andersson
On Mon 14 Jan 08:36 PST 2019, Jeffrey Hugo wrote: > MSM8998 contains a single QMP v3 USB3 phy similar to the existing sdm845 > support. > > Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Regards, Bjorn

Re: [PATCH v2 5/6] usb: dwc3: qcom: Add support for MSM8998

2019-01-15 Thread Bjorn Andersson
On Mon 14 Jan 08:37 PST 2019, Jeffrey Hugo wrote: > Add a MSM8998 specific DT compatible so that we can properly bind to the > device and enable the USB controller. > Reviewed-by: Bjorn Andersson > Signed-off-by: Jeffrey Hugo > --- > drivers/usb/dwc3/dwc3-qcom.c | 1 + > 1 file changed, 1 in

Re: [PATCH v2 6/6] arm64: dts: qcom: msm8998: Add USB-related nodes

2019-01-15 Thread Bjorn Andersson
On Mon 14 Jan 08:37 PST 2019, Jeffrey Hugo wrote: > Add nodes for USB and related PHYs. > > Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 22 > arch/arm64/boot/dts/qcom/msm8998.dtsi | 92 > ++

RE: usb: dwc2 continuously receiving BNA interrupts on ep0

2019-01-15 Thread Maynard CABIENTE
Hi Minas, On Tuesday, January 15, 2019 3:02 AM, Minas Harutyunyan wrote: > > Please apply follow patches which included starting from 4.16: > 1. usb: dwc2: Add safety check in setting of descriptor chain pointers commit > ID: 201ec568c57a43dbc73c7ac00e73c3c2d39559fc > 2. usb: dwc2: Add safety chec

Re: [PATCH v2 4/4] usb: musb: Add support for MediaTek musb controller

2019-01-15 Thread Bin Liu
Hi Min, very close, thanks. Below I tried to explain a further cleanup in musb_clearb/w() and musb_get/set_toggle() implementation. Please let me know if it is not clear. Basically, we don't need musb_default_clearb/w(), just assign the musb_io function pointers to musb_readb/w(). Then the mtk p

Re: [PATCH v2 3/4] usb: musb: Extract set toggle as a separate interface

2019-01-15 Thread Bin Liu
Hi Min, On Tue, Jan 15, 2019 at 04:19:42PM +0100, Matthias Brugger wrote: > > > On 15/01/2019 02:43, min@mediatek.com wrote: > > From: Min Guo > > > > Add a common interface for set data toggle > > > > Signed-off-by: Min Guo > > --- > > drivers/usb/musb/musb_host.c | 37

Re: [PATCH v2 2/3] dt-bindings: usb: keystone-usb: Add ti,am654-dwc3 support

2019-01-15 Thread Rob Herring
On Thu, 10 Jan 2019 17:04:29 +0200, Roger Quadros wrote: > The AM654 SoC from TI contains a DWC3 controller. Add > support for it. > > Signed-off-by: Roger Quadros > --- > Documentation/devicetree/bindings/usb/keystone-usb.txt | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > Rev

Re: [PATCH v2 06/10] dt-bindings: phy: mvebu-utmi: add UTMI PHY bindings

2019-01-15 Thread Rob Herring
On Fri, Jan 11, 2019 at 02:31:29PM +0100, Miquel Raynal wrote: > Add bindings for Marvell Armada 3700 USB2 UTMI+ PHY. > > Signed-off-by: Miquel Raynal > --- > .../bindings/phy/phy-mvebu-utmi.txt | 37 +++ > 1 file changed, 37 insertions(+) > create mode 100644 Document

[PATCH v3] usb: gadget: musb: fix short isoc packets with inventra dma

2019-01-15 Thread Paul Elder
Handling short packets (length < max packet size) in the Inventra DMA engine in the MUSB driver causes the MUSB DMA controller to hang. An example of a problem that is caused by this problem is when streaming video out of a UVC gadget, only the first video frame is transferred. For short packets (

Re: [PATCH v2 3/4] usb: musb: Extract set toggle as a separate interface

2019-01-15 Thread Min Guo
Hi Matthias, On Tue, 2019-01-15 at 16:19 +0100, Matthias Brugger wrote: > > On 15/01/2019 02:43, min@mediatek.com wrote: > > From: Min Guo > > > > Add a common interface for set data toggle > > > > Signed-off-by: Min Guo > > --- > > drivers/usb/musb/musb_host.c | 37 +

Re: [PATCH v2 4/4] usb: musb: Add support for MediaTek musb controller

2019-01-15 Thread Min Guo
Hi Bin, On Tue, 2019-01-15 at 14:38 -0600, Bin Liu wrote: > Hi Min, > > very close, thanks. > Below I tried to explain a further cleanup in musb_clearb/w() and > musb_get/set_toggle() implementation. Please let me know if it is not > clear. > > Basically, we don't need musb_default_clearb/w(), j

Re: [PATCH v2 3/4] usb: musb: Extract set toggle as a separate interface

2019-01-15 Thread Min Guo
Hi Bin, On Tue, 2019-01-15 at 14:40 -0600, Bin Liu wrote: > Hi Min, > > On Tue, Jan 15, 2019 at 04:19:42PM +0100, Matthias Brugger wrote: > > > > > > On 15/01/2019 02:43, min@mediatek.com wrote: > > > From: Min Guo > > > > > > Add a common interface for set data toggle > > > > > > Signed

RE: [PATCH] USB: Fix configuration selection issues introduced in v4.20.0

2019-01-15 Thread Gopal, Saranya
Hi Yakimov, As per UAC3 configuration, the first configuration will always be backward-compatible. So, there cannot be any UAC3-compatible device which has first configuration as UAC3. And secondly, the commit ff2a8c532c14 does not break the pre-existing logic. I also thought so much about movin

Re: [PATCH] usb: dwc3: gadget: Fail request submission if it was already queued

2019-01-15 Thread Manu Gautam
Hi, On 1/11/2019 2:51 PM, Felipe Balbi wrote: > Hi, > > Manu Gautam writes: >>> Manu Gautam writes: If a function driver tries to re-submit an already queued request, it can results in corruption of pending/started request lists. Catch such conditions and fail the request submissi

Re: [PATCH v5 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-15 Thread Paul Elder
On Mon, Jan 14, 2019 at 10:24:44AM -0500, Alan Stern wrote: > On Mon, 14 Jan 2019, Paul Elder wrote: > > > > > > Can you check your uvc > > > > > changes using dummy_hcd with the patch below? > > > > > > > > I'm not sure what to make of the test results. I get the same results > > > > with or wit

[PATCH 2/2] usb: dwc3: Add workaround for host mode VBUS glitch when boot

2019-01-15 Thread Ran Wang
When DWC3 is set to host mode by programming register DWC3_GCTL, VUBS (or its control signal) will be turned on immediately on related Root Hub ports. Then, the VUBS is turned off for a little while(15us) when do xhci reset (conducted by xhci driver) and back to normal finally, we can observed a ne

[PATCH 1/2] usb: dwc3: Add avoiding vbus glitch happen during xhci reset

2019-01-15 Thread Ran Wang
When DWC3 is set to host mode by programming register DWC3_GCTL, VUBS (or its control signal) will on immediately on related Root Hub ports. Then the VUBS will be de-asserted for a little while during xhci reset (conducted by xhci driver) for a little while and back to normal. This VBUS glitch mig

[PATCH 0/2] usb: dwc3: Add avoiding vbus glitch happen during xhci reset

2019-01-15 Thread Ran Wang
This to fix USB enumeration compatibility issue found on DWC3 (host mode) IP only. Some pre-discussion mails can be referred from: https://lkml.org/lkml/2018/11/23/387 https://lkml.org/lkml/2018/11/22/683 As to the workaround, I know programming xhci register in DWC3 dirver (probe function) is no

RE: [PATCH 1/2] usb: dwc3: Add avoiding vbus glitch happen during xhci reset

2019-01-15 Thread Ran Wang
Hi, On 16, 2019 14:48 Ran Wang wrote: > It seems the preface patch (0/2) failed to be accepted by patchwork (could anyone tell me how to generate it properly with some sommand?), I paste its content here for your reference : This to fix USB enumeration compatibility issue found on DWC3 (host mo

Re: USB-C storage device not detected on USB 3.1 Gen 2 host when plugged in after boot

2019-01-15 Thread Jan-Marek Glogowski
Hi, just wanted to know if the logs are usable and if you now need some additional information. Now I should also build usbcore as a module, so I don't have to reboot all the time. And I'll try to look into the code to understand the port status value. AFAIK the log suggest that for whatever r