Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-03-29 Thread Peter Chen
On Wed, Mar 29, 2017 at 08:50:23AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > > According to xHCI ch4.20 Scratchpad Buffers > > A Scratchpad Buffer is a PAGESIZE block of system memory > > located on a PAGESIZE boundary > > ... > > Software clears the Scr

RE: [PATCH 1/4] usb: gadget: udc: renesas_usb3: add sysfs "role" to set "b-device" mode

2017-03-29 Thread Yoshihiro Shimoda
Hi, > -Original Message- > From: Felipe Balbi, Sent: Wednesday, March 29, 2017 2:52 PM > > Hi, > > Yoshihiro Shimoda writes: > > Hi Felipe-san, > > > >> From: Felipe Balbi, Sent: Tuesday, March 28, 2017 9:06 PM > >> > >> Hi, > >> > >> Yoshihiro Shimoda writes: > >> > Sadly, to change t

[PATCH v2 1/1] usb: chipidea: core: add sysfs group

2017-03-29 Thread Peter Chen
Sometimes, the user needs to adjust some properties for controllers, eg the role for controller, we add sysfs group for them. The attribute 'role' is used to switch host/gadget role dynamically, the uewr can read the current role, and write the other role compare to current one to finish the switc

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-03-29 Thread Felipe Balbi
Hi, Peter Chen writes: >> > According to xHCI ch4.20 Scratchpad Buffers >> >A Scratchpad Buffer is a PAGESIZE block of system memory >> >located on a PAGESIZE boundary >> >... >> >Software clears the Scratchpad Buffer to ‘0’ >> > >> > So, we need to use dma pool for PAGES

RE: [PATCH 1/4] usb: gadget: udc: renesas_usb3: add sysfs "role" to set "b-device" mode

2017-03-29 Thread Felipe Balbi
Yoshihiro-san Yoshihiro Shimoda writes: >> >> Yoshihiro Shimoda writes: >> >> > Sadly, to change the role ("host" and "peripheral") of USB3.0 DRD >> >> > controller on R-Car Gen3, software has to set the DRD_CON register >> >> > which is included in a usb3.0 peripheral controler's register. >>

RE: [PATCH 1/4] usb: gadget: udc: renesas_usb3: add sysfs "role" to set "b-device" mode

2017-03-29 Thread Yoshihiro Shimoda
Hi Felipe-san, > From: Felipe Balbi, Sent: Wednesday, March 29, 2017 5:03 PM > > Yoshihiro-san > > Yoshihiro Shimoda writes: > >> >> Yoshihiro Shimoda writes: > >> >> > Sadly, to change the role ("host" and "peripheral") of USB3.0 DRD > >> >> > controller on R-Car Gen3, software has to set the

Re: [PATCH linux-next v2 0/4] usb: gadget: udc: atmel: Endpoint allocation scheme fixes

2017-03-29 Thread Nicolas Ferre
Le 28/03/2017 à 18:07, cristian.bir...@microchip.com a écrit : > From: Cristian Birsan > > This patch series provides fixes, based on the feedback received on the > mailing list, for > the following: > - fifo table parameters validation against device tree values > - coding style >

Re: [PATCH v2 0/4] usb: dwc3: dual-role support

2017-03-29 Thread Roger Quadros
Hi, On 28/03/17 13:27, Felipe Balbi wrote: > Roger Quadros writes: > >> Hi, >> >> We rely on the OTG controller block or Extcon to provide us with >> VBUS and ID line status via an interrupt. >> >> This is then used to switch the controller between host, peripheral >> and idle roles based on the

Re: BUG Report: USB Storage is not working when connecting on a Thunderbolt 3.0 port

2017-03-29 Thread Olivier Langlois
Hi, On Tue, 2017-03-28 at 10:30 +0300, Mathias Nyman wrote: > Hi > > On 28.03.2017 05:35, Olivier Langlois wrote: > > Hardware: > > HP Spectre 13 > > http://h10032.www1.hp.com/ctg/Manual/c05228576.pdf > > > > Kernel version: > > 4.10.6 SMP PREEMPT x86_64 > > Is this a new issue? was it working

