[PATCH] usb: dwc3: OCTEON: add support for device tree

2016-09-07 Thread Steven J. Hill
This patch adds support to parse probe data for the dwc3-octeon driver using device tree. The DWC3 IP core is found on OCTEON III processors. Signed-off-by: Steven J. Hill --- drivers/usb/dwc3/Kconfig | 10 + drivers/usb/dwc3/Makefile | 1 +

RE: [PATCH net-next 0/3] r8152: configuration setting

2016-09-07 Thread Hayes Wang
David Miller [mailto:da...@davemloft.net] > Sent: Thursday, September 08, 2016 8:38 AM [...] > By forcing a certain mode via a Kconfig value, you are basically making it > impossible for distributions to do something reasonable here. The request is always from some manufacturers, not end users.

RE: [PATCH net-next 0/3] r8152: configuration setting

2016-09-07 Thread Hayes Wang
Bjørn Mork [mailto:bj...@mork.no] > Sent: Wednesday, September 07, 2016 9:51 PM [...] > So this adds a lot of code to work around the issues you introduced by > unnecessarily blacklisting the CDC ECM configuration earlier, and still > makes the r8152 driver handle the device even in ECM mode. I

[PATCH v5 2/3] usb: dwc2: Add delay to core soft reset

2016-09-07 Thread John Youn
Add a delay to the core soft reset function to account for the IDDIG debounce filter. If the current mode is host, either due to the force mode bit being set (which persists after core reset) or the connector id pin, a core soft reset will temporarily reset the mode to device and a delay from the

[PATCH v5 3/3] usb: dwc2: Properly account for the force mode delays

2016-09-07 Thread John Youn
When a force mode bit is set and the IDDIG debounce filter is enabled, there is a delay for the forced mode to take effect. This delay is due to the IDDIG debounce filter and is variable depending on the platform's PHY clock speed. To account for this delay we can poll for the expected mode. On a

[PATCH v5 1/3] usb: dwc2: gadget: Only initialize device if in device mode

2016-09-07 Thread John Youn
In dwc2_hsotg_udc_start(), don't initialize the controller for device mode unless we are actually in device mode. Tested-by: Heiko Stuebner Tested-by: Stefan Wahren Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 7

[PATCH v5 0/3] usb: dwc2: Fix core reset and force mode delays

2016-09-07 Thread John Youn
This series accounts for the delay from the IDDIG debounce filter when switching modes. This delay is a function of the PHY clock speed and can range from 5-50 ms. This delay must be taken into account on core reset and force modes. A full explanation is provided in the patch commit log and code

Re: [PATCH 1/7] clk: gxbb: expose USB clocks

2016-09-07 Thread Kevin Hilman
On Wed, Sep 7, 2016 at 3:14 PM, Stephen Boyd wrote: > On 09/07, Martin Blumenstingl wrote: >> On Wed, Sep 7, 2016 at 2:33 AM, Stephen Boyd wrote: >> > On 09/04, Martin Blumenstingl wrote: >> >> USB0_DDR_BRIDGE and USB1_DDR_BRIDGE1 are needed for the

Re: [PATCH v4 00/22] Support qcom's HSIC USB and rewrite USB2 HS support

2016-09-07 Thread Peter Chen
On Thu, Sep 8, 2016 at 5:34 AM, Stephen Boyd wrote: > The state of USB ChipIdea support on Qualcomm's platforms is not great. > The DT description of these devices requires up to three different nodes > for what amounts to be the same hardware block, when there should

Re: [PATCH v4 10/22] usb: chipidea: Consolidate extcon notifiers

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 02:35:07PM -0700, Stephen Boyd wrote: > The two extcon notifiers are almost the same except for the > variable name for the cable structure and the id notifier inverts > the cable->state logic. Make it the same and replace two > functions with one to save some lines. This

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 05:24:08PM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 1:24:07 PM CEST Felipe Balbi wrote: > > > > Hi, > > > > Arnd Bergmann writes: > > > > [...] > > > > > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > > >

Re: [PATCH v4 03/22] usb: ulpi: Support device discovery via DT

2016-09-07 Thread Rob Herring
On Wed, Sep 7, 2016 at 4:35 PM, Stephen Boyd wrote: > The qcom HSIC ULPI phy doesn't have any bits set in the vendor or > product ID registers. This makes it impossible to make a ULPI > driver match against the ID registers. Add support to discover > the ULPI phys via DT

Re: [PATCH v4 02/22] of: device: Export of_device_{get_modalias,uvent_modalias} to modules

2016-09-07 Thread Rob Herring
On Wed, Sep 7, 2016 at 4:34 PM, Stephen Boyd wrote: > The ULPI bus can be built as a module, and it will soon be > calling these functions when it supports probing devices from DT. > Export them so they can be used by the ULPI module. > > Cc: Rob Herring

