[PATCH] USB: serial: cp210x: Add ID for NI USB serial console

2018-04-09 Thread Kyle Roeschley
Added the USB VID and PID for the USB serial console on some National Instruments devices. Signed-off-by: Kyle Roeschley --- drivers/usb/serial/cp210x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index

Re: dwc2: Memory leak in dwc2_gadget_init

2018-04-09 Thread Grigor Tovmasyan
Hi Stefan, On 4/2/2018 12:59 PM, Stefan Wahren wrote: > Hi Minas, > > i noticed that in opposite to all allocations in dwc2_gadget_init() the > function dwc2_hsotg_ep_alloc_request() uses kzalloc. So in case > usb_add_gadget_udc() would fail, the memory of the USB request would be > leaked: >

Re: [PATCH] usb: dwc3: gadget: Fix list_del corruption in dwc3_ep_dequeue

2018-04-09 Thread Jack Pham
Hi Felipe, Just wondering if you had a chance to look at this. This fixes a potential double-delete error which was caught when CONFIG_DEBUG_LIST=y && CONFIG_BUG_ON_DATA_CORRUPTION==y. On Fri, Mar 23, 2018 at 10:05:33AM -0700, Jack Pham wrote: > From: Mayank Rana > >

[PATCH] usb: gadget: f_fs: Add compat_ioctl to ep0

2018-04-09 Thread Jerry Zhang
Functionfs ep0 ioctls can be handled in the same way as a normal ioctl. Underlying gadget ioctls are passed to the underlying gadget's compat_ioctl. Signed-off-by: Jerry Zhang --- drivers/usb/gadget/function/f_fs.c | 20 1 file changed, 20

Re: [PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)

2018-04-09 Thread Rob Herring
On Thu, Mar 29, 2018 at 12:06:07AM +0800, Li Jun wrote: > TCPCI stands for typec port controller interface, its implementation > has full typec port control with power delivery support, it's a > standard i2c slave with GPIO input as irq interface, detail see spec > "Universal Serial Bus Type-C

Re: dwc2: Memory leak in dwc2_gadget_init

2018-04-09 Thread Stefan Wahren
inutes. > I prepared the patch and wanted to check it. So in order to reproduce this issue you will need to make probing fail at the same point. Please follow this patch [1] and this bootlog [2] for more context. Thanks Stefan [1] - https://www.spinics.net/lists/linux-usb/msg167472.html [2

[PATCH v3 0/3] Tegra's USB driver dependency fix

2018-04-09 Thread Dmitry Osipenko
Tegra uses two different USB drivers for host / device controllers, one is tegra-ehci (host) and other is ChipIdea (UDC). Currently ChipIdea driver implicitly (and incorrectly) depends on Tegra's EHCI driver because Tegra's PHY driver is built only when host driver is built, also host controller

[PATCH v3 2/3] usb: tegra: Move utmi-pads reset from ehci-tegra to tegra-phy

2018-04-09 Thread Dmitry Osipenko
UTMI pads are shared by USB controllers and reset of UTMI pads is shared with the reset of USB1 controller. Currently reset of UTMI pads is done by the EHCI driver and ChipIdea UDC works because EHCI driver always happen to be probed first. Move reset controls from ehci-tegra to tegra-phy in order

[PATCH v3 1/3] usb: phy: tegra: Cleanup error messages

2018-04-09 Thread Dmitry Osipenko
Tegra's PHY driver has a mix of pr_err() and dev_err(), let's switch to dev_err() and use common errors message formatting across the driver for consistency. Signed-off-by: Dmitry Osipenko --- drivers/usb/phy/phy-tegra-usb.c | 69 - 1

[PATCH v3 3/3] usb: phy: Add Kconfig entry for Tegra PHY driver

2018-04-09 Thread Dmitry Osipenko
Tegra's EHCI driver has a build dependency on Tegra's PHY driver and currently Tegra's PHY driver is built only when Tegra's EHCI driver is built. Add own Kconfig entry for the Tegra's PHY driver so that drivers other than ehci-tegra (like ChipIdea UDC) could work with ehci-tegra driver being

[PATCH v2 0/2] clk: at91: Added more information logging

2018-04-09 Thread Marcin Ziemianowicz
This is a series of patches which resolves set_rate() for the PLL not having any effect and therefore the USB Host port not working. Also, a few messages were added which may be helpful in the future when others are working with USB clocking. Changes since V1: Added patch set cover letter

