Re: [PATCHv6 2/2] usb: dwc2: Add reset control to dwc2

2016-04-22 Thread John Youn
On 4/20/2016 2:31 PM, dingu...@opensource.altera.com wrote: > From: Dinh Nguyen > > Allow for platforms that have a reset controller driver in place to bring > the USB IP out of reset. > > Signed-off-by: Dinh Nguyen > --- > v6:

Re: [PATCH v2] xhci: Cleanup only when releasing primary hcd.

2016-04-22 Thread Gabriel Krisman Bertazi
Mathias Nyman writes: > Nice catch, and moving xhci_mem_cleanup() until second hcd (primary) is > removed is one way to solve it. Thank you and Roger for your suggestions! > But I don't think we should even try to handle the interrupt at this stage > anymore. > The

RE: [PATCH 1/1] usb: lpm: add boot flag to disable lpm

2016-04-22 Thread Alan Stern
Please remember to use Reply-To-All so that your messages get sent to the mailing list as well as to me. On Thu, 21 Apr 2016, Matthew Giassa wrote: > Hi Alan, > > I've tested your latest patch, and here is a subset of the output in > `dmesg': ... > [ 44.975704] enable LPM > [ 44.975707]

[PATCH v2] usb: xhci-plat: properly handle probe deferral for devm_clk_get()

2016-04-22 Thread Thomas Petazzoni
On some platforms, the clocks might be registered by a platform driver. When this is the case, the clock platform driver may very well be probed after xhci-plat, in which case the first probe() invocation of xhci-plat will receive -EPROBE_DEFER as the return value of devm_clk_get(). The current

Re: [PATCH] usb: xhci-plat: properly handle probe deferral for devm_clk_get()

2016-04-22 Thread Thomas Petazzoni
Hello, On Fri, 22 Apr 2016 16:44:11 +0300, Heikki Krogerus wrote: > if (!IS_ERR(clk)) { > ... > } else if (PTR_ERR(clk) == -EPROBE_DEFER) > ret = -EPROBE_DEFER; > goto put_hcd; > ... Thanks for the review! I've just sent a v2 that

Re: [PATCHv3] usb: Add driver for UCSI

2016-04-22 Thread Mathias Nyman
On 21.04.2016 15:43, Heikki Krogerus wrote: USB Type-C Connector System Software Interface (UCSI) is specification that defines the registers and data structures that can be used to control USB Type-C ports on a system. UCSI is used on several Intel Broxton SoC based platforms. Things that UCSI

Re: [PATCH] usb: xhci-plat: properly handle probe deferral for devm_clk_get()

2016-04-22 Thread Heikki Krogerus
Hi, One nitpick.. On Fri, Apr 22, 2016 at 03:16:45PM +0200, Thomas Petazzoni wrote: > On some platforms, the clocks might be registered by a platform > driver. When this is the case, the clock platform driver may very well > be probed after xhci-plat, in which case the first probe() invocation >

Re: [PATCH v2] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-22 Thread Rob Herring
On Fri, Apr 22, 2016 at 4:36 AM, Felipe Balbi wrote: > > Hi, > > Yoshihiro Shimoda writes: >> The firmware of R-Car USB 3.0 host controller will control the reset. >> So, if the xhci driver doesn't do firmware downloading (e.g.

Re: devicetree: avoid duplicated matching code (was: Re: [PATCH 1/3] xhci: plat: adapt to unified device property interface)

2016-04-22 Thread Rob Herring
On Thu, Apr 21, 2016 at 8:57 AM, Felipe Balbi wrote: > > Hi, > > Rob Herring writes: >> On Thu, Apr 21, 2016 at 6:20 AM, Felipe Balbi >> wrote: >>> >>> Hi, >>> >>> Heikki Krogerus

[PATCH] usb: xhci-plat: properly handle probe deferral for devm_clk_get()

