[PATCH -next] USB: core: remove set but not used variable 'udev'

2018-09-21 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/core/driver.c: In function 'usb_driver_claim_interface': drivers/usb/core/driver.c:513:21: warning: variable 'udev' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- drivers/usb/core/driver.c | 3 --- 1 file ch

Re: [PATCH v3] arm64: dts: exynos: add OF graph between USB-PHY and MUIC

2018-09-21 Thread Krzysztof Kozlowski
On Fri, Sep 21, 2018 at 03:13:55PM +0200, Andrzej Hajda wrote: > OF graph describes USB data lanes between USB-PHY and respective MUIC. > Since graph is present and DWC driver can use it to get extcon, obsolete > extcon property can be removed. > > Signed-off-by: Andrzej Hajda > --- > v3: > - re

Re: [PATCH] usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage

2018-09-21 Thread Guenter Roeck
On Fri, Sep 21, 2018 at 04:04:11PM +0100, Adam Thomson wrote: > Current code mistakenly checks against max current to determine > order but this should be max voltage. This commit fixes the issue > so order is correctly determined, thus avoiding failure based on > a higher voltage PPS APDO having a

[PATCH] usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage

2018-09-21 Thread Adam Thomson
Current code mistakenly checks against max current to determine order but this should be max voltage. This commit fixes the issue so order is correctly determined, thus avoiding failure based on a higher voltage PPS APDO having a lower maximum current output, which is actually valid. Fixes: 2eadc3

Re: [PATCH] Revert "usb: typec: fusb302: Fix debugfs issue"

2018-09-21 Thread Michael Gebhard
Also, sorry for the cc messup, I'll put my two previous mails here, just so they'll appear in the archives. As heikki just pointed out, there already is a fix for this problem. === I do have a couple of questions on how to best make sure is always NULL or pointing to a valid dentry. Other

Re: [PATCH] Revert "usb: typec: fusb302: Fix debugfs issue"

2018-09-21 Thread Michael Gebhard
> Try this patch: > https://patchwork.kernel.org/patch/10607509/ > > It should fix the broblem. Let us know if it works. It does fix the null pointers on boot. As far as i can tell, the rootdir pointer still becomes invalid after fusb302_remove(), and it should crash if fusb302_probe() is called

RE: [PATCH v5 0/8] usb: dwc3: Fix broken BULK stream support to dwc3 gadget driver

2018-09-21 Thread Anurag Kumar Vulisha
Hi Tejas, >-Original Message- >From: Tejas Joglekar [mailto:tejas.jogle...@synopsys.com] >Sent: Friday, September 21, 2018 7:01 PM >To: Anurag Kumar Vulisha ; ba...@kernel.org; >gre...@linuxfoundation.org >Cc: v.anuragku...@gmail.com; linux-usb@vger.kernel.org; linux- >ker...@vger.kernel

Re: [PATCH v5 0/8] usb: dwc3: Fix broken BULK stream support to dwc3 gadget driver

2018-09-21 Thread Tejas Joglekar
Hello Anurag, On 9/15/2018 8:00 PM, Anurag Kumar Vulisha wrote: > These patch series fixes the broken BULK streaming support in > dwc3 gadget driver. > > Changes in v5: > 1. Removed the dev_dbg prints as suggested bt "Thinh Nguyen" > > Changes in v4: > 1. Corrected the commit messgae an

Re: [PATCH] usb: cdc_acm: Do not leak URB buffers

2018-09-21 Thread Oliver Neukum
On Do, 2018-09-20 at 16:49 +0200, Romain Izard wrote: > When the ACM TTY port is disconnected, the URBs it uses must be killed, and > then the buffers must be freed. Unfortunately a previous refactor removed > the code freeing the buffers because it looked extremely similar to the > code killing th

[PATCH] xhci: Add check for invalid byte size error when UAS devices are connected.

2018-09-21 Thread Sandeep Singh
From: Sandeep Singh Observed "TRB completion code (27)" error which corresponds to Stopped - Length Invalid error(xhci spec section 4.17.4) while connecting USB to SATA bridge. Looks like this case was not considered when the following patch[1] was committed. Hence adding this new check which ca

[PATCH v3] arm64: dts: exynos: add OF graph between USB-PHY and MUIC

2018-09-21 Thread Andrzej Hajda
OF graph describes USB data lanes between USB-PHY and respective MUIC. Since graph is present and DWC driver can use it to get extcon, obsolete extcon property can be removed. Signed-off-by: Andrzej Hajda --- v3: - removed #address-cells/#size-cells from ports node. Hi Krzysztof, This is next

[PATCH 5/5] usb: renesas_usbhs: add support for R-Car E3

