[PATCH] usb: gadget: configfs: Fix KASAN use-after-free

2017-01-17 Thread Jim Lin
When gadget is disconnected, running sequence is like this. . android_work: sent uevent USB_STATE=DISCONNECTED . Call trace: usb_string_copy+0xd0/0x128 gadget_config_name_configuration_store+0x4 gadget_config_name_attr_store+0x40/0x50 configfs_write_file+0x198/0x1f4 vfs_write+0x100/0x220

[RFC v2 0/5] Platform driver support for 'amd5536udc' driver

2017-01-17 Thread Raviteja Garimella
This is RFC for the changes made as per the review comments made for the previous version. I would like to know if this approach (the way the driver is split and the naming and all)looks good to be submitted. Changes from v1: === 1. Split the driver into platform/pci specific drivers

[RFC v2 3/5] UDC: Provide correct arguments for 'dma_pool_create'

2017-01-17 Thread Raviteja Garimella
Change the argument from NULL to a struct device for the dma_pool_create call during dma init. Signed-off-by: Raviteja Garimella --- drivers/usb/gadget/udc/snps_udc_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/snps_udc_core.c b/drivers/us

Re: [PATCH 36/37] usb: host: xhci: add xhci_virt_device tracer

2017-01-17 Thread Felipe Balbi
Hi, Lu Baolu writes: >>> Move the trace down until the address device command completes. >> no. I would loose the tracepoint for the command being queued. I want to >> see queue -> execute -> complete for everything. And I want to know what >> changes along the way (slot context, ep context, etc

[RFC v2 2/5] UDC: make debug prints compatible with both pci and platform devices

2017-01-17 Thread Raviteja Garimella
This patch adds a struct device member to UDC data structure and makes changes to the arguments of dev_err and dev_dbg calls so that the debug prints work for both pci and platform devices. Signed-off-by: Raviteja Garimella --- drivers/usb/gadget/udc/amd5536udc.c| 1 + drivers/usb/gadget/ud

Re: [PATCH] usb: gadget: configfs: Fix KASAN use-after-free

2017-01-17 Thread Felipe Balbi
Hi, Jim Lin writes: > When gadget is disconnected, running sequence is like this. > . android_work: sent uevent USB_STATE=DISCONNECTED I'm gonna have to ask you to try with actual mainline where there are no Android changes. -- balbi -- To unsubscribe from this list: send the line "unsubscrib

[RFC v2 4/5] DT bindings documentation for Synopsys UDC platform driver

2017-01-17 Thread Raviteja Garimella
This patch adds device tree bindings documentation for Synopsys USB device controller platform driver. Signed-off-by: Raviteja Garimella --- .../devicetree/bindings/usb/snps,dw-ahb-udc.txt| 27 ++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/devicetr

Re: [PATCH] usb: dwc2: fix "iomem 0x00000000" message by setting iomem parameters in usb_hcd

2017-01-17 Thread Felipe Balbi
Hi, Heiner Kallweit writes: > Am 16.01.2017 um 15:05 schrieb Felipe Balbi: >> >> Hi, >> >> Heiner Kallweit writes: >>> Set the iomem parameters in the usb_hcd to fix this misleading >>> message during driver load: >>> dwc2 c910.usb: irq 22, io mem 0x >>> >>> Signed-off-by: Heiner

[RFC v2 5/5] UDC: Add Synopsys UDC Platform driver

2017-01-17 Thread Raviteja Garimella
This patch adds platform driver support for Synopsys UDC. A new driver file (snps_udc_plat.c) is created for this purpose, where the platform driver registration is done based on the OF node. New members are added to the UDC data structure for having platform device support along with extcon and

Re: [PATCHv15 2/3] usb: USB Type-C connector class

2017-01-17 Thread Heikki Krogerus
Hi Greg, On Mon, Jan 16, 2017 at 04:35:24PM +0100, Greg KH wrote: > On Mon, Jan 16, 2017 at 05:56:13PM +0300, Heikki Krogerus wrote: > > The purpose of USB Type-C connector class is to provide > > unified interface for the user space to get the status and > > basic information about USB Type-C con

Re: [PATCH 1/4] phy: sun4i-usb: support PHY0 on H3 in MUSB mode

2017-01-17 Thread Maxime Ripard
On Tue, Jan 17, 2017 at 03:14:46AM +0800, Icenowy Zheng wrote: > The PHY0 on H3 can be wired either to MUSB controller or OHCI/EHCI > controller. > > The original driver wired it to OHCI/EHCI controller; however, as the > code to use PHY0 as OHCI/EHCI is missing, it makes the PHY fully > unusable.

[GIT PULL] USB fixes for v4.10-rc

2017-01-17 Thread Felipe Balbi
Hi Greg, here's another set of fixes for the -rc cycle. Let me know if you want any changes cheers The following changes since commit a121103c922847ba5010819a3f250f1f7fc84ab8: Linux 4.10-rc3 (2017-01-08 14:18:17 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/

Re: [PATCH] usb: gadget: configfs: Fix KASAN use-after-free

2017-01-17 Thread Greg KH
On Tue, Jan 17, 2017 at 10:07:40AM +0200, Felipe Balbi wrote: > > Hi, > > Jim Lin writes: > > When gadget is disconnected, running sequence is like this. > > . android_work: sent uevent USB_STATE=DISCONNECTED > > I'm gonna have to ask you to try with actual mainline where there are no > Android

Re: [PATCH v2] usb: host: xhci: plat: check hcc_params after add hcd

2017-01-17 Thread Roger Quadros
On 17/01/17 09:32, William Wu wrote: > From: William wu > > The commit 4ac53087d6d4 ("usb: xhci: plat: Create both > HCDs before adding them") move add hcd to the end of > probe, this cause hcc_params uninitiated, because xHCI > driver sets hcc_params in xhci_gen_setup() called from > usb_add_hcd

Re: [PATCH] usb: gadget: configfs: Fix KASAN use-after-free

2017-01-17 Thread Jim Lin
On 2017年01月17日 16:07, Felipe Balbi wrote: Hi, Jim Lin writes: When gadget is disconnected, running sequence is like this. . android_work: sent uevent USB_STATE=DISCONNECTED I'm gonna have to ask you to try with actual mainline where there are no Android changes. Let me rephrase and resend.

Re: [PATCH 2/2] usb: gadget: uac2: add req_number as parameter

2017-01-17 Thread Felipe Balbi
Hi, Peter Chen writes: > On Mon, Jan 16, 2017 at 12:40:06PM +0200, Felipe Balbi wrote: >> >> Hi, >> >> Peter Chen writes: >> > There are only two requests for uac2, it may not be enough at high >> > loading system which usb interrupt handler can't be serviced on >> > time, then the data will

Re: [PATCH] usb: gadget: configfs: Fix KASAN use-after-free

2017-01-17 Thread Felipe Balbi
Hi, Greg KH writes: > On Tue, Jan 17, 2017 at 10:07:40AM +0200, Felipe Balbi wrote: >> >> Hi, >> >> Jim Lin writes: >> > When gadget is disconnected, running sequence is like this. >> > . android_work: sent uevent USB_STATE=DISCONNECTED >> >> I'm gonna have to ask you to try with actual main

Re: [GIT PULL] USB fixes for v4.10-rc

2017-01-17 Thread Greg Kroah-Hartman
On Tue, Jan 17, 2017 at 11:06:05AM +0200, Felipe Balbi wrote: > > Hi Greg, > > here's another set of fixes for the -rc cycle. Let me know if you want > any changes > > cheers > > The following changes since commit a121103c922847ba5010819a3f250f1f7fc84ab8: > > Linux 4.10-rc3 (2017-01-08 14:18

[PATCH v2] usb: gadget: configfs: Fix KASAN use-after-free

2017-01-17 Thread Jim Lin
When gadget is disconnected, running sequence is like this. . composite_disconnect . Call trace: usb_string_copy+0xd0/0x128 gadget_config_name_configuration_store+0x4 gadget_config_name_attr_store+0x40/0x50 configfs_write_file+0x198/0x1f4 vfs_write+0x100/0x220 SyS_write+0x58/0xa8 . conf

[PATCH] usb: core: update comments for send message functions

2017-01-17 Thread Jaejoong Kim
The commonly use of a bottom half are tasklet and workqueue. The big difference between tasklet and workqueue is that the tasklet runs in an interrupt context and the workqueue runs in a process context, which means it can sleep if need be. The comment for usb_control/interrupt/bulk_msg() function

Re: [PATCH 2/2] usb: gadget: uac2: add req_number as parameter

2017-01-17 Thread Peter Chen
On Tue, Jan 17, 2017 at 11:23:55AM +0200, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > > On Mon, Jan 16, 2017 at 12:40:06PM +0200, Felipe Balbi wrote: > >> > >> Hi, > >> > >> Peter Chen writes: > >> > There are only two requests for uac2, it may not be enough at high > >> > loading sy

[PATCH v3] usb: gadget: configfs: Fix KASAN use-after-free

2017-01-17 Thread Jim Lin
When gadget is disconnected, running sequence is like this. . composite_disconnect . Call trace: usb_string_copy+0xd0/0x128 gadget_config_name_configuration_store+0x4 gadget_config_name_attr_store+0x40/0x50 configfs_write_file+0x198/0x1f4 vfs_write+0x100/0x220 SyS_write+0x58/0xa8 . conf

Re: [PATCH v3] usb: gadget: configfs: Fix KASAN use-after-free

2017-01-17 Thread Felipe Balbi
Hi, Jim Lin writes: > When gadget is disconnected, running sequence is like this. > . composite_disconnect > . Call trace: > usb_string_copy+0xd0/0x128 > gadget_config_name_configuration_store+0x4 > gadget_config_name_attr_store+0x40/0x50 > configfs_write_file+0x198/0x1f4 > vfs_write+0

RE: [PATCH v3 2/3] USB3/DWC3: Add property "snps, incr-burst-type-adjustment" for INCR burst type

2017-01-17 Thread Jerry Huang
> -Original Message- > From: Felipe Balbi [mailto:ba...@kernel.org] > Sent: Monday, January 16, 2017 4:50 PM > To: Jerry Huang ; Rob Herring > Cc: mark.rutl...@arm.com; catalin.mari...@arm.com; > will.dea...@arm.com; li...@armlinux.org.uk; devicet...@vger.kernel.org; > linux-usb@vger.ker

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-17 Thread Felipe Balbi
Hi, Baolin Wang writes: >> Baolin Wang writes: >>> When handing the SETUP packet by composite_setup(), we will release the >>> dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup >>> function, which means we need to delay handling the STATUS phase. >>

RE: [PATCH v3 2/3] USB3/DWC3: Add property "snps, incr-burst-type-adjustment" for INCR burst type

2017-01-17 Thread Felipe Balbi
Hi, Jerry Huang writes: >> >> So, I think we still need two vaue to specify INCRBrstEna and INCRx >> >> burst type. >> > Hi, Balbi, >> > It seems there is no feedback for my comment, so these patches can be >> accepted? >> >> probably not, we need to really understand what information we nee

RE: [PATCH v3 2/3] USB3/DWC3: Add property "snps, incr-burst-type-adjustment" for INCR burst type

2017-01-17 Thread Jerry Huang
> -Original Message- > From: Felipe Balbi [mailto:ba...@kernel.org] > Sent: Tuesday, January 17, 2017 6:45 PM > To: Jerry Huang ; Rob Herring > Cc: mark.rutl...@arm.com; catalin.mari...@arm.com; > will.dea...@arm.com; li...@armlinux.org.uk; devicet...@vger.kernel.org; > linux-usb@vger.ker

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-17 Thread Baolin Wang
Hi, On 17 January 2017 at 18:39, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >>> Baolin Wang writes: When handing the SETUP packet by composite_setup(), we will release the dwc->lock. If we get the 'USB_GADGET_DELAYED_STATUS' result from setup function, wh

Re: [PATCHv2] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-17 Thread Bin Liu
Tony, On Mon, Jan 16, 2017 at 03:54:29PM -0800, Tony Lindgren wrote: > * Tony Lindgren [170116 15:36]: > > * Tony Lindgren [170113 14:00]: > > > * Grygorii Strashko [170113 13:37]: > > > > > Simplified diff with fix on top of your patch: > > > > > > > > > > diff --git a/drivers/dma/cppi41.c b/

Re: [PATCH 36/37] usb: host: xhci: add xhci_virt_device tracer

2017-01-17 Thread Mathias Nyman
On 17.01.2017 10:03, Felipe Balbi wrote: Hi, Lu Baolu writes: Move the trace down until the address device command completes. no. I would loose the tracepoint for the command being queued. I want to see queue -> execute -> complete for everything. And I want to know what changes along the wa

[try2] usb: gadger: f_fs: Do not copy past descriptor end.

2017-01-17 Thread Vincent Pelletier
Changes since try1: - do not involve sizeof(*desc) in copy length. - remove explicit cast to size_t, which was needed to compare bLength to sizeof(). -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info

usb: gadger: f_fs: Do not copy past descriptor end.

2017-01-17 Thread Vincent Pelletier
Endpoint descriptors come in 2 sizes, struct usb_endpoint_descriptor being the largest. Use bLength to stop on endpoint descriptor boundary, and not 2 bytes too far. Signed-off-by: Vincent Pelletier --- drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [PATCH v3] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-17 Thread Maksim Salau
Hi Johan, > I think it's right to keep them as in the current version of the patch > (i.e. active high) which is accordance with the datasheet, but if > possible you should verify the levels when using hardware flow control > to be certain that the polarity is not inverted when enabling hardware >

[PATCH 1/2] tools: usb: ffs-test: switch to _DEFAULT_SOURCE

2017-01-17 Thread Felipe Balbi
_BSD_SOURCE is deprecated and gives a build warning. Let's use _DEFAULT_SOURCE instead. Signed-off-by: Felipe Balbi --- tools/usb/ffs-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/usb/ffs-test.c b/tools/usb/ffs-test.c index 88d5e71be044..64fc72acc892 100644 ---

[PATCH 2/2] tools: usb: ffs-test: add SS descriptors

2017-01-17 Thread Felipe Balbi
Without SS descriptors, we have no possibility of running on SS controllers such as DWC3. Signed-off-by: Felipe Balbi --- tools/usb/ffs-test.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/tools/usb/ffs-test.c b/tools/usb/f

Re: [PATCHv2] usb: musb: Add support for optional VBUS irq to dsps glue layer

2017-01-17 Thread Bin Liu
On Thu, Jan 12, 2017 at 01:40:46PM -0800, Tony Lindgren wrote: > We can now configure the PMIC interrupt to provide us VBUS > events. In that case we don't need to constantly poll the > status and can make it optional. This is only wired up > for the mini-B interface on beaglebone. > > Note that e

Re: [PATCH 2/4] musb: sunxi: add support for the variant in H3/V3s SoC

2017-01-17 Thread Bin Liu
On Fri, Jan 06, 2017 at 02:57:15PM +0100, Maxime Ripard wrote: > On Tue, Jan 03, 2017 at 11:25:32PM +0800, Icenowy Zheng wrote: > > Allwinner H3/V3s features a variant of MUSB controller, which lacks one > > endpoint. > > > > Add support for it. > > > > Signed-off-by: Icenowy Zheng > > Acked-by

Re: [PATCH] usb: musb: constify dev_pm_ops structures

2017-01-17 Thread Bin Liu
On Sun, Jan 15, 2017 at 05:30:46PM +0530, Bhumika Goyal wrote: > Declare dev_pm_ops structures as const as they are only stored in the pm > field of a device_driver structure. This field is of type const, so > dev_pm_ops structures having similar properties can be declared const > too. > > Size de

Re: functionfs on dwc3, xhci host: endpoint cannot be used in both directions ?

2017-01-17 Thread Vincent Pelletier
On Mon, 16 Jan 2017 14:48:31 +, Vincent Pelletier wrote: > 3) I declared 4 endpoints (2 IN, 2 OUT). And I went one level deeper >down the rabbit hole: now enumeration fails with this message on >host: Aaand... I dug this part of the hole myself. In the library part of my python module

