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

2019-01-10 Thread Felipe Balbi
Hi, 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 submission to DCD. > > Signed-off-by: Manu Gautam > --- > drivers/usb/dwc3/gadget.c | 6 +++

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

2019-01-10 Thread Manu Gautam
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 submission to DCD. Signed-off-by: Manu Gautam --- drivers/usb/dwc3/gadget.c | 6 ++ 1 file changed, 6 insertions(+) di

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

2019-01-10 Thread Paul Elder
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 > > engine in the MUSB driver causes the MUSB DMA controller to hang. An > > exampl

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

2019-01-10 Thread Min Guo
Hi Bin, I have some questions about musbhs_dma_controller_destroy/create_noirq(). 1,Because of controller->irq=0 in noirq case, destroy_noirq can reuse musbhs_dma_controller_destroy. Is it necessary to write a destroy_noirq function? 2, How about creating a common function for create musb dma cont

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

2019-01-10 Thread Min Guo
Hi Bin, On Thu, 2019-01-10 at 08:18 -0600, Bin Liu wrote: > Hi Min, > > Please briefly summarize the controller differences in the commit log, > such as > > - WIC interrupt registers; > - data toggle bit; > - no dedicated DMA interrupt line; > > so that we can quickly understand the core driver

Wake usb-serial device and disable autosuspend after probing

2019-01-10 Thread Karoly Pados
Hello, It was observed that the GPIOs of the ftdi_sio driver cannot be used when the device was put into autosuspend earlier (usb_control_msg returns -EHOSTUNREACH). Quick workaround for users is to disable autosuspend only for this affected device, which reportedly fixes the problem. However, as

[PATCH v2] usb: dwc3: gadget: Clear req->needs_extra_trb flag on cleanup

2019-01-10 Thread Jack Pham
OUT endpoint requests may somtimes have this flag set when preparing to be submitted to HW indicating that there is an additional TRB chained to the request for alignment purposes. If that request is removed before the controller can execute the transfer (e.g. ep_dequeue/ep_disable), the request wi

