Re: [PATCH] doc: usb: Fix typo in gadget_multi documentation

2016-04-15 Thread Jonathan Corbet
On Tue, 12 Apr 2016 18:13:27 +0100 Diego Herranz wrote: > It tries to "match" drivers for each interface (not "much"). Indeed. Applied to the docs tree, thanks. jon -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org Mor

Re: Unstable ehci(-platform) when using root hub (hw lockup after port reset problem?)

2016-04-15 Thread Rafał Miłecki
On 15 April 2016 at 17:33, Alan Stern wrote: > On Fri, 15 Apr 2016, Rafał Miłecki wrote: > >> Hello >> >> >> I'm seeing some problems with EHCI stability on two families of >> Broadcom devices: >> 1) CONFIG_MIPS=y, CONFIG_BCM47XX=y >> 2) CONFIG_ARM=y, CONFIG_ARCH_BCM_5301X=y >> both of them use bc

Major improvements to the ch341 driver v4

2016-04-15 Thread Grigori Goronzy
Hi, here's a hopefully final v4 of my ch341 patchset. Changelog below this time, because it's cleary better this way. Please review. v4: - Fix parity even/odd mixup introduced in v3. - Fix compilation errors of intermediate commits introduced in v3. v3: - Use u8 shorthand for unsigned char. -

[PATCH v4 04/13] USB: ch341: fix USB buffer allocations

2016-04-15 Thread Grigori Goronzy
Use the correct types and sizes. v2: use u8 shorthand for unsigned char. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index db4b561..95c8a40 10

[PATCH v4 11/13] USB: ch341: improve B0 handling

2016-04-15 Thread Grigori Goronzy
Check for B0 in a more idiomatic way and make sure to not enable RTS/CTS hardware flow control in B0 as it may override the control lines. Also make sure to only enable RTS/DTR if there's a transition from B0. v2: use c_cflag macros. v3: rebase. Signed-off-by: Grigori Goronzy --- drivers/usb/s

[PATCH v4 01/13] USB: ch341: fix error handling on resume

2016-04-15 Thread Grigori Goronzy
This may fail, do not assume it always works. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index c73808f..63df8ce 100644 --- a/drivers/usb/serial/ch341.

[PATCH v4 09/13] USB: ch341: fix coding style

2016-04-15 Thread Grigori Goronzy
No functional change. The following adjustments were made to be more in line with official coding style and to be more consistent. Stop mixing tabs and spaces for alignment. Stop putting labels and statements into the same line. Use braces consistently for a single statement. v2: drop most cha

[PATCH v4 07/13] USB: ch341: add debug output for chip version

2016-04-15 Thread Grigori Goronzy
There are at least two hardware revisions, this may be helpful in case compatibility issues need to be debugged. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 2fbec4a

[PATCH v4 02/13] USB: ch341: add LCR register definitions

2016-04-15 Thread Grigori Goronzy
BREAK2 seems to be a misnomer, the register configures various aspects of the UART configuration. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial

[PATCH v4 08/13] USB: ch341: add support for RTS/CTS flow control

2016-04-15 Thread Grigori Goronzy
v2: use correct flag variable. v3: fix compilation Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index e475677..7ca21a1 100644 --- a/drivers/usb/serial/ch341.c

[PATCH v4 13/13] USB: ch341: implement tx_empty callback

2016-04-15 Thread Grigori Goronzy
The status bit was found with USB captures of the Windows driver and some luck. Tested on CH340G and CH341A. v2: unify general status definitions Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) dif

[PATCH v4 03/13] USB: ch341: add definitions for modem control

2016-04-15 Thread Grigori Goronzy
Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 1ab4384..db4b561 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c @@ -61,6 +61,

[PATCH v4 12/13] USB: ch341: get rid of default configuration

2016-04-15 Thread Grigori Goronzy
If the serial port hasn't been opened yet, no baud rate should be set and RTS/DTR need to be deasserted. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 3ce2041..

[PATCH v4 05/13] USB: ch341: reinitialize chip on reconfiguration