Re: [PATCH v3] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-17 Thread Johan Hovold
On Tue, Jan 17, 2017 at 04:25:18PM +0300, Maksim Salau wrote: > Hi Johan, > > > I think it's right to keep them as in the current version of the patch > > (i.e. active high) which is accordance with the datasheet, but if > > possible you should verify the levels when using hardware flow control >

[PATCH] usb: musb: dsps: make dsps_musb_clear_ep_rxintr() static

2017-01-17 Thread Bin Liu
From: Wei Yongjun Fixes the following sparse warning: drivers/usb/musb/musb_dsps.c:270:6: warning: symbol 'dsps_musb_clear_ep_rxintr' was not declared. Should it be static? Signed-off-by: Wei Yongjun Signed-off-by: Bin Liu --- drivers/usb/musb/musb_dsps.c | 2 +- 1 file changed, 1 insertion

[PATCH] musb fixes for v4.10-rc5

2017-01-17 Thread Bin Liu
Hi Greg, Here is musb fixes for v4.10-rc5, it is to fix a sparse warning. Please let me know if any change is needed. Regards, -Bin. Wei Yongjun (1): usb: musb: dsps: make dsps_musb_clear_ep_rxintr() static drivers/usb/musb/musb_dsps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH] usb: core: update comments for send message functions