Re: [PATCH] USB: serial: drop termios-flag debugging

2017-03-29 Thread Greg KH
On Tue, Mar 28, 2017 at 12:13:50PM +0200, Johan Hovold wrote: > Drop some unnecessary termios-flag debugging that have been faithfully > reproduced in a few old drivers, including the "clfag" typo and all. > > This also addresses a compiler warning on sparc where tcflag_t is > unsigned long and wo

Re: [PATCH RFC] dwc2: Don't assume URB transfer_buffer are dword-aligned

2017-03-29 Thread Greg Kroah-Hartman
On Tue, Mar 28, 2017 at 06:48:02AM -0300, Mauro Carvalho Chehab wrote: > Em Fri, 17 Mar 2017 10:24:15 +0900 > Greg Kroah-Hartman escreveu: > > > On Thu, Mar 16, 2017 at 09:08:40PM -0300, Mauro Carvalho Chehab wrote: > > > The dwc2 hardware doesn't like to do DMA transfers without > > > aligning d

Re: [PATCH v4] USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously

2017-03-29 Thread Greg KH
On Tue, Mar 28, 2017 at 08:09:32AM -0400, Ajay Kaher wrote: > Greg, sending patch again using git send-email, please apply. > Let me know if still any issue. Note, please put comments like this below the --- line so I don't have to manually edit the file by hand. I've now queued this up, thanks.

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-29 Thread Roger Quadros
On 28/03/17 14:10, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> dra7 OTG core limits the host controller to USB2.0 (high-speed) mode >> when we're operating in dual-role. > > yeah, that's not a quirk. DRA7 supports OTGv2, not OTGv3. There was no > USB3 when OTGv2 was written. > > D

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-29 Thread Felipe Balbi
Hi, Roger Quadros writes: >> Roger Quadros writes: >>> dra7 OTG core limits the host controller to USB2.0 (high-speed) mode >>> when we're operating in dual-role. >> >> yeah, that's not a quirk. DRA7 supports OTGv2, not OTGv3. There was no >> USB3 when OTGv2 was written. >> >> DRA7 just shoul

Re: [PATCH 0/4] ARM: exynos: Fix Odroid U3 USB/LAN when TFTP booting (power sequence)

2017-03-29 Thread Hans Verkuil
Hi Krzysztof, On 07/01/17 09:51, Krzysztof Kozlowski wrote: > Hi, > > Thanks to Markus Reichl, I got an Odroid U3 to work with. Thanks to Peter > Chen, we got a power sequence generic library which solves my long > standing Odroid U3 problem - no LAN9730 if it was enabled by bootloader. > > My p

Re: [PATCH v2 3/4] usb: dwc3: add dual-role support

2017-03-29 Thread Roger Quadros
Hi, On 28/03/17 14:07, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> If dr_mode is "otg" then support dual role mode of operation. >> >> Get ID and VBUS information from the OTG controller >> and put the controller in the appropriate state. >> >> This is our dual-role state table. >>

[PATCH v2 0/3] usb: gadget: udc: renesas_usb3: add USB3.0 DRD support

2017-03-29 Thread Yoshihiro Shimoda
This patch set is based on the latest Felipe's usb.bit / testing/next branch (commit id = 29986993f67341493988b6c5d68e0653061975b2). The USB3.0 DRD controller on R-Car Gen3 can change the role via DRD_CON register in the periperal side sadly, so this patch adds support for usb role swap feature in

[PATCH v2 2/3] usb: gadget: udc: renesas_usb3: add extcon support

2017-03-29 Thread Yoshihiro Shimoda
This patch adds extcon support to see VBUS/ID signal states. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/gadget/udc/Kconfig| 1 + drivers/usb/gadget/udc/renesas_usb3.c | 43 +-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH v2 1/3] usb: gadget: udc: add USB ID signal monitoring

2017-03-29 Thread Yoshihiro Shimoda
This usb 3.0 peripheral controller has a register (USB_OTG_STA) to monitor the USB ID signal. So, this patch adds the ID signal monitoring to change the mode to host (A-Device) or peripheral (B-Device). Signed-off-by: Yoshihiro Shimoda --- drivers/usb/gadget/udc/renesas_usb3.c | 53 +

