[PATCH 4/7] usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx

2017-10-09 Thread Bin Liu
From: Alexandre Bailon The way to configure the DMA mode on DA8xx is different from DSPS. Add a new function to configure DMA mode on DA8xx and use a callback to call the right function based on the platform. Cc: sta...@vger.kernel.org # v4.12+ Signed-off-by: Alexandre

[PATCH 3/7] usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers

2017-10-09 Thread Bin Liu
From: Alexandre Bailon The DA8xx and DSPS platforms don't use the same address for few registers. On Da8xx, this is causing some issues (e.g. teardown that doesn't work). Configure the address of the register during the init and use them instead of constants. Cc:

[PATCH 7/7] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Bin Liu
From: Jonathan Liu This fixes a kernel oops when unloading the driver due to usb_put_phy being called after usb_phy_generic_unregister when the device is detached. Calling usb_phy_generic_unregister causes x->dev->driver to be NULL in usb_put_phy and results in a NULL pointer

[PATCH 5/7] usb: musb: musb_cppi41: Configure the number of channels for DA8xx

2017-10-09 Thread Bin Liu
From: Alexandre Bailon Currently, the number of channels is set to 15 but in the case of DA8xx, the number of channels is 4. Update the driver to configure the number of channels at runtime. Cc: sta...@vger.kernel.org # v4.12+ Signed-off-by: Alexandre Bailon

[PATCH 6/7] usb: musb: Check for host-mode using is_host_active() on reset interrupt

2017-10-09 Thread Bin Liu
From: Jonathan Liu The sunxi musb has a bug where sometimes it will generate a babble error on device disconnect instead of a disconnect IRQ. When this happens the musb controller switches from host mode to device mode (it clears MUSB_DEVCTL_HM/MUSB_DEVCTL_SESSION and sets

[PATCH 1/7] USB: musb: fix session-bit runtime-PM quirk

2017-10-09 Thread Bin Liu
From: Johan Hovold The current session-bit quirk implementation does not prevent the retry counter from underflowing, something which could break runtime PM and keep the device active for a very long time (about 2^32 seconds) after a disconnect. This notably breaks the

[PATCH 2/7] USB: musb: fix late external abort on suspend

2017-10-09 Thread Bin Liu
From: Johan Hovold The musb delayed irq work was never flushed on suspend, something which since 4.9 can lead to an external abort if the work is scheduled after the grandparent's clock has been disabled: PM: Suspending system (mem) PM: suspend of devices complete after

[PATCH 0/7] musb-fixes for v4.14 -rc

2017-10-09 Thread Bin Liu
Hi Greg, Here is the first patch set for musb bug fixes for v4.14 -rc cycles. It fixes a couple bugs in the musb runtime power management, corrects a few register offsets for DA8xx, and a couple couple issues on SUNXI platform as while. Please let me know if any change is needed. Regards, -Bin.

Re: [PATCH v2] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Bin Liu
On Tue, Oct 10, 2017 at 01:45:25PM +1100, Jonathan Liu wrote: > This fixes a kernel oops when unloading the driver due to usb_put_phy > being called after usb_phy_generic_unregister when the device is > detached. Calling usb_phy_generic_unregister causes x->dev->driver to > be NULL in usb_put_phy

[PATCH v2] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Jonathan Liu
This fixes a kernel oops when unloading the driver due to usb_put_phy being called after usb_phy_generic_unregister when the device is detached. Calling usb_phy_generic_unregister causes x->dev->driver to be NULL in usb_put_phy and results in a NULL pointer dereference. Cc: sta...@vger.kernel.org

Re: [PATCH] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Jonathan Liu
Hi, On 10 October 2017 at 13:14, Bin Liu wrote: > On Tue, Oct 10, 2017 at 08:17:34AM +1100, Jonathan Liu wrote: >> Hi, >> >> On 10 October 2017 at 01:23, Bin Liu wrote: >> > Hi, >> > >> > On Tue, Sep 26, 2017 at 09:39:23PM +1000, Jonathan Liu wrote: >> >> This fixes

Re: [PATCH] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Bin Liu
On Tue, Oct 10, 2017 at 08:17:34AM +1100, Jonathan Liu wrote: > Hi, > > On 10 October 2017 at 01:23, Bin Liu wrote: > > Hi, > > > > On Tue, Sep 26, 2017 at 09:39:23PM +1000, Jonathan Liu wrote: > >> This fixes a kernel oops when unloading the driver due to usb_put_phy > >> being

Re: [bugzilla-dae...@bugzilla.kernel.org: [Bug 197159] New: Xhci host controller not responding starting kernel 4.13]

2017-10-09 Thread Bjorn Helgaas
On Mon, Oct 09, 2017 at 10:45:39PM +0200, Mason wrote: > On 09/10/2017 19:01, Bjorn Helgaas wrote: > ... > > In that thread, Mason reported a regression that looks similar, but as > > far as I can tell, we never identified a root cause. > > > > 1) The problem Mason reported was on a Tango