2016-04-22 Thread Thomas Petazzoni
On some platforms, the clocks might be registered by a platform driver. When this is the case, the clock platform driver may very well be probed after xhci-plat, in which case the first probe() invocation of xhci-plat will receive -EPROBE_DEFER as the return value of devm_clk_get(). The current

Re: [PATCH] usb: gadget: f_fs: Fix kernel panic for SuperSpeed

2016-04-22 Thread Felipe Balbi
Hi Jim, Jim Lin writes: > Android N adds os_desc_compat in v2_descriptor by init_functionfs() > (system/core/adb/usb_linux_client.cpp) to support automatic install > of MTP driver on Windows for USB device mode. > > Current __ffs_data_do_os_desc() of f_fs.c will check

Re: [PATCH] usb: gadget: f_fs: Fix kernel panic for SuperSpeed

2016-04-22 Thread Lars-Peter Clausen
On 04/22/2016 12:43 PM, Jim Lin wrote: > Android N adds os_desc_compat in v2_descriptor by init_functionfs() > (system/core/adb/usb_linux_client.cpp) to support automatic install > of MTP driver on Windows for USB device mode. > > Current __ffs_data_do_os_desc() of f_fs.c will check reserved1

[PATCH] usb: gadget: f_fs: Fix kernel panic for SuperSpeed

2016-04-22 Thread Jim Lin
Android N adds os_desc_compat in v2_descriptor by init_functionfs() (system/core/adb/usb_linux_client.cpp) to support automatic install of MTP driver on Windows for USB device mode. Current __ffs_data_do_os_desc() of f_fs.c will check reserved1 field and return -EINVAL. This results in a second

[PATCH 4/9] usb: host: xhci: rcar: retire use of xhci_plat_type_is()

2016-04-22 Thread Mathias Nyman
From: Felipe Balbi We're preparing to remove xhci_plat_type_is() in favor of a better approach where we define function pointers ahead of time. This will let us make assumptions about which platforms we're running on and which platform-specific functions we should

[PATCH 1/9] usb: xhci: merge xhci_queue_bulk_tx and queue_bulk_sg_tx functions

2016-04-22 Thread Mathias Nyman
From: Alexandr Ivanov In drivers/usb/host/xhci-ring.c there are two functions (xhci_queue_bulk_tx and queue_bulk_sg_tx) that are very similar, so a lot of code duplication. This patch merges these functions into to one xhci_queue_bulk_tx. Also counting the needed TRBs is

[PATCH 6/9] usb: host: xhci: plat: move mvebu init_quirk() to xhci_plat_setup()

2016-04-22 Thread Mathias Nyman
From: Felipe Balbi xhci_plat_setup() is the rightful place for xhci_mvebu_mbus_init_quirk(), so let's move it there in order to make it simpler to get rid of xhci_plat_type_is() later on. Acked-by: Yoshihiro Shimoda Signed-off-by:

[PATCH 8/9] usb: host: xhci: plat: make use of new methods in xhci_plat_priv

2016-04-22 Thread Mathias Nyman
From: Felipe Balbi Now that the code has been refactored enough, switching over to using ->plat_start() and ->init_quirk() becomes a very simple patch. After this patch, there are no further uses for xhci_plat_type_is() which will be removed in a follow-up patch.

[PATCH 7/9] usb: host: xhci: plat: change type of mvebu init_quirk()

2016-04-22 Thread Mathias Nyman
From: Felipe Balbi Just like RCAR's init_quirk() we want mvebu's to use struct usb_hcd * as argument too. This is another step towards removing xhci_plat_type_is(). Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi

[PATCH 5/9] usb: xhci: plat: add ->plat_start() and ->init_quirk() methods

2016-04-22 Thread Mathias Nyman
From: Felipe Balbi these two methods will be used to hide platform-specific details so we can get rid of xhci_plat_type_is() in a later patch. Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi

[PATCH 3/9] usb: xhci: remove duplicate code of interval checking

2016-04-22 Thread Mathias Nyman
From: Alexandr Ivanov Move duplicate code from xhci_queue_intr_tx() and xhci_queue_isoc_tx_prepare() to the check_interval() function. Signed-off-by: Alexandr Ivanov Signed-off-by: Mathias Nyman ---

