Re: [PATCH 0/5] usb: xhci: Fix breakage on dual-role case

2015-08-20 Thread Roger Quadros
Hi Mathias, On 18/08/15 13:39, Roger Quadros wrote: Hi, Plugging and unplugging a USB-OTG adapter with a USB device into a am437x-gp-evm dual-role port (USB1) causes XHCI to malfunction and USB device to be no longer detected after a few iterations. The triggering case is so 1) USB1 in

Re: [PATCH] UAS: also check for ESHUTDOWN in error reporting

2015-08-20 Thread Hans de Goede
Hi, On 08/20/2015 11:16 AM, Oliver Neukum wrote: -ESHUTDOWN means that the HC has been unplugged. Reporting an error in that case makes no sense. Signed-off-by: Oliver Neukum oneu...@suse.com Looks good to me: Acked-by: Hans de Goede hdego...@redhat.com Regards, Hans ---

Some restrictions when using usbtest and g_zero

2015-08-20 Thread Peter Chen
Hi all, I have played usbtest and g_zero (f_sourcesink f_loopback) to do the tests between two boards these days, and have found some restrictions, I list them here, and to see if they are common problems and can be improved or not. - Test 13 will fail due to there is pending IN request

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: - Test 13 will fail due to there is pending IN request (f_sourcesink will queue a request unconditionally at its completion), and udc driver will run out error if that. udc driver must do that if it wants to wait, what ? test 13 works

Re: [PATCH v5 01/46] usb: gadget: encapsulate endpoint claiming mechanism

2015-08-20 Thread Robert Baldyga
On 08/20/2015 06:48 PM, Felipe Balbi wrote: On Thu, Aug 20, 2015 at 06:28:14PM +0200, Robert Baldyga wrote: Hi Felipe, On 08/20/2015 05:35 PM, Felipe Balbi wrote: [...] just letting you know that this regresses all gadget drivers making them try to disable previously disabled endpoints and

MUSB sysfs node naming convention

2015-08-20 Thread Bin Liu
Hi, Currently, the sysfs MUSB node name uses kernel device name global *auto* convention. So depending on kernel configuration, the two MUSB device nodes could be musb-hdrc.0.auto/musb-hdrc.1.auto, or musb-hdrc.1.auto/musb-hdrc.2.auto. Of cause the index could be any other number if there were

Re: [PATCH] usb: musb: omap2430: use *syscon* framework API to write to mailbox register

2015-08-20 Thread Kishon Vijay Abraham I
Hi, On Thursday 06 August 2015 02:17 PM, Tony Lindgren wrote: * Kishon Vijay Abraham I kis...@ti.com [150805 07:10]: On Wednesday 05 August 2015 01:31 PM, Tony Lindgren wrote: We don't have syscon-otghs and to me it seems we need a PHY driver as I pointed out at: If *syscon-otghs* is not

[PATCH] UAS: also check for ESHUTDOWN in error reporting

2015-08-20 Thread Oliver Neukum
-ESHUTDOWN means that the HC has been unplugged. Reporting an error in that case makes no sense. Signed-off-by: Oliver Neukum oneu...@suse.com --- drivers/usb/host/xhci-ext-caps.h | 0 drivers/usb/storage/uas.c| 15 --- 2 files changed, 8 insertions(+), 7 deletions(-) mode