Re: [PATCH] cdc_ether: flag the u-blox TOBY-L2 and SARA-U2 as wwan

2017-10-09 Thread David Miller
From: Aleksander Morgado Date: Mon, 9 Oct 2017 14:05:12 +0200 > The u-blox TOBY-L2 is a LTE Cat 4 module with HSPA+ and 2G fallback. > This module allows switching to different USB profiles with the > 'AT+UUSBCONF' command, and provides a ECM network interface when the

[PATCH 2/2 v2] typec: tcpm: Only request matching pdos

2017-10-09 Thread Badhri Jagan Sridharan
At present, TCPM code assumes that local device supports variable/batt pdos and always selects the pdo with highest possible power within the board limit. This assumption might not hold good for all devices. To overcome this, this patch makes TCPM only accept a source_pdo when there is a matching

[PATCH 1/2 v2] typec: tcpm: Validate source and sink caps

2017-10-09 Thread Badhri Jagan Sridharan
The source and sink caps should follow the following rules. This patch validates whether the src_caps/snk_caps adheres to it. 6.4.1 Capabilities Message A Capabilities message (Source Capabilities message or Sink Capabilities message) shall have at least one Power Data Object for vSafe5V. The

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-09 Thread John Stultz
On Tue, Oct 3, 2017 at 2:58 AM, Minas Harutyunyan wrote: > > Could you please apply patch from Vardan Mikayelyan "usb: dwc2: Fix > dwc2_hsotg_core_init_disconnected()" submitted at 02/25/2017 > (https://marc.info/?l=linux-usb=148801589931039=2) instead of your >

Re: [PATCH] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Jonathan Liu
Hi, On 10 October 2017 at 01:23, Bin Liu wrote: > Hi, > > On Tue, Sep 26, 2017 at 09:39:23PM +1000, Jonathan Liu wrote: >> This fixes a kernel oops when unloading the driver due to usb_put_phy >> being called after usb_phy_generic_unregister when the device is >> detached. Calling

Re: [bugzilla-dae...@bugzilla.kernel.org: [Bug 197159] New: Xhci host controller not responding starting kernel 4.13]

2017-10-09 Thread Mason
On 09/10/2017 19:01, Bjorn Helgaas wrote: > [+cc linux-pci, linux-usb, Mason, Mathias, Lukas, Greg, Felipe, Alan] > > - Forwarded message from bugzilla-dae...@bugzilla.kernel.org - >> >> Date: Sun, 08 Oct 2017 13:28:13 + >> From: bugzilla-dae...@bugzilla.kernel.org >> To:

Re: VL805 xHCI DMA read faults

2017-10-09 Thread Robin Murphy
On 09/10/17 16:49, Robin Murphy wrote: > On 09/10/17 10:22, Mathias Nyman wrote: >> On 08.10.2017 17:03, Hao Wei Tee wrote: >>> Hi, >>> >>> I've been having DMA read faults with my VL805 xHCI controller when >>> the Intel IOMMU >>> is turned on: >>> >>> xhci_hcd :03:00.0: xHCI Host

Re: Documentation for USB device interface for power consumption

2017-10-09 Thread Alan Stern
On Mon, 9 Oct 2017, Kai Hendry wrote: > Hi there, > > Can't see the /{proc,sys} interface documented in places I expect to be > like https://github.com/torvalds/linux/tree/master/drivers/usb > > And the mailing list search is pretty awful: > https://marc.info/?l=linux-usb=2=1=power+measure=b >

Re: [RFC usb-next v5 3/3] usb: core: hcd: integrate the PHY roothub wrapper

2017-10-09 Thread Alan Stern
On Sun, 8 Oct 2017, Martin Blumenstingl wrote: > This integrates the PHY roothub wrapper into the core hcd > infrastructure. Multiple PHYs which are part of the roothub devicetree > node (which is a sub-node of the sysdev's node) are now managed > (= powered on/off when needed), by the new

Re: [RFC usb-next v5 2/3] usb: core: add a wrapper for the USB PHYs on the root-hub

2017-10-09 Thread Alan Stern
On Sun, 8 Oct 2017, Martin Blumenstingl wrote: > Many SoC platforms have separate devices for the USB PHY which are > registered through the generic PHY framework. These PHYs have to be > enabled to make the USB controller actually work. They also have to be > disabled again on shutdown/suspend.

[bugzilla-dae...@bugzilla.kernel.org: [Bug 197159] New: Xhci host controller not responding starting kernel 4.13]

2017-10-09 Thread Bjorn Helgaas
[+cc linux-pci, linux-usb, Mason, Mathias, Lukas, Greg, Felipe, Alan] - Forwarded message from bugzilla-dae...@bugzilla.kernel.org - > > Date: Sun, 08 Oct 2017 13:28:13 + > From: bugzilla-dae...@bugzilla.kernel.org > To: bugzilla@gmail.com > Subject: [Bug 197159] New: Xhci host

Re: [PATCH] usb: musb: Check for host-mode using is_host_active() on reset interrupt

2017-10-09 Thread Bin Liu
Hi, On Wed, Sep 27, 2017 at 08:35:22PM +1000, Jonathan Liu wrote: > The sunxi musb has a bug where sometimes it will generate a babble > error on device disconnect instead of a disconnect IRQ. When this > happens the musb controller switches from host mode to device mode > (it clears

Re: VL805 xHCI DMA read faults

2017-10-09 Thread Robin Murphy
On 09/10/17 10:22, Mathias Nyman wrote: > On 08.10.2017 17:03, Hao Wei Tee wrote: >> Hi, >> >> I've been having DMA read faults with my VL805 xHCI controller when >> the Intel IOMMU >> is turned on: >> >> xhci_hcd :03:00.0: xHCI Host Controller >> xhci_hcd :03:00.0: new USB bus

Re: VL805 xHCI DMA read faults

2017-10-09 Thread Hao Wei Tee
On 09/10/2017 17:22, Mathias Nyman wrote: > On 08.10.2017 17:03, Hao Wei Tee wrote: >> Hi, >> >> I've been having DMA read faults with my VL805 xHCI controller when the >> Intel IOMMU >> is turned on: >> >> xhci_hcd :03:00.0: xHCI Host Controller >> xhci_hcd :03:00.0: new USB

Re: [PATCH] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-09 Thread Bin Liu
Hi, On Tue, Sep 26, 2017 at 09:39:23PM +1000, Jonathan Liu wrote: > This fixes a kernel oops when unloading the driver due to usb_put_phy > being called after usb_phy_generic_unregister when the device is > detached. Calling usb_phy_generic_unregister causes x->dev->driver to > be NULL in

Re: dwc2 - ChHltd set, but reason is unknown

2017-10-09 Thread Minas Harutyunyan
Hi Anders, On 10/9/2017 5:15 PM, Anders Montonen wrote: > Hi, > > We have a custom Altera Cyclone V SoCFPGA board, where connecting a > particular brand of USB memory sticks produces and enless stream of > console errors messages until it is removed from the system. > > On the board, the SoC has

Re: [PATCH v4 2/3] usb: host: add a generic platform USB roothub driver

2017-10-09 Thread Mathias Nyman
On 07.10.2017 20:08, Martin Blumenstingl wrote: Hi Mathias, thank you for taking the time to go through my patch On Wed, Oct 4, 2017 at 3:05 PM, Mathias Nyman wrote: On 04.09.2017 00:38, Martin Blumenstingl wrote: Many SoC platforms have separate devices for

dwc2 - ChHltd set, but reason is unknown

2017-10-09 Thread Anders Montonen
Hi, We have a custom Altera Cyclone V SoCFPGA board, where connecting a particular brand of USB memory sticks produces and enless stream of console errors messages until it is removed from the system. On the board, the SoC has a fixed connection to a Microchip LAN9152 Ethernet/hub device

Re: [PATCH resend 02/12] usb: typec: add basic typec properties

2017-10-09 Thread Rob Herring
On Mon, Oct 9, 2017 at 6:21 AM, Jun Li wrote: > Hi Rob, > >> -Original Message- >> From: Rob Herring [mailto:r...@kernel.org] >> Sent: Friday, October 06, 2017 4:44 AM >> To: Jun Li >> Cc: gre...@linuxfoundation.org; li...@roeck-us.net;

[PATCH] cdc_ether: flag the u-blox TOBY-L2 and SARA-U2 as wwan

2017-10-09 Thread Aleksander Morgado
The u-blox TOBY-L2 is a LTE Cat 4 module with HSPA+ and 2G fallback. This module allows switching to different USB profiles with the 'AT+UUSBCONF' command, and provides a ECM network interface when the 'AT+UUSBCONF=2' profile is selected. The u-blox SARA-U2 is a HSPA module with 2G fallback. The

[PATCHv4 0/2] dwc3 on XU3

2017-10-09 Thread Andrzej Pietrasiewicz
Hi all, This is the fourth version of patches in this thread. The series fixes problems with enumerating of SuperSpeed devices on an Odroid XU3. There was a patch series from Vivek Gautam in circulation, but it got lost somehow. Please see: https://lkml.org/lkml/2014/9/2/166

[PATCHv4 1/2] drivers: phy: add calibrate method

2017-10-09 Thread Andrzej Pietrasiewicz
Some quirky UDCs (like dwc3 on Exynos) need to have their phys calibrated e.g. for using super speed. This patch adds a new phy_calibrate() method. When the calibration should be used is dependent on actual chip. In case of dwc3 on Exynos the calibration must happen after usb_add_hcd() (while in

[PATCHv4 2/2] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800

2017-10-09 Thread Andrzej Pietrasiewicz
From: Vivek Gautam Adding phy calibration sequence for USB 3.0 DRD PHY present on Exynos5420/5800 systems. This calibration facilitates setting certain PHY parameters viz. the Loss-of-Signal (LOS) Detector Threshold Level, as well as Tx-Vboost-Level for Super-Speed

Re: [GIT PULL] USB-serial fixes for v4.14-rc5

2017-10-09 Thread Johan Hovold
On Mon, Oct 09, 2017 at 01:21:14PM +0200, Greg Kroah-Hartman wrote: > On Mon, Oct 09, 2017 at 12:40:00PM +0200, Johan Hovold wrote: > > The following changes since commit 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e: > > > > Linux 4.14-rc1 (2017-09-16 15:47:51 -0700) > > > > are available in the

RE: [PATCH resend 02/12] usb: typec: add basic typec properties

2017-10-09 Thread Jun Li
Hi Rob, > -Original Message- > From: Rob Herring [mailto:r...@kernel.org] > Sent: Friday, October 06, 2017 4:44 AM > To: Jun Li > Cc: gre...@linuxfoundation.org; li...@roeck-us.net; mark.rutl...@arm.com; > heikki.kroge...@linux.intel.com; yue...@google.com;

Re: [GIT PULL] USB-serial fixes for v4.14-rc5

2017-10-09 Thread Greg Kroah-Hartman
On Mon, Oct 09, 2017 at 12:40:00PM +0200, Johan Hovold wrote: > The following changes since commit 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e: > > Linux 4.14-rc1 (2017-09-16 15:47:51 -0700) > > are available in the git repository at: > >

Re: [PATCH 1/2] USB: serial: console: fix use-after-free on disconnect

2017-10-09 Thread Johan Hovold
On Mon, Oct 09, 2017 at 01:05:30PM +0200, Andrey Konovalov wrote: > On Wed, Oct 4, 2017 at 11:01 AM, Johan Hovold wrote: > > A clean-up patch removing removing two redundant NULL-checks from the > > console disconnect handler inadvertently also removed a third check. > > This

Re: [PATCH 1/2] USB: serial: console: fix use-after-free on disconnect

2017-10-09 Thread Andrey Konovalov
On Wed, Oct 4, 2017 at 11:01 AM, Johan Hovold wrote: > A clean-up patch removing removing two redundant NULL-checks from the > console disconnect handler inadvertently also removed a third check. > This could lead to the struct usb_serial being prematurely freed by the > console

Re: [PATCH 1/2] USB: serial: console: fix use-after-free on disconnect

2017-10-09 Thread Johan Hovold
On Sat, Oct 07, 2017 at 05:56:17PM +0900, Jaejoong Kim wrote: > Hi > > 2017-10-04 18:01 GMT+09:00 Johan Hovold : > > A clean-up patch removing removing two redundant NULL-checks from the >^^ > The word 'removing' was written twice.

[GIT PULL] USB-serial fixes for v4.14-rc5

2017-10-09 Thread Johan Hovold
The following changes since commit 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e: Linux 4.14-rc1 (2017-09-16 15:47:51 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial.git tags/usb-serial-4.14-rc5 for you to fetch changes up to

Re: [RFC usb-next v5 1/3] dt-bindings: usb: add the documentation for USB root-hub

2017-10-09 Thread Arnd Bergmann
On Sun, Oct 8, 2017 at 11:17 PM, Martin Blumenstingl wrote: > A USB root-hub may have several PHYs which need to be configured before > the root-hub starts working. > This adds the documentation for such a USB root-hub as well as a hint > regarding the

Re: [PATCHv3 1/2] drivers: phy: add calibrate method

2017-10-09 Thread Kishon Vijay Abraham I
Hi, On Thursday 05 October 2017 05:41 PM, Andrzej Pietrasiewicz wrote: > Some quirky UDCs (like dwc3 on exynos) need to have heir phys calibrated %s/heir/their > e.g. for using super speed. The commit log should also include when phy calibrate should be used and why existing API's is not

Re: [PATCH V2] usb: phy: tegra: Fix phy suspend for UDC

2017-10-09 Thread Jon Hunter
Felipe, On 02/10/17 12:52, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Mon, Oct 02, 2017 at 12:22:53PM +0100, Jon Hunter wrote: >> Commit dfebb5f43a78 ("usb: chipidea: Add support for Tegra20/30/114/124") >> added UDC support for Tegra but with UDC support enabled, is was found

Re: VL805 xHCI DMA read faults

2017-10-09 Thread Mathias Nyman
On 08.10.2017 17:03, Hao Wei Tee wrote: Hi, I've been having DMA read faults with my VL805 xHCI controller when the Intel IOMMU is turned on: xhci_hcd :03:00.0: xHCI Host Controller xhci_hcd :03:00.0: new USB bus registered, assigned bus number 2 DMAR: DRHD: handling

Re: [RFC PATCH 1/4] dt-bindings: add bindings for USB physical connector

2017-10-09 Thread Andrzej Hajda
On 06.10.2017 19:23, Rob Herring wrote: > On Fri, Oct 6, 2017 at 6:10 AM, Andrzej Hajda wrote: >> Hi Rob, >> >> Thanks for review. >> >> On 06.10.2017 01:12, Rob Herring wrote: >>> On Thu, Sep 28, 2017 at 03:07:27PM +0200, Andrzej Hajda wrote: These bindings allows to

Re: [PATCH v2 0/2] USB: musb: PM fixes

2017-10-09 Thread Johan Hovold
On Fri, Oct 06, 2017 at 11:27:56AM -0500, Bin Liu wrote: > On Thu, Oct 05, 2017 at 05:14:24PM +0200, Johan Hovold wrote: > > On Thu, Oct 05, 2017 at 08:11:55AM -0700, Tony Lindgren wrote: > > > * Johan Hovold [171005 02:15]: > > > > Bin and Tony, any comments to this series? >

Re: [PATCH v2 14/17] phy: qcom-qusb2: Set vbus sw-override signal in device mode

2017-10-09 Thread Manu Gautam
Hi Kishon On 10/5/2017 2:38 PM, Manu Gautam wrote: > Hi Jack, > > On 9/28/2017 10:23 PM, Jack Pham wrote: >> >> +static int qusb2_phy_set_mode(struct phy *phy, enum phy_mode mode) >> +{ >> +struct qusb2_phy *qphy = phy_get_drvdata(phy); >> + >> +qphy->mode =

Re: [PATCH v2] usb: renesas_usbhs: Add compatible string for r8a7743/5

2017-10-09 Thread Geert Uytterhoeven
Hi Simon, On Mon, Oct 9, 2017 at 7:59 AM, Simon Horman wrote: > On Fri, Oct 06, 2017 at 05:49:34PM +0100, Biju Das wrote: >> This patch adds support for r8a7743/5 SoCs. The Renesas RZ/G1[ME] >> (R8A7743/5) usbhs is identical to the R-Car Gen2 family. >> >> No driver change is

Re: [PATCH v2] usb: renesas_usbhs: Add compatible string for r8a7743/5

2017-10-09 Thread Simon Horman
On Fri, Oct 06, 2017 at 05:49:34PM +0100, Biju Das wrote: > This patch adds support for r8a7743/5 SoCs. The Renesas RZ/G1[ME] > (R8A7743/5) usbhs is identical to the R-Car Gen2 family. > > No driver change is needed due to the fallback compatible value > "renesas,rcar-gen2-usbhs". > Adding the