[PATCH 2/9] usb: xhci: remove duplicate function xhci_urb_to_transfer_ring

2016-04-22 Thread Mathias Nyman
From: Alexandr Ivanov Remove duplicate function xhci_urb_to_transfer_ring from xhci.c. We have same function in xhci-ring.c. Signed-off-by: Alexandr Ivanov Signed-off-by: Mathias Nyman ---

[PATCH 9/9] usb: host: xhci: plat: finally get rid of xhci_plat_type_is()

2016-04-22 Thread Mathias Nyman
From: Felipe Balbi Now that there are no more users for xhci_plat_type_is(), we can safely remove it. Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi Signed-off-by: Mathias Nyman

[PATCH 0/9] xhci features for usb-next

2016-04-22 Thread Mathias Nyman
Hi Greg These patches for 4.7 are mostly refactoring and cleanups. Alexandr Ivanov refactored xhci bulk transfer queuing, and Felipe cleaned up code for xhci platform devices. Alexandr Ivanov (3): usb: xhci: merge xhci_queue_bulk_tx and queue_bulk_sg_tx functions usb: xhci: remove duplicate

Re: [PATCH v3 1/6] usb: host: xhci: rcar: retire use of xhci_plat_type_is()

2016-04-22 Thread Felipe Balbi
https://github.com/0day-ci/linux/commits/Felipe-Balbi/usb-xhci-get-rid-of-xhci_plat_type_is/20160422-162823 > base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git > usb-testing > config: mips-allyesconfig (attached as .config) > reproduce: > wget > https:/

Re: [PATCH v2] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-22 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > The firmware of R-Car USB 3.0 host controller will control the reset. > So, if the xhci driver doesn't do firmware downloading (e.g. kernel > configuration is CONFIG_USB_XHCI_PLATFORM=y and CONFIG_USB_XHCI_RCAR > is not set), the

[PATCH v2] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-22 Thread Yoshihiro Shimoda
The firmware of R-Car USB 3.0 host controller will control the reset. So, if the xhci driver doesn't do firmware downloading (e.g. kernel configuration is CONFIG_USB_XHCI_PLATFORM=y and CONFIG_USB_XHCI_RCAR is not set), the reset of USB 3.0 host controller doesn't work correctly. Then, the host

Re: [PATCH v3 1/6] usb: host: xhci: rcar: retire use of xhci_plat_type_is()

2016-04-22 Thread kbuild test robot
-of-xhci_plat_type_is/20160422-162823 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: mips-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x

[PATCH v3 6/6] usb: host: xhci: plat: finally get rid of xhci_plat_type_is()

2016-04-22 Thread Felipe Balbi
Now that there are no more users for xhci_plat_type_is(), we can safely remove it. Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-plat.c | 3 --- drivers/usb/host/xhci-plat.h | 18

[PATCH v3 5/6] usb: host: xhci: plat: make use of new methods in xhci_plat_priv

2016-04-22 Thread Felipe Balbi
Now that the code has been refactored enough, switching over to using ->plat_start() and ->init_quirk() becomes a very simple patch. After this patch, there are no further uses for xhci_plat_type_is() which will be removed in a follow-up patch. Acked-by: Yoshihiro Shimoda

[PATCH v3 3/6] usb: host: xhci: plat: move mvebu init_quirk() to xhci_plat_setup()

2016-04-22 Thread Felipe Balbi
xhci_plat_setup() is the rightful place for xhci_mvebu_mbus_init_quirk(), so let's move it there in order to make it simpler to get rid of xhci_plat_type_is() later on. Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi ---

[PATCH v3 4/6] usb: host: xhci: plat: change type of mvebu init_quirk()

2016-04-22 Thread Felipe Balbi
Just like RCAR's init_quirk() we want mvebu's to use struct usb_hcd * as argument too. This is another step towards removing xhci_plat_type_is(). Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi ---