[PATCH v2 3/3] usb: gadget: udc: renesas_usb3: add support for usb role swap

2017-03-29 Thread Yoshihiro Shimoda
This patch adds support for usb role swap via sysfs "role". For example: 1) Connect a usb cable using 2 Salvator-X boards. - For A-Device, the cable is connected to CN11 (USB3.0 ch0). - For B-Device, the cable is connected to CN9 (USB2.0 ch0). 2) On A-Device, you input the following command:

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-29 Thread Roger Quadros
On 29/03/17 13:32, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> Roger Quadros writes: dra7 OTG core limits the host controller to USB2.0 (high-speed) mode when we're operating in dual-role. >>> >>> yeah, that's not a quirk. DRA7 supports OTGv2, not OTGv3. There was no >>>

Re: [PATCH v2 3/3] usb: gadget: udc: renesas_usb3: add support for usb role swap

2017-03-29 Thread Geert Uytterhoeven
Hi Shimoda-san, On Wed, Mar 29, 2017 at 1:42 PM, Yoshihiro Shimoda wrote: > --- a/drivers/usb/gadget/udc/renesas_usb3.c > +++ b/drivers/usb/gadget/udc/renesas_usb3.c > @@ -568,12 +573,29 @@ static void usb3_mode_a_host(struct renesas_usb3 *usb3) > usb3_set_bit(usb3, DRD_CON_VBOUT, USB3_DR

[PATCH v2] usb: musb: fix possible spinlock deadlock

2017-03-29 Thread Bin Liu
commit bc1e2154542071e3cfe1734b143af9b8bdacf8bd upstream. The DSPS glue calls del_timer_sync() in its musb_platform_disable() implementation, which requires the caller to not hold a lock. But musb_remove() calls musb_platform_disable() will musb->lock held. This could causes spinlock deadlock. So

Re: [PATCH v2 3/4] usb: dwc3: add dual-role support

2017-03-29 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> @@ -839,6 +841,505 @@ static int dwc3_core_get_phy(struct dwc3 *dwc) >>> return 0; >>> } >>> >>> +static int dwc3_drd_start_host(struct dwc3 *dwc, int on, bool skip); >>> +static int dwc3_drd_start_gadget(struct dwc3 *dwc, int on); >>> + >>> +/* dwc->lock mus

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-29 Thread Felipe Balbi
Hi, Roger Quadros writes: >> Roger Quadros writes: Roger Quadros writes: > dra7 OTG core limits the host controller to USB2.0 (high-speed) mode > when we're operating in dual-role. yeah, that's not a quirk. DRA7 supports OTGv2, not OTGv3. There was no USB3 when OTGv

Re: USB device disconnect after suspend/resume

2017-03-29 Thread Mathias Nyman
On 28.03.2017 16:25, Stephan Müller wrote: Am Dienstag, 28. März 2017, 03:12:44 CEST schrieb Peter Chen: What kernel version was this on again? Has it been working before? does reloading xhci driver work? The device is question is at port 2-3. usb core dyndbg: [ 72.546341] Restarting

Re: [PATCH v2 4/4] usb: dwc3: Workaround for super-speed host on dra7 in dual-role mode

2017-03-29 Thread Roger Quadros
On 29/03/17 16:21, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> Roger Quadros writes: > Roger Quadros writes: >> dra7 OTG core limits the host controller to USB2.0 (high-speed) mode >> when we're operating in dual-role. > > yeah, that's not a quirk. DRA7 supp

Re: [PATCH] USB: serial: drop termios-flag debugging

2017-03-29 Thread Johan Hovold
On Wed, Mar 29, 2017 at 11:56:24AM +0200, Greg Kroah-Hartman wrote: > On Tue, Mar 28, 2017 at 12:13:50PM +0200, Johan Hovold wrote: > > Drop some unnecessary termios-flag debugging that have been faithfully > > reproduced in a few old drivers, including the "clfag" typo and all. > > > > This also

Re: USB device disconnect after suspend/resume

2017-03-29 Thread Stephan Müller
Am Mittwoch, 29. März 2017, 15:52:13 CEST schrieb Mathias Nyman: Hi Mathias, > On 28.03.2017 16:25, Stephan Müller wrote: > > Am Dienstag, 28. März 2017, 03:12:44 CEST schrieb Peter Chen: > What kernel version was this on again? > Has it been working before? It is 4.10 vanilla. It never worked.

[PATCH] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine

2017-03-29 Thread Alexandre Bailon
The CPPI 4.1 DMA is sharing its clock with the USB OTG, and most of the time, the clock will be enabled by USB. But during the init of the DMA, USB is not enabled (waiting for DMA), and then we must enable the clock before to do anything. Add the clock for the CPPI 4.1 DMA engine. Note: This patch

Re: [PATCH] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine

2017-03-29 Thread Sergei Shtylyov
Hello! On 03/29/2017 07:09 PM, Alexandre Bailon wrote: The CPPI 4.1 DMA is sharing its clock with the USB OTG, and most of the time, the clock will be enabled by USB. But during the init of the DMA, USB is not enabled (waiting for DMA), and then we must enable the clock before to do anything.

[PATCH v7 0/3] usb: musb: da8xx: Add DMA support

2017-03-29 Thread Alexandre Bailon
This series update MUSB driver to add DMA support to DA8xx. It should be applied on top of: "[PATCH v4 0/3] dmaengine: cppi41: Add dma support to da8xx" and "[PATCH] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine" Changes in v7: - Remove the patch that was adding runtime PM. It was brea

Re: [PATCH] ARM: davinci: Add the clock for the CPPI 4.1 DMA engine

2017-03-29 Thread Alexandre Bailon
Hello Serge, On 03/29/2017 06:16 PM, Sergei Shtylyov wrote: Hello! On 03/29/2017 07:09 PM, Alexandre Bailon wrote: The CPPI 4.1 DMA is sharing its clock with the USB OTG, and most of the time, the clock will be enabled by USB. But during the init of the DMA, USB is not enabled (waiting for D

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

2017-03-29 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 | 43 +++

[PATCH v7 1/3] usb: musb: Use shared irq

2017-03-29 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 v7 3/3] usb: musb: musb_cppi41: Workaround DMA stall issue during teardown

2017-03-29 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

Re: [PATCH v7 2/3] usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx

2017-03-29 Thread Bin Liu
On Wed, Mar 29, 2017 at 06:24:31PM +0200, Alexandre Bailon wrote: > 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. As in DA8xx the CPPI 4.1 DMA is a part of

Re: [PATCH RFC] dwc2: Don't assume URB transfer_buffer are dword-aligned

2017-03-29 Thread Mauro Carvalho Chehab
Em Wed, 29 Mar 2017 11:57:22 +0200 Greg Kroah-Hartman escreveu: > On Tue, Mar 28, 2017 at 06:48:02AM -0300, Mauro Carvalho Chehab wrote: > > Em Fri, 17 Mar 2017 10:24:15 +0900 > > Greg Kroah-Hartman escreveu: > > > > > On Thu, Mar 16, 2017 at 09:08:40PM -0300, Mauro Carvalho Chehab wrote: >

[PATCH 14/22] usb/persist.txt: convert to ReST and add to driver-api book

2017-03-29 Thread Mauro Carvalho Chehab
This document describe some USB core features. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab --- Documentation/driver-api/usb/index.rst | 1 + .../persist.txt => driver-api/usb/persist.rst} | 22 +- 2 files changed, 14 insertions(+), 9 d

[PATCH 07/22] usb/anchors.txt: convert to ReST and add to driver-api book

2017-03-29 Thread Mauro Carvalho Chehab
This document describe some USB core functions. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab --- .../anchors.txt => driver-api/usb/anchors.rst} | 36 -- Documentation/driver-api/usb/index.rst | 1 + 2 files changed, 21 insertions(+), 16

[PATCH 01/22] driver-api/basics.rst: add device table header

2017-03-29 Thread Mauro Carvalho Chehab
The structs there at device table are used by other documentation at the Kernel. So, add it to the driver API. Signed-off-by: Mauro Carvalho Chehab --- Documentation/driver-api/basics.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/driver-api/basics.rst b/Documentati

[PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-29 Thread Mauro Carvalho Chehab
Several host controllers, commonly found on ARM, like dwc2, require buffers that are CPU-word aligned for they to work. Failing to do that will cause random troubles at the caller drivers, causing them to fail. Document it. Signed-off-by: Mauro Carvalho Chehab --- Documentation/driver-api/usb/

[PATCH 20/22] usb: gadget.h: be consistent at kernel doc macros

2017-03-29 Thread Mauro Carvalho Chehab
There's one value that use spaces instead of tabs to ident. That causes the following warning: ./include/linux/usb/gadget.h:193: ERROR: Unexpected indentation. Signed-off-by: Mauro Carvalho Chehab --- include/linux/usb/gadget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 12/22] error-codes.rst: convert to ReST and add to driver-api book

2017-03-29 Thread Mauro Carvalho Chehab
This document describe some USB core features. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab --- Documentation/driver-api/usb/error-codes.rst | 205 +++ Documentation/driver-api/usb/index.rst | 1 + Documentation/usb/error-codes.txt

[PATCH 06/22] writing_musb_glue_layer.rst: Enrich its ReST representation

2017-03-29 Thread Mauro Carvalho Chehab
This file is actually quite complex, and required several manual handwork: - add a title for the document; - use the right tags for monospaced fonts; - use c references where needed; - adjust cross-reference to writing_usb_driver.rst - hightlight cross-referenced lines. With regards to C code sni

[PATCH 03/22] usb.rst: Enrich its ReST representation

2017-03-29 Thread Mauro Carvalho Chehab
- use the proper warning and note markups; - add references for parts of the document that will be cross-referenced on other USB docs; - some minor adjustments to make it better to read in text mode and in html. Signed-off-by: Mauro Carvalho Chehab --- Documentation/driver-api/usb/usb.rst |

[PATCH 04/22] gadget.rst: Enrich its ReST representation and add kernel-doc tag

2017-03-29 Thread Mauro Carvalho Chehab
The pandoc conversion is not perfect. Do handwork in order to: - add a title to this chapter; - use the proper warning and note markups; - use kernel-doc to include Kernel header and c files; - remove legacy notes with regards to DocBook; - some other minor adjustments to make it better to read in

[PATCH 18/22] usb: get rid of some ReST doc build errors

2017-03-29 Thread Mauro Carvalho Chehab
We need an space before a numbered list to avoid those warnings: ./drivers/usb/core/message.c:478: ERROR: Unexpected indentation. ./drivers/usb/core/message.c:479: WARNING: Block quote ends without a blank line; unexpected unindent. ./include/linux/usb/composite.h:455: ERROR: Unexpected indentati

[PATCH 15/22] usb/URB.txt: convert to ReST and update it

2017-03-29 Thread Mauro Carvalho Chehab
The URB doc describes the Kernel mechanism that do USB transfers. While the functions are already described at urb.h, there are a number of concepts and theory that are important for USB driver developers. Convert it to ReST and use C ref links to point to the places at usb.h where each function a

[PATCH 19/22] usb: composite.h: fix two warnings when building docs

2017-03-29 Thread Mauro Carvalho Chehab
By definition, we use /* private: */ tag when we won't be documenting a parameter. However, those two parameters are documented: ./include/linux/usb/composite.h:510: warning: Excess struct/union/enum/typedef member 'setup_pending' description in 'usb_composite_dev' ./include/linux/usb/composite.h

