[PATCH v4] usb: gadget: udc: renesas_usb3: add support for usb role swap

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

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

2017-03-30 Thread Yoshihiro Shimoda
Hi, > From: Felipe Balbi, Sent: Thursday, March 30, 2017 7:37 PM > > Hi, > > Yoshihiro Shimoda writes: > > This patch adds support for usb role swap via sysfs "role". > > > > For example: > > 1) Connect a usb cable using 2 Salvator-X boards. > > - For

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

2017-03-30 Thread kbuild test robot
Hi Mauro, [auto build test WARNING on linus/master] [also build test WARNING on v4.11-rc4 next-20170330] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/driver-api-basics

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

2017-03-30 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 11:55 -0400 schrieb Alan Stern: > > I'm pretty sure that usb-storage does not do this, at least, not when > operating in its normal Bulk-Only-Transport mode.  It never tries to > read the results of an earlier transfer after carrying out a later > transfer to any

[PATCH v3 2/4] cdc-acm: reassemble fragmented notifications

2017-03-30 Thread Tobias Herzog
USB devices may have very limited endpoint packet sizes, so that notifications can not be transferred within one single usb packet. Reassembling of multiple packages may be necessary. Signed-off-by: Tobias Herzog --- drivers/usb/class/cdc-acm.c | 112

[PATCH v3 3/4] cdc-acm: log message for serial state notification

2017-03-30 Thread Tobias Herzog
Adds a similar log message to USB_CDC_NOTIFY_SERIAL_STATE as it is already done with USB_CDC_NOTIFY_NETWORK_CONNECTION. Signed-off-by: Tobias Herzog --- drivers/usb/class/cdc-acm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/class/cdc-acm.c

[PATCH v3 0/4] cdc-acm: reassemble fragmented notifications

2017-03-30 Thread Tobias Herzog
USB devices may have very limitited endpoint packet sizes, so that notifications can not be transferred within one single usb packet. This patchset adds the ability to reassemble notifications that are transmitted fragmented. v3: * reordering patches (security issues first) * fixed possible

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

2017-03-30 Thread Laurent Pinchart
Hi Alan, On Thursday 30 Mar 2017 11:55:18 Alan Stern wrote: > On Thu, 30 Mar 2017, Mauro Carvalho Chehab wrote: > > Em Thu, 30 Mar 2017 10:26:32 -0400 (EDT) Alan Stern escreveu: > >> On Thu, 30 Mar 2017, Oliver Neukum wrote: > Btw, I'm a lot more concerned about USB storage drivers. When I

[PATCH v3 4/4] cdc-acm: remove unused element of struct acm

2017-03-30 Thread Tobias Herzog
write_used was introduced with commit 884b600f63dc ("[PATCH] USB: fix acm trouble with terminals") but never used since. Signed-off-by: Tobias Herzog --- drivers/usb/class/cdc-acm.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/class/cdc-acm.h

[PATCH v3 1/4] cdc-acm: fix possible invalid access when processing notification

2017-03-30 Thread Tobias Herzog
Notifications may only be 8 bytes long. Accessing the 9th and 10th byte of unimplemented/unknown notifications may be insecure. Also check the length of known notifications before accessing anything behind the 8th byte. Signed-off-by: Tobias Herzog ---

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

2017-03-30 Thread Hans Ulli Kroll
Hi Linus, On Thu, 30 Mar 2017, Linus Walleij wrote: > 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

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

2017-03-30 Thread Alan Stern
On Thu, 30 Mar 2017, Mauro Carvalho Chehab wrote: > Em Thu, 30 Mar 2017 10:26:32 -0400 (EDT) > Alan Stern escreveu: > > > On Thu, 30 Mar 2017, Oliver Neukum wrote: > > > > > > Btw, I'm a lot more concerned about USB storage drivers. When I was > > > > discussing

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

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 10:26:32 -0400 (EDT) Alan Stern escreveu: > On Thu, 30 Mar 2017, Oliver Neukum wrote: > > > > Btw, I'm a lot more concerned about USB storage drivers. When I was > > > discussing about this issue at the #raspberrypi-devel IRC channel, > > > someone

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