Re: [PATCH v4 01/22] of: device: Support loading a module with OF based modalias

2016-09-07 Thread Rob Herring
On Wed, Sep 7, 2016 at 4:34 PM, Stephen Boyd wrote: > In the case of ULPI devices, we want to be able to load the > driver before registering the device so that we don't get stuck > in a loop waiting for the phy module to appear and failing usb > controller probe.

[PATCH v2 1/1] usb: xhci: fix return value of xhci_setup_device()

2016-09-07 Thread Lu Baolu
xhci_setup_device() should return failure with correct error number when xhci host has died, removed or halted. Cc: sta...@vger.kernel.org # 4.3+ Signed-off-by: Lu Baolu --- v1->v2: - fix email mismatch issue drivers/usb/host/xhci.c | 4 +++- 1 file changed, 3

Re: [PATCH net-next 0/3] r8152: configuration setting

2016-09-07 Thread David Miller
From: Hayes Wang Date: Wed, 7 Sep 2016 16:12:19 +0800 > Some people prefer to use ECM mode rather than vendor mode. Therefore, I add > CONFIG_RTL8152_CONFIG_VALUE in Kconfig. Then, the users could choose the USB > configuration value which they want. The default is to

Re: [PATCH 1/1] subsystem:usb

2016-09-07 Thread Kees Cook
On Thu, Sep 1, 2016 at 11:07 PM, Greg KH wrote: > On Fri, Sep 02, 2016 at 01:20:21AM +0100, James wrote: >> This patch fixes a NULL pointer dereference caused by a race codition in the >> probe >> function of the legousbtower driver. The probe function does not

Re: [PATCH 1/7] clk: gxbb: expose USB clocks

2016-09-07 Thread Stephen Boyd
On 09/07, Martin Blumenstingl wrote: > On Wed, Sep 7, 2016 at 2:33 AM, Stephen Boyd wrote: > > On 09/04, Martin Blumenstingl wrote: > >> USB0_DDR_BRIDGE and USB1_DDR_BRIDGE1 are needed for the related > >> dwc2 usb controller. USB, USB0 and USB1 are needed for the PHYs. > >>

[PATCH v4 04/22] usb: chipidea: Only read/write OTGSC from one place

2016-09-07 Thread Stephen Boyd
With the id and vbus detection done via extcon we need to make sure we poll the status of OTGSC properly by considering what the extcon is saying, and not just what the register is saying. Let's move this hw_wait_reg() function to the only place it's used and simplify it for polling the OTGSC

[PATCH v4 02/22] of: device: Export of_device_{get_modalias,uvent_modalias} to modules

2016-09-07 Thread Stephen Boyd
The ULPI bus can be built as a module, and it will soon be calling these functions when it supports probing devices from DT. Export them so they can be used by the ULPI module. Cc: Rob Herring Cc: Signed-off-by: Stephen Boyd

[PATCH v4 05/22] usb: chipidea: Handle extcon events properly

2016-09-07 Thread Stephen Boyd
We're currently emulating the vbus and id interrupts in the OTGSC read API, but we also need to make sure that if we're handling the events with extcon that we don't enable the interrupts for those events in the hardware. Therefore, properly emulate this register if we're using extcon, but don't

[PATCH v4 03/22] usb: ulpi: Support device discovery via DT

2016-09-07 Thread Stephen Boyd
The qcom HSIC ULPI phy doesn't have any bits set in the vendor or product ID registers. This makes it impossible to make a ULPI driver match against the ID registers. Add support to discover the ULPI phys via DT help alleviate this problem. In the DT case, we'll look for a ULPI bus node underneath

[PATCH v4 10/22] usb: chipidea: Consolidate extcon notifiers

2016-09-07 Thread Stephen Boyd
The two extcon notifiers are almost the same except for the variable name for the cable structure and the id notifier inverts the cable->state logic. Make it the same and replace two functions with one to save some lines. This also makes it so that the id cable state is true when the id pin is

[PATCH v4 09/22] usb: chipidea: Add support for ULPI PHY bus

2016-09-07 Thread Stephen Boyd
Some phys for the chipidea controller are controlled via the ULPI viewport. Add support for the ULPI bus so that these sorts of phys can be probed and read/written automatically without having to duplicate the viewport logic in each phy driver. Acked-by: Peter Chen Cc: Greg

[PATCH v4 11/22] usb: chipidea: msm: Mark device as runtime pm active

2016-09-07 Thread Stephen Boyd
We're not properly marking the glue layer/wrapper device as runtime active, so runtime PM believes that the hardware state is inactive when we call pm_runtime_enable() in this driver. This causes a problem when the glue layer has a power domain associated with it, because runtime PM will go and

[PATCH v4 19/22] usb: chipidea: msm: Handle phy power states