2017-01-17 Thread Alan Stern
On Tue, 17 Jan 2017, Jaejoong Kim wrote: > The commonly use of a bottom half are tasklet and workqueue. The big > difference between tasklet and workqueue is that the tasklet runs in > an interrupt context and the workqueue runs in a process context, > which means it can sleep if need be. > > The

Re: [PATCH] usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase

2017-01-17 Thread Alan Stern
On Mon, 16 Jan 2017, Felipe Balbi wrote: > > The gadget driver never calls usb_ep_queue in order to receive the next > > SETUP packet; the UDC driver takes care of SETUP handling > > automatically. > > yeah, that's another thing I'd like to change. Currently, we have no > means to either try to i

Re: [PATCHv2] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-17 Thread Tony Lindgren
* Bin Liu [170117 05:00]: > On Mon, Jan 16, 2017 at 03:54:29PM -0800, Tony Lindgren wrote: > > Anyways, for the -rc series oops, we can just leave out the WARN_ON > > parts for now until drivers/usb/musb/musb_cppi41.c is fixed too. > > Giving that cppi is a submodule inside the usb subsysytem and

[PATCH v3 5/5] dt-bindings: Document the STM32 USB OTG DWC2 core binding

2017-01-17 Thread Bruno Herrera
This patch adds the documentation for STM32F4x9 USB OTG FS/HS compatible strings. Signed-off-by: Bruno Herrera --- Documentation/devicetree/bindings/usb/dwc2.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bi