[PATCH v3 2/6] usb: xhci: plat: add ->plat_start() and ->init_quirk() methods

2016-04-22 Thread Felipe Balbi
these two methods will be used to hide platform-specific details so we can get rid of xhci_plat_type_is() in a later patch. Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-plat.h | 2 ++ 1 file

[PATCH v3 1/6] usb: host: xhci: rcar: retire use of xhci_plat_type_is()

2016-04-22 Thread Felipe Balbi
We're preparing to remove xhci_plat_type_is() in favor of a better approach where we define function pointers ahead of time. This will let us make assumptions about which platforms we're running on and which platform-specific functions we should call. Acked-by: Yoshihiro Shimoda

[PATCH v3 0/6] usb: xhci: get rid of xhci_plat_type_is()

2016-04-22 Thread Felipe Balbi
Hi, This 6-patch series gets rid of the pointless xhci_plat_type_is() in favour of a nicer setup where we initialize function pointers ahead of time using driver_data. That way we help the code look a little cleaner and easier to read. Changes since v2: - rebased on v4.6-rc4 - fixed

[PATCHv2 4/4] usb: dwc3: remove handling of platform data

2016-04-22 Thread Heikki Krogerus
No more users for it. Signed-off-by: Heikki Krogerus --- drivers/usb/dwc3/core.c | 35 -- drivers/usb/dwc3/platform_data.h | 53 2 files changed, 88 deletions(-) delete mode 100644

[PATCHv2 3/4] usb: dwc3: pci: use build-in properties instead of platform data

2016-04-22 Thread Heikki Krogerus
This should allow the core driver to drop handling of platform data and expect the platform specific details to always come from properties. Signed-off-by: Heikki Krogerus Cc: Huang Rui CC: John Youn ---

[PATCHv2 0/4] usb: dwc3: get rid of platform data

2016-04-22 Thread Heikki Krogerus
Changes since v1: - Slit the refactoring and cleanup into separate patches Heikki Krogerus (4): usb: dwc3: pci: make build-in device properties available usb: dwc3: pci: pass the platform device as a parameter to dwc3_pci_quirks() usb: dwc3: pci: use build-in properties instead of

[PATCHv2 1/4] usb: dwc3: pci: make build-in device properties available

2016-04-22 Thread Heikki Krogerus
Setting the ACPI companion before calling dwc3_pci_quirks. The ACPI companion will be set unconditionally as the primary fwnode, overriding any previously set primary fwnode. This will make sure that any build-in properties added to the platform device will be added as the secondary fwnode in

[PATCHv2 2/4] usb: dwc3: pci: pass the platform device as a parameter to dwc3_pci_quirks()

2016-04-22 Thread Heikki Krogerus
For convenience, passing the dwc3 platform device as a parameter to dwc3_pci_quirks() function. Signed-off-by: Heikki Krogerus --- drivers/usb/dwc3/dwc3-pci.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

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

2016-04-22 Thread Greg KH
On Wed, Apr 20, 2016 at 11:15:37AM +0300, Felipe Balbi wrote: > > Hi Greg, > > here's what I hope to be my last pull request to this -rc series. > > Patches have been tested (where applicable) with intel platforms I have > around. They have also been in next for a little while without any >

Re: [PATCHv2 REBASE/RESEND 6/6] usb: host: xhci: plat: finally get rid of xhci_plat_type_is()

2016-04-22 Thread kbuild test robot
-of-xhci_plat_type_is/20160422-154613 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: i386-randconfig-x002-201616 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed

[PATCHv2 REBASE/RESEND 4/6] usb: host: xhci: plat: change type of mvebu init_quirk()

2016-04-22 Thread Felipe Balbi
Just like RCAR's init_quirk() we want mvebu's to use struct usb_hcd * as argument too. This is another step towards removing xhci_plat_type_is(). Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi ---

[PATCHv2 REBASE/RESEND 3/6] usb: host: xhci: plat: move mvebu init_quirk() to xhci_plat_setup()