2016-09-07 Thread Stephen Boyd
The ULPI phy on qcom platforms needs to be initialized and powered on after a USB reset and before we toggle the run/stop bit. Otherwise, the phy locks up and doesn't work properly. Hook the phy initialization into the RESET event and the phy power off into the STOPPED event. Acked-by: Peter Chen

[PATCH v4 21/22] phy: Add support for Qualcomm's USB HSIC phy

2016-09-07 Thread Stephen Boyd
The HSIC USB controller on qcom SoCs has an integrated all digital phy controlled via the ULPI viewport. Cc: Kishon Vijay Abraham I Cc: Signed-off-by: Stephen Boyd --- .../devicetree/bindings/phy/qcom,usb-hsic-phy.txt | 65

[PATCH v4 18/22] usb: chipidea: msm: Add reset controller for PHY POR bit

2016-09-07 Thread Stephen Boyd
The MSM chipidea wrapper has two bits that are used to reset the first or second phy. Add support for these bits via the reset controller framework, so that phy drivers can reset their hardware at the right time during initialization. Acked-by: Peter Chen Cc: Greg

[PATCH v4 12/22] usb: chipidea: msm: Rely on core to override AHBBURST

2016-09-07 Thread Stephen Boyd
The core framework already handles setting this parameter with a platform quirk. Add the appropriate flag so that we always set AHBBURST to 0. Technically DT should be doing this, but we always do it for msm chipidea devices so setting the flag in the driver works just as well. If the burst needs

[PATCH v4 07/22] usb: chipidea: Notify events when switching host mode

2016-09-07 Thread Stephen Boyd
The chipidea/udc.c file sends a CI_HDRC_CONTROLLER_RESET_EVENT to the wrapper drivers when it calls hw_device_reset(), but that function is not called from chipidea/host.c. And the udc.c file sends the CI_HDRC_CONTROLLER_STOPPED_EVENT but the host.c file doesn't do anything. The intent of the

[PATCH v4 06/22] usb: chipidea: Add platform flag for wrapper phy management

2016-09-07 Thread Stephen Boyd
The ULPI phy on qcom platforms needs to be initialized and powered on after a USB reset and before we toggle the run/stop bit. Otherwise, the phy locks up and doesn't work properly. Therefore, add a flag to skip any phy power management in the core layer, leaving it up to the glue driver to

[PATCH v4 14/22] usb: chipidea: msm: Add proper clk and reset support

2016-09-07 Thread Stephen Boyd
The msm chipidea controller uses two main clks, an AHB clk to read/write the MMIO registers and a core clk called the system clk that drives the controller itself. Add support for these clks as they're required in all designs. Also add support for an optional third clk that we need to turn on to

[PATCH v4 22/22] phy: Add support for Qualcomm's USB HS phy

2016-09-07 Thread Stephen Boyd
The high-speed phy on qcom SoCs is controlled via the ULPI viewport. Cc: Kishon Vijay Abraham I Cc: Signed-off-by: Stephen Boyd --- .../devicetree/bindings/phy/qcom,usb-hs-phy.txt| 83 ++ drivers/phy/Kconfig

[PATCH v4 13/22] usb: chipidea: msm: Use hw_write_id_reg() instead of writel

2016-09-07 Thread Stephen Boyd
The MSM_USB_BASE macro trick is not very clear, and we're using it for only one register write so let's just move to using hw_write_id_reg() and passing the ci pointer instead. That clearly shows what offset we're using and avoids needing to include the msm_hsusb_hw.h file when we're going to

[PATCH v4 16/22] usb: chipidea: msm: Restore wrapper settings after reset

2016-09-07 Thread Stephen Boyd
When the RESET bit is set in the USBCMD register it resets quite a few of the wrapper's registers to their reset state. This includes the GENCONFIG and GENCONFIG2 registers. Currently this is done by the usb phy and ehci-msm drivers writing into the controller wrapper's MMIO address space. Let's

[PATCH v4 20/22] usb: chipidea: msm: Be silent on probe defer errors

2016-09-07 Thread Stephen Boyd
If something fails in ci_hdrc_add_device() due to probe defer, we shouldn't print an error message. Be silent in this case as we'll try probe again later. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd

[PATCH v4 17/22] usb: chipidea: msm: Make platform data driver local instead of global

2016-09-07 Thread Stephen Boyd
If two devices are probed with this same driver, they'll share the same platform data structure, while the chipidea core layer writes and modifies it. This can lead to interesting results especially if one device is an OTG type chipidea controller and another is a host. Let's create a copy of this

[PATCH v4 15/22] usb: chipidea: msm: Mux over secondary phy at the right time

