[PATCH] b: re-queue tx dma request on herror

2016-11-15 Thread Max Uvarov
Some times dma transfer to usb endpoint fails: [ 78.378283] musb-hdrc musb-hdrc.1.auto: Start TX10 dma [ 78.410763] musb-hdrc musb-hdrc.1.auto: OUT/TX10 end, csr 3400, dma [ 78.410896] musb-hdrc musb-hdrc.1.auto: complete dc01eb00 usb_api_blocking_completion+0x0/0x24 [usbcore] (0), dev4 ep1out,

Re: [PATCH v4 4/4] ARM: dts: da850: Add the usb otg device nodeg

2016-11-15 Thread Sekhar Nori
On Wednesday 16 November 2016 02:49 AM, Bin Liu wrote: > On Tue, Nov 15, 2016 at 04:16:02PM +0530, Sekhar Nori wrote: >> On Thursday 03 November 2016 09:29 PM, Alexandre Bailon wrote: >>> This adds the device tree node for the usb otg >>> controller present in the da850 family of SoC's. >>> This

Re: [PATCH] dma: cpp41: Fix handling of error path

2016-11-15 Thread Sekhar Nori
On Wednesday 16 November 2016 02:28 AM, Tony Lindgren wrote: > * Sekhar Nori [161115 00:35]: >> If pm_runtime_get_sync() fails due to callback error, then >> rpm_callback() sets dev.power.runtime_error to an error value which gets >> cleared by an explicit call to

[PATCH v4 2/6] usb: chipidea: use bus->sysdev for DMA configuration

2016-11-15 Thread Sriram Dash
From: Arnd Bergmann Set the dma for chipidea from sysdev. This is inherited from its parent node. Also, do not set dma mask for child as it is not required now. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Acked-by: Peter Chen

[PATCH v4 4/6] usb: xhci: use bus->sysdev for DMA configuration

2016-11-15 Thread Sriram Dash
From: Arnd Bergmann For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. So, set the dma for xhci from sysdev. sysdev is pointing to device that is known to the system firmware or hardware. Signed-off-by: Arnd

[PATCH v4 3/6] usb: ehci: fsl: use bus->sysdev for DMA configuration

2016-11-15 Thread Sriram Dash
From: Arnd Bergmann For the dual role ehci fsl driver, sysdev will handle the dma config. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash --- Changes in v4: - No update Changes in v3: - fix compile errors Changes in v2: - fix

Re: [GIT PULL] USB fixes for v4.9-rc4

2016-11-15 Thread Peter Chen
On Tue, Nov 15, 2016 at 10:54:09PM -0500, David Miller wrote: > From: Peter Chen > Date: Wed, 16 Nov 2016 11:41:15 +0800 > > > I just notice that you submitted the "usb: gadget: u_ether: remove > > interrupt throttling", and cc stable tree too, but we can't get > > the

[PATCH v4 5/6] usb: dwc3: use bus->sysdev for DMA configuration

2016-11-15 Thread Sriram Dash
From: Arnd Bergmann The dma ops for dwc3 devices are not set properly. So, use a physical device sysdev, which will be inherited from parent, to set the hardware / firmware parameters like dma. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash

[PATCH v4 6/6] usb: dwc3: Do not set dma coherent mask

2016-11-15 Thread Sriram Dash
From: Arnd Bergmann The dma mask is correctly set up by the DT probe function, no need to override it any more. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash --- Changes in v4: - No update Changes in v3: - No update Changes in

[PATCH v4 0/6] inherit dma configuration from parent dev

2016-11-15 Thread Sriram Dash
For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. The idea here is that you pass in the parent of_node along with the child device pointer, so it would behave exactly like the parent already does. The difference is that it also

[PATCH v4 1/6] usb: separate out sysdev pointer from usb_bus

2016-11-15 Thread Sriram Dash
From: Arnd Bergmann For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. The idea here is that you pass in the parent of_node along with the child device pointer, so it would behave exactly like the parent already

[PATCH 3/3] xhci: Remove busy loop from xhci_abort_cmd_ring()

2016-11-15 Thread OGAWA Hirofumi
Now, xhci_abort_cmd_ring() is sleepable. So no reason to use busy loop anymore. - Convert udelay(1000) => msleep(1). - Add xhci_handshake_sleep(), and use it. As related change, current xhci_handshake() is strange behavior, E.g. xhci_handshake(ptr, mask, done, 1) does result = readl(ptr);

[PATCH 2/3] xhci: Fix race related to abort operation