[PATCH v3 4/5] ARM: dts: stm32: Enable USB HS in FS mode (embedded phy) on stm32f429-disco

2017-01-17 Thread Bruno Herrera
This patch enables USB HS working in FS mode on stm32f429-disco with 5V VBUS enable. Signed-off-by: Bruno Herrera --- arch/arm/boot/dts/stm32f429-disco.dts | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-

[PATCH v3 3/5] ARM: dts: stm32: Enable USB FS on stm32f469-disco

2017-01-17 Thread Bruno Herrera
This patch enables USB FS on stm32f469-disco with 5V VBUS enable. Signed-off-by: Bruno Herrera --- arch/arm/boot/dts/stm32f469-disco.dts | 16 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts index 8877

[PATCH v3 2/5] ARM: dts: stm32: Add USB FS support for STM32F429 MCU

2017-01-17 Thread Bruno Herrera
This patch adds the USB pins and nodes for USB FS core. Signed-off-by: Bruno Herrera --- arch/arm/boot/dts/stm32f429.dtsi | 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi index e4dae0e..26f23

[PATCH v3 0/5] usb: dwc2: Add support for USB OTG on STM32F4x9

2017-01-17 Thread Bruno Herrera
The STM32F4x9 MCU family has two DWC2 USB OTG cores on it. One core is USB OTG FS and other core is USB OTG HS. The USB FS core only works with its internal phy whilst the USF HS core can work in HS with external ulpi phy or in FS/LS speed with the embedded FS PHY. The goal of this patch series is

