Re: [bug report] usb: gadget: f_fs: handle control requests not directed to interface or endpoint

2016-10-19 Thread Felix Hädicke
Hello Dan Carpenter, thanks for this. It is indeed a parentheses error. I am currently testing a patch to correct this. Regards, Felix > Hello Felix Hädicke, > > The patch 54dfce6d07b0: "usb: gadget: f_fs: handle control requests > not directed to interface or endpoint" from Jun 22, 2016, leads

[PATCH v9 1/1] USB: serial: cp210x: Adding GPIO support for CP2105

2016-10-19 Thread Martyn Welch
This patch adds support for the GPIO found on the CP2105. Unlike the GPIO provided by some of the other devices supported by the cp210x driver, the GPIO on the CP2015 is muxed on pins otherwise used for serial control lines. The GPIO have been configured in 2 separate banks as the choice to

RE: [PATCH 0/4] usb: host: xhci: plat: add support for Renesas r8a7796 SoC

2016-10-19 Thread Yoshihiro Shimoda
Hi, > -Original Message- > From: Yoshihiro Shimoda > Sent: Wednesday, August 24, 2016 5:53 PM > To: mathias.ny...@intel.com; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com > Cc: linux-usb@vger.kernel.org; linux-renesas-...@vger.kernel.org; Yoshihiro > Shimoda

Re: [PATCH 1/1] usb: xhci: clean up error_bitmask usage

2016-10-19 Thread Mathias Nyman
Hi On 19.10.2016 03:53, Lu Baolu wrote: In xhci_handle_event(), when errors are detected, driver always sets a bit in error_bitmask (one member of the xhci private driver data). That means users have to retrieve and decode the value of error_bitmask in xhci private driver data if they want to

Re: [PATCH 1/1] usb: xhci: clean up error_bitmask usage

2016-10-19 Thread Lu Baolu
Hi, On 10/19/2016 02:52 PM, Mathias Nyman wrote: > Hi > > On 19.10.2016 03:53, Lu Baolu wrote: >> In xhci_handle_event(), when errors are detected, driver always sets >> a bit in error_bitmask (one member of the xhci private driver data). >> That means users have to retrieve and decode the value

Re: [PATCH v8 2/3] usb: dwc2: assert phy reset when waking up in rk3288 platform