[PATCH v2 1/2] clk: at91: Added more information logging.

2018-04-09 Thread Marcin Ziemianowicz
I noticed that when debugging some USB clocking issue that there weren't many ways to tell what the state of the USB clocking system was. This adds a few logging statements to see what the relevant code is trying to do. Signed-off-by: Marcin Ziemianowicz ---

[PATCH v2 2/2] clk: at91: Fix for PLL set_rate changes not being actually written to PLL peripheral bits

2018-04-09 Thread Marcin Ziemianowicz
When a USB device is connected to the USB host port on the SAM9N12 then you get "-62" error which seems to indicate USB replies from the device are timing out. Looking around, I saw the USB bus was running at half speed. Going further, it seems that in ..._set_rate() the PLL wasn't actually being

Re: [RFT/PATCH 18/38] usb: dwc3: gadget: check for Missed Isoc from event status

2018-04-09 Thread Thinh Nguyen
Hi Felipe, On 4/9/2018 4:28 AM, Felipe Balbi wrote: > In case we get an event with status set to Missed Isoc, this means we > have missed an isochronous interval and should issue End Transfer > command and wait for the following XferNotReady. Why does DWC3 need to issue End Transfer if there are

Re: [PATCH] usb: gadget: f_fs: Add compat_ioctl to ep0

2018-04-09 Thread kbuild test robot
Hi Jerry, Thank you for the patch! Yet something to improve: [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.16 next-20180409] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH] usb: gadget: f_midi: Add configfs attrs for card and device

2018-04-09 Thread kbuild test robot
Hi Jerry, Thank you for the patch! Yet something to improve: [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.16 next-20180409] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

RE: [PATCH 4/4] usb: gadget: udc: renesas_usb3: should call devm_phy_get() before add udc

2018-04-09 Thread Yoshihiro Shimoda
Hi Simon-san, > From: Simon Horman, Sent: Monday, April 9, 2018 8:58 PM > > On Mon, Apr 02, 2018 at 09:21:34PM +0900, Yoshihiro Shimoda wrote: > > This patch fixes an issue that this driver cannot call phy_init() > > if a gadget driver is alreadly loaded because usb_add_gadget_udc() > > might

[PATCH] usb: storage: Replace mdelay with msleep in init_freecom

2018-04-09 Thread Jia-Ju Bai
init_freecom() is never called in atomic context. init_freecom() is set as ".initFunction" through UNUSUAL_DEV(). And ->initFunction() is only called by usb_stor_acquire_resources(), which is only called by usb_stor_probe2(). usb_stor_probe2() is called by *_probe() functions (like

[PATCH v2] usb: gadget: f_fs: Add compat_ioctl to ep0

2018-04-09 Thread Jerry Zhang
Functionfs ep0 ioctls can be handled in the same way as a normal ioctl. Don't handle underlying gadget ioctls since we don't know whether they work with compat. Signed-off-by: Jerry Zhang --- v2 - fixed error, realized gadget_ops doesn't have compat_ioctl

Re: [PATCH] usb: gadget: f_fs: Add compat_ioctl to ep0

2018-04-09 Thread kbuild test robot
Hi Jerry, Thank you for the patch! Yet something to improve: [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.16 next-20180409] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH] usb: gadget: f_midi: Add configfs attrs for card and device

2018-04-09 Thread Jerry Zhang
Hi Jerry, > Thank you for the patch! Yet something to improve: > [auto build test ERROR on balbi-usb/next] > [also build test ERROR on v4.16 next-20180409] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > url: https://github.com/0da

Re: [PATCH usb v5 0/6] usb/core/phy fixes for v4.17

2018-04-09 Thread Keerthy
On Monday 09 April 2018 02:57 AM, Martin Blumenstingl wrote: > This is a follow-up to my previous series "initialize (multiple) PHYs > for a HCD": [0]. > > Roger Quadros reported [1] that it "is breaking low power cases on TI > SoCs when USB is in host mode". He further explains that "Not doing

Re: [PATCH] xhci: Fix USB ports for Dell Inspiron 5775