2016-04-15 Thread Grigori Goronzy
Changing the LCR register after initialization does not seem to be reliable on all chips (particularly not on CH341A). Restructure initialization and configuration to always reinit the chip on configuration changes instead and pass the LCR register value directly to the initialization command. v2

[PATCH v4 06/13] USB: ch341: add support for parity, frame length, stop bits

2016-04-15 Thread Grigori Goronzy
With the new reinitialization method, configuring parity, different frame lengths and different stop bit settings work as expected on both CH340G and CH341A. This has been extensively tested with a logic analyzer. v2: only set mark/space when parity is enabled, simplifications, patch termios HW f

[PATCH v4 10/13] USB: ch341: clean up messages

2016-04-15 Thread Grigori Goronzy
No functional change. Remove explicit function name printing, it's easy to use dynamic debug to print it every time, if required. Fix capitalization and phrasing in some cases. Drop useless information like a USB buffer pointer, which is not helpful. Signed-off-by: Grigori Goronzy --- drivers/

Re: [-next] BUG_ON in scsi_target_destroy()

2016-04-15 Thread Martin K. Petersen
> "James" == James Bottomley writes: James> The STARGET_REMOVE state you added only applies to the case we're James> trying to kill a target. In the natural operation case, which is James> what everyone else is running into, we will try to remove a James> running target when it has no more s

Re: [PATCHv5] usb: dwc2: Add reset control to dwc2

2016-04-15 Thread John Youn
On 4/14/2016 2:38 PM, dingu...@opensource.altera.com wrote: > From: Dinh Nguyen > > Allow for platforms that have a reset controller driver in place to bring > the USB IP out of reset. > > Signed-off-by: Dinh Nguyen > --- > v5: updated error conditions for not finding the reset property > v4: u

Re: [PATCH v4 2/7] dt-bindings: Add bindings for phy-da8xx-usb

2016-04-15 Thread Sergei Shtylyov
On 04/15/2016 07:13 PM, David Lechner wrote: Device tree binding for new phy-da8xx-usb driver. Signed-off-by: David Lechner Acked-by: Rob Herring --- v4 changes: * swapped order of usb20 and usb11 to be in logical order of reg address. .../devicetree/bindings/phy/phy-da8xx-usb.txt |

Re: [PATCH v4 2/7] dt-bindings: Add bindings for phy-da8xx-usb

2016-04-15 Thread David Lechner
On 04/15/2016 05:48 AM, Sergei Shtylyov wrote: On 4/14/2016 9:35 PM, David Lechner wrote: Device tree binding for new phy-da8xx-usb driver. Signed-off-by: David Lechner Acked-by: Rob Herring --- v4 changes: * swapped order of usb20 and usb11 to be in logical order of reg address. .../de

[PATCH] USB: EHCI: make all debugging depend on CONFIG_DYNAMIC_DEBUG

2016-04-15 Thread Alan Stern
The debugging facilities in ehci-dbg.c follow an uneven pattern. Some of them are protected by "#ifdef CONFIG_DYNAMIC_DEBUG" and some aren't, presumably in the hope of having some of the debugging output available in any configuration. This leads to build problems when dynamic debugging isn't con

Re: Unstable ehci(-platform) when using root hub (hw lockup after port reset problem?)

2016-04-15 Thread Alan Stern
On Fri, 15 Apr 2016, Rafał Miłecki wrote: > Hello > > > I'm seeing some problems with EHCI stability on two families of > Broadcom devices: > 1) CONFIG_MIPS=y, CONFIG_BCM47XX=y > 2) CONFIG_ARM=y, CONFIG_ARCH_BCM_5301X=y > both of them use bcma-hcd driver which registers "ehci-platform" device. >

Re: [PATCHv4 2/3] usb: storage: scsiglue: limit USB3 devices to 2048 sectors

2016-04-15 Thread Alan Stern
On Fri, 15 Apr 2016, Felipe Balbi wrote: > Alan Stern writes: > > On Thu, 14 Apr 2016, Felipe Balbi wrote: > > > >> >> --- a/drivers/usb/storage/scsiglue.c > >> >> +++ b/drivers/usb/storage/scsiglue.c > >> >> @@ -127,6 +127,11 @@ static int slave_configure(struct scsi_device > >> >> *sdev) > >>