2016-11-15 Thread OGAWA Hirofumi
Current abort operation has race. xhci_handle_command_timeout() xhci_abort_cmd_ring() xhci_write_64(CMD_RING_ABORT) xhci_handshake(5s) do { check CMD_RING_RUNNING udelay(1) ...

[PATCH 1/3] xhci: Use delayed_work instead of timer for command timeout

2016-11-15 Thread OGAWA Hirofumi
This is preparation to fix abort operation race (See "xhci: Fix race related to abort operation"). To make timeout sleepable, use delayed_work instead of timer. Signed-off-by: OGAWA Hirofumi --- drivers/usb/host/xhci-mem.c |7 +++

Re: [GIT PULL] USB fixes for v4.9-rc4

2016-11-15 Thread David Miller
From: Peter Chen Date: Wed, 16 Nov 2016 11:41:15 +0800 > I just notice that you submitted the "usb: gadget: u_ether: remove > interrupt throttling", and cc stable tree too, but we can't get > the agreement that it is suitable for all USB controllers, and David > added this

Re: [GIT PULL] USB fixes for v4.9-rc4

2016-11-15 Thread Peter Chen
On Tue, Nov 01, 2016 at 04:31:07PM +0200, Felipe Balbi wrote: > > Hi Greg, > > Here's another set of fixes for current -rc cycle. Let me know if you > want anything to be changed. > > cheers > > The following changes since commit a909d3e636995ba7c349e2ca5dbb528154d4ac30: > > Linux 4.9-rc3

Re: [PATCH] add DWR-158 in usb option

2016-11-15 Thread Lars Melin
On 2016-11-16 03:20, Giuseppe Lippolis wrote: Signed-off-by: Giuseppe Lippolis --- Adding support for 3G modem DWR-158 from Dlink (I found it embedded in the DWR-512). --- --- drivers/usb/serial/option.c.orig2016-11-15 21:05:16.987504020 +0100 +++

Re: [PATCH] usb: dwc3: core: Disable USB2.0 phy suspend when dwc3 acts as host role

2016-11-15 Thread Baolin Wang
Hi, On 15 November 2016 at 18:49, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> When dwc3 controller acts as host role with attaching slow speed device >> (like mouse or keypad). Then if we plugged out the slow speed device, >> it will timeout

Re: add usb option device

2016-11-15 Thread Lars Melin
On 2016-11-16 02:13, Giuseppe Lippolis wrote: Dear all, I'm porting the Dlink DWR-512 device to LEDE (embedded linux). This device embed a 3G modem connected through the usb bus . The modem work properly with the option kernel module. I added these line in the #define

Logs flooded with cdc_ether warnings

2016-11-15 Thread Josiah Schwab
Hello, I recently observed that when my ThinkPad X1 Carbon (Gen 4) is plugged into my Lenovo OneLink+ dock my logs are filled with lines of the form Nov 15 18:12:28 monolith kernel: cdc_ether 2-4.1.3:2.0 eth0: kevent 11 may have been dropped Nov 15 18:12:28 monolith kernel: cdc_ether

Re: PROBLEM: Oops when deactivating gadget serial driver

2016-11-15 Thread Peter Chen
On Wed, Nov 16, 2016 at 12:15:34AM +0100, Felix Hädicke wrote: > Hello, > > In 4.8.6 and 4.9-rc5, the gadget serial driver crashes during > deinitialisation when compiled with CONFIG_U_SERIAL_CONSOLE. > > Steps to reproduce: > modprobe g-serial > rmmod g-serial > > The problem also occurs when

[PATCH 3/4] usb: dwc2: Use the ahb_burst param

2016-11-15 Thread John Youn
Use the new ahb_burst (instead of ahbcfg) to program the GAHBCFG.HBSTLEN in both host and gadget mode. Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 2 +- drivers/usb/dwc2/hcd.c| 8 +++- drivers/usb/dwc2/params.c | 10 -- 3 files changed, 4

[PATCH 4/4] usb: dwc2: pci: Add AHB burst property for HAPS

2016-11-15 Thread John Youn
Set the AHB burst to INCR for HAPS. Signed-off-by: John Youn --- drivers/usb/dwc2/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c index a23329e..146b7ce 100644 --- a/drivers/usb/dwc2/pci.c +++

[PATCH 2/4] usb: dwc2: Add binding for AHB burst

2016-11-15 Thread John Youn
Add the "snps,ahb-burst" binding and read it in. This property controls which burst type to perform on the AHB bus as a master in internal DMA mode. This overrides the legacy param value, which we need to keep around for now since several platforms use it. Some platforms may see better or worse

[PATCH 0/4] usb: dwc2: Add AHB burst configuration

2016-11-15 Thread John Youn
This series adds a binding for AHB burst, reads it in, and configures the controller for the specified burst type. Tested on HAPS platform with DWC_hsotg IP version 3.30a. John Youn (4): usb: dwc2: Fix AHB burst type for bcm2835 usb: dwc2: Add binding for AHB burst usb: dwc2: Use the

[PATCH 1/4] usb: dwc2: Fix AHB burst type for bcm2835

2016-11-15 Thread John Youn
The ahbcfg param for bcm2835 is specifying a HBSTLEN of 0x8 (0x10 >> 1) which is not a valid value for that field. Remove the param and default to using INCR4. Cc: Stefan Wahren Signed-off-by: John Youn --- drivers/usb/dwc2/params.c | 2 +- 1 file

Re: [PATHCv10 1/2] usb: USB Type-C connector class

2016-11-15 Thread Badhri Jagan Sridharan
Hi, At present I am using the uevent in the userspace to infer the Presence of a port on the remote end through the appearance of usbc*-partner. Userspace uses this info to decide on when to show a USB notification on the screen and what should be the options provided in the dialog. I was

Re: [PATCH 1/2] drivers: usb: phy: Add qoriq usb 3.0 phy driver support

2016-11-15 Thread Rob Herring
On Mon, Nov 14, 2016 at 10:56:54AM +0530, Sriram Dash wrote: > Adds qoriq usb 3.0 phy driver support for LS1043A platform. > Describes the qoriq usb 2.0 phy driver binding, currently used > for LS1043A platform. > > Signed-off-by: Sriram Dash > --- >

PROBLEM: Oops when deactivating gadget serial driver

2016-11-15 Thread Felix Hädicke
Hello, In 4.8.6 and 4.9-rc5, the gadget serial driver crashes during deinitialisation when compiled with CONFIG_U_SERIAL_CONSOLE. Steps to reproduce: modprobe g-serial rmmod g-serial The problem also occurs when using configfs, when the UDC is unbound. I does not make a difference if I use my

[PATCH v3] usb: dwc2: add amcc,dwc-otg support

2016-11-15 Thread John Youn
From: Christian Lamparter This patch adds support for the "amcc,usb-otg" device which is found in the PowerPC Canyonlands' dts. The device definition was added by: commit c89b3458d8cc ("powerpc/44x: Add USB DWC DTS entry to Canyonlands board") but without any driver

Re: [PATCH 6/6] phy: twl4030-usb: Fix for musb session bit based PM

2016-11-15 Thread Bin Liu
On Tue, Nov 15, 2016 at 01:37:55PM -0800, Tony Lindgren wrote: > Now with musb driver implementing generic session bit based > PM, we need to have the USB PHYs behaving in a sane way for > platforms implementing PM. > > Currently twl4030-usb enables PM in twl4030_phy_power_on() > and then

[RFC][PATCH 1/3] usb: dwc2: Force port resume on switching to device mode

2016-11-15 Thread John Stultz
From: Chen Yu We've seen failures when switching between host and gadget mode, which was diagnosed as being caused due to the bus being auto-suspended when we switched. So this patch forces a port resume when switching to device mode if the bus is suspended. Cc: Wei Xu

[RFC][PATCH 2/3] usb: dwc2: Avoid suspending if we're in gadget mode

2016-11-15 Thread John Stultz
I've found when booting HiKey with the usb gadget cable attached if I then try to connect via adb, I get an infinite spew of: dwc2 f72c.usb: dwc2_hsotg_ep_sethalt(ep ffc0790ecb18 ep1out, 0) dwc2 f72c.usb: dwc2_hsotg_ep_sethalt(ep ffc0790eca18 ep1in, 0) It seems that the usb

Re: [RFC][PATCH 0/3] DWC2 fixes and hacks to make things work on HiKey

2016-11-15 Thread John Stultz
On Tue, Nov 15, 2016 at 1:47 PM, John Stultz wrote: > I suspect that some of these issues may be due to the phy driver > on hikey being somewhat minimal: > https://git.linaro.org/people/john.stultz/android-dev.git/plain/drivers/phy/phy-hi6220-usb.c?h=dev/hikey-mainline-WIP

[RFC][PATCH 3/3] usb: dwc2: Make sure we disconnect the gadget state

2016-11-15 Thread John Stultz
I had seen some odd behavior with HiKey's usb-gadget interface that I finally seemed to have chased down. Basically every other time I pluged in the OTG port, the gadget interface would properly initialize. The other times, I'd get a big WARN_ON in dwc2_hsotg_init_fifo() about the fifo_map not

[RFC][PATCH 0/3] DWC2 fixes and hacks to make things work on HiKey

2016-11-15 Thread John Stultz
Hey folks, I wanted to send out these patches again for comment. These three patches are basically required to get otg/gadget mode working reliably on HiKey. I admit they do feel a bit hackish, but without them we run into a number of problems related to autosuspend and incorrect connection

[PATCH 4/6] usb: musb: Add missing pm_runtime_disable and drop 2430 PM timeout

2016-11-15 Thread Tony Lindgren
We are missing pm_runtime_disable() in 2430 glue layer. Further, we only need to enable PM runtime and disable it on exit. With musb_core.c doing PM, the glue layer as a parent will always be active when musb_core.c is active. This fixes host enumeration issues with some devices as reported by

[PATCH 6/6] phy: twl4030-usb: Fix for musb session bit based PM

2016-11-15 Thread Tony Lindgren
Now with musb driver implementing generic session bit based PM, we need to have the USB PHYs behaving in a sane way for platforms implementing PM. Currently twl4030-usb enables PM in twl4030_phy_power_on() and then disables it in twl4030_phy_power_off(). This will block PM runtime for the SoC

[PATCH 5/6] usb: musb: Drop pointless PM runtime code for dsps glue

2016-11-15 Thread Tony Lindgren
This already gets done automatically by PM runtime and we have a separate autosuspend timeout in musb_core.c. Reviewed-by: Johan Hovold Tested-by: Laurent Pinchart Signed-off-by: Tony Lindgren ---

[PATCHv3 0/6] musb fixes for v4.9-rc cycle

2016-11-15 Thread Tony Lindgren
Hi all, Here's v3 of musb fixes for issues that I've been able to track down. The PM changes merged for v4.9 popped up various issues reported by people that I had not seen earlier with my tests. As many people depend on this driver, I'd like to have these merged for v4.9-rc cycle. Regards,

[PATCH 2/6] usb: musb: Fix sleeping function called from invalid context for hdrc glue

2016-11-15 Thread Tony Lindgren
Commit 65b3f50ed6fa ("usb: musb: Add PM runtime support for MUSB DSPS glue layer") wrongly added a call for pm_runtime_get_sync to otg_timer that runs in softirq context. That causes a "BUG: sleeping function called from invalid context" every time when polling the cable status: []

[PATCH 3/6] usb: musb: Fix PM for hub disconnect

2016-11-15 Thread Tony Lindgren
With a USB hub disconnected, devctl can be 0x19 for about a second on am335x and will stay forever on at least omap3. And we get no further interrupts when devctl session bit clears. This keeps PM runtime active. Let's fix the issue by polling devctl until the session bit clears or times out. We

[PATCH 1/6] usb: musb: Fix broken use of static variable for multiple instances

2016-11-15 Thread Tony Lindgren
We can't use static variable first for checking when musb is initialized when we have multiple musb instances like on am335x. Tested-by: Ladislav Michl Reviewed-by: Johan Hovold Tested-by: Laurent Pinchart

Re: [PATCH] dma: cpp41: Fix handling of error path

2016-11-15 Thread Bin Liu
On Tue, Nov 15, 2016 at 12:58:17PM -0800, Tony Lindgren wrote: > * Sekhar Nori [161115 00:35]: > > On Saturday 12 November 2016 12:58 AM, Tony Lindgren wrote: > > > If we return early on pm_runtime_get() error, we need to also call > > > pm_runtime_put_noidle() as pointed out in a

Re: [PATCH v4 4/4] ARM: dts: da850: Add the usb otg device nodeg

2016-11-15 Thread Bin Liu
On Tue, Nov 15, 2016 at 04:16:02PM +0530, Sekhar Nori wrote: > On Thursday 03 November 2016 09:29 PM, Alexandre Bailon wrote: > > This adds the device tree node for the usb otg > > controller present in the da850 family of SoC's. > > This also enables the otg usb controller for the lcdk board. > >

Re: [PATCH] USB: musb: remove obsolete resume-signalling comments

2016-11-15 Thread Bin Liu
On Fri, Nov 04, 2016 at 03:20:04PM +0100, Johan Hovold wrote: > Remove comments about resume signalling being stopped from > GetPortStatus, something which is no longer the case. > > Fixes: 8ed1fb790ea2 ("usb: musb: finish suspend/reset work...") > Signed-off-by: Johan Hovold

Re: [PATCH v3 2/3] musb: sunxi: Remove custom babble handling

2016-11-15 Thread Bin Liu
On Fri, Sep 23, 2016 at 04:40:57PM +0300, Hans de Goede wrote: > The musb core already handles babble interrupts, so the sunxi glue > having its own custom handling is redundant. > > Signed-off-by: Hans de Goede Applied. Thanks. -Bin. > --- > Changes in v2: > -This is a

Re: [PATCH] usb: musb: omap2430: use dev_err

2016-11-15 Thread Bin Liu
On Wed, Nov 09, 2016 at 10:48:25AM -0700, Tony Lindgren wrote: > * Ladislav Michl [161109 07:09]: > > Replace pr_err with dev_err to print also device name. > > > > Signed-off-by: Ladislav Michl > > Acked-by: Tony Lindgren

Re: [PATCH] usb: musb: omap2430: make complain on -EPROBE_DEFER dev_dbg

2016-11-15 Thread Bin Liu
On Wed, Nov 09, 2016 at 10:48:48AM -0700, Tony Lindgren wrote: > * Ladislav Michl [161109 07:11]: > > There is no point having this complaint to be dev_err as it is just adding > > noise to bootlog. > > Acked-by: Tony Lindgren Applied. Thanks. -Bin. >

Re: [PATCH v4 0/4] Add DT support for DA8xx

2016-11-15 Thread Bin Liu
On Thu, Nov 03, 2016 at 04:59:08PM +0100, Alexandre Bailon wrote: > Changes in v2: > * Remove unrelated changes in patch 3 > * Rename the device node in patch 4 > > Changes in v3: > * Fix few mistakes in DT binding sample > * Only build the device table if DT is enabled > > Change in v4: > * Fix

Re: [PATCH] usb: musb: don't complain on -EPROBE_DEFER when initializing controller

2016-11-15 Thread Bin Liu
On Wed, Nov 09, 2016 at 10:48:10AM -0700, Tony Lindgren wrote: > * Ladislav Michl [161109 07:08]: > > Don't complain on -EPROBE_DEFER when initializing controller, > > the driver probe will be retried later. > > > > Signed-off-by: Ladislav Michl > >

Re: [PATCH] dma: cpp41: Fix handling of error path

2016-11-15 Thread Tony Lindgren
* Sekhar Nori [161115 00:35]: > On Saturday 12 November 2016 12:58 AM, Tony Lindgren wrote: > > If we return early on pm_runtime_get() error, we need to also call > > pm_runtime_put_noidle() as pointed out in a musb related thread > > by Johan Hovold . This is to

AW: add usb option device

2016-11-15 Thread Giuseppe Lippolis
> Your email client ate the tabs and spit out spaces and line-wrapped the > patch, making it impossible to apply. > > Also, you need to make it against the latest kernel tree, 4.4 is really old. > > And finally, there is no good subject: line, or description of the patch, or a > signed-off-by:

[RFC PATCH] xhci: Fix memory use after free in xhci_free_virt_device

2016-11-15 Thread Guenter Roeck
The following use-after-free reports were seen on resume with a specific USB hub. BUG: KASAN: use-after-free in xhci_free_virt_device+0x8c/0x21c at addr ffc0cc1a2eb0 BUG: KASAN: use-after-free in xhci_update_tt_active_eps+0x9c/0xdc at addr ffc0cc1a2eb0 Relevant traceback

[PATCH] add DWR-158 in usb option

2016-11-15 Thread Giuseppe Lippolis
Signed-off-by: Giuseppe Lippolis --- Adding support for 3G modem DWR-158 from Dlink (I found it embedded in the DWR-512). --- --- drivers/usb/serial/option.c.orig2016-11-15 21:05:16.987504020 +0100 +++ drivers/usb/serial/option.c 2016-11-15 21:08:27.722378924 +0100 @@

[PATCH v2] usb: dwc2: add amcc,dwc-otg support

2016-11-15 Thread John Youn
From: Christian Lamparter This patch adds support for the "amcc,usb-otg" device which is found in the PowerPC Canyonlands' dts. The device definition was added by: commit c89b3458d8cc ("powerpc/44x: Add USB DWC DTS entry to Canyonlands board") but without any driver

Re: USB stops working if a malfunctioning USB device is connected

2016-11-15 Thread Alan Stern
On Tue, 15 Nov 2016, Greg KH wrote: > On Wed, Nov 16, 2016 at 12:12:53AM +0530, PrasannaKumar Muralidharan wrote: > > >> scripts/kconfig/conf --silentoldconfig Kconfig > > >> CHK include/config/kernel.release > > >> Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong > >

Re: add usb option device

2016-11-15 Thread 'Greg KH'
On Tue, Nov 15, 2016 at 08:46:31PM +0100, Giuseppe Lippolis wrote: > Here it is: > > --- a/linux-4.4.23/drivers/usb/serial/option.c2016-09-30 > 10:20:43.0 +0200 > +++ b/linux-4.4.30/drivers/usb/serial/option.c 2016-11-14 > 21:01:15.738450136 +0100 > @@ -306,6 +306,9 @@

AW: add usb option device

2016-11-15 Thread Giuseppe Lippolis
Here it is: --- a/linux-4.4.23/drivers/usb/serial/option.c2016-09-30 10:20:43.0 +0200 +++ b/linux-4.4.30/drivers/usb/serial/option.c 2016-11-14 21:01:15.738450136 +0100 @@ -306,6 +306,9 @@ static void option_instat_callback(struc #define DLINK_PRODUCT_DWM_652_U5

Re: [PATCH 0/3] usb: dwc2: params revert and rework

2016-11-15 Thread John Youn
On 11/15/2016 3:33 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> Hi Felipe, >> >> This reverts and fixes a few commits that are queued on your >> testing/next, removing the previously added DT bindings, and the code >> that reads them in. >> >> The feedback was

Re: [PATCH v4 2/3] usb: dwc3: Implement interrupt moderation

2016-11-15 Thread John Youn
On 11/15/2016 3:16 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> Implement interrupt moderation which allows the interrupt rate to be >> throttled. To enable this feature the dwc->imod_interval must be set to >> 1 or greater. This value specifies the minimum

Re: add usb option device

2016-11-15 Thread Greg KH
On Tue, Nov 15, 2016 at 08:13:56PM +0100, Giuseppe Lippolis wrote: > Dear all, > I'm porting the Dlink DWR-512 device to LEDE (embedded linux). > This device embed a 3G modem connected through the usb bus . > The modem work properly with the option kernel module. > > I added these line in the >

Re: [PATCH 1/2] usb: dwc2: add amcc,dwc-otg support

2016-11-15 Thread John Youn
On 11/14/2016 3:00 PM, John Youn wrote: > On 11/11/2016 3:12 PM, Christian Lamparter wrote: >> On Friday, November 11, 2016 2:20:42 PM CET John Youn wrote: >>> On 11/11/2016 2:05 PM, Christian Lamparter wrote: On Friday, November 11, 2016 1:22:16 PM CET John Youn wrote: > On 11/11/2016

add usb option device

2016-11-15 Thread Giuseppe Lippolis
Dear all, I'm porting the Dlink DWR-512 device to LEDE (embedded linux). This device embed a 3G modem connected through the usb bus . The modem work properly with the option kernel module. I added these line in the #define DLINK_PRODUCT_DWM_652 0x3e04 #define

Re: USB stops working if a malfunctioning USB device is connected

2016-11-15 Thread Greg KH
On Wed, Nov 16, 2016 at 12:12:53AM +0530, PrasannaKumar Muralidharan wrote: > >> scripts/kconfig/conf --silentoldconfig Kconfig > >> CHK include/config/kernel.release > >> Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong > >> not supported by compiler > >> make: ***

Re: Issue with Telit LE922 and cdc_mbim

2016-11-15 Thread Bjørn Mork
Daniele Palmas writes: > The problem is in cdc_ncm, function cdc_ncm_bind_common, line > > usleep_range(1, 2); > > It seems that LE922 needs an higher timeout; changing the line to > > usleep_range(7, 8); > > makes the modem to work fine. Extremely interesting!

Re: USB stops working if a malfunctioning USB device is connected

2016-11-15 Thread PrasannaKumar Muralidharan
>> scripts/kconfig/conf --silentoldconfig Kconfig >> CHK include/config/kernel.release >> Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong >> not supported by compiler >> make: *** [prepare-compiler-check] Error 1 >> make: *** Waiting for unfinished jobs > > So turn

RE: [PATCH 15/15] net: usb: lan78xx: Utilize phy_ethtool_nway_reset

2016-11-15 Thread Woojung.Huh
> Signed-off-by: Florian Fainelli > --- > drivers/net/usb/lan78xx.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c > index bcd9010c1f27..cf2857fa938f 100644 > ---

[PATCH 14/15] net: usb: ax88172x: Utilize phy_ethtool_nway_reset

2016-11-15 Thread Florian Fainelli
Signed-off-by: Florian Fainelli --- drivers/net/usb/ax88172a.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/usb/ax88172a.c b/drivers/net/usb/ax88172a.c index 49a3bc107d05..6308386b09df 100644 --- a/drivers/net/usb/ax88172a.c +++

[PATCH 15/15] net: usb: lan78xx: Utilize phy_ethtool_nway_reset

2016-11-15 Thread Florian Fainelli
Signed-off-by: Florian Fainelli --- drivers/net/usb/lan78xx.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index bcd9010c1f27..cf2857fa938f 100644 --- a/drivers/net/usb/lan78xx.c +++

Re: USB stops working if a malfunctioning USB device is connected

2016-11-15 Thread Alan Stern
On Tue, 15 Nov 2016, PrasannaKumar Muralidharan wrote: > I am getting the following error when I compile 4.9-rc5: > *** > scripts/kconfig/conf --silentoldconfig Kconfig > CHK include/config/kernel.release >

[PATCH v6 1/2] usb: musb: da8xx: Call earlier clk_prepare_enable()

2016-11-15 Thread Alexandre Bailon
The first attempt to read a register may fail because the clock may not be enabled, and then the probe of musb driver will fail. Call clk_prepare_enable() before the first register read. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/da8xx.c | 17 - 1

[PATCH v6 2/2] usb: musb: da8xx: Set phy in OTG mode by default

2016-11-15 Thread Alexandre Bailon
The DA8xx OTG PHY has some issues when it is forced in host or peripheral mode. Actually, most of the time, OTG is the best mode because host or peripheral mode are only required for hardware that miss some circuitry. Init the PHY mode OTG mode by default. Signed-off-by: Alexandre Bailon

[PATCH v6 0/2] usb: musb: da8xx: Fix few issues

2016-11-15 Thread Alexandre Bailon
This series require the following patch to build: [PATCH 1/6] usb: musb: Fix broken use of static variable for multiple instances Currently, the USB OTG of the da8xx doesn't work. This series intend to fix them. Change in v2: * Fix the error path da8xx_musb_init() Changes in v3: * Remove the

Re: USB stops working if a malfunctioning USB device is connected

2016-11-15 Thread Alan Stern
On Tue, 15 Nov 2016, PrasannaKumar Muralidharan wrote: > Hi, > > My android device does not work sometime when I connect it to my > computer. It works sometime, it does not work sometime. If the device > fails to respond to USB requests then any other USB device that I > connect is not detected.

[PATCH] dwc3: make PM functions as __maybe_unused

2016-11-15 Thread Arnd Bergmann
A change to the suspend/resume handling in dwc3-pci introduced a harmless warning: drivers/usb/dwc3/dwc3-pci.c:169:12: error: ‘dwc3_pci_dsm’ defined but not used [-Werror=unused-function] Replacing the #ifdef around the PM functions with __maybe_unused annotations is the easiest way to make

Re: [PATCH] phy: twl4030-usb: make driver DT only

2016-11-15 Thread Tony Lindgren
* Nicolae Rosia [161115 05:26]: > Hi, > > On Tue, Nov 15, 2016 at 3:20 PM, Kishon Vijay Abraham I wrote: > > Are you sure about this? I still see a bunch of board files in mach-omap2 > > using > > twl4030. > > > > Thanks > > Kishon > > You are

USB stops working if a malfunctioning USB device is connected

2016-11-15 Thread PrasannaKumar Muralidharan
Hi, My android device does not work sometime when I connect it to my computer. It works sometime, it does not work sometime. If the device fails to respond to USB requests then any other USB device that I connect is not detected. dmesg snippet when I connect the malfunctioning USB device:

Re: Issue with Telit LE922 and cdc_mbim

2016-11-15 Thread Daniele Palmas
Hi, 2016-11-14 14:51 GMT+01:00 Daniele Palmas : > Hi, > > I'm struggling with Telit LE922 modem that presents an MBIM device. > The modem works fine in Windows, while in Linux (tested with 4.9 rc1) > data connection is not functional: using ifconfig I can see > > wwp0s20u8i2

Re: [PATCH v5] phy: rcar-gen3-usb2: add sysfs for usb role swap

2016-11-15 Thread Kishon Vijay Abraham I
On Wednesday 09 November 2016 08:00 AM, Yoshihiro Shimoda wrote: > This patch adds sysfs "role" for usb role swap. This parameter can be > read and write. If you use this file as the following, you can swap > the usb role. > > For example: > 1) Connect a usb cable using 2 Salvator-x boards >

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-15 Thread Wim Osterholt
On Tue, Nov 15, 2016 at 12:26:00PM +0100, poma wrote: > > In the process of searching, many options may have changed. The crash/OOPS > > has now mitigated into just a WARNING with a call trace. > > (Or it could be a totally different bug?) > > > > Tests on other machines with (slightly) different

Re: [PATCH] phy: twl4030-usb: make driver DT only

2016-11-15 Thread Nicolae Rosia
Hi, On Tue, Nov 15, 2016 at 3:20 PM, Kishon Vijay Abraham I wrote: > Are you sure about this? I still see a bunch of board files in mach-omap2 > using > twl4030. > > Thanks > Kishon You are right, on v4.9 it is still used in arch/arm/mach-omap2/twl-common.c. I forgot to mention

Re: [PATCH] phy: twl4030-usb: make driver DT only

2016-11-15 Thread Kishon Vijay Abraham I
Hi, On Saturday 12 November 2016 04:09 PM, Nicolae Rosia wrote: > All users are DT-only and it makes no sense to keep > unused code Are you sure about this? I still see a bunch of board files in mach-omap2 using twl4030. Thanks Kishon > > Signed-off-by: Nicolae Rosia

Re: [PATCH v5 2/4] phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround

2016-11-15 Thread Kishon Vijay Abraham I
On Monday 07 November 2016 06:35 PM, Alexandre Bailon wrote: > If we configure the da8xx OTG phy in OTG mode, neither device or host > mode will work. That is because the PHY is not able to detect and notify > the driver that value of ID pin changed. > To work despite this hardware limitation,

Re: [PATCH 3/4] usb: dwc3: gadget: use evt->cache for processing events

2016-11-15 Thread Janusz Dziedzic
On 15 November 2016 at 12:23, Felipe Balbi wrote: > From: John Youn > > Let's start copying events from evt->buf to > evt->cache and use evt->cache for processing events. > > A follow-up patch will be added to clear events in > the top-half

Re: [PATCH 1/5] cdc-acm: reindent log messages

2016-11-15 Thread Oliver Neukum
On Tue, 2016-11-15 at 12:26 +0100, Ladislav Michl wrote: > On Tue, Nov 15, 2016 at 11:07:27AM +0100, Greg KH wrote: > > On Wed, Nov 09, 2016 at 12:53:25PM +0100, Ladislav Michl wrote: > > > Signed-off-by: Ladislav Michl > > > --- > > > drivers/usb/class/cdc-acm.c | 35

Re: [PATCH] usb: host: xhci: Remove unused 'addr_64' variable in xhci_hcd structure

2016-11-15 Thread Mathias Nyman
On 15.11.2016 10:34, Baolin Wang wrote: Since the 'addr_64' variable as legacy is unused now, then remove it from xhci_hcd structure. Signed-off-by: Baolin Wang --- Thanks, I'll add it to the queue -Mathias -- To unsubscribe from this list: send the line

Re: [PATCH 0/3] usb: dwc2: params revert and rework

2016-11-15 Thread Felipe Balbi
Hi, John Youn writes: > Hi Felipe, > > This reverts and fixes a few commits that are queued on your > testing/next, removing the previously added DT bindings, and the code > that reads them in. > > The feedback was that IP validation is not reason enough to add these. >

Re: [PATCH 1/5] cdc-acm: reindent log messages

2016-11-15 Thread Ladislav Michl
On Tue, Nov 15, 2016 at 11:07:27AM +0100, Greg KH wrote: > On Wed, Nov 09, 2016 at 12:53:25PM +0100, Ladislav Michl wrote: > > Signed-off-by: Ladislav Michl > > --- > > drivers/usb/class/cdc-acm.c | 35 +-- > > 1 file changed, 17

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-15 Thread poma
On 15.11.2016 01:16, Wim Osterholt wrote: > On Tue, Oct 18, 2016 at 02:18:43PM +0200, Oliver Neukum wrote: > >> It definitely does not crash and is probed and your .config is not >> extremely unusual. > > Hmmm. > >> ... Something odd is going on. > > Whell, yes. > The only thing that appears

[PATCH 3/4] usb: dwc3: gadget: use evt->cache for processing events

2016-11-15 Thread Felipe Balbi
From: John Youn Let's start copying events from evt->buf to evt->cache and use evt->cache for processing events. A follow-up patch will be added to clear events in the top-half handler in order to bring IRQ line low as soon as possible. Signed-off-by: John Youn

[PATCH 1/4] usb: dwc3: core: add a event buffer cache

2016-11-15 Thread Felipe Balbi
From: John Youn This extra buffer will be used so we can copy triggered events from our event buffer to this cache and process all of them later in bottom half handler. We need this in order to implement a workaround for a known erratum in recent DWC3 release.

[PATCH 4/4] usb: dwc3: gadget: clear events in top-half handler

2016-11-15 Thread Felipe Balbi
From: John Youn Now that all the infrastructure is in place, we can clear events in the top-half handler in order to bring IRQ line low ASAP. This is also a necessary step in order to implement workaround for known erratum in follow-up patches. Signed-off-by: John Youn

[PATCH 2/4] usb: dwc3: gadget: use evt->length as we should

2016-11-15 Thread Felipe Balbi
Instead of always accessing the macro directly, let's rely on evt->length which is the actual length of current event buffer. While unlikely, we could change event buffer's size at any time. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 2 +- 1 file

Re: cdc_acm: debug - BUG - Oops

2016-11-15 Thread poma
On 08.11.2016 10:43, poma wrote: > > Helloo! > > Via Master Chef's debug kernel, the device ist kaputt. > Can you explain why this is happening specifically with the kernel's debug > facility. > > $ uname -r > 4.9.0-0.rc4.git0.1.fc26.x86_64 > > $ file /dev/ttyACM0 > /dev/ttyACM0: character

Re: [PATCH v4 2/3] usb: dwc3: Implement interrupt moderation

2016-11-15 Thread Felipe Balbi
Hi, John Youn writes: > Implement interrupt moderation which allows the interrupt rate to be > throttled. To enable this feature the dwc->imod_interval must be set to > 1 or greater. This value specifies the minimum inter-interrupt interval, > in 250 ns increments. A

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-15 Thread Oliver Neukum
On Tue, 2016-11-15 at 01:16 +0100, Wim Osterholt wrote: Hi, > Whell, yes. > The only thing that appears you'll have to do is unset 'CONFIG_SMP'. OK. I haven't tested that, nor would I ever considered it. > My machines didn't have the luxury of multicore processors (until recently), > so there

Re: [PATCH] usb: dwc3: core: Disable USB2.0 phy suspend when dwc3 acts as host role

2016-11-15 Thread Felipe Balbi
Hi, Baolin Wang writes: > When dwc3 controller acts as host role with attaching slow speed device > (like mouse or keypad). Then if we plugged out the slow speed device, > it will timeout to run the deconfiguration endpoint command to drop the > endpoint's resources.

Re: [PATCH v4 4/4] ARM: dts: da850: Add the usb otg device node

2016-11-15 Thread Sekhar Nori
On Thursday 03 November 2016 09:29 PM, Alexandre Bailon wrote: > This adds the device tree node for the usb otg > controller present in the da850 family of SoC's. > This also enables the otg usb controller for the lcdk board. > > Signed-off-by: Alexandre Bailon > --- >

[PATCH v3 1/1] usb: chipidea: move the lock initialization to core file

2016-11-15 Thread Peter Chen
This can fix below dump when the lock is accessed at host mode due to it is not initialized. [ 46.119638] INFO: trying to register non-static key. [ 46.124643] the code is fine but needs lockdep annotation. [ 46.130144] turning off the locking correctness validator. [ 46.135659] CPU: 0

  1   2   >