2016-10-19 Thread John Youn
On 10/15/2016 8:07 AM, 陈豪 wrote: > 2016-09-25 2:50 GMT+08:00 Randy Li : >> On the rk3288 USB host-only port (the one that's not the OTG-enabled >> port) the PHY can get into a bad state when a wakeup is asserted (not >> just a wakeup from full system suspend but also a wakeup

[PATCH 13/15] Documentation: devicetree: dwc2: Add host DMA binding

2016-10-19 Thread John Youn
Add the host-dma property to devicetree. This controls whether to use DMA in host mode. Signed-off-by: John Youn --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt

[PATCH 09/15] usb: dwc2: Move gadget settings into core_params

2016-10-19 Thread John Youn
Move the gadget devicetree settings into the core_params structure and document them. Then set and check them in params.c, with the addition of some helper functions, and remove the equivalent code in gadget.c. Because these parameters came from the standalone s3c driver, they have a fixed

[PATCH 10/15] usb: dwc2: Rename the dma_enable parameter to host_dma

2016-10-19 Thread John Youn
This parameter will be pushed to devicetree. Rename it so that it is more consistent with other bindings. It only affects host-mode operation so prefix it with "host". Also this can't be a boolean (because we need to turn it on/off while allowing for a default behavior), so just call it

[PATCH 05/15] usb: dwc2: Move parameter initialization into params.c

2016-10-19 Thread John Youn
Consolidate and move all the parameter initialization code from the probe function to params.c. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 3 +++ drivers/usb/dwc2/params.c | 29 + drivers/usb/dwc2/platform.c | 27

[PATCH 04/15] usb: dwc2: Declare the core params struct statically

2016-10-19 Thread John Youn
This makes it consistent with the hw_params struct and simplifies the memory management for future refactoring. Fix up usage in all files. Signed-off-by: John Youn --- drivers/usb/dwc2/core.c | 12 +-- drivers/usb/dwc2/core.h | 2 +-

[PATCH 15/15] usb: dwc2: Add PCI properties

2016-10-19 Thread John Youn
From: Vahram Aharonyan Add device parameters handling in dwc2-pci similar what is done in dwc3. Signed-off-by: Vahram Aharonyan Signed-off-by: John Youn --- drivers/usb/dwc2/pci.c | 19 +++ 1 file changed, 19

[PATCH 12/15] usb: dwc2: Rename the dma_desc_enable_fs parameter

2016-10-19 Thread John Youn
Rename this parameter for the same reason as "host_dma". Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 4 ++-- drivers/usb/dwc2/hcd.c | 8 drivers/usb/dwc2/hcd_intr.c | 2 +- drivers/usb/dwc2/params.c | 22 +++--- 4 files

[PATCH 07/15] usb: dwc2: Remove unnecessary prototypes

2016-10-19 Thread John Youn
Remove the unnecessary prototypes for all the parameter setting functions and declare those functions 'static' in the params.c file. Also remove the duplicate documentation that went along with them. They are already documented as part of the params structure definition. Then move the constants

[PATCH 03/15] usb: dwc2: Add params.c file

2016-10-19 Thread John Youn
Add a params.c file and move all driver parameter code there, including all the static parameter definitions. Signed-off-by: John Youn --- drivers/usb/dwc2/Makefile |1 + drivers/usb/dwc2/core.c | 918 +-- drivers/usb/dwc2/core.h

[PATCH 11/15] usb: dwc2: Rename the dma_desc_enable parameter

2016-10-19 Thread John Youn
Rename this parameter for the same reason as "host_dma". Signed-off-by: John Youn --- drivers/usb/dwc2/core.c | 4 ++-- drivers/usb/dwc2/core.h | 4 ++-- drivers/usb/dwc2/hcd.c | 36 ++-- drivers/usb/dwc2/hcd_intr.c | 24

[PATCH 08/15] usb: dwc2: Rename host_rx_fifo_size hardware parameter

2016-10-19 Thread John Youn
This hardware parameter is not host specific. It also applies to device mode. Drop the "host" from the name to make that clear. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 2 +- drivers/usb/dwc2/params.c | 10 +- 2 files changed, 6 insertions(+), 6

[PATCH 14/15] usb: dwc2: Read host DMA device properties

2016-10-19 Thread John Youn
Read in and set the host DMA-related device properties. This is used to control the DMA mode as a host. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 10 +++-- drivers/usb/dwc2/params.c | 103 +++--- 2 files changed, 40

[PATCH 06/15] usb: dwc2: Remove dwc2_set_all_params function

2016-10-19 Thread John Youn
Replace this by statically defining a function with defaults, and just assigning it. This will allow us to use parameters of any type and any default value. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 2 -- drivers/usb/dwc2/params.c | 78

[PATCH 02/15] usb: dwc2: Remove unused hardware parameter

2016-10-19 Thread John Youn
The dma_desc_fs_enable does not correspond to any hardware parameter and is unused. Remove it. Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 2a21a04..086bbdf

Re: [PATCH v8 2/3] usb: dwc2: assert phy reset when waking up in rk3288 platform

2016-10-19 Thread Randy Li
On 10/20/2016 06:58 AM, John Youn wrote: On 10/15/2016 8:07 AM, 陈豪 wrote: 2016-09-25 2:50 GMT+08:00 Randy Li : On the rk3288 USB host-only port (the one that's not the OTG-enabled port) the PHY can get into a bad state when a wakeup is asserted (not just a wakeup from full

Re: [PATCH] ARM: dts: imx50: fix USB nodes

2016-10-19 Thread Peter Chen
On Wed, Oct 19, 2016 at 03:22:35PM +0200, Alexander Kurz wrote: > Add usbphy and usbmisc nodes to the SOC DTS. fsl,imx53-usbmisc offers > compatible support for the required usbmisc units 0 and 1. > Also fix the clock source for the two usb cores according to the > imx50 reference manual. > >

[RFC][PATCH 2/2 v2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-10-19 Thread John Stultz
From: Chen Yu The Hi6220's usb controller is limited in that it does not support "Split Transactions", so it does not support communicating with low-speed and full-speed devices behind a high-speed hub. Thus it requires a quirk so that we can manually drop the usb speed

[RFC][PATCH 0/2 v2] dwc2 fixes for HiKey

2016-10-19 Thread John Stultz
I wanted to send out two patches we're using on the dwc2 driver in order to make HiKey function. The first is seemingly just a bug fix we ran into when changing modes while the bus was auto-suspended. The second is a little more interesting as it works around a limitation of the the device in

[PATCH] usb: renesas_usbhs: add wait after initialization for R-Car Gen3

2016-10-19 Thread Yoshihiro Shimoda
Since the controller on R-Car Gen3 doesn't have any status registers to detect initialization (LPSTS.SUSPM = 1) and the initialization needs up to 45 usec, this patch adds wait after the initialization. Otherwise, writing other registers (e.g. INTENB0) will fail. Fixes: de18757e272d ("usb:

Re: [RESEND PATCH v2 4/4] usb: doc: add document for USB3 debug port usage

2016-10-19 Thread Lu Baolu
Hi Jani, On 10/19/2016 03:48 PM, Jani Nikula wrote: > On Wed, 19 Oct 2016, Lu Baolu wrote: >> Add Documentation/usb/usb3-debug-port.txt. This document includes >> the user guide for USB3 debug port. > If you're adding completely new files, please at least consider

[RFC][PATCH 1/2 v2] usb: dwc2: Force port resume on switching to device mode

2016-10-19 Thread John Stultz
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

[PATCH 01/15] usb: dwc2: Remove unnecessary kfree

2016-10-19 Thread John Youn
This shouldn't be freed by the HCD as it is owned by the core and allocated with devm_kzalloc. Signed-off-by: John Youn --- drivers/usb/dwc2/hcd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index df5a065..1b6f5e1

[PATCH 00/15] usb: dwc2: Fix up, consolidate, and simplify driver parameters

2016-10-19 Thread John Youn
Currently there are multiple methods of setting parameters in the dwc2 driver. And PCI drivers have no way of setting any paramters. For our IP validation environment, which uses a PCIe FPGA platform, we need a way to override hardware detected values in order to fully cover hardware

New ID for Juniper router built in usb-serial 0x10c4 0x8470 cp210x

2016-10-19 Thread Ben White
Hi, I'm playing with some Juniper SRX devices, which have built in usb-serial. They don't come up automatically when plugging in, however I've found I can add the Vendor/ProductID to the cp210x module and this fixes it. Something in the dmesg output suggested I emailed you to get it added to the

Re: [RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-19 Thread Peter Zijlstra
On Wed, Oct 19, 2016 at 08:18:22AM +0800, Lu Baolu wrote: > +++ b/drivers/usb/early/xhci-dbc.c > +static int xdbc_bulk_write(const char *bytes, int size) > +{ > + unsigned long flags; > + int ret, timeout = 0; > + > + spin_lock_irqsave(, flags); Yikes!! So how is this supposed to

[PATCH] ARM: dts: imx50: fix USB nodes

2016-10-19 Thread Alexander Kurz
Add usbphy and usbmisc nodes to the SOC DTS. fsl,imx53-usbmisc offers compatible support for the required usbmisc units 0 and 1. Also fix the clock source for the two usb cores according to the imx50 reference manual. Signed-off-by: Alexander Kurz ---

Re: [PATCH v8 1/1] USB: serial: cp210x: Adding GPIO support for CP2105

2016-10-19 Thread Johan Hovold
On Tue, Oct 11, 2016 at 12:04:48PM +0100, Martyn Welch wrote: > This patch adds support for the GPIO found on the CP2105. Unlike the GPIO > provided by some of the other devices supported by the cp210x driver, the > GPIO on the CP2015 is muxed on pins otherwise used for serial control > lines. The

Re: New ID for Juniper router built in usb-serial 0x10c4 0x8470 cp210x

2016-10-19 Thread Johan Hovold
On Wed, Oct 19, 2016 at 03:20:57PM +0100, Ben White wrote: > Hi, > > I'm playing with some Juniper SRX devices, which have built in usb-serial. > They don't come up automatically when plugging in, however I've found I can > add the Vendor/ProductID to the cp210x module and this fixes it. > >

Re: All USB devices stop working. Their reconnect not helps

2016-10-19 Thread Greg KH
On Tue, Oct 18, 2016 at 01:54:30PM +0500, Михаил Гаврилов wrote: > Excuse me I don't see that my previous message appeared in mail > archive list. So I repeat my previous message. > > On 14 October 2016 at 19:13, Greg KH wrote: > > xfs having issues? > > I am ask

[PATCH] USB: serial: cp210x: fix tiocmget error handling

2016-10-19 Thread Johan Hovold
The current tiocmget implementation would fail to report errors up the stack and instead leaked a few bits from the stack as a mask of modem-status flags. Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control") Cc: stable Signed-off-by: Johan Hovold

Re: [PATCH 2/4] USB: ch341: reinitialize chip on reconfiguration

2016-10-19 Thread Grigori Goronzy
On 2016-10-18 15:45, Johan Hovold wrote: On Tue, Oct 18, 2016 at 12:39:23PM -, Karl Palsson wrote: Perhaps it needs to be repeated more, but the current driver is so badly broken for so many devices that people simply don't use them. This insistence that any patch trying to fix this driver

Re: usb_ep_{dis,en}able() calling context (was: Re: [PATCH 2/3] usb: dwc3: gadget: wait for End Transfer to complete)

2016-10-19 Thread Felipe Balbi
Hi, Baolin Wang writes: >> Baolin Wang writes: >>> Sure. The problem I met was, when we change the USB function with >>> configfs frequently, sometimes it will hang the system to crash. The >>> reason is, we will start end transfer command when

Re: [PATCH] extcon: usb-gpio: Add VBUS detection support

2016-10-19 Thread Chanwoo Choi
Hi Roger, On 2016년 10월 07일 18:18, Roger Quadros wrote: > Hi Chanwoo, > > > On 27/09/16 08:48, Peter Chen wrote: >> On Tue, Sep 20, 2016 at 05:53:55PM +0300, Roger Quadros wrote: >>> Driver can now work with both ID and VBUS pins or either one of >>> them. >>> >>> There can be the following 3

[PATCH 1/2] USB: serial: cp210x: clean up CSIZE handling

2016-10-19 Thread Johan Hovold
CSIZE is two-bit wide and only CS5 through CS8 are possible values. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index

[PATCH 2/2] USB: serial: cp210x: return -EIO on short control transfers

2016-10-19 Thread Johan Hovold
Return -EIO on short control transfers rather than -EPROTO which is used for lower-level transfer errors. Signed-off-by: Johan Hovold --- drivers/usb/serial/cp210x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/cp210x.c

Re: [RESEND PATCH v2 4/4] usb: doc: add document for USB3 debug port usage

2016-10-19 Thread Jani Nikula
On Wed, 19 Oct 2016, Lu Baolu wrote: > Add Documentation/usb/usb3-debug-port.txt. This document includes > the user guide for USB3 debug port. If you're adding completely new files, please at least consider writing them in reStructuredText, so we can easily bolt them to

Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS

2016-10-19 Thread Anand Moon
Hi Krzysztof, On 10 October 2016 at 00:09, Krzysztof Kozlowski wrote: > On Sun, Oct 09, 2016 at 11:57:59PM +0530, Anand Moon wrote: >> hi Krzysztof, >> >> On 9 October 2016 at 22:57, Krzysztof Kozlowski wrote: >> > On Sun, Oct 09, 2016 at 10:45:40PM +0530,

[PATCH 2/2] usb: musb: Call pm_runtime from musb_gadget_queue

2016-10-19 Thread Bin Liu
From: Tony Lindgren If we're booting pandaboard using NFSroot over built-in g_ether, we can get the following after booting once and doing a warm reset: g_ether gadget: ecm_open g_ether gadget: notify connect true ... WARNING: CPU: 0 PID: 1 at drivers/bus/omap_l3_noc.c:147

[PATCH 0/2] musb-fixes for v4.9-rc2

2016-10-19 Thread Bin Liu
Hi Greg, Here are musb pm fixes for v4.9-rc2. Please let me know if any change is needed. Thanks, -Bin. --- Tony Lindgren (2): usb: musb: Fix hardirq-safe hardirq-unsafe lock order error usb: musb: Call pm_runtime from musb_gadget_queue drivers/usb/musb/musb_gadget.c | 4

[PATCH 1/2] usb: musb: Fix hardirq-safe hardirq-unsafe lock order error

2016-10-19 Thread Bin Liu
From: Tony Lindgren If we configure musb with 2430 glue as a peripheral, and then rmmod omap2430 module, we'll get the following error: [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ] ... rmmod/413 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: (>mutex){+.+.+.},

Re: [PATCH 1/2] host: ehci-exynos: Convert to use the SET_SYSTEM_SLEEP_PM_OPS

2016-10-19 Thread Alan Stern
On Wed, 19 Oct 2016, Anand Moon wrote: > I might be wrong, below is the kconfig option for PM_SLEEP > > Symbol: PM_SLEEP [=y] > Type : boolean > Defined at kernel/power/Kconfig > Depends on: SUSPEND [=y] || HIBERNATE_CALLBACKS [=n] > Selects: PM [=y] > > So we cannot set

[PATCH -next] wusb: fix error return code in wusb_prf()

2016-10-19 Thread Wei Yongjun
From: Wei Yongjun Fix to return error code -ENOMEM from the kmalloc() error handling case instead of 0, as done elsewhere in this function. Fixes: a19b882c07a6 ("wusb: Stop using the stack for sg crypto scratch space") Signed-off-by: Wei Yongjun

Re: [PATCH v5 11/23] usb: chipidea: Emulate OTGSC interrupt enable path

2016-10-19 Thread Peter Chen
On Tue, Oct 18, 2016 at 06:53:07PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-10-18 18:15:35) > > On Mon, Oct 17, 2016 at 06:56:24PM -0700, Stephen Boyd wrote: > > > In the case of an extcon-usb-gpio device being used with the > > > chipidea driver we'll sometimes miss the BSVIS event

Re: [PATCH 2/4] USB: ch341: reinitialize chip on reconfiguration

2016-10-19 Thread Johan Hovold
On Wed, Oct 19, 2016 at 09:26:39AM +0200, Grigori Goronzy wrote: > On 2016-10-18 15:45, Johan Hovold wrote: > > On Tue, Oct 18, 2016 at 12:39:23PM -, Karl Palsson wrote: > >> Perhaps it needs to be repeated more, but the current driver is > >> so badly broken for so many devices that people

[PATCH v2 2/2] usb: host: xhci: plat: add support for Renesas r8a7796 SoC

2016-10-19 Thread Yoshihiro Shimoda
This patch adds support for Renesas r8a7796 SoC. This SoC is not compatible with r8a7795 because using firmware version differs. Since the "V2" firmware can be used on both r8a7795 (es1.x) and r8a7796, the "renesas,rcar-gen3-xhci" keeps to use the "V2" for now. Signed-off-by: Yoshihiro Shimoda