RE: [PATCH 1/1] usb: lpm: add boot flag to disable lpm

2016-04-15 Thread Alan Stern
On Thu, 14 Apr 2016, Matthew Giassa wrote: > The patch did not have any noticeable effect, and the cameras remain in > the problematic state. Can you provide a usbmon trace for a kernel using the second patch? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in

RE: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread David Fisher
>Hi, > >Grygorii Strashko writes: >> On 04/15/2016 02:31 PM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Catalin Marinas writes: On Fri, Apr 15, 2016 at 01:30:01PM +0300, Felipe Balbi wrote: > Catalin Marinas writes: >> On Fri, Apr 15, 2016 at 11:01:08AM +0100, Catalin Marinas wrote:

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Grygorii Strashko
On 04/15/2016 03:55 PM, Felipe Balbi wrote: > Grygorii Strashko writes: >> On 04/15/2016 02:31 PM, Felipe Balbi wrote: >>> Catalin Marinas writes: On Fri, Apr 15, 2016 at 01:30:01PM +0300, Felipe Balbi wrote: > Catalin Marinas writes: >> On Fri, Apr 15, 2016 at 11:01:08AM +0100, Cat

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Catalin Marinas
On Fri, Apr 15, 2016 at 02:56:17PM +0300, Grygorii Strashko wrote: > From c68225e97e8c9505aca4ceab19a0d8e4dde31b73 Mon Sep 17 00:00:00 2001 > From: Grygorii Strashko > Date: Thu, 31 Mar 2016 19:40:52 +0300 > Subject: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev > > Now not a

Re: [PATCH 1/1] usb: musb: gadget: nuke endpoint before setting its descriptor to NULL

2016-04-15 Thread Bin Liu
Hi, On Thu, Apr 14, 2016 at 07:33:43PM +0300, Tal Shorer wrote: > Some functions, such as f_sourcesink, rely on an endpoint's desc > field during their requests' complete() callback, so clear it only > _after_ nuking all requests to avoid NULL pointer dereference. > > Signed-off-by: Tal Shorer

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Felipe Balbi
Hi, Grygorii Strashko writes: > On 04/15/2016 02:31 PM, Felipe Balbi wrote: >> >> Hi, >> >> Catalin Marinas writes: >>> On Fri, Apr 15, 2016 at 01:30:01PM +0300, Felipe Balbi wrote: Catalin Marinas writes: > On Fri, Apr 15, 2016 at 11:01:08AM +0100, Catalin Marinas wrote: >> On

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Grygorii Strashko
On 04/15/2016 02:31 PM, Felipe Balbi wrote: > > Hi, > > Catalin Marinas writes: >> On Fri, Apr 15, 2016 at 01:30:01PM +0300, Felipe Balbi wrote: >>> Catalin Marinas writes: On Fri, Apr 15, 2016 at 11:01:08AM +0100, Catalin Marinas wrote: > On Fri, Apr 15, 2016 at 12:49:15PM +0300, Feli

Re: [PATCH v5 1/4] leds: core: add generic support for RGB Color LED's

2016-04-15 Thread Pavel Machek
Hi! > >>How about implementing patterns as a specific typer of triggers? > >>Let's say we have ledtrig-rgb-pattern: > > > >Well, we'd need ledtrig-rgb-pattern-1, ledtrig-rgb-pattern-2, ... , as we > >can have more than one rgb led. But yes. > > Triggers can have many listeners, i.e. led_trigger_e

[PATCH 3/3] usb: dwc3: debugfs: dump out endpoint details

2016-04-15 Thread Felipe Balbi
There's a bunch of information in the debug register set from dwc3 which is useful in some debugging scenarios. Let's dump them out in endpoint-specific directories and designated files. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debugfs.c | 302

[PATCH 2/3] usb: dwc3: core: add helper to extract trb type

2016-04-15 Thread Felipe Balbi
This helper will be used later to convert trb type into a human-readable string for debugfs. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index c3ea4270bf33..bbbd1789596e 100644 --- a

[PATCH 1/3] usb: dwc3: core: add fifo space helper