[PATCH v3 1/5] usb: dwc2: Add support for STM32F429/439/469 USB OTG HS/FS in FS mode (internal PHY)

2017-01-17 Thread Bruno Herrera
This patch introduces a new parameter to activate USB OTG HS/FS core embedded phy transceiver. The STM32F4x9 SoC uses the GGPIO register to enable the transceiver. Also add the dwc2_core_params structure for stm32f4 otg fs. Signed-off-by: Bruno Herrera --- drivers/usb/dwc2/core.h | 4 d

Re: [PATCHv2] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-17 Thread Bin Liu
On Tue, Jan 17, 2017 at 08:11:39AM -0800, Tony Lindgren wrote: > * Bin Liu [170117 05:00]: > > On Mon, Jan 16, 2017 at 03:54:29PM -0800, Tony Lindgren wrote: > > > Anyways, for the -rc series oops, we can just leave out the WARN_ON > > > parts for now until drivers/usb/musb/musb_cppi41.c is fixed

Re: [PATCH] usb: musb: dsps: make dsps_musb_clear_ep_rxintr() static

2017-01-17 Thread Greg KH
On Tue, Jan 17, 2017 at 09:32:05AM -0600, Bin Liu wrote: > From: Wei Yongjun > > Fixes the following sparse warning: > > drivers/usb/musb/musb_dsps.c:270:6: warning: > symbol 'dsps_musb_clear_ep_rxintr' was not declared. Should it be static? > > Signed-off-by: Wei Yongjun > Signed-off-by: Bin

Re: [PATCHv2] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-17 Thread Tony Lindgren
* Bin Liu [170117 08:22]: > On Tue, Jan 17, 2017 at 08:11:39AM -0800, Tony Lindgren wrote: > > * Bin Liu [170117 05:00]: > > > On Mon, Jan 16, 2017 at 03:54:29PM -0800, Tony Lindgren wrote: > > > > Anyways, for the -rc series oops, we can just leave out the WARN_ON > > > > parts for now until dri

Re: [PATCHv2] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-17 Thread Bin Liu
On Tue, Jan 17, 2017 at 08:31:03AM -0800, Tony Lindgren wrote: > * Bin Liu [170117 08:22]: > > On Tue, Jan 17, 2017 at 08:11:39AM -0800, Tony Lindgren wrote: > > > * Bin Liu [170117 05:00]: > > > > On Mon, Jan 16, 2017 at 03:54:29PM -0800, Tony Lindgren wrote: > > > > > Anyways, for the -rc serie

Re: [PATCHv2] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-17 Thread Tony Lindgren
* Bin Liu [170117 08:49]: > On Tue, Jan 17, 2017 at 08:31:03AM -0800, Tony Lindgren wrote: > > * Bin Liu [170117 08:22]: > > > On Tue, Jan 17, 2017 at 08:11:39AM -0800, Tony Lindgren wrote: > > > > * Bin Liu [170117 05:00]: > > > > > On Mon, Jan 16, 2017 at 03:54:29PM -0800, Tony Lindgren wrote:

[PATCHv3] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-17 Thread Tony Lindgren
Commit fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") together with recent MUSB changes allowed USB and DMA on BeagleBone to idle when no cable is connected. But looks like few corner case issues still remain. Looks like just by re-plugging USB cable about ten or so times on Beag

Re: [PATCH] usb: musb: dsps: make dsps_musb_clear_ep_rxintr() static

2017-01-17 Thread Greg KH
On Tue, Jan 17, 2017 at 10:43:28AM -0600, Bin Liu wrote: > On Tue, Jan 17, 2017 at 05:23:48PM +0100, Greg KH wrote: > > On Tue, Jan 17, 2017 at 09:32:05AM -0600, Bin Liu wrote: > > > From: Wei Yongjun > > > > > > Fixes the following sparse warning: > > > > > > drivers/usb/musb/musb_dsps.c:270:6:

Re: [PATCH] usb: musb: dsps: make dsps_musb_clear_ep_rxintr() static

2017-01-17 Thread Bin Liu
On Tue, Jan 17, 2017 at 07:28:29PM +0100, Greg KH wrote: > On Tue, Jan 17, 2017 at 10:43:28AM -0600, Bin Liu wrote: > > On Tue, Jan 17, 2017 at 05:23:48PM +0100, Greg KH wrote: > > > On Tue, Jan 17, 2017 at 09:32:05AM -0600, Bin Liu wrote: > > > > From: Wei Yongjun > > > > > > > > Fixes the follo

Re: [PATCH] usb: dwc2: fix "iomem 0x00000000" message by setting iomem parameters in usb_hcd

2017-01-17 Thread Heiner Kallweit
Am 17.01.2017 um 09:11 schrieb Felipe Balbi: > > Hi, > > Heiner Kallweit writes: >> Am 16.01.2017 um 15:05 schrieb Felipe Balbi: >>> >>> Hi, >>> >>> Heiner Kallweit writes: Set the iomem parameters in the usb_hcd to fix this misleading message during driver load: dwc2 c910.us

Re: [PATCH 1/4] phy: sun4i-usb: support PHY0 on H3 in MUSB mode