2018-09-21 Thread Yoshihiro Shimoda
This patch adds support for R-Car E3. This SoC needs to release the PLL reset by the UGCTRL register like R-Car D3. So, this patch adds a usbhs_of_match entry for this SoC with "USBHS_TYPE_RCAR_GEN3_WITH_PLL". Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/common.c | 4 1 fi

[PATCH 2/5] Revert "usb: renesas_usbhs: set the mode by using extcon state for non-otg channel"

2018-09-21 Thread Yoshihiro Shimoda
This reverts commit cd14247d5c14b9b20bb3d3dfcaa899ca22c8dccc. R-Car D3 can use OTG mode in fact. So, the commit doesn't need anymore. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/rcar3.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/driver

[PATCH 4/5] dt-bindings: usb: renesas_usbhs: add bindings for r8a77990

2018-09-21 Thread Yoshihiro Shimoda
This patch adds bindings for r8a77990 (R-Car E3). Signed-off-by: Yoshihiro Shimoda --- Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/rene

[PATCH 3/5] usb: renesas_usbhs: rcar3: Use OTG mode for R-Car D3

2018-09-21 Thread Yoshihiro Shimoda
Since R-Car D3 can use OTG mode, this patch changes the UGCTRL2 value to UGCTRL2_USB0SEL_OTG and UGCTRL2_VBUSSEL like other R-Car Gen3 SoCs. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/rcar3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/re

[PATCH 0/5] usb: renesas_usbhs: use otg mode and add support for R-Car E3

2018-09-21 Thread Yoshihiro Shimoda
This patch set is based on the latest Greg's usb.git / usb-testing branch (the commit id is ae8a2ca8a2215c7e31e6d874f7303801bb15fbbc) The previous code set the mode as peripheral mode by the UGCTRL2 register for R-Car D3. But, this SoC can select OTG mode in fact. So, at first, I'd like to revert

[PATCH 1/5] Revert "usb: renesas_usbhs: add extcon notifier to set mode for non-otg channel"

2018-09-21 Thread Yoshihiro Shimoda
This reverts commit 8ada211d0383b72878582bd312b984a9eae62b30. R-Car D3 can use OTG mode in fact. So, the commit doesn't need anymore. In other words, like other R-Car Gen3 SoCs, R-Car D3 can change the mode by using the phy-rcar-gen3-usb2 driver. Signed-off-by: Yoshihiro Shimoda --- drivers/usb

Re: [PATCH] Revert "usb: typec: fusb302: Fix debugfs issue"

2018-09-21 Thread Heikki Krogerus
Hi Michael, On Fri, Sep 21, 2018 at 11:49:23AM +0200, Michael Gebhard wrote: > This reverts commit c9359f416207 ("usb: typec: fusb302: Fix debugfs issue") > > Removing debugfs directory leaves pointing at > freed memory. The next subsequent call to fusb302_probe() causes a > NULL pointer derenf

Re: Kernel memory leak on CDC-ACM device plug/unplug

2018-09-21 Thread Romain Izard
2018-09-21 10:08 GMT+02:00 Oliver Neukum : > On Mi, 2018-09-19 at 16:11 +0200, Romain Izard wrote: >> While trying to debug a memory leak problem, I encountered the following >> problem: >> >> After plugging/unplugging an USB CDC-ACM device, kmemleak reports multiple >> copies of the following leak

Re: [PATCH 2/3] usb: host: xhci: return -ESHUTDOWN when removing hcd

2018-09-21 Thread Sergei Shtylyov
On 9/21/2018 4:48 AM, Peter Chen wrote: When we are removing HCD, the xhci_configure_endpoint may be timeout. To get rid of timeout, we'd better return before issue command. The related log message when removing HCD like below: [66.736633] usb 3-1: USB disconnect, device number 2 [66.737003] hu

Re: [PATCH 3/3] usb: host: xhci: return early for xhci_urb_dequeue when removing hcd

2018-09-21 Thread Sergei Shtylyov
On 9/21/2018 4:48 AM, Peter Chen wrote: When we are removing hcd, the stop endpoint command may be timeout. To eliminate the timeout, we'd better return early. The related log for this timeout like below: [31.208933] hub 3-1:1.0: hub_ext_port_status failed (err = -71) [31.214972] usb 3-1-port2:

Re: Kernel memory leak on CDC-ACM device plug/unplug

2018-09-21 Thread Oliver Neukum
On Mi, 2018-09-19 at 16:11 +0200, Romain Izard wrote: > While trying to debug a memory leak problem, I encountered the following > problem: > > After plugging/unplugging an USB CDC-ACM device, kmemleak reports multiple > copies of the following leak. It is not necessary to open the port for the >