2017-03-30 Thread Alan Stern
On Thu, 30 Mar 2017, Oliver Neukum wrote: > > Btw, I'm a lot more concerned about USB storage drivers. When I was > > discussing about this issue at the #raspberrypi-devel IRC channel, > > someone complained that, after switching from the RPi downstream Kernel > > to upstream, his USB data

Re: usb-serial remembers termios settings between device replugs

2017-03-30 Thread Johan Hovold
On Tue, Jul 12, 2016 at 10:18:05AM +0200, Jan Kundrát wrote: > On Tuesday, 12 July 2016 01:50:59 CEST, Greg KH wrote: > > There is, as far as I can tell, no set of "default" termios values for > > any type of serial port, so the "last" set of them is as good as any, > > right? > > Each driver

[PATCH] USB: serial: drop obsolete open-race workaround

2017-03-30 Thread Johan Hovold
Commit a65a6f14dc24 ("USB: serial: fix race between probe and open") fixed a race between probe and open, which could lead to crashes when a not yet fully initialised port was being opened. This race was later incidentally closed by commit 7e73eca6a7b2 ("TTY: move cdev_add to

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

2017-03-30 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 07:28 -0300 schrieb Mauro Carvalho Chehab: > Em Thu, 30 Mar 2017 12:34:32 +0300 > Laurent Pinchart escreveu: > > > Hi, > > > That effectively changes the API. Many network drivers are written with > > > the assumption that any

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

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 15:05:30 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > On Thursday 30 Mar 2017 07:28:00 Mauro Carvalho Chehab wrote: > > Em Thu, 30 Mar 2017 12:34:32 +0300 Laurent Pinchart escreveu: > > > On Thursday 30 Mar 2017 10:11:31 Oliver Neukum

Re: [PATCH 02/22] docs-rst: convert usb docbooks to ReST

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 13:17:16 +0200 Markus Heiser escreveu: > Am 30.03.2017 um 12:12 schrieb Mauro Carvalho Chehab > : > >>> At this point I'd just go with what Mauro has. It's here now, as > >>> patches. We've seen from the GPU documentation

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

2017-03-30 Thread Laurent Pinchart
Hi Mauro, On Thursday 30 Mar 2017 07:28:00 Mauro Carvalho Chehab wrote: > Em Thu, 30 Mar 2017 12:34:32 +0300 Laurent Pinchart escreveu: > > On Thursday 30 Mar 2017 10:11:31 Oliver Neukum wrote: > >> Am Donnerstag, den 30.03.2017, 01:15 +0300 schrieb Laurent Pinchart: > + may also override

Re: [PATCHv2] phy: cpcap-usb: Add CPCAP PMIC USB support

2017-03-30 Thread Kishon Vijay Abraham I
Hi Tony, On Monday 27 March 2017 08:35 PM, Tony Lindgren wrote: > * Kishon Vijay Abraham I [170326 23:27]: >> On Thursday 23 March 2017 05:16 AM, Tony Lindgren wrote: >>> +static const struct phy_ops ops = { >>> + .owner = THIS_MODULE, >>> +}; >> >> Given that this phy

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-03-30 Thread Janusz Dziedzic
On 30 March 2017 at 11:23, Greg KH wrote: > On Thu, Mar 30, 2017 at 11:11:34AM +0200, Janusz Dziedzic wrote: >> On 30 March 2017 at 10:53, Greg KH wrote: >> > On Thu, Mar 30, 2017 at 10:29:41AM +0200, Christian Gromm wrote: >> >> >> >> >> >> On 03/27/2017 11:31

Re: [PATCH v2 01/22] tmplcvt: make the tool more robust

2017-03-30 Thread Jani Nikula
On Thu, 30 Mar 2017, Mauro Carvalho Chehab wrote: > Currently, the script just assumes to be called at > Documentation/sphinx/. Change it to work on any directory, > and make it abort if something gets wrong. > > Also, be sure that both parameters are specified. > > That

Re: [PATCH 02/22] docs-rst: convert usb docbooks to ReST

2017-03-30 Thread Markus Heiser
Am 30.03.2017 um 13:17 schrieb Markus Heiser : > > If it helps ... dbxml2rst also supports single file conversion ... I updated: > > > https://github.com/return42/sphkerneldoc/tree/master/Documentation/books_migrated > > There you find a folder for each DocBook

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

2017-03-30 Thread Olivier Langlois
> > Odd that it tries to enumerate as high-speed. > > Might be because xHC controller is being hotplug added at device > connect, > and xhci driver adds USB2 hcd first, and usb3 hcd second. > > What happens if you first connect a high-speed USB device to the > first > Thunderbolt type-C Gen2

Re: [PATCH 02/22] docs-rst: convert usb docbooks to ReST

2017-03-30 Thread Markus Heiser
Am 30.03.2017 um 12:12 schrieb Mauro Carvalho Chehab : >>> At this point I'd just go with what Mauro has. It's here now, as >>> patches. We've seen from the GPU documentation that polishing the >>> one-time initial conversion is, after a point, wasted effort. Having the

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

2017-03-30 Thread David Laight
From: Mauro Carvalho Chehab > Sent: 30 March 2017 11:28 ... > While debugging this issue, I saw *a lot* of network-generated URB > traffic from RPi3 Ethernet port drivers that were using non-aligned > buffers and were subject to the temporary buffer conversion. Buffers from the network stack will

Re: [PATCH v2 01/22] tmplcvt: make the tool more robust

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 07:45:35 -0300 Mauro Carvalho Chehab escreveu: > Currently, the script just assumes to be called at > Documentation/sphinx/. Change it to work on any directory, > and make it abort if something gets wrong. > > Also, be sure that both parameters are

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

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 12:38:42 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > On Wednesday 29 Mar 2017 22:06:33 Mauro Carvalho Chehab wrote: > > Em Thu, 30 Mar 2017 01:15:27 +0300 Laurent Pinchart escreveu: > > > On Wednesday 29 Mar 2017 15:54:21 Mauro

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

2017-03-30 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 +

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

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

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

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

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

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

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

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

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

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

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

2017-03-30 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} | 404 +++-- 2 files

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

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

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

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