2016-04-22 Thread Felipe Balbi
xhci_plat_setup() is the rightful place for xhci_mvebu_mbus_init_quirk(), so let's move it there in order to make it simpler to get rid of xhci_plat_type_is() later on. Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi ---

[PATCHv2 REBASE/RESEND 5/6] usb: host: xhci: plat: make use of new methods in xhci_plat_priv

2016-04-22 Thread Felipe Balbi
Now that the code has been refactored enough, switching over to using ->plat_start() and ->init_quirk() becomes a very simple patch. After this patch, there are no further uses for xhci_plat_type_is() which will be removed in a follow-up patch. Acked-by: Yoshihiro Shimoda

[PATCHv2 REBASE/RESEND 2/6] usb: xhci: plat: add ->plat_start() and ->init_quirk() methods

2016-04-22 Thread Felipe Balbi
these two methods will be used to hide platform-specific details so we can get rid of xhci_plat_type_is() in a later patch. Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-plat.h | 2 ++ 1 file

[PATCHv2 REBASE/RESEND 1/6] usb: host: xhci: rcar: retire use of xhci_plat_type_is()

2016-04-22 Thread Felipe Balbi
We're preparing to remove xhci_plat_type_is() in favor of a better approach where we define function pointers ahead of time. This will let us make assumptions about which platforms we're running on and which platform-specific functions we should call. Acked-by: Yoshihiro Shimoda

[PATCHv2 REBASE/RESEND 6/6] usb: host: xhci: plat: finally get rid of xhci_plat_type_is()

2016-04-22 Thread Felipe Balbi
Now that there are no more users for xhci_plat_type_is(), we can safely remove it. Acked-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi --- drivers/usb/host/xhci-plat.c | 3 --- drivers/usb/host/xhci-plat.h | 18

RE: [PATCH] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-22 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: >> > > And, kernel log is the following: >> > > >> > > [1.565605] xhci-hcd ee00.usb: xHCI Host Controller >> > > [1.570636] xhci-hcd ee00.usb: new USB bus registered, assigned >> > > bus number 5 >> > > [

Re: [PATCH] usb: core: Do not use sizeof on pointer type

2016-04-22 Thread Bjørn Mork
Vaishali Thakkar writes: > When sizeof is applied to a pointer typed expression, it gives > the size of the pointer. So, do not use sizeof on pointer type. What if the intended result was the size of the pointer? > Problem found using Coccinelle. Yes, sure. But

Re: [PATCH] usb: core: Do not use sizeof on pointer type

2016-04-22 Thread Clemens Ladisch
Vaishali Thakkar wrote: > When sizeof is applied to a pointer typed expression, it gives > the size of the pointer. And why would that be wrong in this case? > +++ b/drivers/usb/core/hcd.c > @@ -1386,7 +1386,7 @@ static int hcd_alloc_coherent(struct usb_bus *bus, > return -EFAULT;

RE: [PATCH] usb: host: xhci-rcar: Avoid long wait in xhci_reset()

2016-04-22 Thread Yoshihiro Shimoda
Hi, > From: linux-renesas-soc-ow...@vger.kernel.org > [mailto:linux-renesas-soc-ow...@vger.kernel.org] On Behalf Of Yoshihiro > Shimoda > Sent: Thursday, April 21, 2016 7:28 PM > > Hi Felipe, > > > From: Felipe Balbi > > Sent: Thursday, April 21, 2016 7:19 PM > > > > Yoshihiro Shimoda

Re: [PATCH v6 07/12] usb: otg: add OTG/dual-role core

2016-04-22 Thread Peter Chen
On Wed, Apr 20, 2016 at 10:03:34AM +0300, Roger Quadros wrote: > On 20/04/16 08:08, Yoshihiro Shimoda wrote: > > Hi, > > > >> From: Peter Chen > >> Sent: Tuesday, April 19, 2016 6:18 PM > >> > >> On Fri, Apr 15, 2016 at 10:03:16AM +, Yoshihiro Shimoda wrote: > >>> Hi, > >>> > From: