Re: USB/swiotlb failure on arm64/RPi3

2017-01-25 Thread Stefan Wahren
[Add John and linux-usb] Am 24.01.2017 um 23:52 schrieb Aaro Koskinen: > Hi, > > Booting Debian rootfs from USB hard disk (ext4) using 64-bit 4.9 kernel > on Raspberry Pi 3 fails early in the boot as follows: > > [ 15.162466] systemd[1]: Detected architecture arm64. > > Welcome to Debian GNU/Lin

Re: [PATCHv15 2/3] usb: USB Type-C connector class

2017-01-25 Thread Heikki Krogerus
Hi, On Mon, Jan 23, 2017 at 04:44:23PM +0200, Felipe Balbi wrote: > Heikki Krogerus writes: > > +static void typec_report_identity(struct device *dev) > > +{ > > + sysfs_notify(&dev->kobj, "identity", "id_header"); > > + sysfs_notify(&dev->kobj, "identity", "cert_stat"); > > + sysfs_notify(

Re: [PATCHv15 2/3] usb: USB Type-C connector class

2017-01-25 Thread Heikki Krogerus
Hi Guenter, On Tue, Jan 24, 2017 at 01:47:18PM -0800, Guenter Roeck wrote: > > +static ssize_t product_show(struct device *dev, struct device_attribute > > *attr, > > + char *buf) > > +{ > > + struct usb_pd_identity *id = get_pd_identity(dev); > > + > > + return sprintf(

[PATCH net v2 4/4] r8152: check rx after napi is enabled

2017-01-25 Thread Hayes Wang
Schedule the napi after napi_enable() for rx, if it is necessary. If the rx is completed when napi is disabled, the sheduling of napi would be lost. Then, no one handles the rx packet until next napi is scheduled. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 7 ++- 1 file changed

[PATCH net v2 1/4] r8152: avoid start_xmit to call napi_schedule during autosuspend

2017-01-25 Thread Hayes Wang
Adjust the setting of the flag of SELECTIVE_SUSPEND to prevent start_xmit() from calling napi_schedule() directly during runtime suspend. After calling napi_disable() or clearing the flag of WORK_ENABLE, scheduling the napi is useless. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 12

[PATCH net v2 3/4] r8152: re-schedule napi for tx

2017-01-25 Thread Hayes Wang
Re-schedule napi after napi_complete() for tx, if it is necessay. In r8152_poll(), if the tx is completed after tx_bottom() and before napi_complete(), the scheduling of napi would be lost. Then, no one handles the next tx until the next napi_schedule() is called. Signed-off-by: Hayes Wang ---

[PATCH net v2 0/4] r8152: fix scheduling napi

2017-01-25 Thread Hayes Wang
v2: Add smp_mb__after_atomic() for patch #1. v1: Scheduling the napi during the following periods would let it be ignored. And the events wouldn't be handled until next napi_schedule() is called. 1. after napi_disable and before napi_enable(). 2. after all actions of napi function is completed an

[PATCH net v2 2/4] r8152: avoid start_xmit to schedule napi when napi is disabled

2017-01-25 Thread Hayes Wang
Stop the tx when the napi is disabled to prevent napi_schedule() is called. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 23bef8e..ec882be 100644 --- a/driv

Re: [PATCH] ARM: dts: Odroid XU4: fix USB3.0 ports

2017-01-25 Thread Richard Genoud
On 24/01/2017 19:22, Krzysztof Kozlowski wrote: > On Tue, Jan 24, 2017 at 02:48:09PM +0100, Richard Genoud wrote: >> Since commit 2164a476205ccc ("usb: dwc3: set SUSPHY bit for all cores"), >> the USB ports on odroid-XU4 don't work anymore. > > Hi, > > Thanks for the patch. Please: > 1. Use recen

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-25 Thread Rafał Miłecki
On 21 January 2017 at 22:42, Jacek Anaszewski wrote: > On 01/21/2017 05:24 PM, Rafał Miłecki wrote: >> On 20 January 2017 at 23:35, Jacek Anaszewski >> wrote: >>> On 01/20/2017 10:56 PM, Rafał Miłecki wrote: From: Rafał Miłecki Some LEDs can be related to particular devices descri

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-25 Thread Rafał Miłecki
On 01/23/2017 05:45 PM, Rob Herring wrote: On Fri, Jan 20, 2017 at 11:35:20PM +0100, Jacek Anaszewski wrote: Hi Rafał, On 01/20/2017 10:56 PM, Rafał Miłecki wrote: From: Rafał Miłecki Some LEDs can be related to particular devices described in DT. This property allows specifying such relatio

Re: [PATCHv15 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-25 Thread Heikki Krogerus
On Mon, Jan 23, 2017 at 04:20:08PM +0200, Felipe Balbi wrote: > Heikki Krogerus writes: > > +static int wcove_typec_probe(struct platform_device *pdev) > > +{ > > [snip] > > > + wcove->cap.prefer_role = TYPEC_NO_PREFERRED_ROLE; > > we have a slight problem here that affects users of this part

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-25 Thread Rafał Miłecki
On 01/23/2017 09:51 PM, Jacek Anaszewski wrote: On 01/23/2017 05:45 PM, Rob Herring wrote: On Fri, Jan 20, 2017 at 11:35:20PM +0100, Jacek Anaszewski wrote: Hi Rafał, On 01/20/2017 10:56 PM, Rafał Miłecki wrote: From: Rafał Miłecki Some LEDs can be related to particular devices described in

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-01-25 Thread Ingo Molnar
* Lu Baolu wrote: > > Hiding essentially an early udelay() implementation in an early-printk > > driver is > > ugly and counterproductive. > > Sure. How about below change? > > diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c > index d3f0c84..940989e 100644 > --- a/dr

NAPI on USB network drivers

2017-01-25 Thread Oliver Neukum
Hi, looking at r8152 I noticed that it uses NAPI. I never considered this for the generic USB networking code as you cannot disable interrupts for USB. Is it still worth it? What are the benefits? Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe

RE: NAPI on USB network drivers

2017-01-25 Thread Hayes Wang
Oliver Neukum [mailto:oneu...@suse.com] > Sent: Wednesday, January 25, 2017 5:35 PM [...] > looking at r8152 I noticed that it uses NAPI. I never considered > this for the generic USB networking code as you cannot disable > interrupts for USB. Is it still worth it? What are the benefits? You could

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-01-25 Thread Peter Zijlstra
On Wed, Jan 25, 2017 at 10:23:55AM +0100, Ingo Molnar wrote: > > * Lu Baolu wrote: > > > > Hiding essentially an early udelay() implementation in an early-printk > > > driver is > > > ugly and counterproductive. > Yeah - so could we do this in a more generic fashion, not in the early-printk

Re: [PATCH 1/2] usb: musb: Fix host mode error -71 regression

2017-01-25 Thread Greg KH
On Tue, Jan 24, 2017 at 09:18:57AM -0600, Bin Liu wrote: > From: Tony Lindgren > > Commit 467d5c980709 ("usb: musb: Implement session bit based runtime PM for > musb-core") started implementing musb generic runtime PM support by > introducing devctl register session bit based state control. > >

[PATCH v5 4/6] usb: musb: cppi_dma: Clean up cppi41_dma_controller structure

2017-01-25 Thread Alexandre Bailon
A pointer to musb is now present in the dma_controller structure. Remove the one present in cppi41_dma_controller structure. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/musb_cppi41.c | 29 + 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/driv

[PATCH v5 5/6] usb: musb: cppi_dma: Clean up tusb_omap_dma structure

2017-01-25 Thread Alexandre Bailon
A pointer to musb is now present in the dma_controller structure. Remove the one present in tusb_omap_dma structure. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/tusb6010_omap.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/tusb6010_omap.c b/

[PATCH v5 3/6] usb: musb: cppi_dma: Clean up cppi structure

2017-01-25 Thread Alexandre Bailon
A pointer to musb is now present in the dma_controller structure. Remove the one present in cppi structure. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/cppi_dma.c | 26 +- drivers/usb/musb/cppi_dma.h | 1 - 2 files changed, 13 insertions(+), 14 deletions(-) dif

[PATCH v5 0/6] usb: musb: cppi41: Add a way to manage DMA irq

2017-01-25 Thread Alexandre Bailon
This series was "dmaengine: cppi41: Make the driver more generic". I have tried to separate as munch I could CPPI 4.1 MUSB driver changes. Currently, the DMA interrupt is managed by the CPPI 4.1 driver. The issue here is the CPPI 4.1 driver must access to MUSB glue registers to manage its interrup

[PATCH v5 6/6] usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS

2017-01-25 Thread Alexandre Bailon
Despite the CPPI 4.1 is a generic DMA, it is tied to USB. On the DSPS, CPPI 4.1 interrupt's registers are in USBSS (the MUSB glue). Currently, to enable / disable and clear interrupts, the CPPI 4.1 driver maps and accesses to USBSS's register, which making CPPI 4.1 driver not really generic. Move t

[PATCH v5 1/6] usb: musb: dma: Add a DMA completion platform callback

2017-01-25 Thread Alexandre Bailon
Currently, the CPPI 4.1 driver is not completely generic and only works on DSPS. This is because of IRQ management. Add a callback to dma_controller that could be invoked on DMA completion to acknowledge the IRQ. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/musb_cppi41.c | 7 +-- dri

[PATCH v5 2/6] usb: musb: cppi41: Detect aborted transfers in cppi41_dma_callback()

2017-01-25 Thread Alexandre Bailon
Update cppi41_dma_callback() to detect an aborted transfer. This was not required before because cppi41_dma_callback() was only invoked on transfer completion. In order to make CPPI 4.1 driver more generic, cppi41_dma_callback() will be invoked after a transfer abort in order to let the MUSB driver

Re: [PATCHv15 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-25 Thread Felipe Balbi
Hi, Heikki Krogerus writes: >> > + wcove->cap.prefer_role = TYPEC_NO_PREFERRED_ROLE; >> >> we have a slight problem here that affects users of this particular >> driver. Well, more specifically, it affects Intel Joule. >> >> Because of the way ASL was written and the way Intel's DRD mux works

[PATCH v5 3/5] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-01-25 Thread Alexandre Bailon
Currently, only the PIO mode is supported. This add support of CPPI 4.1 to DA8xx. As the In DA8xx the CPPI 4.1 DMA is a part of the USB. Create the CPPI 4.1 device as a child of USB. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/Kconfig | 4 ++-- drivers/usb/musb/da8xx.c | 35 +++

[PATCH v5 5/5] usb: musb: da8xx: Add a primary support of PM runtime

2017-01-25 Thread Alexandre Bailon
Currently, MUSB DA8xx glue driver doesn't have PM runtime support. Because the CPPI 4.1 is using the same clock as MUSB DA8xx and CPPI 4.1 is a child of MUSB DA8xx glue, add support of PM runtime to the DA8xx glue driver in order to let the CPPI 4.1 driver manage the clock by using PM runtime. Sig

[PATCH v5 2/5] usb: musb: Use shared irq

2017-01-25 Thread Alexandre Bailon
In the DA8xx, USB and CPPI 4.1 are sharing the same interrupt line. Update the driver to request a shared irq. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb

[PATCH v5 4/5] usb: musb: musb_cppi41: Workaround DMA stall issue during teardown

2017-01-25 Thread Alexandre Bailon
The DMA may hang up if a teardown is initiated while an endpoint is still active (Advisory 2.3.27 of DA8xx errata). To workaround this issue, add a delay before to initiate the teardown. Signed-off-by: Alexandre Bailon --- drivers/usb/musb/da8xx.c | 2 +- drivers/usb/musb/musb_core.h | 1

[PATCH v5 1/5] usb: musb: da8xx: Remove CPPI 3.0 quirk and methods

2017-01-25 Thread Alexandre Bailon
DA8xx driver is registering and using the CPPI 3.0 DMA controller but actually, the DA8xx has a CPPI 4.1 DMA controller. Remove the CPPI 3.0 quirk and methods. Fixes: f8e9f34f80a2 ("usb: musb: Fix up DMA related macros") Fixes: 7f6283ed6fe8 ("usb: musb: Set up function pointers for DMA") Signed-of

[PATCH v5 0/5] usb: musb: da8xx: Add DMA support

2017-01-25 Thread Alexandre Bailon
This series update MUSB driver to add DMA support to DA8xx. It should be applied on top of "[PATCH v3 0/3] usb: musb: cppi41: Add a way to manage DMA irq" but "[PATCH v3 0/3] dmaengine: cppi41: Add dma support to da8xx" and "[PATCH] arm: davinci: Make the usb20 clock available to PM runtime" are re

[PATCH v2] usb: dwc3: gadget: read IN ep FIFO size from HW

2017-01-25 Thread Felipe Balbi
Instead of assuming all IN endpoints support 1024 bytes, let's read the actual value from HW and pass that to gadget API. Signed-off-by: Felipe Balbi --- changes since v1: - Fix a bug where we weren't setting endpoints.ops nor addding EP to ep_list. drivers/usb/dwc3/gadget.c |

Re: functionfs on dwc3, xhci host: endpoint cannot be used in both directions ?

2017-01-25 Thread Felipe Balbi
Hi, Vincent Pelletier writes: > Hello, > > On Tue, 24 Jan 2017 11:02:10 +0200, Felipe Balbi > wrote: >> that's correct. Maybe I should always set bulk capability. Thanks for >> catching that, I'll send v2 shortly. > > I just tested v2 from your branch, but the original "else" contains > several

Re: [PATCH v3 00/24] usb: dwc2: Rework params, FIFO, and other changes

2017-01-25 Thread Felipe Balbi
Hi, John Youn writes: > On 1/23/2017 2:52 PM, John Youn wrote: >> Hi Felipe, >> >> This is a consolidation, rebase, and resend of several dwc2 patch >> series that were submitted to this list in the past month or so. See >> v2 [1] of this series for a summary. >> >> This latest revision is rebas

Re: [PATCHv15 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-25 Thread Heikki Krogerus
On Wed, Jan 25, 2017 at 12:27:28PM +0200, Felipe Balbi wrote: > > Hi, > > Heikki Krogerus writes: > >> > +wcove->cap.prefer_role = TYPEC_NO_PREFERRED_ROLE; > >> > >> we have a slight problem here that affects users of this particular > >> driver. Well, more specifically, it affects Inte

[PATCH v3] usb: dwc3: gadget: read IN ep FIFO size from HW

2017-01-25 Thread Felipe Balbi
Instead of assuming all IN endpoints support 1024 bytes, let's read the actual value from HW and pass that to gadget API. Signed-off-by: Felipe Balbi --- changes since v2: - Actually commit "ret" variable :-s changes since v1: - Fix a bug where we weren't setting endpoints.ops n

Re: [PATCHv15 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-25 Thread Felipe Balbi
Hi, Heikki Krogerus writes: >> Heikki Krogerus writes: >> >> > + wcove->cap.prefer_role = TYPEC_NO_PREFERRED_ROLE; >> >> >> >> we have a slight problem here that affects users of this particular >> >> driver. Well, more specifically, it affects Intel Joule. >> >> >> >> Because of the wa

Re: usb: gadget: Kernel panic (NULL pointer dereference) when using fsl_udc2_core on i.MX31 PDK

2017-01-25 Thread Felipe Balbi
Hi, Magnus Lilja writes: > I tried the fsl_udc_core gadget driver on the i.MX31 PDK board and > got a > kernel panic (NULL pointer dereference) when connecting the USB > cable. I > had the g_serial module loaded as well. > > The NULL poin

RE: [PATCH v2 28/37] usb: host: xhci: combine event TRB completion debugging messages

2017-01-25 Thread David Laight
From: Janusz Dziedzic > Sent: 24 January 2017 12:06 > On 23 January 2017 at 13:20, Mathias Nyman > wrote: > > From: Felipe Balbi > > > > If we just provide a helper to convert completion code to string, we can > > combine all debugging messages into a single print. > > > > [keep the old debug mes

[PATCH v3] ARM: davinci: Make the usb20 clock available to PM runtime

2017-01-25 Thread Alexandre Bailon
Since USB20 subsystem uses just one clock, there is no need of a con_id, so we are using NULL. Signed-off-by: Alexandre Bailon Suggested-by: Sekhar Nori --- arch/arm/mach-davinci/da830.c | 2 +- arch/arm/mach-davinci/da850.c | 2 +- arch/arm/mach-davinci/usb-da8xx.c | 2 +- 3 files chan

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-01-25 Thread Lu Baolu
Hi, On 01/25/2017 05:23 PM, Ingo Molnar wrote: > * Lu Baolu wrote: > >>> Hiding essentially an early udelay() implementation in an early-printk >>> driver is >>> ugly and counterproductive. >> Sure. How about below change? >> >> diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-01-25 Thread Lu Baolu
Hi, On 01/25/2017 05:57 PM, Peter Zijlstra wrote: > On Wed, Jan 25, 2017 at 10:23:55AM +0100, Ingo Molnar wrote: >> * Lu Baolu wrote: >> Hiding essentially an early udelay() implementation in an early-printk driver is ugly and counterproductive. >> Yeah - so could we do this in a

Re: [PATCH 1/2] usb: musb: Fix host mode error -71 regression

2017-01-25 Thread Bin Liu
On Wed, Jan 25, 2017 at 11:01:30AM +0100, Greg KH wrote: > On Tue, Jan 24, 2017 at 09:18:57AM -0600, Bin Liu wrote: > > From: Tony Lindgren > > > > Commit 467d5c980709 ("usb: musb: Implement session bit based runtime PM for > > musb-core") started implementing musb generic runtime PM support by >

Re: [PATCH 1/2] usb: musb: Fix host mode error -71 regression

2017-01-25 Thread Greg KH
On Wed, Jan 25, 2017 at 06:59:47AM -0600, Bin Liu wrote: > On Wed, Jan 25, 2017 at 11:01:30AM +0100, Greg KH wrote: > > On Tue, Jan 24, 2017 at 09:18:57AM -0600, Bin Liu wrote: > > > From: Tony Lindgren > > > > > > Commit 467d5c980709 ("usb: musb: Implement session bit based runtime PM > > > for

Re: [PATCH 1/2] usb: musb: Fix host mode error -71 regression

2017-01-25 Thread Bin Liu
On Wed, Jan 25, 2017 at 02:17:11PM +0100, Greg KH wrote: > On Wed, Jan 25, 2017 at 06:59:47AM -0600, Bin Liu wrote: > > On Wed, Jan 25, 2017 at 11:01:30AM +0100, Greg KH wrote: > > > On Tue, Jan 24, 2017 at 09:18:57AM -0600, Bin Liu wrote: > > > > From: Tony Lindgren > > > > > > > > Commit 467d5c

Re: NAPI on USB network drivers

2017-01-25 Thread Oliver Hartkopp
On 01/25/2017 10:39 AM, Hayes Wang wrote: Oliver Neukum [mailto:oneu...@suse.com] Sent: Wednesday, January 25, 2017 5:35 PM [...] looking at r8152 I noticed that it uses NAPI. I never considered this for the generic USB networking code as you cannot disable interrupts for USB. Is it still wort

Re: [PATCH] ARM: dts: Odroid XU4: fix USB3.0 ports

2017-01-25 Thread Marek Szyprowski
Hi Krzysztof, On 2017-01-25 08:55, Krzysztof Kozlowski wrote: On Wed, Jan 25, 2017 at 7:51 AM, Anand Moon wrote: On 24 January 2017 at 19:18, Richard Genoud wrote: Since commit 2164a476205ccc ("usb: dwc3: set SUSPHY bit for all cores"), the USB ports on odroid-XU4 don't work anymore. Insert

Re: [PATCH net v2 3/4] r8152: re-schedule napi for tx

2017-01-25 Thread Eric Dumazet
On Wed, 2017-01-25 at 16:13 +0800, Hayes Wang wrote: > Re-schedule napi after napi_complete() for tx, if it is necessay. > > In r8152_poll(), if the tx is completed after tx_bottom() and before > napi_complete(), the scheduling of napi would be lost. Then, no > one handles the next tx until the ne

[PATCH -next] usb: chipidea: msm: Fix return value check in ci_hdrc_msm_probe()

2017-01-25 Thread Wei Yongjun
From: Wei Yongjun In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 2fc305be364e ("usb: chipidea: msm: Mux over secondary phy at the right time") Signed-off-by: Wei Yon

Re: NAPI on USB network drivers

2017-01-25 Thread Eric Dumazet
On Wed, 2017-01-25 at 09:39 +, Hayes Wang wrote: > Oliver Neukum [mailto:oneu...@suse.com] > > Sent: Wednesday, January 25, 2017 5:35 PM > [...] > > looking at r8152 I noticed that it uses NAPI. I never considered > > this for the generic USB networking code as you cannot disable > > interrupts

Re: [PATCH] ARM: dts: Odroid XU4: fix USB3.0 ports

2017-01-25 Thread Krzysztof Kozlowski
On Wed, Jan 25, 2017 at 3:48 PM, Marek Szyprowski wrote: > Hi Krzysztof, > > On 2017-01-25 08:55, Krzysztof Kozlowski wrote: >> >> On Wed, Jan 25, 2017 at 7:51 AM, Anand Moon wrote: >>> >>> On 24 January 2017 at 19:18, Richard Genoud >>> wrote: Since commit 2164a476205ccc ("usb: dwc3:

[PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting

2017-01-25 Thread Johan Hovold
Since commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag") the FTDI driver has been using a receive latency-timer value of 1 ms instead of the device default of 16 ms. The latency timer is used to periodically empty a non-full receive buffer, but a status header is always sent when th

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-01-25 Thread Peter Zijlstra
On Wed, Jan 25, 2017 at 08:27:38PM +0800, Lu Baolu wrote: > In my driver, udelay() is mostly used to handle time out. > > Xdbc hides most USB things in its firmware. Early printk driver only needs > to setup the registers/data structures and wait until link ready or time out. > Without udelay(), I

Re: [PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting

2017-01-25 Thread Greg Kroah-Hartman
On Wed, Jan 25, 2017 at 03:35:20PM +0100, Johan Hovold wrote: > Since commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY > flag") the FTDI driver has been using a receive latency-timer value of > 1 ms instead of the device default of 16 ms. > > The latency timer is used to periodically emp

Re: [PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting

2017-01-25 Thread Johan Hovold
On Wed, Jan 25, 2017 at 04:06:47PM +0100, Greg Kroah-Hartman wrote: > On Wed, Jan 25, 2017 at 03:35:20PM +0100, Johan Hovold wrote: > > Since commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY > > flag") the FTDI driver has been using a receive latency-timer value of > > 1 ms instead of the

RE: [PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting

2017-01-25 Thread David Laight
From: Johan Hovold > Sent: 25 January 2017 14:35 > Since commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY > flag") the FTDI driver has been using a receive latency-timer value of > 1 ms instead of the device default of 16 ms. > > The latency timer is used to periodically empty a non-full

Re: [PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting

2017-01-25 Thread Greg Kroah-Hartman
On Wed, Jan 25, 2017 at 04:14:36PM +0100, Johan Hovold wrote: > On Wed, Jan 25, 2017 at 04:06:47PM +0100, Greg Kroah-Hartman wrote: > > On Wed, Jan 25, 2017 at 03:35:20PM +0100, Johan Hovold wrote: > > > Since commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY > > > flag") the FTDI driver h

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-01-25 Thread Lu Baolu
Hi, On 01/25/2017 10:38 PM, Peter Zijlstra wrote: > On Wed, Jan 25, 2017 at 08:27:38PM +0800, Lu Baolu wrote: >> In my driver, udelay() is mostly used to handle time out. >> >> Xdbc hides most USB things in its firmware. Early printk driver only needs >> to setup the registers/data structures and

Re: [PATCH] USB: serial: ftdi_sio: fix extreme low-latency setting

2017-01-25 Thread Johan Hovold
On Wed, Jan 25, 2017 at 04:42:01PM +0100, Greg Kroah-Hartman wrote: > On Wed, Jan 25, 2017 at 04:14:36PM +0100, Johan Hovold wrote: > > On Wed, Jan 25, 2017 at 04:06:47PM +0100, Greg Kroah-Hartman wrote: > > > On Wed, Jan 25, 2017 at 03:35:20PM +0100, Johan Hovold wrote: > > > > Since commit 557aaa

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-01-25 Thread Peter Zijlstra
On Wed, Jan 25, 2017 at 11:51:34PM +0800, Lu Baolu wrote: > > What is timeout and why? > > Put it in simple: > > The driver sets the RUN bit in control register and polls READY > bit in status register for the successful USB device enumeration. > As the USB device enumeration might fail and the

Re: [PATCH] usb: musb: constify musb_hdrc_config structures

2017-01-25 Thread Bin Liu
On Wed, Jan 25, 2017 at 12:52:22AM +0530, Bhumika Goyal wrote: > Declare musb_hdrc_config structures as const as they are only stored in > the config field of a musb_hdrc_platform_data structure. This field is of > type const, so musb_hdrc_config structures having this property can be > made const

[PATCH] USB: cdc-acm: fix TIOCGSERIAL flags

2017-01-25 Thread Johan Hovold
The driver reports that it always uses a low-latency mode by returning the ASYNC_LOW_LATENCY flag through TIOCGSERIAL. Even if this behaviour could not be changed, this may have made some sense prior to 7a9a65ced11e ("cdc-acm: Fix long standing abuse of tty->low_latency") which removed the uncondi

[PATCH 1/2] USB: serial: ftdi_sio: clean up ioctl handler

2017-01-25 Thread Johan Hovold
Clean up the ioctl handler and make sure to pass an unsigned-int rather than serial_struct pointer to the TIOCSERGETLSR helper as this it what the user argument really is. Signed-off-by: Johan Hovold --- drivers/usb/serial/ftdi_sio.c | 19 +++ 1 file changed, 7 insertions(+), 12

[PATCH 2/2] USB: serial: drop unused ASYNC flags

2017-01-25 Thread Johan Hovold
Do not report ASYNC_SKIP_TEST or ASYNC_AUTO_IRQ as being set in TIOCGSERIAL handlers as these flags are not supported and do not really make any sense for USB serial devices in the first place. Signed-off-by: Johan Hovold --- drivers/usb/serial/io_edgeport.c | 1 - drivers/usb/serial/io_ti.c

Re: [PATCH v5 1/2] usb: host: plat: Enable xhci plat runtime PM

2017-01-25 Thread Robert Foss
Looks good to me. Feel free to add my r-b. On 2016-12-13 02:49 AM, Baolin Wang wrote: Enable the xhci plat runtime PM for parent device to suspend/resume xhci. Also call pm_runtime_get_noresume() in probe() function in case the parent device doesn't call suspend/resume callback by runtime PM no

Re: [PATCH v5 2/2] usb: dwc3: core: Support the dwc3 host suspend/resume

2017-01-25 Thread Robert Foss
Looks good to me. Feel free to add my r-b. Rob. On 2016-12-13 02:49 AM, Baolin Wang wrote: For some mobile devices with strict power management, we also want to suspend the host when the slave is detached for power saving. Thus we add the host suspend/resume functions to support this requirem

[PATCH i-g-t v7 1/1] usb: xhci: plat: Enable async suspend/resume

2017-01-25 Thread Robert Foss
From: Andrew Bresticker USB host controllers can take a significant amount of time to suspend and resume, adding several hundred miliseconds to the kernel resume time. Since the XHCI controller has no outside dependencies (other than clocks, which are suspended late/resumed early), allow it to su

[PATCH i-g-t v7 0/1] usb: xhci: plat: Enable runtime PM

2017-01-25 Thread Robert Foss
This series enables runtime PM and asynchronous resume/suspend support for xhci-plat devices. Due to Baolin Wangs series[1] part 1/2 of this series is now dropped. [1] https://lkml.org/lkml/2016/12/13/32 Andrew Bresticker (1): usb: xhci: plat: Enable async suspend/resume drivers/usb/host/xhc

Re: [PATCH net-next] r8152: fix the wrong spelling

2017-01-25 Thread David Miller
From: Hayes Wang Date: Wed, 25 Jan 2017 13:41:45 +0800 > Replace rumtime with runtime. > > Signed-off-by: Hayes Wang Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vge

Re: [PATCH] ARM: dts: Odroid XU4: fix USB3.0 ports

2017-01-25 Thread Anand Moon
Hi Krzysztof, On 25 January 2017 at 19:47, Krzysztof Kozlowski wrote: > On Wed, Jan 25, 2017 at 3:48 PM, Marek Szyprowski > wrote: >> Hi Krzysztof, >> >> On 2017-01-25 08:55, Krzysztof Kozlowski wrote: >>> >>> On Wed, Jan 25, 2017 at 7:51 AM, Anand Moon wrote: On 24 January 2017 at 19

Re: [PATCHv15 2/3] usb: USB Type-C connector class

2017-01-25 Thread Guenter Roeck
On Mon, Jan 23, 2017 at 04:44:23PM +0200, Felipe Balbi wrote: > > Hi, > > Heikki Krogerus writes: > > +static void typec_report_identity(struct device *dev) > > +{ > > + sysfs_notify(&dev->kobj, "identity", "id_header"); > > + sysfs_notify(&dev->kobj, "identity", "cert_stat"); > > + sysfs_

Re: [PATCH -next] usb: chipidea: msm: Fix return value check in ci_hdrc_msm_probe()

2017-01-25 Thread Stephen Boyd
Quoting Wei Yongjun (2017-01-25 06:02:48) > From: Wei Yongjun > > In case of error, the function devm_ioremap_resource() returns ERR_PTR() > and never returns NULL. The NULL test in the return value check should > be replaced with IS_ERR(). > > Fixes: 2fc305be364e ("usb: chipidea: msm: Mux over

Re: [PATCH v5] USB: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-25 Thread Maksim Salau
Hi Johan, > You made some further changes than what I suggested but forgot to > document those. Often better to explicitly list the changes made rather > than refer to review comments this way. Sorry for that, I'll try to describe changes more verbosely. > > + if (res < 0) > > + retu

Re: [PATCH net v2 0/4] r8152: fix scheduling napi

2017-01-25 Thread David Miller
From: Hayes Wang Date: Wed, 25 Jan 2017 16:13:17 +0800 > v2: > Add smp_mb__after_atomic() for patch #1. > > v1: > Scheduling the napi during the following periods would let it be ignored. > And the events wouldn't be handled until next napi_schedule() is called. > > 1. after napi_disable and be

Re: NAPI on USB network drivers

2017-01-25 Thread David Miller
From: Oliver Neukum Date: Wed, 25 Jan 2017 10:34:41 +0100 > looking at r8152 I noticed that it uses NAPI. I never considered > this for the generic USB networking code as you cannot disable > interrupts for USB. Is it still worth it? What are the benefits? I think it's not a good approach for ge

[RESEND][PATCH] media/usb: Fix pctv452e

2017-01-25 Thread Wolfgang Rohdewald
I sent this 9 days ago but got no answer. Is anything wrong with this patch? Commit 73d5c5c864f40 made sure that media/usb drivers don't do DMA on stack. That made pctv452e oops while initialising: [...] BUG: unable to handle kernel NULL pointer dereference at (null) [...] [9.0515

Re: [PATCH] usb: dwc2: fix "iomem 0x00000000" message by setting iomem parameters in usb_hcd

2017-01-25 Thread Heiner Kallweit
Am 24.01.2017 um 09:46 schrieb Felipe Balbi: > > Hi, > > John Youn writes: >>> John Youn writes: @@ -1229,7 +1229,8 @@ static inline void dwc2_hcd_connect(struct dwc2_hsotg *hsotg) {} static inline void dwc2_hcd_disconnect(struct dwc2_hsotg *hsotg, bool fo

[PATCH v6] USB: serial: Add uPD78F0730 USB to Serial Adaptor Driver

2017-01-25 Thread Maksim Salau
The adaptor can be found on development boards for 78k, RL78 and V850 microcontrollers produced by Renesas Electronics Corporation. This is not a full-featured USB to serial converter, however it allows basic communication and simple control which is enough for programming of on-board flash and de

Re: NAPI on USB network drivers

2017-01-25 Thread Alexander Duyck
On Wed, Jan 25, 2017 at 5:33 AM, Oliver Hartkopp wrote: > On 01/25/2017 10:39 AM, Hayes Wang wrote: >> >> Oliver Neukum [mailto:oneu...@suse.com] >>> >>> Sent: Wednesday, January 25, 2017 5:35 PM >> >> [...] >>> >>> looking at r8152 I noticed that it uses NAPI. I never considered >>> this for the

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-25 Thread Jacek Anaszewski
On 01/25/2017 10:18 AM, Rafał Miłecki wrote: > On 01/23/2017 09:51 PM, Jacek Anaszewski wrote: >> On 01/23/2017 05:45 PM, Rob Herring wrote: >>> On Fri, Jan 20, 2017 at 11:35:20PM +0100, Jacek Anaszewski wrote: Hi Rafał, On 01/20/2017 10:56 PM, Rafał Miłecki wrote: > From: Rafał

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-25 Thread Jacek Anaszewski
On 01/25/2017 10:08 AM, Rafał Miłecki wrote: > On 01/23/2017 05:45 PM, Rob Herring wrote: >> On Fri, Jan 20, 2017 at 11:35:20PM +0100, Jacek Anaszewski wrote: >>> Hi Rafał, >>> >>> On 01/20/2017 10:56 PM, Rafał Miłecki wrote: From: Rafał Miłecki Some LEDs can be related to particu

Re: [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property

2017-01-25 Thread Jacek Anaszewski
On 01/25/2017 10:03 AM, Rafał Miłecki wrote: > On 21 January 2017 at 22:42, Jacek Anaszewski > wrote: >> On 01/21/2017 05:24 PM, Rafał Miłecki wrote: >>> On 20 January 2017 at 23:35, Jacek Anaszewski >>> wrote: On 01/20/2017 10:56 PM, Rafał Miłecki wrote: > From: Rafał Miłecki > >>>

[PATCH] usb: gadget: udc: fsl: Add missing complete function.

2017-01-25 Thread Magnus Lilja
Commit 304f7e5e1d08 ("usb: gadget: Refactor request completion") removed check if req->req.complete is non-NULL, resulting in a NULL pointer derefence and a kernel panic. This patch adds an empty complete function instead of re-introducing the req->req.complete check. Fixes: 304f7e5e1d08 ("usb: ga

Re: [PATCH 1/2] USB: serial: ftdi_sio: clean up ioctl handler

2017-01-25 Thread Greg KH
On Wed, Jan 25, 2017 at 06:22:53PM +0100, Johan Hovold wrote: > Clean up the ioctl handler and make sure to pass an unsigned-int rather > than serial_struct pointer to the TIOCSERGETLSR helper as this it what > the user argument really is. > > Signed-off-by: Johan Hovold > --- > drivers/usb/seri

Re: [PATCH 2/2] USB: serial: drop unused ASYNC flags

2017-01-25 Thread Greg KH
On Wed, Jan 25, 2017 at 06:22:54PM +0100, Johan Hovold wrote: > Do not report ASYNC_SKIP_TEST or ASYNC_AUTO_IRQ as being set in > TIOCGSERIAL handlers as these flags are not supported and do not really > make any sense for USB serial devices in the first place. > > Signed-off-by: Johan Hovold > -

Re: [PATCH] usb: dwc2: fix "iomem 0x00000000" message by setting iomem parameters in usb_hcd

2017-01-25 Thread John Youn
On 1/25/2017 12:37 PM, Heiner Kallweit wrote: > Am 24.01.2017 um 09:46 schrieb Felipe Balbi: >> >> Hi, >> >> John Youn writes: John Youn writes: > @@ -1229,7 +1229,8 @@ static inline void dwc2_hcd_connect(struct > dwc2_hsotg *hsotg) {} > static inline void dwc2_hcd_

Re: [PATCH] usb: musb: constify musb_hdrc_config structures

2017-01-25 Thread Greg KH
On Wed, Jan 25, 2017 at 10:58:15AM -0600, Bin Liu wrote: > On Wed, Jan 25, 2017 at 12:52:22AM +0530, Bhumika Goyal wrote: > > Declare musb_hdrc_config structures as const as they are only stored in > > the config field of a musb_hdrc_platform_data structure. This field is of > > type const, so musb

Re: [PATCH] usb: dwc2: fix "iomem 0x00000000" message by setting iomem parameters in usb_hcd

2017-01-25 Thread John Youn
On 1/15/2017 12:37 PM, Heiner Kallweit wrote: > Set the iomem parameters in the usb_hcd to fix this misleading > message during driver load: > dwc2 c910.usb: irq 22, io mem 0x > > Signed-off-by: Heiner Kallweit > --- > drivers/usb/dwc2/core.h | 3 ++- > drivers/usb/dwc2/hcd.c

Re: [PATCH] usb: dwc2: fix "iomem 0x00000000" message by setting iomem parameters in usb_hcd

2017-01-25 Thread Heiner Kallweit
Am 25.01.2017 um 22:28 schrieb John Youn: > On 1/15/2017 12:37 PM, Heiner Kallweit wrote: >> Set the iomem parameters in the usb_hcd to fix this misleading >> message during driver load: >> dwc2 c910.usb: irq 22, io mem 0x >> >> Signed-off-by: Heiner Kallweit >> --- >> drivers/usb/dwc

[PATCH v2] usb: dwc2: fix "iomem 0x00000000" message

2017-01-25 Thread Heiner Kallweit
Set the iomem parameters in the usb_hcd to fix this misleading message during driver load: dwc2 c910.usb: irq 22, io mem 0x Signed-off-by: Heiner Kallweit --- v2: - get info from hsotg->dev instead of adding a function parameter --- drivers/usb/dwc2/hcd.c | 7 +++ 1 file changed,

[PATCH] usb: dwc2: eliminate irq parameter from dwc2_hcd_init

2017-01-25 Thread Heiner Kallweit
The irq is available in hsotg already, so there's no need to pass it as separate function parameter. Signed-off-by: Heiner Kallweit --- drivers/usb/dwc2/core.h | 2 +- drivers/usb/dwc2/hcd.c | 4 ++-- drivers/usb/dwc2/hcd.h | 2 +- drivers/usb/dwc2/platform.c | 2 +- 4 files change

[PATCH] usb: phy: ab8500: remove unused ab8500_eyediagram_workaroud()

2017-01-25 Thread Arnd Bergmann
The only caller of this function is gone, so now we get a warning: drivers/usb/phy/phy-ab8500-usb.c:1026:17: error: 'ab8500_eyediagram_workaroud' defined but not used [-Werror=unused-function] It is possible that we should in fact still call the function from somewhere else, but I don't see from

[PATCH v8 1/3] usb: chipidea: Configure phy for appropriate mode

2017-01-25 Thread Stephen Boyd
When the qcom chipidea controller is used with an extcon, we need to signal device mode or host mode to the phy so it can configure itself for the correct mode. This should be done after the phy is powered up, so that the register writes work correctly. Add in the appropriate phy_set_mode() call he

[PATCH v8 2/3] phy: Add support for Qualcomm's USB HSIC phy

2017-01-25 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 Acked-by: Rob Herring Cc: Signed-off-by: Stephen Boyd --- .../devicetree/bindings/phy/qcom,usb-hsic-phy.txt | 65 + drivers/phy/Kconfig

[PATCH v8 0/3] Support qcom's HSIC USB and rewrite USB2 HS support

2017-01-25 Thread Stephen Boyd
This patch series continues the usb chipidea rewrite for Qualcommm platforms. I've dropped the patches that were applied to Peter's tree for chipidea. Now the phy drivers are left, along with the patch to call phy_set_mode() at the right place. I've left the HSIC phy driver here, because it wasn'

[PATCH v8 3/3] phy: Add support for Qualcomm's USB HS phy

2017-01-25 Thread Stephen Boyd
The high-speed phy on qcom SoCs is controlled via the ULPI viewport. Cc: Kishon Vijay Abraham I Cc: Acked-by: Rob Herring Signed-off-by: Stephen Boyd --- .../devicetree/bindings/phy/qcom,usb-hs-phy.txt| 84 ++ drivers/phy/Kconfig| 8 + drivers/phy/Ma

Re: [PATCH] usb: dwc2: eliminate irq parameter from dwc2_hcd_init

2017-01-25 Thread John Youn
On 1/25/2017 2:14 PM, Heiner Kallweit wrote: > The irq is available in hsotg already, so there's no need to > pass it as separate function parameter. > > Signed-off-by: Heiner Kallweit > --- > drivers/usb/dwc2/core.h | 2 +- > drivers/usb/dwc2/hcd.c | 4 ++-- > drivers/usb/dwc2/hcd.h

Re: [PATCH v2] usb: dwc2: fix "iomem 0x00000000" message

2017-01-25 Thread John Youn
On 1/25/2017 2:14 PM, Heiner Kallweit wrote: > Set the iomem parameters in the usb_hcd to fix this misleading > message during driver load: > dwc2 c910.usb: irq 22, io mem 0x > > Signed-off-by: Heiner Kallweit > --- > v2: > - get info from hsotg->dev instead of adding a function parame

Re: [PATCH v2] usb: dwc3: handle DWC_USB3_NUM == DWC_USB3_NUM_IN_EPS

2017-01-25 Thread John Youn
On 1/24/2017 3:14 PM, Bryan O'Donoghue wrote: > > > On 24/01/17 19:25, John Youn wrote: >> On 1/24/2017 3:05 AM, Bryan O'Donoghue wrote: >>> On 23/01/17 22:34, John Youn wrote: On 1/23/2017 2:10 PM, Alan Stern wrote: > On Mon, 23 Jan 2017, John Youn wrote: > >> On 1/22/2017 5:29 PM

  1   2   >