[PATCH v3] usb: dwc3: gadget: Handle 0 xfer length for OUT EP

2019-01-21 Thread Tejas Joglekar
For OUT endpoints, zero-length transfers require MaxPacketSize buffer as per the DWC_usb3 programming guide 3.30a section 4.2.3.3. This patch fixes this by explicitly checking zero length transfer to correctly pad up to MaxPacketSize. Fixes: c6267a51639b ("usb: dwc3: gadget: align transfers to wM

RE: [PATCH v3 1/2] dt-bindings: usb: ci-hdrc-usb2: add property power-active-high

2019-01-21 Thread Peter Chen
> Am 17.01.19 um 08:01 schrieb Peter Chen: > > > >> > >> The i.MX6q/dl USB controller may drive the usb power line directly, > >> but the polarity depends on the board. Reset state of the polarity is > >> low-active so add this property to allow it to be high-active. > >> > > > > As far as I know

Re: [PATCH 10/14] usb: dwc3: gadget: remove wait_end_transfer

2019-01-21 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > Try to dequeue a request that was already completed. Odd. Why are we > missing a call to giveback?? Got a little more information: file-storage-3982 [006] d... 131.010663: dwc3_ep_queue: ep1in: req eccaa10f length 0/16384 zsI

Re: [RFC PATCH 3/5] usb: roles: Find the muxes by also matching against the device node

2019-01-21 Thread Jun Li
Hi Heikki, Heikki Krogerus 于2018年10月24日周三 下午11:06写道: > > When the connections are defined in firmware, struct > device_connection will have the fwnode member pointing to > the device node (struct fwnode_handle) of the requested > device, and the endpoint will not be used at all in that > case. > >

Re: [PATCH v2] usb: dwc3: gadget: Handle 0 xfer length for OUT EP

2019-01-21 Thread Tejas Joglekar
Hi, On 1/21/2019 9:47 PM, Sergei Shtylyov wrote: > Hello! > > On 01/21/2019 12:33 PM, Tejas Joglekar wrote: > >> For OUT endpoints, zero-length transfers require MaxPacketSize buffer as >> per the DWC_usb3 programming guide 3.30a section 4.2.3.3. >> >> This patch fixes this by explicitly checking z

RE: [PATCH 1/2] usb: dwc3: Add avoiding vbus glitch happen during xhci reset

2019-01-21 Thread Ran Wang
Hi Rob, On January 22, 2019 09:03, Rob Herring wrote: > > On Wed, Jan 16, 2019 at 06:48:06AM +, Ran Wang wrote: > > When DWC3 is set to host mode by programming register DWC3_GCTL, > VUBS > > s/VUBS/VBUS/ Yes, will fix it in next version. > > (or its control signal) will on immediately on

Re: [PATCH 10/14] usb: dwc3: gadget: remove wait_end_transfer

2019-01-21 Thread Thinh Nguyen
Hi Felipe, On 1/21/2019 4:15 AM, Felipe Balbi wrote: > Hi > > Felipe Balbi writes: >> Hi, >> >> Felipe Balbi writes: >>> Hi again, >>> >>> Felipe Balbi writes: >>> >>> >>> Try to dequeue a request that was already completed. Odd. Why are we missing a call to giveback?? >>> Got a litt

Re: [PATCH v4 6/6] usb: musb: Add support for MediaTek musb controller

2019-01-21 Thread Min Guo
Hi Bin, On Mon, 2019-01-21 at 10:07 -0600, Bin Liu wrote: > Hi Min, > > On Mon, Jan 21, 2019 at 08:22:31PM +0800, min@mediatek.com wrote: > > From: Min Guo > > > > This adds support for MediaTek musb controller in > > host, peripheral and otg mode. > > There are some quirk of MediaTek musb

Re: [PATCH v4 5/6] usb: musb: Add musb_clearb/w() interface

2019-01-21 Thread Min Guo
Hi Bin, On Mon, 2019-01-21 at 09:59 -0600, Bin Liu wrote: > Hi Min, > > On Mon, Jan 21, 2019 at 08:22:30PM +0800, min@mediatek.com wrote: > > From: Min Guo > > > > Delete the const attribute of addr parameter in readb/w/l hooks, these > > changes are for implementing clearing W1C registers.

Re: [PATCH 4/8] net/macb: bindings doc/trivial: fix documentation for sama5d3 10/100 interface

2019-01-21 Thread Rob Herring
On Wed, Jan 16, 2019 at 10:57:40AM +0100, Nicolas Ferre wrote: > This removes a line left while adding the correct compatibility string for > sama5d3 10/100 interface. Now use the "atmel,sama5d3-macb" string. > > Signed-off-by: Nicolas Ferre > --- > Documentation/devicetree/bindings/net/macb.txt

Re: [PATCH 2/8] dt-bindings: arm: atmel: add new sam9x60 reset controller binding

2019-01-21 Thread Rob Herring
On Wed, Jan 16, 2019 at 10:57:38AM +0100, Nicolas Ferre wrote: > Update the Reset Controller's binding to add new SoC compatibility string. > > Signed-off-by: Nicolas Ferre > --- > Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/D

Re: [PATCH 1/8] dt-bindings: arm: atmel: add missing samx7 to reset controller

2019-01-21 Thread Rob Herring
On Wed, 16 Jan 2019 10:57:37 +0100, Nicolas Ferre wrote: > Add this missing compatibility string to the Reset Controller > compatible string chip list. > > Signed-off-by: Nicolas Ferre > --- > Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 2 +- > 1 file changed, 1 insertion(+), 1 del

Re: [PATCH 1/2] usb: dwc3: Add avoiding vbus glitch happen during xhci reset

2019-01-21 Thread Rob Herring
On Wed, Jan 16, 2019 at 06:48:06AM +, Ran Wang wrote: > When DWC3 is set to host mode by programming register DWC3_GCTL, VUBS s/VUBS/VBUS/ > (or its control signal) will on immediately on related Root Hub ports. /will on/will turn on/ > Then the VUBS will be de-asserted for a little while d

[PATCH v3 3/3] arm64: dts: qcom: msm8998: Add USB-related nodes

2019-01-21 Thread Jeffrey Hugo
Add nodes for USB and related PHYs. Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 22 arch/arm64/boot/dts/qcom/msm8998.dtsi | 92 +++ 2 files changed, 114 insertions(+) diff --git a/arch/arm64/b

[PATCH v3 2/3] usb: dwc3: qcom: Add support for MSM8998

2019-01-21 Thread Jeffrey Hugo
Add a MSM8998 specific DT compatible so that we can properly bind to the device and enable the USB controller. Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson --- drivers/usb/dwc3/dwc3-qcom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb

[PATCH v3 1/3] dt-bindings: usb: Add support for msm8998

2019-01-21 Thread Jeffrey Hugo
msm8998 USB has a dwc3 controller just like the existing sdm845 support. Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson --- Documentation/devicetree/bindings/usb/qcom,dwc3.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.txt b/Do

[PATCH v3 0/6] MSM8998 basic USB support

2019-01-21 Thread Jeffrey Hugo
This series provides basic USB support for MSM8998. Currently missing is wiring up the Type-C detection logic so that the controller can correctly switch between host and peripheral modes. Work to implement that is ongoing, and expected to appear soon in followup patches. Also missing is Display

[PATCH v2] usb: dwc3: exynos: Fix error handling of clk_prepare_enable

2019-01-21 Thread Alexey Khoroshilov
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 (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Fixes: 9f2168367a0a ("usb: dwc3:

Re: MUSB interrupt storm on device removal

2019-01-21 Thread Måns Rullgård
Bin Liu writes: > On Fri, Jan 18, 2019 at 08:15:02PM +, Måns Rullgård wrote: >> Bin Liu writes: >> >> > On Mon, Dec 17, 2018 at 09:36:17PM +, Måns Rullgård wrote: >> >> Bin Liu writes: >> >> >> >> > On Mon, Dec 17, 2018 at 07:16:08PM +, Måns Rullgård wrote: >> >> >> Bin Liu write

Dearest Friend

2019-01-21 Thread Mercy Kings
Dearest One First i thanks your attention to me, I am mercy kings My parents Mr.and Mrs.kings were assassinated here in IVORY COAST. Before my Before my father's death he had (USD $5.9M) Five Million Nine Hundred Thousand United State Dollars deposited in a bank here in Abidjan. I want you to do m

Re: [PATCH v2,2/2] usb: chipidea: imx: set power polarity

2019-01-21 Thread Philipp Puschmann
Hi! Am 16.01.19 um 17:32 schrieb Sergei Shtylyov: > Hello! > > On 01/16/2019 01:51 PM, Philipp Puschmann wrote: > >> This patch adds support to set the power line polarity for i.MX6q/dl. >> >> To let the USB controller control the power it may be necessary to configure >> the polarity of the pow

Re: [PATCH v3 1/2] dt-bindings: usb: ci-hdrc-usb2: add property power-active-high

2019-01-21 Thread Philipp Puschmann
Hi Peter, Am 17.01.19 um 08:01 schrieb Peter Chen: > >> >> The i.MX6q/dl USB controller may drive the usb power line directly, but the >> polarity >> depends on the board. Reset state of the polarity is low-active so add this >> property >> to allow it to be high-active. >> > > As far as I kn

Re: [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Rob Herring
On Mon, Jan 21, 2019 at 10:04:06AM +0200, Mike Rapoport wrote: > Add check for the return value of memblock_alloc*() functions and call > panic() in case of error. > The panic message repeats the one used by panicing memblock allocators with > adjustment of parameters to include only relevant ones.

Re: MUSB interrupt storm on device removal

2019-01-21 Thread Bin Liu
On Fri, Jan 18, 2019 at 08:15:02PM +, Måns Rullgård wrote: > Bin Liu writes: > > > On Mon, Dec 17, 2018 at 09:36:17PM +, Måns Rullgård wrote: > >> Bin Liu writes: > >> > >> > On Mon, Dec 17, 2018 at 07:16:08PM +, Måns Rullgård wrote: > >> >> Bin Liu writes: > >> >> > >> >> > Hi, >

Re: [PATCH v2] usb: dwc3: gadget: Handle 0 xfer length for OUT EP

2019-01-21 Thread Sergei Shtylyov
Hello! On 01/21/2019 12:33 PM, Tejas Joglekar wrote: > For OUT endpoints, zero-length transfers require MaxPacketSize buffer as > per the DWC_usb3 programming guide 3.30a section 4.2.3.3. > > This patch fixes this by explicitly checking zero length > transfer to correctly pad up to MaxPacketSize

Re: [PATCH v4 6/6] usb: musb: Add support for MediaTek musb controller

2019-01-21 Thread Bin Liu
Hi Min, On Mon, Jan 21, 2019 at 08:22:31PM +0800, min@mediatek.com wrote: > From: Min Guo > > This adds support for MediaTek musb controller in > host, peripheral and otg mode. > There are some quirk of MediaTek musb controller, such as: > -W1C interrupt status registers > -Private data to

Re: [PATCH v4 5/6] usb: musb: Add musb_clearb/w() interface

2019-01-21 Thread Bin Liu
Hi Min, On Mon, Jan 21, 2019 at 08:22:30PM +0800, min@mediatek.com wrote: > From: Min Guo > > Delete the const attribute of addr parameter in readb/w/l hooks, these > changes are for implementing clearing W1C registers. > Replace musb_readb/w with musb_clearb/w to clear the interrupt status.

Re: [PATCH v3 06/10] dt-bindings: phy: mvebu-utmi: add UTMI PHY bindings

2019-01-21 Thread Gregory CLEMENT
Hi Rob, On lun., janv. 21 2019, Rob Herring wrote: > On Mon, 21 Jan 2019 12:23:32 +0100, Miquel Raynal wrote: >> Add bindings for Marvell Armada 3700 USB2 UTMI+ PHY. >> >> Signed-off-by: Miquel Raynal >> --- >> .../bindings/phy/phy-mvebu-utmi.txt | 38 +++ >> 1 fil

Re: [PATCH v3 06/10] dt-bindings: phy: mvebu-utmi: add UTMI PHY bindings

2019-01-21 Thread Rob Herring
On Mon, 21 Jan 2019 12:23:32 +0100, Miquel Raynal wrote: > Add bindings for Marvell Armada 3700 USB2 UTMI+ PHY. > > Signed-off-by: Miquel Raynal > --- > .../bindings/phy/phy-mvebu-utmi.txt | 38 +++ > 1 file changed, 38 insertions(+) > create mode 100644 Documentation/

Re: [PATCH v3 1/4] Documentation: dt: Add binding info for jz4740-musb driver

2019-01-21 Thread Bin Liu
On Thu, Jan 17, 2019 at 07:33:27PM -0300, Paul Cercueil wrote: > This commit adds documentation for the device-tree bindings of the > jz4740-musb driver, which provides support for the USB gadget mode > of the JZ4740 and similar SoCs from Ingenic. > > Signed-off-by: Paul Cercueil > Reviewed-by: R

Re: [PATCH v4 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller

2019-01-21 Thread Rob Herring
On Mon, Jan 21, 2019 at 08:22:26PM +0800, min@mediatek.com wrote: > From: Min Guo > > This adds support for MediaTek musb controller in > host, peripheral and otg mode. > > Signed-off-by: Min Guo > --- > changes in v4: > suggested by Sergei: > 1. String alignment > > changes in v3: > 1. no

[PATCH] usb: dwc3: Enable GBit Ethernet on Odroid XU4

2019-01-21 Thread Jochen Sprickerhof
Note that it only works with USB_XHCI_PLATFORM=y. Also it needs a hard reset when coming from an unpatched kernel. This was included in the original patch in https://patchwork.kernel.org/patch/9992809/ but got dropped when accepted in d8c80bb3b55b phy: exynos5-usbdrd: Calibrate LOS levels for exy

Re: [PATCH] usb: core: endpoint: Add error messages for usb_create_ep_devs()

2019-01-21 Thread Greg KH
On Mon, Jan 21, 2019 at 11:30:55PM +0900, Suwan Kim wrote: > usb_create_ep_devs() returns error code if an error occurs. But > usb_new_device() and create_intf_ep_devs() which use usb_create_ep_devs() > to create endpoint devices ignore the error and cut the propagation > of the error when usb_crea

[PATCH] usb: misc: usb3503: Add system sleep support in non-I2C mode

2019-01-21 Thread Marek Szyprowski
USB3503 chip can be used without any I2C connection, what is handled by a simple platform device driver. Add support for resetting the chip (via GPIO lines) during system suspend/resume cycle by adding calls to existing suspend/resume functions used for E2C device. Signed-off-by: Marek Szyprowski

[PATCH] usb: core: endpoint: Add error messages for usb_create_ep_devs()

2019-01-21 Thread Suwan Kim
usb_create_ep_devs() returns error code if an error occurs. But usb_new_device() and create_intf_ep_devs() which use usb_create_ep_devs() to create endpoint devices ignore the error and cut the propagation of the error when usb_create_ep_devs() fails. So, usb_create_ep_devs() prints an error messag

Re: [PATCH v1 07/12] usb: roles: Find the usb role switch by also matching against the device node

2019-01-21 Thread Heikki Krogerus
Hi, On Mon, Jan 21, 2019 at 04:36:13PM +0800, Chen Yu wrote: > Have the fwnode_get_name() patches been accepted? No, I didn't have a user for the function anymore: https://lkml.org/lkml/2018/12/17/284 > And I will be grateful if you can tell me your plan about the > https://lkml.org/lkml/2018/10

[PATCH v3] usb: dwc2: gadget: Add scatter-gather mode

2019-01-21 Thread Marek Szyprowski
From: Andrzej Pietrasiewicz This patch adds support for transferring requests, which are non-contiguous in physical memory, i.e. the data buffer is described by a scatter-list. This allows transferring large requests without relying on error-prone contiguous buffer allocations. This way of alloca

[PATCH v4 5/6] usb: musb: Add musb_clearb/w() interface

2019-01-21 Thread min.guo
From: Min Guo Delete the const attribute of addr parameter in readb/w/l hooks, these changes are for implementing clearing W1C registers. Replace musb_readb/w with musb_clearb/w to clear the interrupt status. Signed-off-by: Min Guo --- new patch based on v3: --- drivers/usb/musb/musb_core.c |

[PATCH v4 3/6] usb: musb: Add get/set toggle hooks

2019-01-21 Thread min.guo
From: Min Guo Add get/set toggle hooks in struct musb_io and struct musb_platform_ops for special platform; remove function musb_save_toggle, use the set/get callback to handle toggle. Signed-off-by: Min Guo --- new patch based on v3: --- drivers/usb/musb/musb_core.c | 42 +

[PATCH v4 4/6] usb: musb: Add noirq type of dma create interface

2019-01-21 Thread min.guo
From: Min Guo Add noirq type of dma create interface for platform which do not have dedicated DMA interrupt line, move musbhsdma macro definition to musb_dma.h Signed-off-by: Min Guo --- new patch based on v3: --- drivers/usb/musb/musb_dma.h | 9 drivers/usb/musb/musbhsdma.c | 54 ++

[PATCH v4 0/6] Add MediaTek MUSB Controller Driver

2019-01-21 Thread min.guo
From: Min Guo These patches introduce the MediaTek MUSB controller driver. The driver can be configured as Dual-Role Device (DRD), Peripheral Only and Host Only modes. This has beed tested on MT2701 with a variety of devices in host mode and with the f_mass gadget driver in peripheral mode, plu

[PATCH v4 1/6] dt-bindings: usb: musb: Add support for MediaTek musb controller

2019-01-21 Thread min.guo
From: Min Guo This adds support for MediaTek musb controller in host, peripheral and otg mode. Signed-off-by: Min Guo --- changes in v4: suggested by Sergei: 1. String alignment changes in v3: 1. no changes changes in v2: suggested by Bin: 1. Modify DRC to DRD suggested by Rob: 2. Drop the "-

[PATCH v4 6/6] usb: musb: Add support for MediaTek musb controller

2019-01-21 Thread min.guo
From: Min Guo This adds support for MediaTek musb controller in host, peripheral and otg mode. There are some quirk of MediaTek musb controller, such as: -W1C interrupt status registers -Private data toggle registers -No dedicated DMA interrupt line Signed-off-by: Min Guo Signed-off-by: Yong

[PATCH v4 2/6] arm: dts: mt2701: Add usb2 device nodes

2019-01-21 Thread min.guo
From: Min Guo Add musb nodes and usb2 phy nodes for MT2701 Signed-off-by: Min Guo --- changes in v4: 1. no changes changes in v3: 1. no changes changes in v2: 1. Remove phy-names --- arch/arm/boot/dts/mt2701-evb.dts | 21 + arch/arm/boot/dts/mt2701.dtsi| 33 ++

Re: [PATCH 10/14] usb: dwc3: gadget: remove wait_end_transfer

2019-01-21 Thread Felipe Balbi
Hi Felipe Balbi writes: > Hi, > > Felipe Balbi writes: >> Hi again, >> >> Felipe Balbi writes: >> >> >> >>> Try to dequeue a request that was already completed. Odd. Why are we >>> missing a call to giveback?? >> >> Got a little more information: >> >> file-storage-3982 [006] d... 131.

[PATCH v3 06/10] dt-bindings: phy: mvebu-utmi: add UTMI PHY bindings

2019-01-21 Thread Miquel Raynal
Add bindings for Marvell Armada 3700 USB2 UTMI+ PHY. Signed-off-by: Miquel Raynal --- .../bindings/phy/phy-mvebu-utmi.txt | 38 +++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-mvebu-utmi.txt diff --git a/Documentation/

[PATCH v3 05/10] phy: add A3700 UTMI PHY driver

2019-01-21 Thread Miquel Raynal
Marvell Armada 3700 SoC has two USB controllers, each of them being wired to an internal UTMI PHY. Add a driver to control them. Igal Liberman worked on supporting the PHY, I took the while 'register configuration' from his work and rewrote almost entirely the driver/bindings around it. Co-develo

[PATCH v3 02/10] usb: host: xhci: mvebu: add reset on resume quirk

2019-01-21 Thread Miquel Raynal
From: Ofer Heifetz The mvebu xHCI host driver does not have suspend/resume support. Use of the XHCI_RESET_ON_RESUME quirk is mandatory in order to avoid failures after resume. This will work only if no USB device is plugged-in. While at it, mention in the Kconfig file that this IP is also presen

[PATCH v3 01/10] usb: core: comply to PHY framework

2019-01-21 Thread Miquel Raynal
Current implementation of the USB core does not take into account the new PHY framework. Correct the situation by adding a call to phy_set_mode() before phy_power_on(). Signed-off-by: Miquel Raynal --- drivers/usb/core/hcd.c | 5 + drivers/usb/core/phy.c | 28 d

[PATCH v3 10/10] ARM64: dts: marvell: armada-37xx: link USB hosts with their PHYs

2019-01-21 Thread Miquel Raynal
Reference the PHY nodes from the USB controller nodes. The USB3 host controller is wired to: * the first PHY of the COMPHY IP * the OTG-capable UTMI PHY The USB2 host controller is wired to: * the host-only UTMI PHY Signed-off-by: Miquel Raynal --- arch/arm64/boot/dts/marvell/armada-37xx

[PATCH v3 00/10] A3700 USB S2RAM support

2019-01-21 Thread Miquel Raynal
Hello, As part of an effort to bring suspend to RAM support to Armada 3700 SoCs (main target: ESPRESSObin), this series handles the work around the USB2 and USB32 IPs. First, a change in the core adds support for the new PHY framework by following the phy_set_mode()/phy_power_on() sequence (patch

[PATCH v3 08/10] ARM64: dts: marvell: armada-37xx: fix USB2 memory region

2019-01-21 Thread Miquel Raynal
The specification splits the USB2 memory region into three sections: 1/ 0xD005E000-0xD005EFFF: USB2 Host Controller Registers 2/ 0xD005F000-0xD005F7FF: USB2 UTMI PHY Registers 3/ 0xD005F800-0xD005: USB2 Host Miscellaneous Registers Section 1/ belongs to the USB2 node but section 2/ belongs to

[PATCH v3 07/10] MAINTAINERS: phy: fill Armada 3700 PHY drivers entry

2019-01-21 Thread Miquel Raynal
Update the Armada 3700 PHY drivers entry with the recently added UTMI PHY driver. Signed-off-by: Miquel Raynal --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index abfd80f21b24..2a08a097e107 100644 --- a/MAINTAINERS +++ b/MAINTAIN

[PATCH v3 09/10] ARM64: dts: marvell: armada-37xx: declare USB2 UTMI PHYs

2019-01-21 Thread Miquel Raynal
On Marvell Armada 3700 SoCs there are two USB2 UTMI PHYs. They are both very similar but only one has OTG/charging capabilities. Because there are USB host registers and PHY registers mixed in a single area, a system controller is also created and referenced from both the USB host node and the PHY

[PATCH v3 04/10] usb: ehci-orion: add S2RAM support

2019-01-21 Thread Miquel Raynal
Add suspend/resume callbacks to reset the host controller properly during S2RAM operation. Signed-off-by: Miquel Raynal --- drivers/usb/host/ehci-orion.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c i

[PATCH v3 03/10] usb: ehci-orion: avoid double PHY initialization

2019-01-21 Thread Miquel Raynal
No need to initialize the PHY from the driver's probe. It is done by the core automatically and doing it twice would increment the phy->powercount counter to 2 instead of 1. During later suspend operation, the counter will be decremented to one, no phy->power_off() will occur and worse than that, t

[PATCH] USB: storage: karma: add whitespace after declarations

2019-01-21 Thread Bharath Vedartham
fixed the checkpatch.pl warning: WARNING: Missing a blank line after declarations Added space after declarations to conform to coding style. Signed-off-by: Bharath Vedartham --- drivers/usb/storage/karma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/storage/karma.c b/driv

Re: [PATCH v2 02/10] usb: host: xhci: mvebu: add reset on resume quirk

2019-01-21 Thread Miquel Raynal
Hi Gregory, Gregory CLEMENT wrote on Fri, 18 Jan 2019 17:04:01 +0100: > Hi Miquel, > > On ven., janv. 11 2019, Miquel Raynal wrote: > > > From: Ofer Heifetz > > > > The mvebu xHCI host driver does not have suspend/resume support. Use of > > the XHCI_RESET_ON_RESUME quirk is mandatory in or

Re: [PATCH v2 05/10] phy: add A3700 UTMI PHY driver

2019-01-21 Thread Miquel Raynal
Hi Kishon, Chunfeng, Kishon Vijay Abraham I wrote on Wed, 16 Jan 2019 14:50:58 +0530: > Hi, > > On 15/01/19 8:10 AM, Chunfeng Yun wrote: > > Hi, > > On Fri, 2019-01-11 at 14:31 +0100, Miquel Raynal wrote: > >> Marvell Armada 3700 SoC has two USB controllers, each of them being > >> wired to a

[PATCH v2 4/6] usb: linux/fsl_device: Add platform member has_fsl_erratum_a006918

2019-01-21 Thread Yinbo Zhu
From: Yinbo Zhu This patch is to add member has_fsl_erratum_a006918 in platform data Signed-off-by: Yinbo Zhu --- include/linux/fsl_devices.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 60cef82..7ea53c

[PATCH v2 5/6] usb: linux/fsl_device: Add platform member has_fsl_erratum_14

2019-01-21 Thread Yinbo Zhu
From: Yinbo Zhu This patch is to add member has_fsl_erratum_14 in platform data Signed-off-by: Yinbo Zhu --- include/linux/fsl_devices.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 7ea53c8..5c21a3a 100

Re: [PATCH v2 05/10] phy: add A3700 UTMI PHY driver

2019-01-21 Thread Miquel Raynal
Hi Gregory, Gregory CLEMENT wrote on Fri, 18 Jan 2019 17:36:36 +0100: > Hi Miquel, > > I have only a few smallish remarks: > > On ven., janv. 11 2019, Miquel Raynal wrote: > > > Marvell Armada 3700 SoC has two USB controllers, each of them being > > wired to an internal UTMI PHY. Add a driv

[PATCH v2 6/6] usb :fsl: Change string format for errata property

2019-01-21 Thread Yinbo Zhu
From: Nikhil Badola Remove USB errata checking code from driver. Applicability of erratum is retrieved by reading corresponding property in device tree. This property is written during device tree fixup. Signed-off-by: Ramneek Mehresh Signed-off-by: Nikhil Badola Signed-off-by: Yinbo Zhu ---

[PATCH v2 3/6] usb: host: Stops USB controller init if PLL fails to lock

2019-01-21 Thread Yinbo Zhu
From: yinbo.zhu USB erratum-A006918 workaround tries to start internal PHY inside uboot (when PLL fails to lock). However, if the workaround also fails, then USB initialization is also stopped inside Linux. Erratum-A006918 workaround failure creates "fsl,erratum_a006918" node in device-tree. Pres

[PATCH v2 1/6] usb: fsl: Set USB_EN bit to select ULPI phy

2019-01-21 Thread Yinbo Zhu
From: Nikhil Badola Set USB_EN bit to select ULPI phy for USB controller version 2.5 Signed-off-by: Nikhil Badola Signed-off-by: Yinbo Zhu --- Change in v2: replace Yinbo.Zhu with Yinbo Zhu drivers/usb/host/ehci-fsl.c |6 ++ 1 files changed, 6 insertions(+), 0 deleti

[PATCH v2 2/6] usb: phy: Workaround for USB erratum-A005728

2019-01-21 Thread Yinbo Zhu
From: Suresh Gupta PHY_CLK_VALID bit for UTMI PHY in USBDR does not set even if PHY is providing valid clock. Workaround for this involves resetting of PHY and check PHY_CLK_VALID bit multiple times. If PHY_CLK_VALID bit is still not set even after 5 retries, it would be safe to deaclare that PHY

RE: [PATCH v1 3/6] usb: host: Stops USB controller init if PLL fails to lock

2019-01-21 Thread Yinbo Zhu
-Original Message- From: Sergei Shtylyov [mailto:sergei.shtyl...@cogentembedded.com] Sent: 2019年1月21日 16:17 To: Yinbo Zhu ; Alan Stern Cc: Xiaobo Xie ; Jerry Huang ; Ran Wang ; Greg Kroah-Hartman ; Ramneek Mehresh ; Nikhil Badola ; Suresh Gupta ; linux-usb@vger.kernel.org; linux-ker

Re: [PATCH v2 03/10] usb: ehci-orion: avoid double PHY initialization

2019-01-21 Thread Miquel Raynal
Hi Sergei, Sergei Shtylyov wrote on Fri, 11 Jan 2019 21:03:01 +0300: > Hello! > > On 01/11/2019 04:31 PM, Miquel Raynal wrote: > > > No need to initialize the PHY from the driver's probe. It is done by > > the core automatically and doing it twice would increment the > > phy->powercount counte

Re: [PATCH] usb: dwc3: exynos: Fix error handling of clk_prepare_enable

2019-01-21 Thread Marek Szyprowski
Hi Alexey, On 2019-01-18 22:17, Alexey Khoroshilov wrote: > If clk_prepare_enable() fails in dwc3_exynos_probe(), > exynos->clks[0] is left undisabled because of usage > preincrement in while condition. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Kh

Re: [PATCH v2 03/10] usb: ehci-orion: avoid double PHY initialization

2019-01-21 Thread Miquel Raynal
Hi Gregory, Gregory CLEMENT wrote on Fri, 18 Jan 2019 17:25:30 +0100: > Hi Miquel, > > On ven., janv. 11 2019, Miquel Raynal wrote: > > > No need to initialize the PHY from the driver's probe. It is done by > > the core automatically and doing it twice would increment the > > Do you know

[PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint

2019-01-21 Thread Zeng Tao
For ISOC transfers, if there is no available data for a period, we need to stop the transfer by issue a stop command, otherwise, all the upcoming transfers will started by update transfer command, and will be dropped with MISS ISOC errors. Signed-off-by: Zeng Tao --- drivers/usb/dwc3/gadget.c |

RE: [PATCH] usb: dwc3: gadget: don't remove the request if bus-expired

2019-01-21 Thread Zengtao (B)
Hi balbi: >-Original Message- >From: Felipe Balbi [mailto:felipe.ba...@linux.intel.com] >Sent: Monday, January 14, 2019 4:13 PM >To: Zengtao (B) >Cc: Zengtao (B) ; Greg Kroah-Hartman >; linux-usb@vger.kernel.org; >linux-ker...@vger.kernel.org >Subject: Re: [PATCH] usb: dwc3: gadget: don't

[PATCH v2] usb: dwc3: gadget: Handle 0 xfer length for OUT EP

2019-01-21 Thread Tejas Joglekar
For OUT endpoints, zero-length transfers require MaxPacketSize buffer as per the DWC_usb3 programming guide 3.30a section 4.2.3.3. This patch fixes this by explicitly checking zero length transfer to correctly pad up to MaxPacketSize. Fixes: c6267a51639b (usb: dwc3: gadget: align transfers to wMa

Re: [PATCH 10/14] usb: dwc3: gadget: remove wait_end_transfer

2019-01-21 Thread Felipe Balbi
Hi, Felipe Balbi writes: > Hi again, > > Felipe Balbi writes: > > > >> Try to dequeue a request that was already completed. Odd. Why are we >> missing a call to giveback?? > > Got a little more information: > > file-storage-3982 [006] d... 131.010663: dwc3_ep_queue: ep1in: req > 00

Re: [PATCH 10/14] usb: dwc3: gadget: remove wait_end_transfer

2019-01-21 Thread Felipe Balbi
Hi again, Felipe Balbi writes: > Try to dequeue a request that was already completed. Odd. Why are we > missing a call to giveback?? Got a little more information: file-storage-3982 [006] d... 131.010663: dwc3_ep_queue: ep1in: req eccaa10f length 0/16384 zsI ==> -115 fil

RE: [PATCH] usb: dwc3: gadget: don't remove the request if bus-expired

2019-01-21 Thread Felipe Balbi
Hi, "Zengtao (B)" writes: >>-Original Message- >>From: Felipe Balbi [mailto:felipe.ba...@linux.intel.com] >>Sent: Monday, January 14, 2019 4:13 PM >>To: Zengtao (B) >>Cc: Zengtao (B) ; Greg Kroah-Hartman >>; linux-usb@vger.kernel.org; >>linux-ker...@vger.kernel.org >>Subject: Re: [PATCH

RE: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint

2019-01-21 Thread Felipe Balbi
Hi, "Zengtao (B)" writes: >>-Original Message- >>From: Felipe Balbi [mailto:felipe.ba...@linux.intel.com] >>Sent: Monday, January 21, 2019 4:17 PM >>To: Zengtao (B) >>Cc: Zengtao (B) ; Greg Kroah-Hartman >>; linux-usb@vger.kernel.org; >>linux-ker...@vger.kernel.org >>Subject: Re: [PATCH

RE: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint

2019-01-21 Thread Zengtao (B)
Hi balbi: >-Original Message- >From: Felipe Balbi [mailto:felipe.ba...@linux.intel.com] >Sent: Monday, January 21, 2019 4:17 PM >To: Zengtao (B) >Cc: Zengtao (B) ; Greg Kroah-Hartman >; linux-usb@vger.kernel.org; >linux-ker...@vger.kernel.org >Subject: Re: [PATCH] usb: dwc3: gadget: issue

Re: [PATCH 10/14] usb: dwc3: gadget: remove wait_end_transfer

2019-01-21 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > On 1/17/2019 11:12 PM, Felipe Balbi wrote: >> Hi, >> >> Thinh Nguyen writes: >>> @@ -1409,15 +1407,11 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep, >>> if (r == req) { >>> /* wait until it is processed */ >>>

Re: [PATCH v1 07/12] usb: roles: Find the usb role switch by also matching against the device node

2019-01-21 Thread Chen Yu
Hi Heikki, On 2018/12/3 20:25, Heikki Krogerus wrote: > Hi, > > On Mon, Dec 03, 2018 at 10:17:20AM +0200, Andy Shevchenko wrote: >> On Mon, Dec 3, 2018 at 5:45 AM Yu Chen wrote: >>> >>> This patch adds code for supporting find usb role switch by matching against >>> the device node described usi

Re: [PATCH] usb: dwc3: gadget: issue a stop command for ISOC endpoint

2019-01-21 Thread Felipe Balbi
Hi, Zeng Tao writes: > For ISOC transfers, if there is no available data for a period, we need > to stop the transfer by issue a stop command, otherwise, all the > upcoming transfers will started by update transfer command, and will be > dropped with MISS ISOC errors. We, actually, have code to

Re: [PATCH v1 3/6] usb: host: Stops USB controller init if PLL fails to lock

2019-01-21 Thread Sergei Shtylyov
Hello! On 21.01.2019 6:13, Yinbo Zhu wrote: From: yinbo.zhu USB erratum-A006918 workaround tries to start internal PHY inside uboot (when PLL fails to lock). However, if the workaround also fails, then USB initialization is also stopped inside Linux. Erratum-A006918 workaround failure creates

[PATCH v2 02/21] powerpc: use memblock functions returning virtual address

2019-01-21 Thread Mike Rapoport
From: Christophe Leroy Since only the virtual address of allocated blocks is used, lets use functions returning directly virtual address. Those functions have the advantage of also zeroing the block. [ MR: - updated error message in alloc_stack() to be more verbose - convereted several additi

[PATCH v2 00/21] Refine memblock API

2019-01-21 Thread Mike Rapoport
Hi, Current memblock API is quite extensive and, which is more annoying, duplicated. Except the low-level functions that allow searching for a free memory region and marking it as reserved, memblock provides three (well, two and a half) sets of functions to allocate memory. There are several overl

[PATCH v2 05/21] memblock: emphasize that memblock_alloc_range() returns a physical address

2019-01-21 Thread Mike Rapoport
Rename memblock_alloc_range() to memblock_phys_alloc_range() to emphasize that it returns a physical address. While on it, remove the 'enum memblock_flags' parameter from this function as its only user anyway sets it to MEMBLOCK_NONE, which is the default for the most of memblock allocations. Sign

[PATCH v2 07/21] memblock: memblock_phys_alloc(): don't panic

2019-01-21 Thread Mike Rapoport
Make the memblock_phys_alloc() function an inline wrapper for memblock_phys_alloc_range() and update the memblock_phys_alloc() callers to check the returned value and panic in case of error. Signed-off-by: Mike Rapoport --- arch/arm/mm/init.c | 4 arch/arm64/mm/mmu.c

[PATCH v2 04/21] memblock: drop memblock_alloc_base_nid()

2019-01-21 Thread Mike Rapoport
The memblock_alloc_base_nid() is a oneliner wrapper for memblock_alloc_range_nid() without any side effect. Replace it's usage by the direct calls to memblock_alloc_range_nid(). Signed-off-by: Mike Rapoport --- include/linux/memblock.h | 3 --- mm/memblock.c| 15 --- 2 f

[PATCH v2 08/21] memblock: drop __memblock_alloc_base()

2019-01-21 Thread Mike Rapoport
The __memblock_alloc_base() function tries to allocate a memory up to the limit specified by its max_addr parameter. Depending on the value of this parameter, the __memblock_alloc_base() can is replaced with the appropriate memblock_phys_alloc*() variant. Signed-off-by: Mike Rapoport Acked-by: Ro

[PATCH v2 11/21] memblock: make memblock_find_in_range_node() and choose_memblock_flags() static

2019-01-21 Thread Mike Rapoport
These functions are not used outside memblock. Make them static. Signed-off-by: Mike Rapoport --- include/linux/memblock.h | 4 mm/memblock.c| 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index cf4cd9c

[PATCH v2 12/21] arch: use memblock_alloc() instead of memblock_alloc_from(size, align, 0)

2019-01-21 Thread Mike Rapoport
The last parameter of memblock_alloc_from() is the lower limit for the memory allocation. When it is 0, the call is equivalent to memblock_alloc(). Signed-off-by: Mike Rapoport Acked-by: Paul Burton # MIPS part --- arch/alpha/kernel/core_cia.c | 2 +- arch/alpha/kernel/pci_iommu.c | 4 ++--

[PATCH v2 13/21] arch: don't memset(0) memory returned by memblock_alloc()

2019-01-21 Thread Mike Rapoport
memblock_alloc() already clears the allocated memory, no point in doing it twice. Signed-off-by: Mike Rapoport Acked-by: Geert Uytterhoeven # m68k --- arch/c6x/mm/init.c | 1 - arch/h8300/mm/init.c| 1 - arch/ia64/kernel/mca.c | 2 -- arch/m68k/mm/mcfmmu.c | 1 - arc

[PATCH v1 2/6] usb: phy: Workaround for USB erratum-A005728

2019-01-21 Thread Yinbo Zhu
From: Suresh Gupta PHY_CLK_VALID bit for UTMI PHY in USBDR does not set even if PHY is providing valid clock. Workaround for this involves resetting of PHY and check PHY_CLK_VALID bit multiple times. If PHY_CLK_VALID bit is still not set even after 5 retries, it would be safe to deaclare that PHY

[PATCH v2 16/21] mm/percpu: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc() returns NULL. The panic() format duplicates the one used by memblock itself and in order to avoid explosion with long parameters list replace open coded allocation size calculations with a local variable. Signed-off-by: Mike Rapoport --- mm/percpu.c | 73 ++

[PATCH v1 5/6] usb: linux/fsl_device: Add platform member has_fsl_erratum_14

2019-01-21 Thread Yinbo Zhu
This patch is to add member has_fsl_erratum_14 in platform data Signed-off-by: Yinbo Zhu --- include/linux/fsl_devices.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 7ea53c8..5c21a3a 100644 --- a/include/

[PATCH v2 15/21] sparc: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc*() returns NULL. Most of the changes are simply addition of if(!ptr) panic(); statements after the calls to memblock_alloc*() variants. Exceptions are pcpu_populate_pte() and kernel_map_range() that were slightly refactored to accommod

[PATCH v2 18/21] swiotlb: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc() returns NULL. The panic() format duplicates the one used by memblock itself and in order to avoid explosion with long parameters list replace open coded allocation size calculations with a local variable. Signed-off-by: Mike Rapoport --- kernel/dma/swiotlb.

[PATCH v2 10/21] memblock: refactor internal allocation functions

2019-01-21 Thread Mike Rapoport
Currently, memblock has several internal functions with overlapping functionality. They all call memblock_find_in_range_node() to find free memory and then reserve the allocated range and mark it with kmemleak. However, there is difference in the allocation constraints and in fallback strategies.

[PATCH v2 17/21] init/main: add checks for the return value of memblock_alloc*()

2019-01-21 Thread Mike Rapoport
Add panic() calls if memblock_alloc() returns NULL. The panic() format duplicates the one used by memblock itself and in order to avoid explosion with long parameters list replace open coded allocation size calculations with a local variable. Signed-off-by: Mike Rapoport --- init/main.c | 26 ++

[PATCH v2 21/21] memblock: drop memblock_alloc_*_nopanic() variants

2019-01-21 Thread Mike Rapoport
As all the memblock allocation functions return NULL in case of error rather than panic(), the duplicates with _nopanic suffix can be removed. Signed-off-by: Mike Rapoport Acked-by: Greg Kroah-Hartman --- arch/arc/kernel/unwind.c | 3 +-- arch/sh/mm/init.c | 2 +- arch/x86/

[PATCH v2 06/21] memblock: memblock_phys_alloc_try_nid(): don't panic

2019-01-21 Thread Mike Rapoport
The memblock_phys_alloc_try_nid() function tries to allocate memory from the requested node and then falls back to allocation from any node in the system. The memblock_alloc_base() fallback used by this function panics if the allocation fails. Replace the memblock_alloc_base() fallback with the di

  1   2   >