2017-01-17 Thread Chen-Yu Tsai
Hi, On Wed, Jan 18, 2017 at 4:06 AM, Maxime Ripard wrote: > On Wed, Jan 18, 2017 at 12:57:08AM +0800, Icenowy Zheng wrote: >> >> >> 17.01.2017, 16:06, "Maxime Ripard" : >> > On Tue, Jan 17, 2017 at 03:14:46AM +0800, Icenowy Zheng wrote: >> >> The PHY0 on H3 can be wired either to MUSB controller

Re: [PATCH 1/4] phy: sun4i-usb: support PHY0 on H3 in MUSB mode

2017-01-17 Thread Maxime Ripard
On Wed, Jan 18, 2017 at 12:57:08AM +0800, Icenowy Zheng wrote: > > > 17.01.2017, 16:06, "Maxime Ripard" : > > On Tue, Jan 17, 2017 at 03:14:46AM +0800, Icenowy Zheng wrote: > >>  The PHY0 on H3 can be wired either to MUSB controller or OHCI/EHCI > >>  controller. > >> > >>  The original driver wi

Re: [PATCHv2] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-17 Thread Tony Lindgren
* Bin Liu [170117 11:47]: > On Tue, Jan 17, 2017 at 09:39:23AM -0800, Tony Lindgren wrote: > > * Bin Liu [170117 08:49]: > > > On Tue, Jan 17, 2017 at 08:31:03AM -0800, Tony Lindgren wrote: > > > > * Bin Liu [170117 08:22]: > > > > > On Tue, Jan 17, 2017 at 08:11:39AM -0800, Tony Lindgren wrote:

[PATCH] usb: dwc2: remove dead function dwc2_pci_quirks

2017-01-17 Thread Heiner Kallweit
Commit 9962b62f1be9 "Deprecate g-use-dma binding" removed the only property in dwc2_pci_quirks. This function is dead code now. Maybe it was kept intentionally to be prepared for the case that another quirk-related property needs to be added in future. If not it can be removed. Signed-off-by: Hei

Re: [PATCH] usb: dwc2: fix "iomem 0x00000000" message by setting iomem parameters in usb_hcd

2017-01-17 Thread Heiner Kallweit
Am 17.01.2017 um 21:08 schrieb Heiner Kallweit: > Am 17.01.2017 um 09:11 schrieb Felipe Balbi: >> >> Hi, >> >> Heiner Kallweit writes: >>> Am 16.01.2017 um 15:05 schrieb Felipe Balbi: Hi, Heiner Kallweit writes: > Set the iomem parameters in the usb_hcd to fix this mislead

usb: gadget: Kernel panic (NULL pointer dereference) when using fsl_udc2_core on i.MX31 PDK

2017-01-17 Thread Magnus Lilja
Hi I tried the fsl_udc_core gadget driver on the i.MX31 PDK board and got a kernel panic (NULL pointer dereference) when connecting the USB cable. I had the g_serial module loaded as well. The NULL pointer panic comes from gadget/udc/core.c usb_gadget_giveback_request() which calls req->comp

Re: [PATCHv2] dmaengine: cppi41: Fix oops in cppi41_runtime_resume

2017-01-17 Thread Bin Liu
On Tue, Jan 17, 2017 at 09:39:23AM -0800, Tony Lindgren wrote: > * Bin Liu [170117 08:49]: > > On Tue, Jan 17, 2017 at 08:31:03AM -0800, Tony Lindgren wrote: > > > * Bin Liu [170117 08:22]: > > > > On Tue, Jan 17, 2017 at 08:11:39AM -0800, Tony Lindgren wrote: > > > > > * Bin Liu [170117 05:00]:

Re: [PATCH] usb: dwc3 dwc3_exynos_probe() change goto labels to meaningful names

2017-01-17 Thread Shuah Khan
On 01/16/2017 03:33 AM, Felipe Balbi wrote: > > Hi, > > Shuah Khan writes: >> Change goto labels to meaningful names from a series of errNs. >> >> Signed-off-by: Shuah Khan > > doesn't apply to testing/next, please rebase. > Hi Felipe, This patch is dependent on the usb: dwc3: exynos fix a

Re: [PATCH] usb: core: update comments for send message functions

2017-01-17 Thread Kim Jaejoong
Hi Alan 2017-01-18 0:57 GMT+09:00 Alan Stern : > On Tue, 17 Jan 2017, Jaejoong Kim wrote: > >> The commonly use of a bottom half are tasklet and workqueue. The big >> difference between tasklet and workqueue is that the tasklet runs in >> an interrupt context and the workqueue runs in a process co

Re: [PATCH] usb: musb: dsps: make dsps_musb_clear_ep_rxintr() static

2017-01-17 Thread Bin Liu
On Tue, Jan 17, 2017 at 05:23:48PM +0100, Greg KH wrote: > On Tue, Jan 17, 2017 at 09:32:05AM -0600, Bin Liu wrote: > > From: Wei Yongjun > > > > Fixes the following sparse warning: > > > > drivers/usb/musb/musb_dsps.c:270:6: warning: > > symbol 'dsps_musb_clear_ep_rxintr' was not declared. Sho