[PATCH 11/22] usb/dma.txt: convert to ReST and add to driver-api book

2017-03-29 Thread Mauro Carvalho Chehab
This document describe some USB core features. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab --- .../{usb/dma.txt => driver-api/usb/dma.rst}| 51 -- Documentation/driver-api/usb/index.rst | 1 + 2 files changed, 28 insertions(+), 24

[PATCH 05/22] writing_usb_driver.rst: Enrich its ReST representation

2017-03-29 Thread Mauro Carvalho Chehab
The pandoc conversion is not perfect. Do handwork in order to: - add a title to this chapter; - adjust function and struct references; - use monospaced fonts for C code names; - some other minor adjustments to make it better to read in text mode and in html. Signed-off-by: Mauro Carvalho Chehab

[PATCH 17/22] usb.rst: get rid of some Sphinx errors

2017-03-29 Thread Mauro Carvalho Chehab
Get rid of those warnings: Documentation/driver-api/usb/usb.rst:615: ERROR: Unknown target name: "usb_type". Documentation/driver-api/usb/usb.rst:615: ERROR: Unknown target name: "usb_dir". Documentation/driver-api/usb/usb.rst:615: ERROR: Unknown target name: "usb_recip". Docume

[PATCH 16/22] usb/gadget.rst: remove unused kernel-doc tags

2017-03-29 Thread Mauro Carvalho Chehab
The DocBook file used to have "!E" include tags for usb gadget functions. However, there's nothing there to be documented: ./drivers/usb/gadget/function/f_acm.c:1: warning: no structured comments found ./drivers/usb/gadget/function/f_ecm.c:1: warning: no structured comments found

[PATCH 10/22] usb/power-management.txt: convert to ReST and add to driver-api book

2017-03-29 Thread Mauro Carvalho Chehab
This document describe some USB core functions. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab --- Documentation/driver-api/usb/index.rst | 1 + .../usb/power-management.rst} | 403 +++-- 2 files changed, 214 insertions(+),

[PATCH 13/22] usb/hotplug.txt: convert to ReST and add to driver-api book

2017-03-29 Thread Mauro Carvalho Chehab
This document describe some USB core features. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab --- .../hotplug.txt => driver-api/usb/hotplug.rst} | 66 -- Documentation/driver-api/usb/index.rst | 1 + 2 files changed, 37 insertions(+), 30

[PATCH 08/22] usb/bulk-streams.txt: convert to ReST and add to driver-api book

2017-03-29 Thread Mauro Carvalho Chehab
This document describe some USB core functions. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab --- .../bulk-streams.txt => driver-api/usb/bulk-streams.rst}| 13 + Documentation/driver-api/usb/index.rst | 1 + 2 files changed, 10 insertio