[PATCH v2 01/22] tmplcvt: make the tool more robust

2017-03-30 Thread Mauro Carvalho Chehab
Currently, the script just assumes to be called at Documentation/sphinx/. Change it to work on any directory, and make it abort if something gets wrong. Also, be sure that both parameters are specified. That should avoid troubles like this: $ Documentation/sphinx/tmplcvt

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

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

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

2017-03-30 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(+),

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

2017-03-30 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 ++

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

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

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

2017-03-30 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'

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

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

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

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

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

2017-03-30 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".

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

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

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

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

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

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

Re: [PATCH] dwc2: gadget: Fix in control write transfers

2017-03-30 Thread Felipe Balbi
Hi, Minas Harutyunyan writes: > After data out stage gadget driver should not initate ZLP on control EP, > because it is up to function driver. not true always, depends on return value from ->setup(). Which problem did you have? Which gadget driver? How did you

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

2017-03-30 Thread Roger Quadros
On 30/03/17 13:25, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> To avoid checkpatch warnings with new patches let's >> start using the BIT() macro wherever possible. >> >> Signed-off-by: Roger Quadros > > this didn't apply cleanly, I have manually

Re: [PATCH linux-next v2 3/4] usb: gadget: udc: atmel: Use dev_warn() to display EP configuration error

2017-03-30 Thread Felipe Balbi
Hi, cristian.bir...@microchip.com writes: > From: Cristian Birsan > > Use dev_warn() to display EP configuration error to avoid silent failure. > > Signed-off-by: Cristian Birsan > --- > drivers/usb/gadget/udc/atmel_usba_udc.c | 6

