[PATCH 5/5] usb: xhci: exit early in xhci_setup_device() if we're halted or dying

2015-08-18 Thread Roger Quadros
During quick plug/removal of OTG adapter during dual-role testing it can happen that xhci_alloc_device() is called for the newly detected device after the DRD library has called xhci_stop to remove the HCD. If that is the case, just fail early to prevent the following warning. [ 154.732649] hub

[PATCH 3/5] usb: xhci: Clear XHCI_STATE_DYING on start

2015-08-18 Thread Roger Quadros
For whatever reason if XHCI died in the previous instant then it will never recover on the next xhci_start unless we clear the DYING flag. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/host/xhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

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

2015-08-18 Thread Roger Quadros
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 requests to complete. Signed-off-by: Roger Quadros rog...@ti.com ---

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

2015-08-18 Thread Peter Chen
On Mon, Aug 17, 2015 at 10:26:23AM -0700, Mark Brown wrote: On Mon, Aug 17, 2015 at 09:07:08AM +0800, Peter Chen wrote: On Fri, Aug 14, 2015 at 05:47:46PM +0800, Baolin Wang wrote: + 1500, + 1800, + 550, +}; Why 550 is the last, but not 1800? You'd have to ask the hardware

[PATCH 0/2] USB: serial: new device ids for 4.3-rc1

2015-08-18 Thread Johan Hovold
Greg, Do you want to pick these up as well? Otherwise, I'll just send them after rc1 is out. Thanks, Johan David Ward (1): USB: qcserial: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module Matthijs Kooijman (1): USB: ftdi_sio: Added custom PID for CustomWare products

[PATCH 1/2] USB: ftdi_sio: Added custom PID for CustomWare products

2015-08-18 Thread Johan Hovold
From: Matthijs Kooijman matth...@stdin.nl CustomWare uses the FTDI VID with custom PIDs for their ShipModul MiniPlex products. Signed-off-by: Matthijs Kooijman matth...@stdin.nl Cc: stable sta...@vger.kernel.org Signed-off-by: Johan Hovold jo...@kernel.org --- drivers/usb/serial/ftdi_sio.c

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

2015-08-18 Thread Yunzhi Li
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 GRXFSIZ/GNPTXFSIZ/HPTXFSIZ registers. This patch

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

2015-08-18 Thread Roger Quadros
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 peripheal mode 2) plug OTG adapter with USB device 3) USB1

[PATCH 2/5] usb: hcd: Initialize hcd-flags to 0

2015-08-18 Thread Roger Quadros
When using the OTG/drd library we can call hcd_add/remove consecutively without and hcd_alloc so flags can be stale. If the HC dies due to whatever reason then without this patch we get the below error on next hcd_add. [ 91.494257] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up [ 91.502068]

[PATCH 1/5] usb: xhci: lock mutex on xhci_stop

2015-08-18 Thread Roger Quadros
Else it races with xhci_setup_device Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/host/xhci.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 526ebc0..f998ddf 100644 --- a/drivers/usb/host/xhci.c +++

Re: [PATCH v1 1/3] usb: dwc2: reset AHB hclk domain before init

2015-08-18 Thread Yunzhi Li
Hi John, 在 2015/8/15 3:41, John Youn 写道: On 8/13/2015 8:29 PM, Yunzhi Li wrote: 在 2015/8/14 8:09, John Youn 写道: On 8/11/2015 12:57 AM, Yunzhi Li wrote: We initiate dwc2 usb controller in BIOS, when kernel driver start-up we should reset AHB hclk domain to reset all AHB interface registers

[PATCH] usb: phy: msm: Unregister driver interest for VBUS and ID events