[PATCH 21/22] docs-rst: fix usb cross-references

2017-03-29 Thread Mauro Carvalho Chehab
As some USB documentation files got moved, adjust their cross-references to their new place. Signed-off-by: Mauro Carvalho Chehab --- Documentation/ABI/stable/sysfs-bus-usb| 2 +- Documentation/driver-api/usb/URB.rst | 2 ++ Documentation/driver-api/usb/callbacks.rst

[PATCH 09/22] usb/callbacks.txt: convert to ReST and add to driver-api book

2017-03-29 Thread Mauro Carvalho Chehab
This document describe some USB core functions. Add it to the driver-api book. Signed-off-by: Mauro Carvalho Chehab --- .../callbacks.txt => driver-api/usb/callbacks.rst} | 61 +++--- Documentation/driver-api/usb/index.rst | 1 + 2 files changed, 43 insertions(+), 19

hiddev device location

2017-03-29 Thread Sanford Rockowitz
According to file https://www.kernel.org/doc/Documentation/hid/hiddev.txt, hiddev devices are always named /dev/usb/hiddevN (where n = 0..15). However, searching the web I see statements that the hiddev device files might be located in any of several distribution dependent directories, and code th

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-29 Thread Laurent Pinchart
Hi Mauro, Thank you for the patch. On Wednesday 29 Mar 2017 15:54:21 Mauro Carvalho Chehab wrote: > Several host controllers, commonly found on ARM, like dwc2, > require buffers that are CPU-word aligned for they to work. > > Failing to do that will cause random troubles at the caller > drivers,

Re: [PATCH 2/3] usb: add DT bindings for farady fotg2 host controller