[PATCH] usb: core: update comments for send message functions

2017-01-17 Thread Jaejoong Kim
The commonly use of bottom halves are tasklet and workqueue. The big difference between tasklet and workqueue is that the tasklet runs in an interrupt context and the workqueue runs in a process context, which means it can sleep if need be. The comment for usb_control/interrupt/bulk_msg() function

Re: [PATCH] usb: core: update comments for send message functions

2017-01-17 Thread Kim Jaejoong
really really sorry for noisy mail. Please ignore this mail. I will resend patch with right subject.. Jaejoong 2017-01-18 10:46 GMT+09:00 Jaejoong Kim : > The commonly use of bottom halves are tasklet and workqueue. The big > difference between tasklet and workqueue is that the tasklet runs in >

[PATCH v2] usb: core: update comments for send message functions

2017-01-17 Thread Jaejoong Kim
The commonly use of bottom halves are tasklet and workqueue. The big difference between tasklet and workqueue is that the tasklet runs in an interrupt context and the workqueue runs in a process context, which means it can sleep if need be. The comment for usb_control/interrupt/bulk_msg() function

[PATCH v2] usb: core: update comments for send message functions

2017-01-17 Thread Jaejoong Kim
The commonly use of bottom halves are tasklet and workqueue. The big difference between tasklet and workqueue is that the tasklet runs in an interrupt context and the workqueue runs in a process context, which means it can sleep if need be. The comment for usb_control/interrupt/bulk_msg() function

[PATCH v2] usb: core: update comments for send message functions

2017-01-17 Thread Jaejoong Kim
The commonly use of bottom halves are tasklet and workqueue. The big difference between tasklet and workqueue is that the tasklet runs in an interrupt context and the workqueue runs in a process context, which means it can sleep if need be. The comment for usb_control/interrupt/bulk_msg() function

Re: [PATCH v2] usb: core: update comments for send message functions

2017-01-17 Thread Kim Jaejoong
I just want to send v2 patch with new mail thread with subject [PATCH v2] not reply I don't understand why v2 patch mail is followed previous mail thread. --no-chain-reply-to : fail ( this is wrong option for in this case) --subject-prefix "PATCH v2" : fail.. why? This is what I did for send patc

Re: [PATCH] usb: dwc2: fix "iomem 0x00000000" message by setting iomem parameters in usb_hcd

2017-01-17 Thread John Youn
On 1/17/2017 12:13 AM, Felipe Balbi wrote: > > Hi, > > Heiner Kallweit writes: >> Am 16.01.2017 um 15:05 schrieb Felipe Balbi: >>> >>> Hi, >>> >>> Heiner Kallweit writes: Set the iomem parameters in the usb_hcd to fix this misleading message during driver load: dwc2 c910.usb: i

[PATCH v2 09/28] usb: dwc2: Fix sizeof in kzalloc

2017-01-17 Thread John Youn
Take the sizeof '*req' instead of 'struct dwc2_hsotg_req'. Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 559c01e591dc..b457522c20f8 100644 --- a/drivers/usb/dw

[PATCH v2 11/28] usb: dwc2: Set core parameters to default values

2017-01-17 Thread John Youn
Initialize the core parameters to their default, auto-detected values. Remove all the previous dwc2_set_param* methods. Most of what this code is doing is handling defaults for "not set" values and other trivial checks. The checking can be simplified and will be done in a later commit. This allow

[PATCH v2 07/28] usb: dwc2: Fix code indentation after conditionals

2017-01-17 Thread John Youn
The indent should be only one tab. Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 09fadc26023f..559c01e591dc 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/

[PATCH v2 08/28] usb: dwc2: Remove 'return' from void function

2017-01-17 Thread John Youn
The function returns void so a return is unnecessary. Signed-off-by: John Youn --- drivers/usb/dwc2/hcd_queue.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c index faf45dfbf652..b1fc9fed6ebe 100644 --- a/drivers/usb/dwc2/hcd_queue.

[PATCH v2 10/28] usb: dwc2: Remove unused otg_ver parameter

2017-01-17 Thread John Youn
The otg_ver parameter only controls the SRP pulsing method and defaults to the 1.3 behavior. It is unused and can be removed. Signed-off-by: John Youn --- drivers/usb/dwc2/core.c | 5 - drivers/usb/dwc2/core.h | 9 - drivers/usb/dwc2/hcd.c| 3 --- drivers/usb/dwc2/params.c

[PATCH v2 12/28] usb: dwc2: Get device properties

2017-01-17 Thread John Youn
After setting the default core parameter values, read in the device properties and modify core parameter values if needed. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/usb/dwc2/params.c b/d

[PATCH v2 03/28] usb: dwc2: Fix comment alignment and format

2017-01-17 Thread John Youn
Fix misaligned and over 80-character comments. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 19 ++- drivers/usb/dwc2/gadget.c | 43 +++ drivers/usb/dwc2/hcd.c | 2 +- drivers/usb/dwc2/hcd_intr.c | 37 ++

[PATCH v2 04/28] usb: dwc2: Fix logical continuations