2016-09-07 Thread Stephen Boyd
We need to pick the correct phy at runtime based on how the SoC has been wired onto the board. If the secondary phy is used, take it out of reset and mux over to it by writing into the TCSR register. Make sure to do this on reset too, because this register is reset to the default value (primary

[PATCH v4 08/22] usb: chipidea: Remove locking in ci_udc_start()

2016-09-07 Thread Stephen Boyd
We don't call hw_device_reset() with the ci->lock held, so it doesn't seem like this lock here is protecting anything. Let's just remove it. This allows us to call sleeping functions like phy_init() from within the CI_HDRC_CONTROLLER_RESET_EVENT hook. Acked-by: Peter Chen Cc:

[PATCH v4 00/22] Support qcom's HSIC USB and rewrite USB2 HS support

2016-09-07 Thread Stephen Boyd
The state of USB ChipIdea support on Qualcomm's platforms is not great. The DT description of these devices requires up to three different nodes for what amounts to be the same hardware block, when there should really only be one. Furthermore, the "phy" driver that is in mainline (phy-msm-usb.c)

[PATCH v4 01/22] of: device: Support loading a module with OF based modalias

2016-09-07 Thread Stephen Boyd
In the case of ULPI devices, we want to be able to load the driver before registering the device so that we don't get stuck in a loop waiting for the phy module to appear and failing usb controller probe. Currently we request the ulpi module via the ulpi ids, but in the DT case we might need to

Re: [PATCH 1/7] clk: gxbb: expose USB clocks

2016-09-07 Thread Martin Blumenstingl
On Wed, Sep 7, 2016 at 2:33 AM, Stephen Boyd wrote: > On 09/04, Martin Blumenstingl wrote: >> USB0_DDR_BRIDGE and USB1_DDR_BRIDGE1 are needed for the related >> dwc2 usb controller. USB, USB0 and USB1 are needed for the PHYs. >> Expose these clocks to DT and comment out in

Re: [PATCH 1/7] clk: gxbb: expose USB clocks

2016-09-07 Thread Stephen Boyd
On 09/04, Martin Blumenstingl wrote: > USB0_DDR_BRIDGE and USB1_DDR_BRIDGE1 are needed for the related > dwc2 usb controller. USB, USB0 and USB1 are needed for the PHYs. > Expose these clocks to DT and comment out in clk driver. > > Signed-off-by: Jerome Brunet >

Re: [PATCH 2/7] usb: dwc2: add support for Meson8b and GXBB SoCs

2016-09-07 Thread John Youn
On 9/4/2016 2:32 PM, Martin Blumenstingl wrote: > From: Jerome Brunet > > Add compatible strings for amlogic Meson8b and GXBB SoCs with the > corresponding configuration parameters. > > Signed-off-by: Martin Blumenstingl >

Re: xHCI problem? [was Re: Erratic USB device behavior and device loss]

2016-09-07 Thread Alan Stern
On Tue, 6 Sep 2016, Ulf Hansson wrote: > On 5 September 2016 at 17:58, Alan Stern wrote: > > On Mon, 5 Sep 2016, Ritesh Raj Sarraf wrote: > > > >> -BEGIN PGP SIGNED MESSAGE- > >> Hash: SHA512 > >> > >> On Sun, 2016-09-04 at 15:46 -0400, Alan Stern wrote: > >> >

Re: [PATCH] usb: phy: generic: request regulator optionally

2016-09-07 Thread Stefan Agner
On 2016-09-07 11:53, Mark Brown wrote: > On Tue, Sep 06, 2016 at 11:01:15AM -0700, Stefan Agner wrote: >> On 2016-09-06 01:22, Mark Brown wrote: > >> > This is nonsense unless the device can work without this supply. Given >> > that the supply is called VCC that doesn't seem entirely likely. >

[PATCH resend 5/5] phy-sun4i-usb: Warn when external vbus is detected

2016-09-07 Thread Hans de Goede
Warn when external vbus is detected when we're trying to enable our own vbus. Signed-off-by: Hans de Goede --- Changes in v2: -No changes Changes in v3: -No changes --- drivers/phy/phy-sun4i-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH resend 4/5] phy-sun4i-usb: Add support for phy_set_mode

2016-09-07 Thread Hans de Goede
Together with some musb sunxi glue changes this allows run-time dr_mode switching support via the "mode" musb sysfs attribute. Signed-off-by: Hans de Goede --- Changes in v2: -No changes Changes in v3: -Fix switch-case code style --- drivers/phy/phy-sun4i-usb.c | 30

[PATCH resend 3/5] phy-sun4i-usb: Simplify missing dr_mode handling

2016-09-07 Thread Hans de Goede
If we cannot get dr_mode or no id gpio is specified simply assume peripheral mode, as this is always safe. Signed-off-by: Hans de Goede --- Changes in v2: -Keep sun4i_usb_phy0_get_id_det() logic as is rather then re-ordering the switch-case Changes in v3: -No changes ---

[PATCH resend 1/5] phy-sun4i-usb: Use bool where appropriate

2016-09-07 Thread Hans de Goede
We're using bool as true/false type in most places in phy-sun4i-usb.c for consistency fixup the remaining uses of ints which are ever only 0 or 1 to be bools too. Signed-off-by: Hans de Goede --- Changes in v2: -No changes Changes in v3: -No changes ---

[PATCH resend 0/5] phy-sun4i-usb: Add support for phy_set_mode

2016-09-07 Thread Hans de Goede
Hi Kishon, There was some discussion about the 6th patch in this set, so I've dropped this for now (needs a universal dt binding), but the other 5 are still useful without this patch and are ready for merging. Can you please add these 5 to your next branch ? Thanks & Regards, Hans -- To

[PATCH resend 2/5] phy-sun4i-usb: Refactor forced session ending

2016-09-07 Thread Hans de Goede
The phy-sun4i-usb code supports forced ending a session on systems which lack Vbus detection, to allow switching between host and peripheral mode on such systems. Role switching via the musb driver "mode" sysfs attribute requires force ending the session too. This commit refactors the code to

Re: [PATCH 1/3] usb: gadgetfs: introduce feature control mechanism

2016-09-07 Thread Alan Stern
On Wed, 7 Sep 2016, Felipe Balbi wrote: > Hi, > > Alan Stern writes: > > On Wed, 7 Sep 2016, Felipe Balbi wrote: > > > >> > --- a/include/uapi/linux/usb/gadgetfs.h > >> > +++ b/include/uapi/linux/usb/gadgetfs.h > >> > @@ -85,4 +85,33 @@ struct usb_gadgetfs_event { >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 12:08:20 PM CEST Alan Stern wrote: > On Wed, 7 Sep 2016, Arnd Bergmann wrote: > > > drivers/usb/host/ehci-fsl.c| 4 ++-- > > How did this driver end up in the patch? > > > diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c > > index

Re: [PATCH 1/3] usb: gadgetfs: introduce feature control mechanism

2016-09-07 Thread Felipe Balbi
Hi, Alan Stern writes: > On Wed, 7 Sep 2016, Felipe Balbi wrote: > >> > --- a/include/uapi/linux/usb/gadgetfs.h >> > +++ b/include/uapi/linux/usb/gadgetfs.h >> > @@ -85,4 +85,33 @@ struct usb_gadgetfs_event { >> > */ >> > #defineGADGETFS_CLEAR_HALT_IO('g',

Re: [PATCH 1/3] usb: gadgetfs: introduce feature control mechanism

2016-09-07 Thread Felipe Balbi
Hi, Binyamin Sharet writes: > On 09/07/2016 03:36 PM, Felipe Balbi wrote: >> Hi, >> >> Binyamin Sharet writes: >>> Feature control mechanism allows addition of dynamic features to >>> gadgetfs. >>> >>> It provides a user-mode driver the ability to control

Re: [PATCH 3/3] usb: gadgetfs: protect descriptor delegation with Kconfig

2016-09-07 Thread Felipe Balbi
Hi, Binyamin Sharet writes: > On 09/07/2016 03:51 PM, Felipe Balbi wrote: >> Binyamin Sharet writes: >> >>> On 09/07/2016 03:40 PM, Felipe Balbi wrote: Binyamin Sharet writes: > Added

Re: [PATCH] usb: phy: generic: request regulator optionally

2016-09-07 Thread Mark Brown
On Tue, Sep 06, 2016 at 11:01:15AM -0700, Stefan Agner wrote: > On 2016-09-06 01:22, Mark Brown wrote: > > This is nonsense unless the device can work without this supply. Given > > that the supply is called VCC that doesn't seem entirely likely. > Afaik it is kind of a generic device tree

Re: [PATCH 2/3] cdc-acm: cleanup debugging in submission path

2016-09-07 Thread Sergei Shtylyov
Hello. On 09/07/2016 03:30 PM, Oliver Neukum wrote: Actually make it retutn useful information. Return? Or maybe just "print"? Signed-off-by: Oliver Neukum --- drivers/usb/class/cdc-acm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

RE: unusual_devs addition for Kingston DT100G3/32GB 0951:1666

2016-09-07 Thread David Laight
From: Wolfgang Breyha > Sent: 07 September 2016 17:10 > I purchased a Kingston DT100G3/32GB and it corrupts large files (> ~500MB) on > write with plain "cp". I already filed a bug at > https://bugzilla.redhat.com/show_bug.cgi?id=1371183 > with detailed descriptions how I tested the device. > >

unusual_devs addition for Kingston DT100G3/32GB 0951:1666

2016-09-07 Thread Wolfgang Breyha
Hi! I purchased a Kingston DT100G3/32GB and it corrupts large files (> ~500MB) on write with plain "cp". I already filed a bug at https://bugzilla.redhat.com/show_bug.cgi?id=1371183 with detailed descriptions how I tested the device. Kingston suspected a broken device and sent me a new one as

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Alan Stern
On Wed, 7 Sep 2016, Arnd Bergmann wrote: > However, to summarize the discussion so far, I agree that > of_dma_configure() is not the solution to these problems, and I think > we can do much better: > > Splitting the usb_bus->controller field into the Linux-internal device > (used for the sysfs

Re: [PATCH 3/3] usb: gadgetfs: protect descriptor delegation with Kconfig

2016-09-07 Thread Binyamin Sharet
On 09/07/2016 03:51 PM, Felipe Balbi wrote: > Binyamin Sharet writes: > >> On 09/07/2016 03:40 PM, Felipe Balbi wrote: >>> Binyamin Sharet writes: >>> Added USB_GADGETFS_ALLOW_DELEGATE_DESCRIPTORS to Kconfig, this option is available under

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 1:24:07 PM CEST Felipe Balbi wrote: > > Hi, > > Arnd Bergmann writes: > > [...] > > > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > > I think we should replace > > > > pdev->dev.dma_mask = dev->dma_mask; > >

Re: crash in usb_hc_died+0x16 when unplugging usb-c dock

2016-09-07 Thread Alan Stern
On Wed, 7 Sep 2016, Mathias Nyman wrote: > > I'm still seeing occasional problems. For example, when I unplugged the > > dock last night, it seems to have wedged some things, and then plugging it > > back in didn't work. See some logs below. > > > > > > I ran a show-blocked-tasks after plugging

Re: [PATCH 1/3] usb: gadgetfs: introduce feature control mechanism

2016-09-07 Thread Alan Stern
On Wed, 7 Sep 2016, Felipe Balbi wrote: > > --- a/include/uapi/linux/usb/gadgetfs.h > > +++ b/include/uapi/linux/usb/gadgetfs.h > > @@ -85,4 +85,33 @@ struct usb_gadgetfs_event { > > */ > > #defineGADGETFS_CLEAR_HALT_IO('g', 3) > > > > + > > + > > +struct usb_gadgetfs_features { > >

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 4:04:52 PM CEST Roger Quadros wrote: > > The main use for it is to let you specify a MAC address for on-board > > ethernet devices that lack an EPROM, but any other information can be > > added that way too. > > > >> There is a bug in the USB core because of which

[PATCH 1/1] xhci: fix null pointer dereference in stop command timeout function

2016-09-07 Thread Mathias Nyman
The stop endpoint command has its own 5 second timeout timer. If the timeout function is triggered between USB3 and USB2 host removal it will try to call usb_hc_died(xhci_to_hcd(xhci)->primary_hcd) the ->primary_hcd will be set to NULL at USB3 hcd removal. Fix this by first checking if the PCI

[PATCH 0/1] xhci fix for usb-linus

2016-09-07 Thread Mathias Nyman
Hi Greg One small but important fix that would be nice to get into 4.8 Fixes a NULL pointer dereference seen by two people already when a hotplugged xHC host is removed at the same time as a usb device is unplugged. -Mathias Mathias Nyman (1): xhci: fix null pointer dereference in stop

Re: crash in usb_hc_died+0x16 when unplugging usb-c dock

2016-09-07 Thread Mathias Nyman
On 07.09.2016 11:46, Richard van der Hoff wrote: On 01/09/16 08:53, Richard van der Hoff wrote: On 30/08/16 21:52, Richard van der Hoff wrote: On 30/08/16 19:48, Alan Stern wrote: On Tue, 30 Aug 2016, Richard van der Hoff wrote: I have a USB-3.1 dock; sometimes I see a kernel panic when I

Re: [PATCH net-next 0/3] r8152: configuration setting

2016-09-07 Thread Bjørn Mork
[ CCing Oliver, who AFAIK still is the cdc_ether maintainer and should have the final word on this ] Hayes Wang writes: > Some people prefer to use ECM mode rather than vendor mode. Therefore, I add > CONFIG_RTL8152_CONFIG_VALUE in Kconfig. Then, the users could choose

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Roger Quadros
On 07/09/16 11:29, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 10:17:31 AM CEST Roger Quadros wrote: >>> >>> Speaking of that flag, I suppose we need the same logic to know where >>> to look for USB devices attached to a dwc3 host when we need to describe >>> them in DT. By default we

Re: [PATCH 1/3] usb: gadgetfs: introduce feature control mechanism

2016-09-07 Thread Binyamin Sharet
On 09/07/2016 03:36 PM, Felipe Balbi wrote: > Hi, > > Binyamin Sharet writes: >> Feature control mechanism allows addition of dynamic features to >> gadgetfs. >> >> It provides a user-mode driver the ability to control those features, >> by querying the supported and enabled

Re: [PATCH 3/3] usb: gadgetfs: protect descriptor delegation with Kconfig

2016-09-07 Thread Felipe Balbi
Binyamin Sharet writes: > On 09/07/2016 03:40 PM, Felipe Balbi wrote: >> Binyamin Sharet writes: >> >>> Added USB_GADGETFS_ALLOW_DELEGATE_DESCRIPTORS to Kconfig, this >>> option is available under USB_GADGETFS and requires EXPERT. >>> Enabling this option

Re: [PATCH 3/3] usb: gadgetfs: protect descriptor delegation with Kconfig

2016-09-07 Thread Binyamin Sharet
On 09/07/2016 03:40 PM, Felipe Balbi wrote: > Binyamin Sharet writes: > >> Added USB_GADGETFS_ALLOW_DELEGATE_DESCRIPTORS to Kconfig, this >> option is available under USB_GADGETFS and requires EXPERT. >> Enabling this option will not change the default behavior of >> GadgetFS,

Re: [PATCH 3/3] usb: gadgetfs: protect descriptor delegation with Kconfig

2016-09-07 Thread Felipe Balbi
Binyamin Sharet writes: > Added USB_GADGETFS_ALLOW_DELEGATE_DESCRIPTORS to Kconfig, this > option is available under USB_GADGETFS and requires EXPERT. > Enabling this option will not change the default behavior of > GadgetFS, but will allow a user to enable descriptor

[PATCH] usb: dwc3: pci: fix build warning on !PM_SLEEP

2016-09-07 Thread Felipe Balbi
When building a kernel with CONFIG_PM_SLEEP=n, we get the following warning: drivers/usb/dwc3/dwc3-pci.c:253:12: warning: 'dwc3_pci_pm_dummy' defined but not used In order to fix this, we should only define dwc3_pci_pm_dummy() when CONFIG_PM_SLEEP is defined. Fixes: f6c274e11e3b ("usb: dwc3:

[PATCH 2/3] cdc-acm: cleanup debugging in submission path

2016-09-07 Thread Oliver Neukum
Actually make it retutn useful information. Signed-off-by: Oliver Neukum --- drivers/usb/class/cdc-acm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index ea7d361..7c21567 100644 ---

[PATCH 1/3] cdc-acm: delete obsolete debug messages

2016-09-07 Thread Oliver Neukum
Some debug messages merely provide a function trace without additional debug data. They predate ftrace and can be replaced by it. Drop them without replacement. Signed-off-by: Oliver Neukum --- drivers/usb/class/cdc-acm.c | 20 +++- 1 file changed, 3

Re: [PATCH 1/3] usb: gadgetfs: introduce feature control mechanism

2016-09-07 Thread Felipe Balbi
Hi, Binyamin Sharet writes: > Feature control mechanism allows addition of dynamic features to > gadgetfs. > > It provides a user-mode driver the ability to control those features, > by querying the supported and enabled features and enable/disable > features in runtime via

[PATCH 3/3] cdc-acm: cleaning up debug in data submission path

2016-09-07 Thread Oliver Neukum
Further cleanup making the debug messages more precise, useful and removing mere trace points. Signed-off-by: Oliver Neukum --- drivers/usb/class/cdc-acm.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c

[PATCH 3/3] usb: gadgetfs: protect descriptor delegation with Kconfig

2016-09-07 Thread Binyamin Sharet
Added USB_GADGETFS_ALLOW_DELEGATE_DESCRIPTORS to Kconfig, this option is available under USB_GADGETFS and requires EXPERT. Enabling this option will not change the default behavior of GadgetFS, but will allow a user to enable descriptor delegation using ioctls. ---

[PATCH 2/3] usb: gadgetfs: feature - delegate get descriptor

2016-09-07 Thread Binyamin Sharet
When this feature is enabled, all GET_DESCRIPTOR control requests will not be handled by gadgetfs, but delegated to the user mode driver for handling. The feature is disabled when ep0 file is opened, and can be set via ioctl, since when enabled, it breaks compatibility with older versions, and

[PATCH 1/3] usb: gadgetfs: introduce feature control mechanism

2016-09-07 Thread Binyamin Sharet
Feature control mechanism allows addition of dynamic features to gadgetfs. It provides a user-mode driver the ability to control those features, by querying the supported and enabled features and enable/disable features in runtime via ioctl on ep0 fd. --- drivers/usb/gadget/legacy/inode.c | 67

[PATCH 0/3] usb: gadgetfs: support delegation of GET_DESCRIPTOR

2016-09-07 Thread Binyamin Sharet
This patch series adds support for delegation of GET_DESCRIPTOR requests from GadgetFS to user mode driver. This will allow deeper testing of USB hosts using GadgetFS, since it allows a user mode driver to control the responses to to GET_DESCRIPTOR requests, and respond with malformed descriptors.

Re: [PATCH for v4.8] usb: dwc3: mark PM function as __maybe_unused

2016-09-07 Thread Arnd Bergmann
On Wednesday, September 7, 2016 1:39:16 PM CEST Felipe Balbi wrote: > > seems like it would've been enough to define dwc3_pci_pm_dummy() if > CONFIG_PM_SLEEP. Right? IOW: > > diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c > index 0a32430f4c41..6df0f5dad9a4 100644 > ---

Re: Logitech Precision Gamepad shows axis activity upon connection

2016-09-07 Thread Greg KH
On Tue, Sep 06, 2016 at 10:44:31PM +1200, Eddie Stanley wrote: > SUMMARY: > Logitech Precision Gamepad shows axis activity upon connection > > DESCRIPTION: > When I connect my Logitech Precision Gamepad (or the machine starts up > with it connected) it exhibits activity on both axes until I press

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Hi, Robin Murphy writes: > On 07/09/16 10:55, Peter Chen wrote: > [...] >>> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >>> I think we should replace >>> >>> pdev->dev.dma_mask = dev->dma_mask; >>> pdev->dev.dma_parms =

Re: [PATCH v2] usb: gadget: configfs: log function unbinding as debug

2016-09-07 Thread Felipe Balbi
Romain Izard writes: > 2016-08-29 11:07 GMT+02:00 Romain Izard : >> Disabling USB gadget functions configured through configfs is something >> that can happen in normal use cases. Keep the existing log for this type >> of event, but only as

Re: [PATCH for v4.8] usb: dwc3: mark PM function as __maybe_unused

2016-09-07 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > Starting with v4.8-rc5, we get a warning about the dwc3_pci_pm_dummy function > when CONFIG_PM_SLEEP is disabled: > > drivers/usb/dwc3/dwc3-pci.c:253:12: warning: 'dwc3_pci_pm_dummy' defined but > not used > > Using __maybe_unused instead of #ifdef

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Robin Murphy
On 07/09/16 10:55, Peter Chen wrote: [...] >> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >> I think we should replace >> >> pdev->dev.dma_mask = dev->dma_mask; >> pdev->dev.dma_parms = dev->dma_parms; >> dma_set_coherent_mask(>dev,

Re: [RFT PATCH v4 0/3] usb: dwc2: Fix core reset and force mode delays

2016-09-07 Thread Felipe Balbi
Hi, Stefan Wahren writes: > Hi John, > >> John Youn hat am 1. September 2016 um 23:07 >> geschrieben: >> >> >> This series accounts for the delay from the IDDIG debounce filter when >> switching modes. This delay is a function of the PHY clock

Re: Gadgetfs - adding support for delegation of setup requests

2016-09-07 Thread Felipe Balbi
Hi, Binyamin Sharet writes: >>> I think this will cause existing implementation over gadgetfs to fail >>> with this >>> special kernel (as now it will delegate everything all of the time). How >>> about >>> using a ioctl to configure it, but wrapping this

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Hi, Arnd Bergmann writes: [...] > Regarding the DMA configuration that you mention in ci_hdrc_add_device(), > I think we should replace > > pdev->dev.dma_mask = dev->dma_mask; > pdev->dev.dma_parms = dev->dma_parms; > dma_set_coherent_mask(>dev,

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Felipe Balbi
Hi, Russell King - ARM Linux writes: > On Wed, Sep 07, 2016 at 05:29:01PM +0800, Peter Chen wrote: >> On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: >> > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: >> > > >> > > The pre-condition of

Re: Memory barrier needed with wake_up_process()?

2016-09-07 Thread Felipe Balbi
Hi, Alan Stern writes: > On Tue, 6 Sep 2016, Peter Zijlstra wrote: > >> On Tue, Sep 06, 2016 at 01:49:37PM +0200, Peter Zijlstra wrote: >> > On Tue, Sep 06, 2016 at 02:43:39PM +0300, Felipe Balbi wrote: >> >> > > My fear now, however, is that changing smp_[rw]mb() to

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 10:48:06AM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 2:33:13 PM CEST Peter Chen wrote: > > > > > > Right, that should make it work with iommu as well. However, it does > > > not solve the other issue I mentioned above, with boards that have > > > USB

Re: [PATCH v2] usb: gadget: configfs: log function unbinding as debug

2016-09-07 Thread Romain Izard
2016-08-29 11:07 GMT+02:00 Romain Izard : > Disabling USB gadget functions configured through configfs is something > that can happen in normal use cases. Keep the existing log for this type > of event, but only as debug, not as an error. > > Signed-off-by: Romain Izard

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Russell King - ARM Linux
On Wed, Sep 07, 2016 at 05:29:01PM +0800, Peter Chen wrote: > On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: > > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > > > > > The pre-condition of DT function at USB HCD core works is the host > > > controller device

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Peter Chen
On Wed, Sep 07, 2016 at 10:52:46AM +0200, Arnd Bergmann wrote: > On Wednesday, September 7, 2016 3:44:28 PM CEST Peter Chen wrote: > > > > The pre-condition of DT function at USB HCD core works is the host > > controller device has of_node, since it is the root node for USB tree > > described at

  1   2   >