2017-03-29 Thread Linus Walleij
On Tue, Feb 21, 2017 at 3:43 PM, Rob Herring wrote: > On Fri, Feb 17, 2017 at 4:07 AM, Hans Ulli Kroll > wrote: >> Hi Rob, >> >> On Wed, 15 Feb 2017, Rob Herring wrote: >> >>> On Wed, Feb 08, 2017 at 09:00:09PM +0100, Hans Ulli Kroll wrote: >>> > This adds DT bindings for the Faraday FOTG2 host c

Re: [PATCH 22/22] usb: document that URB transfer_buffer should be aligned

2017-03-29 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 01:15:27 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > Thank you for the patch. > > On Wednesday 29 Mar 2017 15:54:21 Mauro Carvalho Chehab wrote: > > Several host controllers, commonly found on ARM, like dwc2, > > require buffers that are CPU-word aligned for they to wor

RE: [PATCH v2 3/3] usb: gadget: udc: renesas_usb3: add support for usb role swap

2017-03-29 Thread Yoshihiro Shimoda
Hi Geert-san, > From: Geert Uytterhoeven, Sent: Wednesday, March 29, 2017 9:23 PM > > Hi Shimoda-san, > > On Wed, Mar 29, 2017 at 1:42 PM, Yoshihiro Shimoda > wrote: > > --- a/drivers/usb/gadget/udc/renesas_usb3.c > > +++ b/drivers/usb/gadget/udc/renesas_usb3.c > > @@ -568,12 +573,29 @@ static

Re: [PATCH 2/2] usb: host: xhci: using dma pool for scratchpad buffer

2017-03-29 Thread Peter Chen
On Wed, Mar 29, 2017 at 11:06:53AM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> > According to xHCI ch4.20 Scratchpad Buffers > >> > A Scratchpad Buffer is a PAGESIZE block of system memory > >> > located on a PAGESIZE boundary > >> > ... > >> > Software clears the

Re: USB device disconnect after suspend/resume

2017-03-29 Thread Stephan Müller
Am Mittwoch, 29. März 2017, 04:17:33 CEST schrieb Peter Chen: Hi Peter, > Add Mathias > > Would you tries to apply below Mathias's patches [1] and [2]? > > [1] http://www.spinics.net/lists/linux-usb/msg155351.html > [2] http://www.spinics.net/lists/linux-usb/msg155353.html Applying these patch

[PATCH v3 1/3] usb: gadget: udc: add USB ID signal monitoring

2017-03-29 Thread Yoshihiro Shimoda
This usb 3.0 peripheral controller has a register (USB_OTG_STA) to monitor the USB ID signal. So, this patch adds the ID signal monitoring to change the mode to host (A-Host) or peripheral (B-Peripheral). This patch also removes hardcoded setting as B-Peripheral mode. Signed-off-by: Yoshihiro Shim

[PATCH v3 2/3] usb: gadget: udc: renesas_usb3: add extcon support

2017-03-29 Thread Yoshihiro Shimoda
This patch adds extcon support to see VBUS/ID signal states. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/gadget/udc/Kconfig| 1 + drivers/usb/gadget/udc/renesas_usb3.c | 43 +-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH v3 0/3] usb: gadget: udc: renesas_usb3: add USB3.0 DRD support

2017-03-29 Thread Yoshihiro Shimoda
This patch set is based on the latest Felipe's usb.bit / testing/next branch (commit id = 29986993f67341493988b6c5d68e0653061975b2). The USB3.0 DRD controller on R-Car Gen3 can change the role via DRD_CON register in the periperal side sadly, so this patch adds support for usb role swap feature in

[PATCH v3 3/3] usb: gadget: udc: renesas_usb3: add support for usb role swap

2017-03-29 Thread Yoshihiro Shimoda
This patch adds support for usb role swap via sysfs "role". For example: 1) Connect a usb cable using 2 Salvator-X boards. - For A-Device, the cable is connected to CN11 (USB3.0 ch0). - For B-Device, the cable is connected to CN9 (USB2.0 ch0). 2) On A-Device, you input the following command:

Re: USB device disconnect after suspend/resume