Re: [PATCH linux-next v2 1/4] usb: gadget: udc: atmel: Check fifo configuration values against device tree

2017-03-30 Thread Felipe Balbi
Hi, cristian.bir...@microchip.com writes: > From: Cristian Birsan > > Check fifo configuration values against device tree values for endpoint fifo > in auto configuration mode (fifo_mode=0). > > Signed-off-by: Cristian Birsan > ---

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

2017-03-30 Thread Felipe Balbi
Hi, Yoshihiro Shimoda writes: > 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

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

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 12:34:32 +0300 Laurent Pinchart escreveu: > Hi Oliver, > > On Thursday 30 Mar 2017 10:11:31 Oliver Neukum wrote: > > Am Donnerstag, den 30.03.2017, 01:15 +0300 schrieb Laurent Pinchart: > > > > + may also override PAD bytes at the end

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

2017-03-30 Thread Felipe Balbi
Hi, Roger Quadros writes: > To avoid checkpatch warnings with new patches let's > start using the BIT() macro wherever possible. > > Signed-off-by: Roger Quadros this didn't apply cleanly, I have manually applied it since it was so simple. Please make sure

Re: [PATCH 02/22] docs-rst: convert usb docbooks to ReST

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 11:20:14 +0200 Markus Heiser escreveu: > Am 30.03.2017 um 10:21 schrieb Jani Nikula : > > > On Thu, 30 Mar 2017, Markus Heiser wrote: > >> Hi Mauro, > >> > >> Am 29.03.2017 um 20:54 schrieb

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

2017-03-30 Thread Roger Quadros
On 30/03/17 12:32, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: 3) All this becomes even more complex for configfs based gadget driver. So using stop/start gadget is a much simpler solution really as UDC software side of things remain unchanged

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

2017-03-30 Thread Laurent Pinchart
Hi Mauro, On Wednesday 29 Mar 2017 22:06:33 Mauro Carvalho Chehab wrote: > Em Thu, 30 Mar 2017 01:15:27 +0300 Laurent Pinchart escreveu: > > On Wednesday 29 Mar 2017 15:54:21 Mauro Carvalho Chehab wrote: > > > Several host controllers, commonly found on ARM, like dwc2, > > > require buffers that

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

2017-03-30 Thread Laurent Pinchart
Hi Oliver, On Thursday 30 Mar 2017 10:11:31 Oliver Neukum wrote: > Am Donnerstag, den 30.03.2017, 01:15 +0300 schrieb Laurent Pinchart: > > > + may also override PAD bytes at the end of the ``transfer_buffer``, > > > up to the > > > + size of the CPU word. > > > > "May" is quite weak here.

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

2017-03-30 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> 3) All this becomes even more complex for configfs based gadget driver. >>> >>> So using stop/start gadget is a much simpler solution really as UDC software >>> side of things remain unchanged and the gadget driver can persist between >>> role

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

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 10:04:32 +0300 Jani Nikula escreveu: > On Thu, 30 Mar 2017, Jani Nikula wrote: > > On Wed, 29 Mar 2017, Mauro Carvalho Chehab > > wrote: > >> The pandoc conversion is not perfect. Do

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

2017-03-30 Thread Felipe Balbi
Hi Roger Quadros writes: For something that simple, we wouldn't even need to use OTG FSM layer because that brings no benefit for such a simple requirement. >>> >>> no no. I think you got it wrong. I'm not using the OTG FSM layer at all :). >> >> what are all the

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-03-30 Thread Greg KH
On Thu, Mar 30, 2017 at 11:11:34AM +0200, Janusz Dziedzic wrote: > On 30 March 2017 at 10:53, Greg KH wrote: > > On Thu, Mar 30, 2017 at 10:29:41AM +0200, Christian Gromm wrote: > >> > >> > >> On 03/27/2017 11:31 AM, Felipe Balbi wrote: > >> > > >> > Hi, > >> > > >> > Christian