2015-08-18 Thread Ivan T. Ivanov
Right now even if driver failed to probe extcon framework will still deliver its VBUS and ID events, which will lead to random exception codes. Fix this by removing driver interest for VBUS and ID events when probe fail. Fixes: 591fc116f330 (usb: phy: msm: Use extcon framework for VBUS and ID

[PATCH] usb: Move xhci_pme_quirk() behind an #ifdef CONFIG_PM, as it is not used when it's not defined

2015-08-18 Thread Tomer Barletz
Signed-off-by: Tomer Barletz barl...@gmail.com --- drivers/usb/host/xhci-pci.c | 90 ++--- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 5590eac..c79d336 100644 ---

[PATCH 2/2] USB: qcserial: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module

2015-08-18 Thread Johan Hovold
From: David Ward david.w...@ll.mit.edu This is an HP-branded Sierra Wireless EM7355: https://bugzilla.redhat.com/show_bug.cgi?id=1223646#c2 Signed-off-by: David Ward david.w...@ll.mit.edu Cc: stable sta...@vger.kernel.org Signed-off-by: Johan Hovold jo...@kernel.org ---

Re: repeat... Re: BUG: usb: phy: msm: problem with EPROBE defer and extcon cleanup

2015-08-18 Thread Ivan T. Ivanov
On Mon, 2015-08-17 at 16:46 -0700, Tim Bird wrote: Sorry - I mistyped Ivan's e-mail the first time. On 08/17/2015 04:43 PM, Tim Bird wrote: Ivan, I'm seeing a bug in the phy-msm-usb.c code, when I get an EPROBE defer during probing the driver. The code is statically linked in the

Re: Stack dump when try to store uframe_periodic_max

2015-08-18 Thread Peter Chen
On Mon, Aug 17, 2015 at 12:04:07PM -0400, Alan Stern wrote: On Mon, 17 Aug 2015, Peter Zijlstra wrote: On Mon, Aug 17, 2015 at 10:32:20AM -0400, Alan Stern wrote: On Mon, 17 Aug 2015, Peter Chen wrote: Hi Alan, When run echo 105

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

2015-08-18 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.

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

2015-08-18 Thread Mathias Nyman
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 requests to complete. Signed-off-by: Roger

Re: Re: Re: [PATCH v4]USB:OHCI: BugFix:Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()

2015-08-18 Thread AMAN DEEP
Hi Greg What tree are you making it against? I made it for 4.2-rc6. I need it made against linux-next please. Thanks for information. I will make patch against latest linux-next tree (18 Aug). Thanks Regards, Aman Deep --- Original Message --- Sender : Greg

Re: MUSB dual-role on AM335x behaving weirdly

2015-08-18 Thread Gregory CLEMENT
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 Tue, Aug 04, 2015 at 04:23:02PM +0200, Gregory CLEMENT wrote: Hi again, On 04/08/2015 15:08, Gregory CLEMENT wrote: Hi Bin, On

Re: [PATCH 1/5] usb: xhci: lock mutex on xhci_stop

2015-08-18 Thread Mathias Nyman
On 18.08.2015 13:39, Roger Quadros wrote: Else it races with xhci_setup_device Signed-off-by: Roger Quadros rog...@ti.com --- Thanks. Applied, will send forward after 4.3-rc1 -Mathias -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to

Re: [PATCH 3/5] usb: xhci: Clear XHCI_STATE_DYING on start

2015-08-18 Thread Mathias Nyman
On 18.08.2015 13:39, Roger Quadros wrote: For whatever reason if XHCI died in the previous instant then it will never recover on the next xhci_start unless we clear the DYING flag. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/host/xhci.c | 3 ++- 1 file changed, 2

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

2015-08-18 Thread Lee Jones
On Tue, 18 Aug 2015, Baolin Wang wrote: 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

Re: [PATCH 5/5] usb: xhci: exit early in xhci_setup_device() if we're halted or dying

2015-08-18 Thread Mathias Nyman
On 18.08.2015 13:39, Roger Quadros wrote: During quick plug/removal of OTG adapter during dual-role testing it can happen that xhci_alloc_device() is called for the newly detected device after the DRD library has called xhci_stop to remove the HCD. If that is the case, just fail early to

[PATCH v3 2/3] gadget: Introduce the usb charger framework

2015-08-18 Thread Baolin Wang
This patch introduces the usb charger driver based on usb gadget that makes an enhancement to a power driver. It works well in practice but that requires a system with suitable hardware. The basic conception of the usb charger is that, when one usb charger is added or removed by reporting from

[PATCH v3 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-18 Thread Baolin Wang
Currently the Linux kernel does not provide any standard integration of this feature that integrates the USB subsystem with the system power regulation provided by PMICs meaning that either vendors must add this in their kernels or USB gadget devices based on Linux (such as mobile phones) may not

[PATCH v3 1/3] gadget: Support for the usb charger framework

2015-08-18 Thread Baolin Wang
The usb charger framework is based on usb gadget, and each usb gadget can be one usb charger to set the current limitation. This patch adds a notifier mechanism for usb charger to report to usb charger when the usb gadget state is changed. Also we introduce a callback 'get_charger_type' which

[PATCH v5]USB:OHCI: BugFix:Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()

2015-08-18 Thread AMAN DEEP
There is a race condition between finish_unlinks-finish_urb() function and usb_kill_urb() in ohci controller case. The finish_urb calls spin_unlock(ohci-lock) before usb_hcd_giveback_urb() function call, then if during this time, usb_kill_urb is called for another endpoint, then new

[PATCH v3 1/1] USB:option:add ZTE PIDs

2015-08-18 Thread Liu.Zhao
This is intended to add ZTE device PIDs on kernel. Signed-off-by: Liu.Zhao lzsos...@163.com --- drivers/usb/serial/option.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index

[PATCH] usb: dwc2: rename all s3c_* to dwc2_*

2015-08-18 Thread Felipe Balbi
this driver has long ago became dwc2.ko with both peripheral and host roles, there's no point in keeping the old function names. Signed-off-by: Felipe Balbi ba...@ti.com --- arch/arm/mach-s3c64xx/mach-crag6410.c | 4 +- arch/arm/mach-s3c64xx/mach-smartq.c | 4 +-

Re: [PATCH v5]USB:OHCI: BugFix:Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()

2015-08-18 Thread Greg KH
On Tue, Aug 18, 2015 at 12:25:05PM +, AMAN DEEP wrote: There is a race condition between finish_unlinks-finish_urb() function and usb_kill_urb() in ohci controller case. The finish_urb calls spin_unlock(ohci-lock) before usb_hcd_giveback_urb() function call, then if during this

Re: [PATCH RESEND] usbhid: Fix the check for HID_RESET_PENDING in hid_io_error

2015-08-18 Thread Jiri Kosina
On Mon, 10 Aug 2015, Don Zickus wrote: It was reported that after 10-20 reboots, a usb keyboard plugged into a docking station would not work unless it was replugged in. Using usbmon, it turns out the interrupt URBs were streaming with callback errors of -71 for some reason. The

Re: Fwd: [Bug 102101] USB 3 storage device disconnects after S3 resume,and re-enumerate it.

2015-08-18 Thread Aaron Chou
Thanks all. When I debug,I find that if I build-in the xHCI, (suspend to disk)STD is perform OK. But whatever I build-in xHCI, (suspend to ram)STR is bad. My experiment is in MIPS paltform with Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03), and I don't have the X86

[PATCH] usb: core: hub: Removed some warnings generated by checkpatch.pl

2015-08-18 Thread Chase Metzger
Removed some checkpatch.pl warnings saying there was an unwanted space between function names and their arguments. Signed-off-by: Chase Metzger chasemetzge...@gmail.com --- drivers/usb/core/hub.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-18 Thread David Miller
From: Eugene Shatokhin eugene.shatok...@rosalab.ru Date: Fri, 14 Aug 2015 19:58:36 +0300 2. The second race is on dev-flags. dev-flags is set to 0 here: *0 usbnet_stop (usbnet.c:816) /* deferred work (task, timer, softirq) must also stop. * can't flush_scheduled_work() until we

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

2015-08-18 Thread John Youn
On 8/18/2015 2:41 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-18 Thread Peter Chen
On Tue, Aug 18, 2015 at 09:12:00AM -0700, Mark Brown wrote: On Tue, Aug 18, 2015 at 01:20:12PM +0800, Peter Chen wrote: ok, I just had suspected below function's correctness, after looking it again, it always set 1800 as charging limit, does it be expected? + /* Find the highest

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

2015-08-18 Thread Doug Anderson
lyz, On Tue, Aug 18, 2015 at 2:40 AM, Yunzhi Li l...@rock-chips.com 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

Re: [PATCH v3 1/3] gadget: Support for the usb charger framework

2015-08-18 Thread Baolin Wang
On 19 August 2015 at 00:04, Greg KH gre...@linuxfoundation.org wrote: On Tue, Aug 18, 2015 at 07:14:19PM +0800, Baolin Wang wrote: The usb charger framework is based on usb gadget, and each usb gadget can be one usb charger to set the current limitation. This patch adds a notifier mechanism

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

2015-08-18 Thread Vaishali Thakkar
In big endian cases, macro cpu_to_le16 unfolds to __swab16 which provides special case for constants. In little endian cases, __constant_cpu_to_le16 and cpu_to_le16 expand directly to the same expression. So, replace __constant_cpu_to_le16 with cpu_to_le16 with the goal of getting rid of the

[PATCH] usbip: vhci_hcd: Convert use of __constant_cpu_to_le16 to cpu_to_le16

2015-08-18 Thread Vaishali Thakkar
In big endian cases, macro cpu_to_le16 unfolds to __swab16 which provides special case for constants. In little endian cases, __constant_cpu_to_le16 and cpu_to_le16 expand directly to the same expression. So, replace __constant_cpu_to_le16 with cpu_to_le16 with the goal of getting rid of the

Re: [PATCH] usb: dwc3: pci: passing forward the ACPI companion

2015-08-18 Thread Felipe Balbi
HI, On Tue, Aug 18, 2015 at 04:31:17PM +0300, Heikki Krogerus wrote: On Mon, Aug 17, 2015 at 12:59:52PM -0500, Felipe Balbi wrote: On Mon, Aug 17, 2015 at 10:26:53AM -0700, David Cohen wrote: On Mon, Aug 17, 2015 at 08:41:19AM -0500, Felipe Balbi wrote: On Mon, Aug 17, 2015 at

[PATCH] usb: gadget: composite: fill bcdUSB for any gadget max speed

2015-08-18 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. Make behaviour consistent by filling bcdUSB for the other two cases of USB 2.0 and USB 1.1 capable gadgets. Given that legacy gadget

Re: [PATCH] usb: dwc3: pci: passing forward the ACPI companion

2015-08-18 Thread Heikki Krogerus
On Mon, Aug 17, 2015 at 12:59:52PM -0500, Felipe Balbi wrote: On Mon, Aug 17, 2015 at 10:26:53AM -0700, David Cohen wrote: On Mon, Aug 17, 2015 at 08:41:19AM -0500, Felipe Balbi wrote: On Mon, Aug 17, 2015 at 02:32:06PM +0300, Heikki Krogerus wrote: Sharing the APCI companion with the

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

2015-08-18 Thread Lee Jones
On Tue, 18 Aug 2015, Charles Keepax wrote: On Tue, Aug 18, 2015 at 07:14:21PM +0800, Baolin Wang wrote: 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

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

2015-08-18 Thread Charles Keepax
On Tue, Aug 18, 2015 at 07:14:21PM +0800, Baolin Wang wrote: 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

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

2015-08-18 Thread Felipe Balbi
On Mon, Aug 17, 2015 at 10:04:05PM -0700, Mark Brown wrote: On Mon, Aug 17, 2015 at 06:58:16PM -0500, Felipe Balbi wrote: On Mon, Aug 17, 2015 at 10:26:23AM -0700, Mark Brown wrote: On Mon, Aug 17, 2015 at 09:07:08AM +0800, Peter Chen wrote: On Fri, Aug 14, 2015 at 05:47:46PM +0800,

Re: MUSB dual-role on AM335x behaving weirdly

2015-08-18 Thread Felipe Balbi
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 Tue, Aug 04, 2015 at 04:23:02PM +0200, Gregory

Re: [PATCH] usb: gadget: composite: fill bcdUSB for any gadget max speed

2015-08-18 Thread Felipe Balbi
On Tue, Aug 18, 2015 at 11:06:32AM -0400, Alan Stern wrote: On Tue, 18 Aug 2015, Igor Kotrasinski wrote: 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. Make behaviour

[PATCH 0/1] USB DWC2 parity fix in isochronous mode

2015-08-18 Thread Scott Branden
This patch contains a fix for a real world interop problem found when using the Synopsis DWC2 USB controller with isochronous audio as detailed in the commit message. Roman Bacik (1): usb: dwc2: gadget: parity fix in isochronous mode drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/gadget.c

Re: [PATCH v3 1/3] gadget: Support for the usb charger framework

2015-08-18 Thread Greg KH
On Tue, Aug 18, 2015 at 07:14:19PM +0800, Baolin Wang wrote: The usb charger framework is based on usb gadget, and each usb gadget can be one usb charger to set the current limitation. This patch adds a notifier mechanism for usb charger to report to usb charger when the usb gadget state is

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

2015-08-18 Thread Mark Brown
On Tue, Aug 18, 2015 at 01:20:12PM +0800, Peter Chen wrote: ok, I just had suspected below function's correctness, after looking it again, it always set 1800 as charging limit, does it be expected? + /* Find the highest supported limit */ + best = 0; + for (i = 0; i

[PATCH 1/1] usb: dwc2: gadget: parity fix in isochronous mode

2015-08-18 Thread Scott Branden
From: Roman Bacik rba...@broadcom.com USB OTG driver in isochronous mode has to set the parity of the receiving microframe. The parity is set to even by default. This causes problems for an audio gadget, if the host starts transmitting on odd microframes. This fix uses Incomplete Periodic

Re: [PATCH RESEND] usbhid: Fix the check for HID_RESET_PENDING in hid_io_error

2015-08-18 Thread Don Zickus
Bump. :-) On Mon, Aug 10, 2015 at 12:06:53PM -0400, Don Zickus wrote: It was reported that after 10-20 reboots, a usb keyboard plugged into a docking station would not work unless it was replugged in. Using usbmon, it turns out the interrupt URBs were streaming with callback errors of -71