2018-04-09 Thread Kai Heng Feng
Hi Matthias, On Mar 18, 2018, at 11:11 PM, Kai-Heng Feng wrote: The Dell Inspiron 5775 is a Raven Ridge. The Enable Slot command timed out when a USB device gets plugged: [ 212.156326] xhci_hcd :03:00.3: Error while assigning device slot ID [ 212.156340]

[PATCH] usb: gadget: f_midi: Add configfs attrs for card and device

2018-04-09 Thread Jerry Zhang
An f_midi instance will have a corresponding native device in /dev/snd/midiC%dD%d where the first number is the number of the sound card and the second is the number of the device. Expose both of these through configfs so the user can find the correct sound device. The configfs attrs are read

Re: [RFT/PATCH 35/38] usb: dwc3: gadget: combine modify & restore into single argument

2018-04-09 Thread kbuild test robot
Hi Felipe, I love your patch! Perhaps something to improve: [auto build test WARNING on balbi-usb/next] [also build test WARNING on next-20180409] [cannot apply to v4.16] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

[PATCH v2 5/6] usb: gadget: udc: renesas_usb3: should fail if devm_phy_get() returns error

2018-04-09 Thread Yoshihiro Shimoda
This patch fixes an issue that this driver ignores errors other than the non-existence of the device, f.e. a memory allocation failure in devm_phy_get(). So, this patch replaces devm_phy_get() with devm_phy_optional_get(). Reported-by: Simon Horman Fixes: 279d4bc64060

[PATCH v2 0/6] usb: gadget: udc: renesas_usb3: fix some major issues

2018-04-09 Thread Yoshihiro Shimoda
This patch set is based on v4.16. Changes from v1: - Add Reviewed-by in patch 1, 2, 3 and 4. - Revise typo in patch 4. - Add new patches as patch 5 and 6. Yoshihiro Shimoda (6): usb: gadget: udc: renesas_usb3: fix double phy_put() usb: gadget: udc: renesas_usb3: should remove debugfs

[PATCH v2 3/6] usb: gadget: udc: renesas_usb3: should call pm_runtime_enable() before add udc

2018-04-09 Thread Yoshihiro Shimoda
This patch fixes an issue that this driver causes panic if a gadget driver is already loaded because usb_add_gadget_udc() might call renesas_usb3_start() via .udc_start, and then pm_runtime_get_sync() in renesas_usb3_start() doesn't work correctly. Note that the usb3_to_dev() macro should not be

[PATCH v2 6/6] usb: gadget: udc: renesas_usb3: disable the controller's irqs for reconnecting

2018-04-09 Thread Yoshihiro Shimoda
This patch fixes an issue that reconnection is possible to fail because unexpected state handling happens by the irqs. To fix the issue, the driver disables the controller's irqs when disconnected. Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral

[PATCH v2 1/6] usb: gadget: udc: renesas_usb3: fix double phy_put()

2018-04-09 Thread Yoshihiro Shimoda
This patch fixes an issue that this driver cause double phy_put() calling. This driver must not call phy_put() in the remove because the driver calls devm_phy_get() in the probe. Fixes: 279d4bc64060 ("usb: gadget: udc: renesas_usb3: add support for generic phy") Cc: #

[PATCH v2 4/6] usb: gadget: udc: renesas_usb3: should call devm_phy_get() before add udc