RE: [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management

2015-08-20 Thread David Laight
From: Baolin Wang Sent: 14 August 2015 10:48 +/* In miliamps */ Spelling police: milliamps +static unsigned int wm831x_usb_limits[] = { + 0, + 2, + 100, + 500, + 900, + 1500, + 1800, + 550, +}; David -- To unsubscribe from this list: send the

Re: [PATCH 4/5] usb: xhci: stop everything on the first call to xhci_stop

2015-08-20 Thread Roger Quadros
On 18/08/15 15:14, Mathias Nyman wrote: On 18.08.2015 13:39, Roger Quadros wrote: xhci_stop will be called twice, once for the shared hcd and again for the primary hcd. We stop the XHCI controller in any case so clean up everything on the first call else we can timeout waiting for pending

[PATCH v2 1/2] usb: gadget: composite: fill bcdUSB for any gadget max speed

2015-08-20 Thread Igor Kotrasinski
When handling device GET_DESCRIPTOR, composite gadget driver fills the bcdUSB field only if the gadget supports USB 3.0. Otherwise the field is left unfilled. For consistency, set bcdUSB to 0x0200 for gadgets that don't support superspeed. It's correct to use 0x0200 for any setting that doesn't

[PATCH v2 2/2] usb: gadget: composite: remove redundant bcdUSB setting in legacy

2015-08-20 Thread Igor Kotrasinski
Since composite now overwrites bcdUSB for any gadget, remove setting it in legacy gadgets. All legacy gadgets set 0x0200, the same as the value additionally set by composite, so there is no behaviour change. Signed-off-by: Igor Kotrasinski i.kotrasi...@samsung.com ---

[PATCH v4 3/5] gadget: Support for the usb charger framework

2015-08-20 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. Introduce a callback 'get_charger_type' which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang

[PATCH v4 5/5] power: wm831x_power: Support USB charger current limit management

2015-08-20 Thread Baolin Wang
Integrate with the newly added USB charger interface to limit the current we draw from the USB input based on the input device configuration identified by the USB stack, allowing us to charge more quickly from high current inputs without drawing more current than specified from others.

[PATCH v4 4/5] gadget: Integrate with the usb gadget supporting for usb charger

2015-08-20 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger should get the type by the 'get_charger_type' callback which is implemented by the usb gadget operations, and get the usb charger pointer from struct 'usb_gadget'. Signed-off-by: Baolin Wang baolin.w...@linaro.org ---

RE: [PATCH] usb: gadget: f_uac1: Convert use of __constant_cpu_to_le16 to cpu_to_le16

2015-08-20 Thread David Laight
From: Vaishali Thakkar Sent: 19 August 2015 06:31 To: Felipe Balbi Cc: Greg Kroah-Hartman; linux-usb@vger.kernel.org; linux-ker...@vger.kernel.org Subject: [PATCH] usb: gadget: f_uac1: Convert use of __constant_cpu_to_le16 to cpu_to_le16 In big endian cases, macro cpu_to_le16 unfolds to

Re: [PATCH] UAS: also check for ESHUTDOWN in error reporting

2015-08-20 Thread Sergei Shtylyov
Hello. On 8/20/2015 12:16 PM, Oliver Neukum wrote: -ESHUTDOWN means that the HC has been unplugged. Reporting an error in that case makes no sense. Signed-off-by: Oliver Neukum oneu...@suse.com --- drivers/usb/host/xhci-ext-caps.h | 0 drivers/usb/storage/uas.c| 15 ---

Re: [PATCH v3] usb: dwc2: reset dwc2 core before dwc2_get_hwparams()

2015-08-20 Thread John Youn
On 8/19/2015 5:22 AM, Yunzhi Li wrote: We initiate dwc2 usb controller in BIOS, dwc2_core_reset() should be called before dwc2_get_hwparams() to reset core registers to default value. Without this the FIFO setting might be incorrect because calculating FIFO size need power-on value of

Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management

2015-08-20 Thread Baolin Wang
On 20 August 2015 at 17:02, David Laight david.lai...@aculab.com wrote: From: Baolin Wang Sent: 14 August 2015 10:48 +/* In miliamps */ Spelling police: milliamps Hi David, I'll correct it in next patch series. Thanks for your comments. +static unsigned int wm831x_usb_limits[] = { +

Re: [PATCH v5 01/46] usb: gadget: encapsulate endpoint claiming mechanism

2015-08-20 Thread Felipe Balbi
On Thu, Aug 20, 2015 at 10:51:46PM +0200, Robert Baldyga wrote: On 08/20/2015 10:23 PM, Alan Stern wrote: [CC: list drastically trimmed] On Thu, 20 Aug 2015, Robert Baldyga wrote: On 08/20/2015 06:48 PM, Felipe Balbi wrote: On Thu, Aug 20, 2015 at 06:28:14PM +0200, Robert Baldyga

PROBLEM: USB devices not appearing after upgrading 4.1.4 = 4.1.5

2015-08-20 Thread Daurnimator
Description: After upgrading from linux kernel 4.1.4 to 4.1.5 I'm having trouble with my USB devices. First boot: my external keyboard wasn't working Second boot: my external mouse wasn't working Third boot: my internal touchpad wasn't working Additional info: The computer is a Dell M3800.

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
Hi, On Thu, Aug 20, 2015 at 01:08:30PM -0400, Alan Stern wrote: On Thu, 20 Aug 2015, Felipe Balbi wrote: - Test 13 will fail due to there is pending IN request (f_sourcesink will queue a request unconditionally at its completion), and udc driver will run out error if that.

Re: [PATCH v5 01/46] usb: gadget: encapsulate endpoint claiming mechanism

2015-08-20 Thread Felipe Balbi
Hi, On Thu, Aug 20, 2015 at 07:16:48PM +0200, Robert Baldyga wrote: On 08/20/2015 06:48 PM, Felipe Balbi wrote: On Thu, Aug 20, 2015 at 06:28:14PM +0200, Robert Baldyga wrote: Hi Felipe, On 08/20/2015 05:35 PM, Felipe Balbi wrote: [...] just letting you know that this regresses all gadget

Re: MUSB sysfs node naming convention

2015-08-20 Thread Felipe Balbi
On Thu, Aug 20, 2015 at 12:21:29PM -0500, Bin Liu wrote: Hi, Currently, the sysfs MUSB node name uses kernel device name global *auto* convention. So depending on kernel configuration, the two MUSB device nodes could be musb-hdrc.0.auto/musb-hdrc.1.auto, or

[PATCH v3] usb: dwc2: add support for big-endian Lantiq SoCs

2015-08-20 Thread Antti Seppälä
Here is a patch which makes it possible to support mips based big-endian SoCs made by Lantiq in the dwc2 driver. The patch converts the readl/writel io-accessors of dwc2 to big-endian friendly versions and was discussed on the linux-usb ml already earlier [1]. The patch has been included in

[PATCH v3] usb: dwc2: Use platform endianness when accessing registers

2015-08-20 Thread Antti Seppälä
This patch switches calls to readl/writel to their dwc2_readl/dwc2_writel equivalents which preserve platform endianness. This patch is necessary to access dwc2 registers correctly on big-endian systems such as the mips based SoCs made by Lantiq. Then dwc2 can be used to replace ifx-hcd driver

Re: MUSB sysfs node naming convention

2015-08-20 Thread Bin Liu
On Thu, Aug 20, 2015 at 1:23 PM, Felipe Balbi ba...@ti.com wrote: On Thu, Aug 20, 2015 at 12:21:29PM -0500, Bin Liu wrote: Hi, Currently, the sysfs MUSB node name uses kernel device name global *auto* convention. So depending on kernel configuration, the two MUSB device nodes could be

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
Hi, On Thu, Aug 20, 2015 at 04:25:08PM +0800, Peter Chen wrote: Hi all, I have played usbtest and g_zero (f_sourcesink f_loopback) to do the tests between two boards these days, and have found some restrictions, I list them here, and to see if they are common problems and can be improved

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Peter Chen wrote: Hi all, I have played usbtest and g_zero (f_sourcesink f_loopback) to do the tests between two boards these days, and have found some restrictions, I list them here, and to see if they are common problems and can be improved or not. - Test 13 will

RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Ramneek Mehresh wrote: --- a/drivers/usb/host/ehci-fsl.h +++ b/drivers/usb/host/ehci-fsl.h @@ -63,4 +63,22 @@ #define UTMI_PHY_EN (19) #define ULPI_PHY_CLK_SEL(110) #define PHY_CLK_VALID(117) + +struct ehci_fsl {

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: Hi, On Thu, Aug 20, 2015 at 04:25:08PM +0800, Peter Chen wrote: Hi all, I have played usbtest and g_zero (f_sourcesink f_loopback) to do the tests between two boards these days, and have found some restrictions, I list them here, and to see

Re: [PATCH v5 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-08-20 Thread Arnd Bergmann
On Wednesday 19 August 2015 14:28:33 Duc Dang wrote: Hi Arnd, So the check will look like this, please let me know what do you think: if (!pdev-dev.dma_mask) { WARN_ON(1); /* Initialize dma_mask if the broken platform code has not done so */

Re: [PATCH v5 01/46] usb: gadget: encapsulate endpoint claiming mechanism

2015-08-20 Thread Robert Baldyga
On 08/20/2015 10:23 PM, Alan Stern wrote: [CC: list drastically trimmed] On Thu, 20 Aug 2015, Robert Baldyga wrote: On 08/20/2015 06:48 PM, Felipe Balbi wrote: On Thu, Aug 20, 2015 at 06:28:14PM +0200, Robert Baldyga wrote: Hi Felipe, On 08/20/2015 05:35 PM, Felipe Balbi wrote: [...]

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: Doesn't Peter need to cope with differentiating protocol vs non-protocol stalls ? Those matter only for ep0, not for bulk/interrupt. huh ? usbtest send SetFeature(HALT) for the bulk endpoint, right ? That's what Peter's UDC driver is

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: - When using pattern = 1 as module parameters to compare the data, the packet size must be same between host and device's. why ? The gadget stores the pattern data starting from 0 for each packet it sends. But the host tests the

Re: MUSB sysfs node naming convention

2015-08-20 Thread Felipe Balbi
On Thu, Aug 20, 2015 at 01:28:30PM -0500, Bin Liu wrote: On Thu, Aug 20, 2015 at 1:23 PM, Felipe Balbi ba...@ti.com wrote: On Thu, Aug 20, 2015 at 12:21:29PM -0500, Bin Liu wrote: Hi, Currently, the sysfs MUSB node name uses kernel device name global *auto* convention. So depending on

[PATCH v7 2/2] usb: Add support for ACPI identification to xhci-platform

2015-08-20 Thread Duc Dang
Provide the methods to let ACPI identify the need to use xhci-platform. Change the Kconfig files so the xhci-plat.o file is selectable during kernel config. This has been tested on an ARM64 machine with platform XHCI, an x86_64 machine with XHCI, and an x86_64 machine without XHCI. There were no

Re: [PATCH v5 01/46] usb: gadget: encapsulate endpoint claiming mechanism

2015-08-20 Thread Alan Stern
[CC: list drastically trimmed] On Thu, 20 Aug 2015, Robert Baldyga wrote: On 08/20/2015 06:48 PM, Felipe Balbi wrote: On Thu, Aug 20, 2015 at 06:28:14PM +0200, Robert Baldyga wrote: Hi Felipe, On 08/20/2015 05:35 PM, Felipe Balbi wrote: [...] just letting you know that this

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
Hi, On Thu, Aug 20, 2015 at 10:48:15AM -0400, Alan Stern wrote: On Thu, 20 Aug 2015, Felipe Balbi wrote: Hi, On Thu, Aug 20, 2015 at 04:25:08PM +0800, Peter Chen wrote: Hi all, I have played usbtest and g_zero (f_sourcesink f_loopback) to do the tests between two boards

Re: [PATCH] UAS: also check for ESHUTDOWN in error reporting

2015-08-20 Thread Greg KH
On Thu, Aug 20, 2015 at 11:16:00AM +0200, Oliver Neukum wrote: mode change 100644 = 100755 drivers/usb/host/xhci-ext-caps.h That's not good, I can't take this :( -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v5 01/46] usb: gadget: encapsulate endpoint claiming mechanism

2015-08-20 Thread Felipe Balbi
Hi, On Fri, Jul 31, 2015 at 04:00:13PM +0200, Robert Baldyga wrote: So far it was necessary for usb functions to set ep-driver_data in endpoint obtained from autoconfig to non-null value, to indicate that endpoint is claimed by function (in autoconfig it was checked if endpoint has set this

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
On Thu, Aug 20, 2015 at 10:40:17AM -0400, Alan Stern wrote: On Thu, 20 Aug 2015, Peter Chen wrote: Hi all, I have played usbtest and g_zero (f_sourcesink f_loopback) to do the tests between two boards these days, and have found some restrictions, I list them here, and to see if they

Re: MUSB sysfs node naming convention

2015-08-20 Thread Bin Liu
On Thu, Aug 20, 2015 at 2:11 PM, Felipe Balbi ba...@ti.com wrote: On Thu, Aug 20, 2015 at 01:28:30PM -0500, Bin Liu wrote: On Thu, Aug 20, 2015 at 1:23 PM, Felipe Balbi ba...@ti.com wrote: On Thu, Aug 20, 2015 at 12:21:29PM -0500, Bin Liu wrote: Hi, Currently, the sysfs MUSB node name

[PATCH v7 1/2] usb: make xhci platform driver use 64 bit or 32 bit DMA

2015-08-20 Thread Duc Dang
The xhci platform driver needs to work on systems that either only support 64-bit DMA or only support 32-bit DMA. Attempt to set a coherent dma mask for 64-bit DMA, and attempt again with 32-bit DMA if that fails. [dhdang: regenerate the patch over 4.2-rc5 and address new comments] Signed-off-by:

[GIT PULL] USB driver patches for 4.3-rc1

2015-08-20 Thread Greg KH
The following changes since commit f7644cbfcdf03528f0f450f3940c4985b2291f49: Linux 4.2-rc6 (2015-08-09 15:54:30 -0400) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-4.3-rc1 for you to fetch changes up to

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Alan Stern
On Thu, 20 Aug 2015, Felipe Balbi wrote: Hi, On Thu, Aug 20, 2015 at 01:08:30PM -0400, Alan Stern wrote: On Thu, 20 Aug 2015, Felipe Balbi wrote: - Test 13 will fail due to there is pending IN request (f_sourcesink will queue a request unconditionally at its completion), and

Re: Some restrictions when using usbtest and g_zero

2015-08-20 Thread Felipe Balbi
On Thu, Aug 20, 2015 at 04:12:24PM -0400, Alan Stern wrote: On Thu, 20 Aug 2015, Felipe Balbi wrote: Hi, On Thu, Aug 20, 2015 at 01:08:30PM -0400, Alan Stern wrote: On Thu, 20 Aug 2015, Felipe Balbi wrote: - Test 13 will fail due to there is pending IN request

PROBLEM: lsusb -v freezes kernel on Acer ES1-111M

2015-08-20 Thread Roland Weber
[1.] One line summary of the problem: lsusb -v as root freezes the kernel on Acer ES1-111M [2.] Full description of the problem/report: As root, lsusb -v against USB devices 003:001 or 003:002 of my Acer ES1-111M netbook freezes the kernel. No log entry, no oops, no magic sysreq key.

Re: [PATCH v5 01/46] usb: gadget: encapsulate endpoint claiming mechanism

2015-08-20 Thread Robert Baldyga
Hi Felipe, On 08/20/2015 05:35 PM, Felipe Balbi wrote: [...] just letting you know that this regresses all gadget drivers making them try to disable previously disabled endpoints and enable previously enabled endpoints. I have a possible fix (see below) but then it shows a problem on the host

Re: MUSB dual-role on AM335x behaving weirdly

2015-08-20 Thread Gregory CLEMENT
Hi Felipe, On 18/08/2015 16:13, Felipe Balbi wrote: Hi, On Tue, Aug 18, 2015 at 02:36:13PM +0200, Gregory CLEMENT wrote: Hi again Felipe, I sent this email again without the capture because it prevented to be delivered to the mailing lists. On 04/08/2015 21:32, Felipe Balbi wrote: On

Re: MUSB dual-role on AM335x behaving weirdly

2015-08-20 Thread Felipe Balbi
On Thu, Aug 20, 2015 at 06:35:17PM +0200, Gregory CLEMENT wrote: Hi Felipe, On 18/08/2015 16:13, Felipe Balbi wrote: Hi, On Tue, Aug 18, 2015 at 02:36:13PM +0200, Gregory CLEMENT wrote: Hi again Felipe, I sent this email again without the capture because it prevented to be

Re: [PATCH v5 01/46] usb: gadget: encapsulate endpoint claiming mechanism

2015-08-20 Thread Felipe Balbi
On Thu, Aug 20, 2015 at 06:28:14PM +0200, Robert Baldyga wrote: Hi Felipe, On 08/20/2015 05:35 PM, Felipe Balbi wrote: [...] just letting you know that this regresses all gadget drivers making them try to disable previously disabled endpoints and enable previously enabled endpoints. I

[PATCH] usb: musb: dsps: handle the otg_state_a_wait_vrise_timeout case

2015-08-20 Thread Gregory CLEMENT
According to the OTG specification after a timeout of OTG_TIME_A_WAIT_VRISE (the maximum value is 100ms) the driver must move from the state a_wait_vrise to the state a_wait_bcon. However, the dsps version of musb does not handle this case. Without it, the driver could remain stuck in the

Support of Mark-10 Force Gauge USB

2015-08-20 Thread Sepp Käsbauer
Hi Johan, if you want to take the following patch then the Mark-10 Force Gauge Series 5 is supported by the cp210x driver. We have tested only with kernel 4.1.5 It works perfect. Thanks, Sepp Käsbauer see: http://www.mark-10.com/instruments/force/series5.html diff -c cp210x.c.orig