2017-01-17 Thread John Youn
Fix the formatting of logical statements to end the line with the logical operator. Signed-off-by: John Youn --- drivers/usb/dwc2/core_intr.c | 5 ++--- drivers/usb/dwc2/hcd_ddma.c | 8 drivers/usb/dwc2/hcd_queue.c | 5 ++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --gi

[PATCH v2 16/28] usb: dwc2: Remove platform static params

2017-01-17 Thread John Youn
Remove the platform-specific static param structs and set only those params that are necessary for each platform. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 262 +++--- 1 file changed, 108 insertions(+), 154 deletions(-) diff --git a/drivers

[PATCH v2 15/28] usb: dwc2: Check core parameters

2017-01-17 Thread John Youn
Check that core parameters have valid values and adjust them if they aren't. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 185 ++ 1 file changed, 185 insertions(+) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 44

[PATCH v2 17/28] usb: dwc2: Fix usage of bool params

2017-01-17 Thread John Youn
Check these parameters only for true or false. There is no need to check for greater or less than 0. Signed-off-by: John Youn --- drivers/usb/dwc2/core.c | 4 +- drivers/usb/dwc2/core.h | 5 -- drivers/usb/dwc2/core_intr.c | 2 +- drivers/usb/dwc2/gadget.c| 2 +- drivers/us

[PATCH v2 01/28] usb: dwc2: Cleanup some checkpatch issues

2017-01-17 Thread John Youn
This commmit is the result of running checkpatch --fix. The results were verified for correctness. Some of the fixes result in line over 80 char which we will fix manually later. The following is a summary of what was done by checkpatch: * Remove externs on function prototypes. * Replace symbolic

[PATCH v2 14/28] usb: dwc2: Rearrange param structure members

2017-01-17 Thread John Youn
Group the members by global, host, and gadget params. Formatting and organizational change only. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 51 ++--- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/

[PATCH v2 13/28] usb: dwc2: Update parameter types

2017-01-17 Thread John Youn
Update the param types to appropriately sized ints and bools. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 52 - 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 7256b

[PATCH v2 18/28] usb: dwc2: Remove unnecessary parameters

2017-01-17 Thread John Youn
Further reduce the set of parameters set by platforms. Many of them are unnecessary as they should be reported by hardware. They should only need to be overridden if there is a problem. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 11 --- 1 file changed, 11 deletions(-) diff

[PATCH v2 21/28] usb: dwc2: Show dr_mode via debugfs

2017-01-17 Thread John Youn
Show the value of dr_mode via a debufs file. Signed-off-by: John Youn --- drivers/usb/dwc2/debugfs.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c index 57747b0df595..794b959a7c8c 100644 --- a/drivers/us

[PATCH v2 26/28] usb: dwc2: host: use msleep() for long delay

2017-01-17 Thread John Youn
From: Nicholas Mc Guire ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 100ms delays here passing the adjusted "min" value to msleep(). This helps reduce the load on the hrtimer subsystem. Link: http://lkml.org/lkml/2017/1/11/377 Fixes: commit 2

[PATCH v2 06/28] usb: dwc2: Fix lines over 80 characters

2017-01-17 Thread John Youn
Fix lines over 80 characters. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 13 + drivers/usb/dwc2/gadget.c | 14 +- drivers/usb/dwc2/hcd.c | 4 ++-- drivers/usb/dwc2/hcd_intr.c | 13 +++-- drivers/usb/dwc2/params.c | 14 +++--- 5 fi

[PATCH v2 28/28] usb: dwc2: host: use msleep() for long delays

2017-01-17 Thread John Youn
From: Nicholas Mc Guire ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 20+ ms delays here passing the adjusted "min" value to msleep(). This helps reduce the load on the hrtimer subsystem. [johnyoun: minor rebase] Signed-off-by: Nicholas Mc Gui

[PATCH v2 20/28] usb: dwc2: Remove debug prints in params.c

2017-01-17 Thread John Youn
Remove debugging prints to show params. Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 56 --- 1 file changed, 56 deletions(-) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 0e7f0f92c18f..620b02723f0d 100644 --- a/d

[PATCH v2 23/28] usb: dwc2: Workaround case where GOTGCTL state is wrong

2017-01-17 Thread John Youn
From: John Stultz When removing a USB-A to USB-otg adapter cable, we get a change status irq, and then in dwc2_conn_id_status_change, we erroniously see the GOTGCTL_CONID_B flag set. This causes us to get stuck in the "while (!dwc2_is_device_mode(hsotg))" loop, spitting out "Waiting for Peripher

[PATCH v2 19/28] usb: dwc2: Add debugfs file to show params

2017-01-17 Thread John Youn
Show the core params and hardware params. Signed-off-by: John Youn --- drivers/usb/dwc2/debugfs.c | 127 + 1 file changed, 127 insertions(+) diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c index cad621f02972..57747b0df595 100644 -

[PATCH v2 24/28] usb: dwc2: Force port resume on switching to device mode

2017-01-17 Thread John Youn
From: Chen Yu We've seen failures when switching between host and gadget mode, which was diagnosed as being caused due to the bus being auto-suspended when we switched. So this patch forces a port resume when switching to device mode if the bus is suspended. Cc: Wei Xu Cc: Guodong Xu Cc: Amit

  1   2   >