2018-04-09 Thread Yoshihiro Shimoda
This patch fixes an issue that this driver cannot call phy_init() if a gadget driver is alreadly loaded because usb_add_gadget_udc() might call renesas_usb3_start() via .udc_start. This patch also revises the typo (s/an optional/optional/). Fixes: 279d4bc64060 ("usb: gadget: udc: renesas_usb3:

[PATCH v2 2/6] usb: gadget: udc: renesas_usb3: should remove debugfs

2018-04-09 Thread Yoshihiro Shimoda
This patch fixes an issue that this driver doesn't remove its debugfs. Fixes: 43ba968b00ea ("usb: gadget: udc: renesas_usb3: add debugfs to set the b-device mode") Cc: # v4.14+ Signed-off-by: Yoshihiro Shimoda Reviewed-by: Simon Horman

Re: [PATCH] usb: typec: ucsi: fix tracepoint related build error

2018-04-09 Thread Heikki Krogerus
On Mon, Apr 09, 2018 at 09:55:17AM +0200, Tobias Regnery wrote: > The ucsi driver defines several tracepoints, but the header file with the > tracepoint definition trace.h is only conditionally built depending on > CONFIG_FTRACE. You mean trace.c, right? The definitions are indeed in the header,

RE: [PATCH v2 2/5] usb: typec: fusb302: remove max_snk_* for sink config

2018-04-09 Thread Jun Li
> -Original Message- > From: Hans de Goede [mailto:hdego...@redhat.com] > Sent: 2018年4月5日 4:13 > To: Mats Karrman ; Jun Li ; > gre...@linuxfoundation.org; robh...@kernel.org; mark.rutl...@arm.com; > heikki.kroge...@linux.intel.com > Cc:

Re: [PATCH] usb: gadget: udc-xilinx: Add clock support

2018-04-09 Thread Felipe Balbi
Hi, shubhrajyoti.da...@gmail.com writes: > From: Shubhrajyoti Datta > > Currently the driver depends on the bootloader to enable the clocks. > Add support for clocking. The patch enables the clock at probe and > disables them at remove. > > Signed-off-by:

[PATCH] usb: typec: ucsi: fix tracepoint related build error

2018-04-09 Thread Tobias Regnery
The ucsi driver defines several tracepoints, but the header file with the tracepoint definition trace.h is only conditionally built depending on CONFIG_FTRACE. This leads to the following build error with CONFIG_FTRACE=n and CONFIG_TYPEC_UCSI=m: ERROR: "__tracepoint_ucsi_command"

RE: [PATCH v2 2/5] usb: typec: fusb302: remove max_snk_* for sink config

2018-04-09 Thread Jun Li
Hi > -Original Message- > From: Mats Karrman [mailto:mats.dev.l...@gmail.com] > Sent: 2018年4月4日 20:07 > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com; > hdego...@redhat.com > Cc: li...@roeck-us.net;

RE: [PATCH v2 2/5] usb: typec: fusb302: remove max_snk_* for sink config

2018-04-09 Thread Jun Li
Hi > -Original Message- > From: Hans de Goede [mailto:hdego...@redhat.com] > Sent: 2018年4月3日 23:26 > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com > Cc: li...@roeck-us.net; rmf...@gmail.com;

Re: Not enough bandwidth with Magewell XI100DUSB-HDMI

2018-04-09 Thread Michael Tretter
On Tue, 20 Feb 2018 15:29:28 +0200, Mathias Nyman wrote: > On 16.02.2018 15:28, Michael Tretter wrote: > > On Mon, 29 Jan 2018 14:02:57 +0200, Mathias Nyman wrote: > >> On 19.01.2018 22:12, Philipp Zabel wrote: > >>> On Fri, Jan 19, 2018 at 2:10 PM, Michael Tretter > >>>

[RFT/PATCH 26/38] usb: dwc3: trace: print out event status too

2018-04-09 Thread Felipe Balbi
This will make it easier to figure out the reason for the event. That information really helps debugging certain problems. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debug.h | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff

[RFT/PATCH 21/38] usb: dwc3: gadget: simplify isoc case on cleanup_completed_requests

2018-04-09 Thread Felipe Balbi
Just a minor simplification, no functional changes. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[RFT/PATCH 29/38] usb: dwc3: gadget: add a helper to test if a request is completed

2018-04-09 Thread Felipe Balbi
This will allow us to remove an unnecessary variable Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[RFT/PATCH 30/38] usb: dwc3: gadget: one declaration per line

2018-04-09 Thread Felipe Balbi
Misc cleanup. No functional changes. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 763304194ca4..99962de67715 100644 ---

[RFT/PATCH 35/38] usb: dwc3: gadget: combine modify & restore into single argument

2018-04-09 Thread Felipe Balbi
Those two arguments refer to a single bitfield in the register. In order to simplify the code, we can combine them into a single argument and expect caller to pass the correct action argument at all times. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c |

[RFT/PATCH 27/38] usb: dwc3: gadget: simplify short packet event

2018-04-09 Thread Felipe Balbi
We know that only OUT endpoints can trigger SHORT. We also know that count MUST be > 0 whenever SHORT triggers. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git

[RFT/PATCH 19/38] usb: dwc3: gadget: remove duplicated missed isoc handling

2018-04-09 Thread Felipe Balbi
Now, this part of the code is duplicated and brings no extra value to the driver. Let's remove it. Signed-off-by: Felipe Balbi --- Documentation/driver-api/usb/dwc3.rst | 1 - drivers/usb/dwc3/core.h | 1 - drivers/usb/dwc3/gadget.c | 34

[RFT/PATCH 31/38] usb: dwc3: gadget: reduce scope of ret variable

2018-04-09 Thread Felipe Balbi
We can declare it inside list_for_each_entry_safe() loop and reduce its scope. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

[RFT/PATCH 24/38] usb: dwc3: gadget: remove unnecessary 'chain' variable

2018-04-09 Thread Felipe Balbi
Minor cleanup, no functional changes. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index e4bd902a1e76..63e74a8964d7 100644 ---

[RFT/PATCH 14/38] usb: dwc3: gadget: start removing BUSY flag

2018-04-09 Thread Felipe Balbi
By now, it has the same semantics as DWC3_EP_TRANSFER_STARTED, but that has a much more descriptive name. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c

[RFT/PATCH 36/38] usb: dwc3: gadget: remove a few more dwc arguments

2018-04-09 Thread Felipe Balbi
In a few places, the argument is completely unnecessary. On places where it's needed, we can get it from dep->dwc. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git

[RFT/PATCH 38/38] usb: dwc3: gadget: move dwc3_calc_trbs_left() in place of prototype

2018-04-09 Thread Felipe Balbi
Avoid a prototype when the function can be defined earlier. No functional changes, cleanup only. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 96 +++ 1 file changed, 47 insertions(+), 49 deletions(-) diff

[RFT/PATCH 37/38] usb: dwc3: gadget: move set_xfer_resource() in place of prototype

2018-04-09 Thread Felipe Balbi
Instead of having a prototype for a function that's defined a few lines down, let's just move definition to the place where prototype was. No functional changes, cleanup only. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 24 +++-

[RFT/PATCH 16/38] usb: dwc3: gadget: make cleanup_completed_requests() return nothing

2018-04-09 Thread Felipe Balbi
We don't need to return a value anymore here. Let's remove it. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c

[RFT/PATCH 20/38] usb: dwc3: gadget: simplify queueing of isoc transfers

2018-04-09 Thread Felipe Balbi
After all the previous changes, it's now a lot clearer how isoc transfers should be managed. We don't need to try to End Transfers from ep_queue since that's already done by cleanup_requests. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 18

[RFT/PATCH 15/38] usb: dwc3: gadget: remove DWC3_EP_BUSY flag

2018-04-09 Thread Felipe Balbi
It has no use anymore. Signed-off-by: Felipe Balbi --- Documentation/driver-api/usb/dwc3.rst | 2 +- drivers/usb/dwc3/core.h | 3 +-- drivers/usb/dwc3/ep0.c| 5 ++--- drivers/usb/dwc3/gadget.c | 14 ++

[RFT/PATCH 28/38] usb: dwc3: gadget: simplify IOC handling

2018-04-09 Thread Felipe Balbi
We will only have event status of IOC when IOC bit is set in TRB. There's no need to check both bits. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c

[RFT/PATCH 18/38] usb: dwc3: gadget: check for Missed Isoc from event status

2018-04-09 Thread Felipe Balbi
In case we get an event with status set to Missed Isoc, this means we have missed an isochronous interval and should issue End Transfer command and wait for the following XferNotReady. Let's do that early, rather than late. Signed-off-by: Felipe Balbi ---

[RFT/PATCH 11/38] usb: dwc3: gadget: remove unnecessary 'dwc' parameter

2018-04-09 Thread Felipe Balbi
Endpoint handlers need to know about endpoints, not dwc. If they really need access to dwc (e.g. for printing error messages) we have a reference to it tucked inside the endpoint. This patch has no functional changes, it's simply moving things around. Signed-off-by: Felipe Balbi

[RFT/PATCH 07/38] usb: dwc3: gadget: remove allocated/queued request tracking

2018-04-09 Thread Felipe Balbi
That has never proven useful in any way. Just remove it. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 4 drivers/usb/dwc3/gadget.c | 21 ++--- drivers/usb/dwc3/trace.h | 7 ++- 3 files changed, 8 insertions(+), 24

[RFT/PATCH 08/38] usb: dwc3: gadget: remove some pointless checks

2018-04-09 Thread Felipe Balbi
We *KNOW* which events we enable for which endpoint types and we *KNOW* when they'll trigger. The endpoint type checks are pointless. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-)

[RFT/PATCH 09/38] usb: dwc3: gadget: renable dwc3_gadget_start_isoc()

2018-04-09 Thread Felipe Balbi
Cleanup only, no functional changes. This just matches the event name with its handler. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c

[RFT/PATCH 23/38] usb: dwc3: gadget: remove PENDING handling from cleanup_completed

2018-04-09 Thread Felipe Balbi
We are trying to kick transfers on Isochronous endpoints in a more controlled manner now. And this ended up rendering this piece of code unnecessary. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 16 +--- 1 file changed, 1 insertion(+), 15

[RFT/PATCH 22/38] usb: dwc3: gadget: split scatterlist and linear handlers

2018-04-09 Thread Felipe Balbi
instead of having one big loop, let's split it down into two smaller handlers: one for linear buffers and one for scatterlist. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 71 ++- 1 file changed, 45

[RFT/PATCH 05/38] usb: dwc3: gadget: don't kick transfer all the time

2018-04-09 Thread Felipe Balbi
Instead of constantly calling kick transfer everything some event shows up, let's just rely on the fact that we send Update Transfer every time a new request is queued. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 11 --- 1 file changed, 11

Re: [PATCH 4/4] usb: gadget: udc: renesas_usb3: should call devm_phy_get() before add udc

2018-04-09 Thread Simon Horman
On Mon, Apr 02, 2018 at 09:21:34PM +0900, Yoshihiro Shimoda wrote: > This patch fixes an issue that this driver cannot call phy_init() > if a gadget driver is alreadly loaded because usb_add_gadget_udc() > might call renesas_usb3_start() via .udc_start. > > Fixes: 279d4bc64060 ("usb: gadget: udc:

[RFT/PATCH 04/38] usb: dwc3: gadget: rename dwc3_endpoint_transfer_complete()

2018-04-09 Thread Felipe Balbi
Now that we're making sure we don't have XferComplete events, we can rename this function to what it actually handles: dwc3_gadget_endpoint_transfer_in_progress() Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 9 +++-- 1 file changed, 3

[RFT/PATCH 03/38] usb: dwc3: gadget: XferComplete only for EP0

2018-04-09 Thread Felipe Balbi
XferComplete is enabled only for the default control pipe, let's make that clear in the code. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c

[RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-04-09 Thread Felipe Balbi
Hi guys, I've been working on this series for a while now. I feels like after this series the transfer management code is far easier to read and understand. Based on my tests, I have no regressions. Tested g_mass_storage and all of testusb's tests (including ISOC). Patches are also available on

[RFT/PATCH 12/38] usb: dwc3: gadget: always use frame number from XferNotReady

2018-04-09 Thread Felipe Balbi
The core requires the extra two bits of information for properly scheduling Isochronous transfers. This means that we can't rely on __dwc3_gadget_get_frame(). Let's always cache uFrame number from XferNotReady instead. Signed-off-by: Felipe Balbi ---

[RFT/PATCH 02/38] usb: dwc3: gadget: XferNotReady is Isoc-only

2018-04-09 Thread Felipe Balbi
We don't use XferNotReady for anything other than Default Control Pipe, which is handled in ep0.c, and Isochronous endpoints. Let's make that clear in the code. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 10 ++ 1 file changed, 6

[RFT/PATCH 13/38] usb: dwc3: gadget: update dep->frame_number from XferInprogress too

2018-04-09 Thread Felipe Balbi
We will need an up-to-date frame_number from XferInProgress too when future patches improve our handling of Isoc endpoints. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff

[RFT/PATCH 01/38] usb: dwc3: gadget: pre-issue Start Transfer for Interrupt EPs too

2018-04-09 Thread Felipe Balbi
Interrupt endpoints behave much like Bulk endpoints with the exception that they are periodic. We can pre-issue Start Transfer exactly as we do for Bulk endpoints. While at that, remove one trailing blank line which is unnecessary. Signed-off-by: Felipe Balbi ---

[RFT/PATCH 10/38] usb: dwc3: gadget: move handler closer to calling site

2018-04-09 Thread Felipe Balbi
Cleanup only, no functional changes. Just making code easier to follow. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c

[RFT/PATCH 06/38] usb: dwc3: gadget: rename done_trbs and done_reqs

2018-04-09 Thread Felipe Balbi
This patch simply renames two functions to more descriptive names so that it's easier to understand what they're doing. Cleanup only, no functional changes. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 29 - 1 file

[RFT/PATCH 17/38] usb: dwc3: gadget: remove unnecessary 'ioc' variable

2018-04-09 Thread Felipe Balbi
It's only written to, never read. We can remove it now. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

Re: [PATCH] usb: typec: ucsi: fix tracepoint related build error

2018-04-09 Thread Tobias Regnery
On 09.04.18, Heikki Krogerus wrote: > On Mon, Apr 09, 2018 at 09:55:17AM +0200, Tobias Regnery wrote: > > The ucsi driver defines several tracepoints, but the header file with the > > tracepoint definition trace.h is only conditionally built depending on > > CONFIG_FTRACE. > > You mean trace.c,

[RFT/PATCH 34/38] usb: dwc3: gadget: refactor dwc3_gadget_init_endpoints()

2018-04-09 Thread Felipe Balbi
This just makes it slightly easier to read. No functional changes. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 203 ++ 1 file changed, 116 insertions(+), 87 deletions(-) diff --git

[RFT/PATCH 32/38] usb: dwc3: gadget: get rid of the length variable

2018-04-09 Thread Felipe Balbi
Code is just as readable without it. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3a4013bc61d8..c515104ba86d 100644 ---

[RFT/PATCH 33/38] usb: dwc3: gadget: split dwc3_gadget_ep_cleanup_completed_requests()

2018-04-09 Thread Felipe Balbi
No functional changes, it just makes the code slightly easier to read. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 60 --- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git

[RFT/PATCH 25/38] usb: dwc3: gadget: simplify unaligned and zlp handling

2018-04-09 Thread Felipe Balbi
We can just call reclaim_trb_linear instead of reimplementing it. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index

Re: [PATCH 1/4] usb: gadget: udc: renesas_usb3: fix double phy_put()

2018-04-09 Thread Simon Horman
On Mon, Apr 02, 2018 at 09:21:31PM +0900, Yoshihiro Shimoda wrote: > This patch fixes an issue that this driver cause double phy_put() > calling. This driver must not call phy_put() in the remove because > the driver calls devm_phy_get() in the probe. > > Fixes: 279d4bc64060 ("usb: gadget: udc:

Re: [PATCH 2/4] usb: gadget: udc: renesas_usb3: should remove debugfs

2018-04-09 Thread Simon Horman
On Mon, Apr 02, 2018 at 09:21:32PM +0900, Yoshihiro Shimoda wrote: > This patch fixes an issue that this driver doesn't remove its debugfs. > > Fixes: 43ba968b00ea ("usb: gadget: udc: renesas_usb3: add debugfs to set the > b-device mode") > Cc: # v4.14+ > Signed-off-by:

Re: [PATCH 3/4] usb: gadget: udc: renesas_usb3: should call pm_runtime_enable() before add udc

2018-04-09 Thread Simon Horman
On Mon, Apr 02, 2018 at 09:21:33PM +0900, Yoshihiro Shimoda wrote: > This patch fixes an issue that this driver causes panic if a gadget > driver is already loaded because usb_add_gadget_udc() might call > renesas_usb3_start() via .udc_start, and then pm_runtime_get_sync() > in

RE: [PATCH v2 1/5] usb: typec: tcpm: pdo matching optimization

2018-04-09 Thread Jun Li
Hi > -Original Message- > From: Hans de Goede [mailto:hdego...@redhat.com] > Sent: 2018年4月3日 23:17 > To: Jun Li ; gre...@linuxfoundation.org; robh...@kernel.org; > mark.rutl...@arm.com; heikki.kroge...@linux.intel.com > Cc: li...@roeck-us.net; rmf...@gmail.com;

Re: [PATCH 2/2] usb: dwc3: add clock and resets

2018-04-09 Thread Rob Herring
On Wed, Mar 28, 2018 at 11:32 PM, Masahiro Yamada wrote: > 2018-03-19 7:37 GMT+09:00 Masahiro Yamada : >> Hi Rob, >> >> 2018-03-18 21:52 GMT+09:00 Rob Herring : >>> On Thu, Mar 15, 2018 at 08:39:58PM +0900, Masahiro