Re: [PATCH v5 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2019-01-10 Thread Alan Stern
On Wed, 9 Jan 2019, Paul Elder wrote: > This patch series adds a mechanism to allow asynchronously validating > the data stage of a control OUT request, and for stalling or suceeding > the request accordingly. One thing we haven't mentioned explicitly: What should happen when the time for the st

Re: [PATCH v3 1/2] USB: quirks: Check device interface LPM capability

2019-01-10 Thread Kyle Williams
On Wed, Dec 12, 2018 at 12:37:09PM +0100, Greg Kroah-Hartman wrote: > On Fri, Dec 07, 2018 at 08:47:21PM -0500, Kyle Williams wrote: > > From: Kyle Williams > > > > Description: enable the ability to disable LPM for all devices matched > > by interface information > > Why have "Description:" in

RE: [PATCH 2/3] usb: ehci: fsl: Update register accessing for arm/arm64 platforms

2019-01-10 Thread Alan Stern
On Thu, 10 Jan 2019, Ran Wang wrote: > Hi Alan, > > > -Original Message- > > From: Alan Stern > > Sent: Wednesday, January 09, 2019 23:14 > > To: Ran Wang > > Cc: Greg Kroah-Hartman ; linux- > > u...@vger.kernel.org; linux-ker...@vger.kernel.org > > Subject: RE: [PATCH 2/3] usb: ehci: f

[PATCH v2 1/3] usb: dwc3: gadget: Fix OTG events when gadget driver isn't loaded

2019-01-10 Thread Roger Quadros
On v3.10a in dual-role mode, if port is in device mode and gadget driver isn't loaded, the OTG event interrupts don't come through. It seems that if the core is configured to be OTG2.0 only, then we can't leave the DCFG.DEVSPD at Super-speed (default) if we expect OTG to work properly. It must be

[PATCH v2 0/3] usb: dwc3: Add support for AM654 USB

2019-01-10 Thread Roger Quadros
Hi Felipe, TI's AM654 USB SoC has 2 instances of the DWC3 controller. This series adds AM654 USB wrapper support to the keystone-usb driver. Changelog: v2: - Moved compatible to separate lines in DT binding. cheers, -roger Roger Quadros (3): usb: dwc3: gadget: Fix OTG events when gadget drive

[PATCH v2 3/3] usb: dwc3: keystone: Add support for ti,am654-dwc3

2019-01-10 Thread Roger Quadros
The AM654 SoC contains a DWC3 controller with TI specific wrapper. Add support for that. Unlike the Keystone 2 case, for AM654 We don't need to process any IRQs for basic USB operation. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/Kconfig | 6 +++--- drivers/usb/dwc3/dwc3-keystone

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

2019-01-10 Thread Roger Quadros
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(-) diff --git a/Documentation/devicetree/bindings/usb/keystone-usb.txt b/Docume

Re: [PATCH] USB: quirks: add NO_LPM quirk for Logitech Flare|Meetup|Brio|Rally

2019-01-10 Thread Kyle Williams
On Mon, Dec 10, 2018 at 03:50:17PM +0200, Mathias Nyman wrote: > On 08.12.2018 00:18, Kyle Williams wrote: > > On Tue, Dec 04, 2018 at 04:36:18PM -0500, Alan Stern wrote: > > > On Tue, 4 Dec 2018, Kyle Williams wrote: > > > > > > > Description: Some USB device / host controller combinations seem t

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

2019-01-10 Thread Bin Liu
Hi Min, Please briefly summarize the controller differences in the commit log, such as - WIC interrupt registers; - data toggle bit; - no dedicated DMA interrupt line; so that we can quickly understand the core driver is modified accordingly to handle the differences. On Thu, Jan 10, 2019 at 03

[PATCH v2 1/4] Documentation: dt: Add binding info for jz4740-musb driver

2019-01-10 Thread Paul Cercueil
This commit adds documentation for the device-tree bindings of the jz4740-musb driver, which provides support for the USB gadget mode of the JZ4740 and similar SoCs from Ingenic. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring --- v2: No change .../bindings/usb/ingenic,jz4740-musb.txt

[PATCH v2 2/4] usb: musb: jz4740: Add support for devicetree

2019-01-10 Thread Paul Cercueil
Add support for probing the driver from devicetree. Signed-off-by: Paul Cercueil --- v2: Add MODULE_DEVICE_TABLE and wrap inside CONFIG_OF drivers/usb/musb/jz4740.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c index 04d8b

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

2019-01-10 Thread Paul Cercueil
Depending on MACH_INGENIC prevent us from creating a generic kernel that works on more than one MIPS board. Instead, we just depend on MIPS being set. Signed-off-by: Paul Cercueil --- v2: Remove info about adding COMPILE_TEST in commit message, as it was there before drivers/usb/musb/Kconf

[PATCH v2 4/4] usb: musb: Kconfig: Drop dependency on CONFIG_USB for jz4740

2019-01-10 Thread Paul Cercueil
The Kconfig entry previously depended on USB_OTG_BLACKLIST_HUB unconditionally, which is an option that is only available when CONFIG_USB is enabled. However, the USB IP in the JZ4740 SoC does not support host mode, only gadget mode, so it makes sense to allow it to build when CONFIG_USB is not set

question on xhci_handle_stopped_cmd_ring()

2019-01-10 Thread Oliver Neukum
Hi, looking at this code: /* ring command ring doorbell to restart the command ring */ if ((xhci->cmd_ring->dequeue != xhci->cmd_ring->enqueue) && !(xhci->xhc_state & XHCI_STATE_DYING)) { xhci->current_cmd = cur_cmd; xhci_mod_cmd_timer(

Re: [PATCH] usb: dwc3: gadget: Clear req->needs_extra_trb flag on cleanup

2019-01-10 Thread Felipe Balbi
Hi, Jack Pham writes: > OUT endpoint requests may somtimes have this flag set when > preparing to be submitted to HW indicating that there is an > additional TRB chained to the request for alignment purposes. > If that request is removed before the controller can execute the > transfer (e.g. e