2017-03-29 Thread Stephan Müller
Am Mittwoch, 29. März 2017, 15:52:13 CEST schrieb Mathias Nyman: Hi Mathias, > you could try a kernel without that patch and see if it works: > > commit 37be66767e3cae4fd16e064d8bb7f9f72bf5c045 > usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices After hand-reverting this pat

Re: [PATCH v2 1/2] usb: phy: Introduce one extcon device into usb phy

2017-03-29 Thread Baolin Wang
Hi, On 28 March 2017 at 21:40, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Usually usb phy need register one extcon device to get the connection >> notifications. It will remove some duplicate code if the extcon device >> is registered using common code instead of each phy driver havi

Re: [PATCH v2 1/2] usb: phy: Introduce one extcon device into usb phy

2017-03-29 Thread Baolin Wang
Hi, On 29 March 2017 at 06:56, NeilBrown wrote: > On Thu, Mar 23 2017, Baolin Wang wrote: > >> Usually usb phy need register one extcon device to get the connection >> notifications. It will remove some duplicate code if the extcon device >> is registered using common code instead of each phy dri

Re: [PATCH v19 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2017-03-29 Thread Baolin Wang
Hi, On 29 March 2017 at 07:04, NeilBrown wrote: > On Tue, Mar 07 2017, Baolin Wang wrote: > >> On 3 March 2017 at 10:23, NeilBrown wrote: >> >>> >>> I understand your reluctance to change drivers that you cannot test. >>> An alternative it do change all the >>> atomic_notifier_call_chain(.*not

[PATCH v2] usb: dwc2: Make sure we disconnect the gadget state

2017-03-29 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 plugged 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 bei

Re: [PATCH v2 2/2] usb: phy: phy-qcom-8x16-usb: Remove redundant extcon register/unregister

2017-03-29 Thread Baolin Wang
Hi, On 28 March 2017 at 21:42, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Since usb phy core has added common code to register or unregister >> extcon device, then phy-qcom-8x16-usb driver does not need its own >> code to register/unregister extcon device, then remove them. >> >> Sig

[PATCH] usb: host: plat: Enable xHCI plat runtime PM

2017-03-29 Thread Baolin Wang
Enable the xHCI plat runtime PM for parent device to suspend/resume xHCI. Also call pm_runtime_forbid() in probe() function to force users to explicitly enable runtime pm using power/control in sysfs, in case some parent devices didn't implement runtime PM callbacks. Signed-off-by: Baolin Wang --

Re: [PATCH v2 3/4] usb: dwc3: add dual-role support

2017-03-29 Thread Roger Quadros
Hi, On 29/03/17 16:15, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: @@ -839,6 +841,505 @@ static int dwc3_core_get_phy(struct dwc3 *dwc) return 0; } +static int dwc3_drd_start_host(struct dwc3 *dwc, int on, bool skip); +static int dwc3_drd_start_gadg

[PATCH v3 1/2] usb: dwc3: use BIT() macro where possible

2017-03-29 Thread Roger Quadros
To avoid checkpatch warnings with new patches let's start using the BIT() macro wherever possible. Signed-off-by: Roger Quadros --- drivers/usb/dwc3/core.h | 193 ++- drivers/usb/dwc3/dwc3-omap.c | 48 +-- drivers/usb/dwc3/gadget.h| 20 +

[PATCH v3 2/2] usb: otg-fsm: Prevent build warning "VDBG" redefined

2017-03-29 Thread Roger Quadros
If usb/otg-fsm.h and usb/composite.h are included together then it results in the build warning [1]. Prevent that by defining VDBG locally. Also get rid of MPC_LOC which doesn't seem to be used by anyone. [1] - warning fixed by this patch: In file included from drivers/usb/dwc3/core.h:33, fr

[PATCH v3 0/2] usb: dwc3: trivial fixes.

2017-03-29 Thread Roger Quadros
Hi Felipe, Resending this series rebased on v4.11-rc4. Changelog: v3: -rebased on v4.11-rc4 v2: -include bitops.h header cheers, -roger Roger Quadros (2): usb: dwc3: use BIT() macro where possible usb: otg-fsm: Prevent build warning "VDBG" redefined drivers/usb/common/usb-otg-fsm.c | 7