2016-04-15 Thread Felipe Balbi
this helper will be used, initially, to dump space of different queues and fifos in dwc3 to debugfs. Later, it'll be used to issue remote wakeup when we want to start a transfer and there's something in a TX FIFO. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.c | 14 ++ drive

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Felipe Balbi
Hi, Catalin Marinas writes: > On Fri, Apr 15, 2016 at 01:30:01PM +0300, Felipe Balbi wrote: >> Catalin Marinas writes: >> > On Fri, Apr 15, 2016 at 11:01:08AM +0100, Catalin Marinas wrote: >> >> On Fri, Apr 15, 2016 at 12:49:15PM +0300, Felipe Balbi wrote: >> >> > Catalin Marinas writes: >> >>

Re: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-15 Thread Roger Quadros
On 15/04/16 12:25, Peter Chen wrote: > On Tue, Apr 05, 2016 at 05:05:12PM +0300, Roger Quadros wrote: >> + * usb_otg_register() - Register the OTG/dual-role device to OTG core >> + * @dev: OTG/dual-role controller device. >> + * @config: OTG configuration. >> + * >> + * Registers the OTG/dual-role

Re: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-15 Thread Roger Quadros
On 15/04/16 12:59, Yoshihiro Shimoda wrote: > Hi, > >> From: Roger Quadros >> Sent: Thursday, April 14, 2016 8:32 PM >> >> On 14/04/16 14:15, Yoshihiro Shimoda wrote: >>> Hi, >>> > < snip > > @@ -865,7 +867,8 @@ int usb_otg_register_hcd(struct usb_hcd *hcd, > unsigned int irqnum, >

Re: [PATCH v4 2/7] dt-bindings: Add bindings for phy-da8xx-usb

2016-04-15 Thread Sergei Shtylyov
Hello. On 4/14/2016 9:35 PM, David Lechner wrote: Device tree binding for new phy-da8xx-usb driver. Signed-off-by: David Lechner Acked-by: Rob Herring --- v4 changes: * swapped order of usb20 and usb11 to be in logical order of reg address. .../devicetree/bindings/phy/phy-da8xx-usb.txt

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Catalin Marinas
On Fri, Apr 15, 2016 at 01:30:01PM +0300, Felipe Balbi wrote: > Catalin Marinas writes: > > On Fri, Apr 15, 2016 at 11:01:08AM +0100, Catalin Marinas wrote: > >> On Fri, Apr 15, 2016 at 12:49:15PM +0300, Felipe Balbi wrote: > >> > Catalin Marinas writes: > >> > > On Thu, Apr 14, 2016 at 12:46:47P

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Felipe Balbi
Catalin Marinas writes: > On Fri, Apr 15, 2016 at 11:01:08AM +0100, Catalin Marinas wrote: >> On Fri, Apr 15, 2016 at 12:49:15PM +0300, Felipe Balbi wrote: >> > Catalin Marinas writes: >> > > On Thu, Apr 14, 2016 at 12:46:47PM +, David Fisher wrote: >> > >> dwc3 is in dual-role, with "synopsy

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Felipe Balbi
Hi, Catalin Marinas writes: > On Fri, Apr 15, 2016 at 12:49:15PM +0300, Felipe Balbi wrote: >> Catalin Marinas writes: >> > On Thu, Apr 14, 2016 at 12:46:47PM +, David Fisher wrote: >> >> dwc3 is in dual-role, with "synopsys,dwc3" specified in DT. >> >> >> >> When xhci is probed, initiated

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Catalin Marinas
On Fri, Apr 15, 2016 at 11:01:08AM +0100, Catalin Marinas wrote: > On Fri, Apr 15, 2016 at 12:49:15PM +0300, Felipe Balbi wrote: > > Catalin Marinas writes: > > > On Thu, Apr 14, 2016 at 12:46:47PM +, David Fisher wrote: > > >> dwc3 is in dual-role, with "synopsys,dwc3" specified in DT. > > >>

RE: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-15 Thread Yoshihiro Shimoda
Hi, > From: Yoshihiro Shimoda > Sent: Friday, April 15, 2016 6:59 PM > > Hi, > > > From: Roger Quadros > > Sent: Thursday, April 14, 2016 8:32 PM > > > > On 14/04/16 14:15, Yoshihiro Shimoda wrote: > > > Hi, > > > > < snip > > > >>> @@ -865,7 +867,8 @@ int usb_otg_register_hcd(struct usb_hcd *hc

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Catalin Marinas
On Fri, Apr 15, 2016 at 12:49:15PM +0300, Felipe Balbi wrote: > Catalin Marinas writes: > > On Thu, Apr 14, 2016 at 12:46:47PM +, David Fisher wrote: > >> dwc3 is in dual-role, with "synopsys,dwc3" specified in DT. > >> > >> When xhci is probed, initiated from dwc3/host.c (not DT), we get : >

RE: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-15 Thread Yoshihiro Shimoda
Hi, > From: Roger Quadros > Sent: Thursday, April 14, 2016 8:32 PM > > On 14/04/16 14:15, Yoshihiro Shimoda wrote: > > Hi, > > < snip > > >>> @@ -865,7 +867,8 @@ int usb_otg_register_hcd(struct usb_hcd *hcd, > >>> unsigned int irqnum, > >>>* we're ready only if we have shared HCD > >>>*

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Felipe Balbi
Hi, Catalin Marinas writes: > On Thu, Apr 14, 2016 at 12:46:47PM +, David Fisher wrote: >> dwc3 is in dual-role, with "synopsys,dwc3" specified in DT. >> >> When xhci is probed, initiated from dwc3/host.c (not DT), we get : >> xhci-hcd: probe of xhci-hcd.7.auto failed with error -5 >> This

Re: dwc3 initiated xhci probe problem in arm64 4.4 kernel due to DMA setup

2016-04-15 Thread Catalin Marinas
On Thu, Apr 14, 2016 at 12:46:47PM +, David Fisher wrote: > dwc3 is in dual-role, with "synopsys,dwc3" specified in DT. > > When xhci is probed, initiated from dwc3/host.c (not DT), we get : > xhci-hcd: probe of xhci-hcd.7.auto failed with error -5 > This -EIO error originated from inside dma_

Re: [PATCHv4 2/3] usb: storage: scsiglue: limit USB3 devices to 2048 sectors

2016-04-15 Thread Felipe Balbi
Alan Stern writes: > On Thu, 14 Apr 2016, Felipe Balbi wrote: > >> >> --- a/drivers/usb/storage/scsiglue.c >> >> +++ b/drivers/usb/storage/scsiglue.c >> >> @@ -127,6 +127,11 @@ static int slave_configure(struct scsi_device *sdev) >> >> if (queue_max_hw_sectors(sdev->request_queue) > max_

Unstable ehci(-platform) when using root hub (hw lockup after port reset problem?)

2016-04-15 Thread Rafał Miłecki
Hello I'm seeing some problems with EHCI stability on two families of Broadcom devices: 1) CONFIG_MIPS=y, CONFIG_BCM47XX=y 2) CONFIG_ARM=y, CONFIG_ARCH_BCM_5301X=y both of them use bcma-hcd driver which registers "ehci-platform" device. An interesting note is that this stability problem occurs o

Re: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-15 Thread Peter Chen
On Tue, Apr 05, 2016 at 05:05:12PM +0300, Roger Quadros wrote: > + * usb_otg_register() - Register the OTG/dual-role device to OTG core > + * @dev: OTG/dual-role controller device. > + * @config: OTG configuration. > + * > + * Registers the OTG/dual-role controller device with the USB OTG core. > +

Re: ehci-dbg prints random memory (# CONFIG_DYNAMIC_DEBUG is not set)

2016-04-15 Thread Rafał Miłecki
On 13 April 2016 at 17:25, Alan Stern wrote: > On Wed, 13 Apr 2016, Rafał Miłecki wrote: >> I'm trying to debug some EHCI issue so I enabled debugging by adding >> ccflags-y := -DDEBUG >> to the drivers/usb/host/Makefile >> >> Some of debugging lines contain random memory, e.g.: >> ehci-platform e