Re: [PATCH 02/22] docs-rst: convert usb docbooks to ReST

2017-03-30 Thread Markus Heiser
Am 30.03.2017 um 10:21 schrieb Jani Nikula : > On Thu, 30 Mar 2017, Markus Heiser wrote: >> Hi Mauro, >> >> Am 29.03.2017 um 20:54 schrieb Mauro Carvalho Chehab >> : >> >>> As we're moving out of DocBook, let's

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-03-30 Thread Janusz Dziedzic
On 30 March 2017 at 10:53, Greg KH wrote: > On Thu, Mar 30, 2017 at 10:29:41AM +0200, Christian Gromm wrote: >> >> >> On 03/27/2017 11:31 AM, Felipe Balbi wrote: >> > >> > Hi, >> > >> > Christian Gromm writes: >> > > we observe an issue with a

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-03-30 Thread Greg KH
On Thu, Mar 30, 2017 at 10:29:41AM +0200, Christian Gromm wrote: > > > On 03/27/2017 11:31 AM, Felipe Balbi wrote: > > > > Hi, > > > > Christian Gromm writes: > > > we observe an issue with a td_list running empty and an > > > endpoint being stalled at the same

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

2017-03-30 Thread Mauro Carvalho Chehab
Em Thu, 30 Mar 2017 10:01:29 +0300 Jani Nikula escreveu: > On Wed, 29 Mar 2017, Mauro Carvalho Chehab wrote: > > The pandoc conversion is not perfect. Do handwork in order to: > > > > - add a title to this chapter; > > - use the proper

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-03-30 Thread Christian Gromm
On 03/27/2017 11:31 AM, Felipe Balbi wrote: Hi, Christian Gromm writes: we observe an issue with a td_list running empty and an endpoint being stalled at the same time on Linux ihu-low 4.1.27-abl #1 SMP PREEMPT Mon Mar 20 13:51:51 CET 2017 x86_64 x86_64

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

2017-03-30 Thread Mathias Nyman
On 30.03.2017 04:48, Peter Chen wrote: 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

Re: [PATCH 02/22] docs-rst: convert usb docbooks to ReST

2017-03-30 Thread Jani Nikula
On Thu, 30 Mar 2017, Markus Heiser wrote: > Hi Mauro, > > Am 29.03.2017 um 20:54 schrieb Mauro Carvalho Chehab > : > >> As we're moving out of DocBook, let's convert the remaining >> USB docbooks to ReST. >> >> The transformation itself on

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

2017-03-30 Thread Oliver Neukum
Am Donnerstag, den 30.03.2017, 01:15 +0300 schrieb Laurent Pinchart: > > +   may also override PAD bytes at the end of the ``transfer_buffer``, up to > > the > > +   size of the CPU word. > > "May" is quite weak here. If some host controller drivers require buffers to > be aligned, then it's an

Re: [PATCH 02/22] docs-rst: convert usb docbooks to ReST

2017-03-30 Thread Markus Heiser
Hi Mauro, Am 29.03.2017 um 20:54 schrieb Mauro Carvalho Chehab : > As we're moving out of DocBook, let's convert the remaining > USB docbooks to ReST. > > The transformation itself on this patch is a no-brainer > conversion using pandoc. right, its a no-brainer ;-)

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

2017-03-30 Thread Jani Nikula
On Thu, 30 Mar 2017, Jani Nikula wrote: > On Wed, 29 Mar 2017, Mauro Carvalho Chehab wrote: >> The pandoc conversion is not perfect. Do handwork in order to: >> >> - add a title to this chapter; >> - use the proper warning and note markups;

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

2017-03-30 Thread Jani Nikula
On Wed, 29 Mar 2017, Mauro Carvalho Chehab wrote: > 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; Please look at

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

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

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

2017-03-30 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,

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

2017-03-30 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 +--

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

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