Re: [PATCH] xhci: use iopoll for xhci_handshake

2019-02-28 Thread Mathias Nyman
On 28.2.2019 9.09, Greg Kroah-Hartman wrote: On Wed, Feb 27, 2019 at 03:19:17PM -0700, Daniel Kurtz wrote: In cases such as xhci_abort_cmd_ring(), xhci_handshake() is called with a spin lock held (and local interrupts disabled) with a huge 5 second timeout. This can translates to 5 million call

RE: [PATCH 1/2] usb: chipiea: add flags for id and vbus from external block

2019-02-28 Thread Jun Li
> -Original Message- > From: Peter Chen > Sent: 2019年2月26日 14:53 > To: Jun Li > Cc: gre...@linuxfoundation.org; linux-usb@vger.kernel.org; dl-linux-imx > > Subject: RE: [PATCH 1/2] usb: chipiea: add flags for id and vbus from > external block > > > > drivers/usb/chipidea/core.c | 2

RE: [PATCH 2/2] usb: typec: add typec switch via GPIO control

2019-02-28 Thread Jun Li
Hi > -Original Message- > From: Andy Shevchenko > Sent: 2019年2月26日 15:25 > To: Jun Li > Cc: robh...@kernel.org; heikki.kroge...@linux.intel.com; > gre...@linuxfoundation.org; hdego...@redhat.com; linux-usb@vger.kernel.org; > devicet...@vger.kernel.org; dl-linux-imx > Subject: Re: [PATCH

RE: [PATCH 2/2] usb: typec: add typec switch via GPIO control

2019-02-28 Thread Jun Li
> -Original Message- > From: Heikki Krogerus > Sent: 2019年2月27日 17:41 > To: Jun Li > Cc: robh...@kernel.org; gre...@linuxfoundation.org; hdego...@redhat.com; > andy.shevche...@gmail.com; linux-usb@vger.kernel.org; > devicet...@vger.kernel.org; dl-linux-imx > Subject: Re: [PATCH 2/2] us

Re: [PATCH 0/3] Propagate DP-over-Type-C hotplug events from Type-C subsys to drm-drivers

2019-02-28 Thread Heikki Krogerus
On Wed, Feb 27, 2019 at 04:45:32PM +0100, Hans de Goede wrote: > Hi, > > On 27-02-19 12:16, Jani Nikula wrote: > > On Wed, 27 Feb 2019, Heikki Krogerus > > wrote: > > > One thing that this series does not consider is the DP lane count > > > problem. The GPU drivers (i915 in this case) does not k

Re: [PATCH] usb: xhci: Support running urb giveback in tasklet context

2019-02-28 Thread Mathias Nyman
Hi On 19.2.2019 17.41, Suwan Kim wrote: Patch "USB: HCD: support giveback of URB in tasklet context" introduced giveback of urb in tasklet context. [1] This patch was applied to ehci but not xhci. [2] It significantly reduces the hard irq time of xhci. Especially for the uvc driver, the hard irq

Re: XHCI abort CMD failure

2019-02-28 Thread Shah, Nehal-bakulchandra
Hi Mathias, On 2/27/2019 1:01 PM, Mathias Nyman wrote: > Hi > > On 26.2.2019 19.55, Shah, Nehal-bakulchandra wrote: >> Hi >> >> In one of our customer platform, we are getting following errors >> >> [65136.606651] xhci_hcd :00:10.0: Command timeout >> [65136.606690] xhci_hcd :00:10.0: Abo

[PATCH] usb: musb: sunxi: propagate devicetree node to glue pdev

2019-02-28 Thread Mans Rullgard
In order for devicetree nodes to be correctly associated with attached devices, the controller node needs to be propagated to the glue device. Signed-off-by: Mans Rullgard --- This depends on 2c1ea6abde88 ("platform: set of_node in platform_device_register_full()") which is currently winding its

Re: [PATCH 0/3] Propagate DP-over-Type-C hotplug events from Type-C subsys to drm-drivers

2019-02-28 Thread Hans de Goede
Hi, On 28-02-19 10:15, Heikki Krogerus wrote: On Wed, Feb 27, 2019 at 04:45:32PM +0100, Hans de Goede wrote: Hi, On 27-02-19 12:16, Jani Nikula wrote: On Wed, 27 Feb 2019, Heikki Krogerus wrote: One thing that this series does not consider is the DP lane count problem. The GPU drivers (i915

[PATCH] wusb: use correct format characters

2019-02-28 Thread Louis Taylor
When compiling with -Wformat, clang warns: ./include/linux/usb/wusb.h:245:5: warning: format specifies type 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] ckhdid->data[0], ckhdid->data[1], ^~~ ckhdid->data is unconditionally defined as `u8 data[1

Re: [PATCH] wusb: use correct format characters

2019-02-28 Thread Greg KH
On Thu, Feb 28, 2019 at 11:52:56AM +, Louis Taylor wrote: > When compiling with -Wformat, clang warns: > > ./include/linux/usb/wusb.h:245:5: warning: format specifies type > 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') > [-Wformat] > ckhdid->data[0], ckhdid->data[1]

[PATCH v2] wusb: use correct format characters

2019-02-28 Thread Louis Taylor
When compiling with -Wformat, clang warns: ./include/linux/usb/wusb.h:245:5: warning: format specifies type 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] ckhdid->data[0], ckhdid->data[1], ^~~ ckhdid->data is unconditionally defined as `u8 data[1

[RFC][PATCH] dt-bindings: usb: add non-removable device property

2019-02-28 Thread Mans Rullgard
Add a boolean property indicating that a device is hardwired to the upstream port. Although hubs can provide this information, they are not always configured correctly. An alternate means of indicating this for built-in USB devices is thus useful. Signed-off-by: Mans Rullgard --- I have a situa

Re: [PATCH 0/3] Propagate DP-over-Type-C hotplug events from Type-C subsys to drm-drivers

2019-02-28 Thread Heikki Krogerus
Hi Hans, On Thu, Feb 28, 2019 at 12:24:25PM +0100, Hans de Goede wrote: > Hi, > > On 28-02-19 10:15, Heikki Krogerus wrote: > > On Wed, Feb 27, 2019 at 04:45:32PM +0100, Hans de Goede wrote: > > > Hi, > > > > > > On 27-02-19 12:16, Jani Nikula wrote: > > > > On Wed, 27 Feb 2019, Heikki Krogerus

Re: [PATCH 1/8] dt-bindings: phy: Add Amlogic G12A USB2 PHY Bindings

2019-02-28 Thread Rob Herring
On Tue, 12 Feb 2019 16:14:06 +0100, Neil Armstrong wrote: > Add the Amlogic G12A Family USB2 OTG PHY Bindings > > Signed-off-by: Neil Armstrong > --- > .../bindings/phy/meson-g12a-usb2-phy.txt | 22 +++ > 1 file changed, 22 insertions(+) > create mode 100644 > Documentatio

[PATCH AUTOSEL 4.9 04/19] usb: phy: fix link errors

2019-02-28 Thread Sasha Levin
From: Anders Roxell [ Upstream commit f2105d42597f4d10e431b195d69e96dccaf9b012 ] Fix link errors when CONFIG_FSL_USB2_OTG is enabled and USB_OTG_FSM is set to module then the following link error occurs. aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `fsl_otg_ioctl': drivers/

[PATCH AUTOSEL 4.14 08/36] usb: phy: fix link errors

2019-02-28 Thread Sasha Levin
From: Anders Roxell [ Upstream commit f2105d42597f4d10e431b195d69e96dccaf9b012 ] Fix link errors when CONFIG_FSL_USB2_OTG is enabled and USB_OTG_FSM is set to module then the following link error occurs. aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `fsl_otg_ioctl': drivers/

Re: [RFC][PATCH] dt-bindings: usb: add non-removable device property

2019-02-28 Thread Måns Rullgård
Greg Kroah-Hartman writes: > On Thu, Feb 28, 2019 at 02:33:44PM +, Mans Rullgard wrote: >> Add a boolean property indicating that a device is hardwired to the >> upstream port. Although hubs can provide this information, they are not >> always configured correctly. An alternate means of ind

Re: [RFC][PATCH] dt-bindings: usb: add non-removable device property

2019-02-28 Thread Greg Kroah-Hartman
On Thu, Feb 28, 2019 at 02:33:44PM +, Mans Rullgard wrote: > Add a boolean property indicating that a device is hardwired to the > upstream port. Although hubs can provide this information, they are not > always configured correctly. An alternate means of indicating this for > built-in USB de

[PATCH AUTOSEL 4.19 20/64] usb: phy: fix link errors

2019-02-28 Thread Sasha Levin
From: Anders Roxell [ Upstream commit f2105d42597f4d10e431b195d69e96dccaf9b012 ] Fix link errors when CONFIG_FSL_USB2_OTG is enabled and USB_OTG_FSM is set to module then the following link error occurs. aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `fsl_otg_ioctl': drivers/

[PATCH AUTOSEL 4.20 27/81] usb: dwc3: exynos: Fix error handling of clk_prepare_enable

2019-02-28 Thread Sasha Levin
From: Alexey Khoroshilov [ Upstream commit 512e6fb589bc18f9321457632e89b95017447db9 ] If clk_prepare_enable() fails in dwc3_exynos_probe() or in dwc3_exynos_resume(), exynos->clks[0] is left undisabled because of usage preincrement in while condition. Found by Linux Driver Verification project

[PATCH AUTOSEL 4.20 26/81] usb: phy: fix link errors

2019-02-28 Thread Sasha Levin
From: Anders Roxell [ Upstream commit f2105d42597f4d10e431b195d69e96dccaf9b012 ] Fix link errors when CONFIG_FSL_USB2_OTG is enabled and USB_OTG_FSM is set to module then the following link error occurs. aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `fsl_otg_ioctl': drivers/

Re: [RFC][PATCH] dt-bindings: usb: add non-removable device property

2019-02-28 Thread Greg Kroah-Hartman
On Thu, Feb 28, 2019 at 03:22:24PM +, Måns Rullgård wrote: > Greg Kroah-Hartman writes: > > > On Thu, Feb 28, 2019 at 02:33:44PM +, Mans Rullgard wrote: > >> Add a boolean property indicating that a device is hardwired to the > >> upstream port. Although hubs can provide this information

Re: [PATCH 3/8] dt-bindings: usb: dwc2: Add Amlogic G12A DWC2 Compatible

2019-02-28 Thread Rob Herring
On Tue, 12 Feb 2019 16:14:08 +0100, Neil Armstrong wrote: > Adds the specific compatible string for the DWC2 IP found in the > Amlogic G12A SoC Family. > > Signed-off-by: Neil Armstrong > --- > Documentation/devicetree/bindings/usb/dwc2.txt | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by

Re: [PATCH 4/8] dt-bindings: usb: dwc3: Add Amlogic G12A DWC3 Glue Bindings

2019-02-28 Thread Rob Herring
On Tue, Feb 12, 2019 at 04:14:09PM +0100, Neil Armstrong wrote: > Adds the bindings for the Amlogic G12A USB Glue HW. > > The Amlogic G12A SoC Family embeds 2 USB Controllers : > - a DWC3 IP configured as Host for USB2 and USB3 > - a DWC2 IP configured as Peripheral USB2 Only > > A glue connects

Re: [PATCH] xhci: use iopoll for xhci_handshake

2019-02-28 Thread Daniel Kurtz
On Thu, Feb 28, 2019 at 12:09 AM Greg Kroah-Hartman wrote: > > On Wed, Feb 27, 2019 at 03:19:17PM -0700, Daniel Kurtz wrote: > > In cases such as xhci_abort_cmd_ring(), xhci_handshake() is called with > > a spin lock held (and local interrupts disabled) with a huge 5 second > > timeout. This can

Re: [PATCH 0/3] Propagate DP-over-Type-C hotplug events from Type-C subsys to drm-drivers

2019-02-28 Thread Hans de Goede
Hi Heikki, On 28-02-19 15:47, Heikki Krogerus wrote: Hi Hans, On Thu, Feb 28, 2019 at 12:24:25PM +0100, Hans de Goede wrote: Hi, On 28-02-19 10:15, Heikki Krogerus wrote: I've been thinking about this... Do we actually need to link the correct drm_connector to the Type-C connector? Perha

Re: [RFC][PATCH] dt-bindings: usb: add non-removable device property

2019-02-28 Thread Måns Rullgård
Greg Kroah-Hartman writes: > On Thu, Feb 28, 2019 at 03:22:24PM +, Måns Rullgård wrote: >> Greg Kroah-Hartman writes: >> >> > On Thu, Feb 28, 2019 at 02:33:44PM +, Mans Rullgard wrote: >> >> Add a boolean property indicating that a device is hardwired to the >> >> upstream port. Althou

Re: [RFC][PATCH] dt-bindings: usb: add non-removable device property

2019-02-28 Thread Greg Kroah-Hartman
On Thu, Feb 28, 2019 at 05:34:25PM +, Måns Rullgård wrote: > >> --- a/drivers/usb/core/hub.c > >> +++ b/drivers/usb/core/hub.c > >> @@ -2392,6 +2392,14 @@ static void set_usb_port_removable(struct > >> usb_device *udev) > >> break; > >> } > >> > >> + /* > >> +

[PATCH 1/2] dt-bindings: usb: add non-removable-ports hub property

2019-02-28 Thread Mans Rullgard
Add a non-removable-ports property that lists the hardwired downstream ports of a hub. Although hubs can provide this information, they are not always configured correctly. An alternate means of indicating this for built-in USB devices is thus useful. Signed-off-by: Mans Rullgard --- Documenta

[PATCH 2/2] usb: hub: use non-removable-ports DT property

2019-02-28 Thread Mans Rullgard
Mark any ports listed in the non-removable-ports DT property as hardwired. This is useful for boards with built-in USB devices that cannot be (or have not been) marked as fixed in hardware. Signed-off-by: Mans Rullgard --- drivers/usb/core/hub.c | 14 ++ 1 file changed, 14 insertions

Re: [PATCH v2] wusb: use correct format characters

2019-02-28 Thread Nick Desaulniers
On Thu, Feb 28, 2019 at 4:28 AM Louis Taylor wrote: > > When compiling with -Wformat, clang warns: > > ./include/linux/usb/wusb.h:245:5: warning: format specifies type > 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') We should probably update Documentation/core-api/printk-f

Re: [PATCH v2] wusb: use correct format characters

2019-02-28 Thread Joe Perches
On Thu, 2019-02-28 at 12:24 +, Louis Taylor wrote: > When compiling with -Wformat, clang warns: > ./include/linux/usb/wusb.h:245:5: warning: format specifies type > 'unsigned short' but the argument has type 'u8' (aka 'unsigned char') > [-Wformat] > ckhdid->data[0], ckhdid->data[1], > ^~~~

Re: [PATCH v2] wusb: use correct format characters

2019-02-28 Thread Jon Flatley
Thanks for the patch and comments. On Thu, Feb 28, 2019 at 1:53 PM Joe Perches wrote: > > On Thu, 2019-02-28 at 12:24 +, Louis Taylor wrote: > > When compiling with -Wformat, clang warns: > > ./include/linux/usb/wusb.h:245:5: warning: format specifies type > > 'unsigned short' but the argumen

Re: [PATCH v2] wusb: use correct format characters

2019-02-28 Thread Joe Perches
On Thu, 2019-02-28 at 14:23 -0800, Jon Flatley wrote: > Thanks for the patch and comments. > > On Thu, Feb 28, 2019 at 1:53 PM Joe Perches wrote: > > On Thu, 2019-02-28 at 12:24 +, Louis Taylor wrote: > > > When compiling with -Wformat, clang warns: > > > ./include/linux/usb/wusb.h:245:5: war

Re: [PATCH v2] wusb: use correct format characters

2019-02-28 Thread Jon Flatley
On Thu, Feb 28, 2019 at 3:05 PM Joe Perches wrote: > > On Thu, 2019-02-28 at 14:23 -0800, Jon Flatley wrote: > > Thanks for the patch and comments. > > > > On Thu, Feb 28, 2019 at 1:53 PM Joe Perches wrote: > > > On Thu, 2019-02-28 at 12:24 +, Louis Taylor wrote: > > > > When compiling with -

[PATCH v2 1/2] dt-bindings: usb: add documentation for typec switch via GPIO

2019-02-28 Thread Jun Li
Some typec super speed active channel switch can be controlled via a GPIO, this binding can be used to specify the switch node by a GPIO and the remote endpoint of its consumre. Signed-off-by: Li Jun --- No change on v2 for this patch. .../devicetree/bindings/usb/typec-switch-gpio.txt | 30 +++

[PATCH v2 2/2] usb: typec: add typec switch via GPIO control

2019-02-28 Thread Jun Li
This patch adds a simple typec switch driver which only needs a GPIO to switch the super speed active channel according to typec orientation. Signed-off-by: Li Jun --- Changes for v2: - Use the correct head files for gpio api and of_device_id: #include #include - Add driver dependency on G

[PATCH] soc: sunxi: Fix missing dependency on REGMAP_MMIO

2019-02-28 Thread Samuel Holland
When enabling ARCH_SUNXI from allnoconfig, SUNXI_SRAM is enabled, but not REGMAP_MMIO, so the kernel fails to link with an undefined reference to __devm_regmap_init_mmio_clk. Select REGMAP_MMIO, as suggested in drivers/base/regmap/Kconfig. This creates the following dependency loop: drivers/of/

RE: [PATCH 1/2] usb: chipiea: add flags for id and vbus from external block

2019-02-28 Thread Peter Chen
> > > > > > > drivers/usb/chipidea/core.c | 2 ++ include/linux/usb/chipidea.h | > > > 4 > > > 2 files changed, 6 insertions(+) > > > > > > diff --git a/drivers/usb/chipidea/core.c > > > b/drivers/usb/chipidea/core.c index > > > 7bfcbb2..0bfa850 100644 > > > --- a/drivers/usb/chipidea/cor

Re: Bus noise periodically causes ci_hdrc IRQ lockup

2019-02-28 Thread Chandler Griscom
On 2/28/19 1:57 AM, Peter Chen wrote: Let me summary your observation: - bind/unbind ci_hdrc device can recover connection - Reset HUB can't recover, and will go the previous error state after reset From the register, we do see something abnormal, and the RX is waiting the SYNC Field. We ne

[PATCH] wusb: Remove unnecessary static function ckhdid_printf

2019-02-28 Thread Joe Perches
This static inline is unnecessary and can be removed by using the vsprintf %ph extension. This reduces overall object size by more than 2K. Signed-off-by: Joe Perches --- drivers/usb/wusbcore/cbaf.c | 15 --- drivers/usb/wusbcore/dev-sysfs.c | 5 ++--- drivers/usb/wusbcore/d

[PATCH] usb: introduce usb_ep_type_string() function

2019-02-28 Thread Chunfeng Yun
In some places, the code prints a human-readable USB endpoint transfer type (e.g. "bulk"). This involves a switch statement sometimes wrapped around in ({ ... }) block leading to code repetition. To make this scenario easier, here introduces usb_ep_type_string() function, which returns a human-read