Re: [PATCH] usb: gadget: ffs: don't allow to open with O_NONBLOCK flag

2015-04-02 Thread Robert Baldyga
Hi Michal, On 04/01/2015 05:17 PM, Michal Nazarewicz wrote: > On Wed, Apr 01 2015, Robert Baldyga wrote: >> FunctionFS can't support O_NONBLOCK because read/write operatons are >> directly translated into USB requests which are asynchoronous, so we >> can't know how long we will have to wait for

RE: [PATCH][RFC] usb: renesas_usbhs: tidyup usbhs_for_each_dfifo macro

2015-04-02 Thread Yoshihiro Shimoda
Hi Morimoto-san, > From: Kuninori Morimoto > > Current usbhs_for_each_dfifo macro will read out-of-array's > memory after last loop operation. > It was not good C language operation, and the kernel which was > compiled by (at least) gcc 4.8.1 will be broken. > > This patch is based on > 925403f

[PATCH 13/13] USB/IP: USB over WebSocket

2015-04-02 Thread Nobuo Iwata
This patch adds utilities transmit packets via WebSocket protocol. WebSocket version of utilities as following. usbws : command usbwsa : application-side daemon usbwsd : device-side daemon The command supports all sub-command (ie. list, connect, disconnect, port, bind, unbind, attach and de

[PATCH 02/13] USB/IP: readme and manuals about exporting devices

2015-04-02 Thread Nobuo Iwata
This patch adds function and usage of export to README and manuals. The wording, 'server' and 'client', is changed also. For existing attach command, the daemon runs device side machine and attach command is executed in application side machine. Then 'server' is used for device side and 'client

[PATCH 05/13] USB/IP: tools for userspace URBs transmission

2015-04-02 Thread Nobuo Iwata
Originally, USB/IP transmits requests and response PDUs for preparation to transfer URBs in user space, after completion of the preparation, URBs are transmitted in kernel space. To make easy to introduce application network protocols like SSL, WebSocket, the driver, usbip_ux.ko, forwards URBs

[PATCH 08/13] USB/IP: USB/IP with SSL

2015-04-02 Thread Nobuo Iwata
This patch allows to transfer both request/response between utilities and userspace URBs transfer over SSL. OpenSSL is used for the implementation. Options --with-ssl=yes at ./configure and --ssl to command and daemon enable SSL. Default of --with-ssl is depends on existence of OpenSSL package.

[PATCH 09/13] USB/IP: readme and manuals about USB/IP with SSL

2015-04-02 Thread Nobuo Iwata
Addition to README and manuals regarding USB/IP with SSL. Signed-off-by: Nobuo Iwata --- tools/usb/usbip/README | 13 - tools/usb/usbip/doc/usbip.8 | 38 +++--- tools/usb/usbip/doc/usbipa.8 | 34 ++ tools/usb/usbi

[PATCH 07/13] USB/IP: letting send and receive replaceable

2015-04-02 Thread Nobuo Iwata
This patch allows to substitute send, receive and shutdown routines for both a) request/response PDUs among utilities and b) user space URBs transmission. usbip_sock_t is introduced instead of sockfd. it includes function pointers of send/receive/shutdown routines, an argument for the routines,

[PATCH 12/13] USB/IP: added const qualifier to arguments of some functions

2015-04-02 Thread Nobuo Iwata
This patch adds 'const' qualifier to 'char*' arguments of library interfaces to make acceptable std::string.c_str(). Essentially, these qualifiers are better to be used even if not to use C++. Although, I just added to functions related to previous patch. Also, it changes C++ reserved words (ie

[PATCH 04/13] USB/IP: kernel module for userspace URBs transmission

2015-04-02 Thread Nobuo Iwata
Originally, USB/IP transmits requests and response PDUs for preparation to transfer URBs in user space, after the preparation, URBs are transmitted in kernel space. To make easy to introduce application network protocols like SSL, WebSocket and so on, the driver, usbip_ux.ko, forwards URBs to U

[PATCH 01/13] USB/IP: exporting devices

2015-04-02 Thread Nobuo Iwata
USB/IP supports a function to import USB devices from application-side machine by attach command. The usage is as following. dev:# (Physically attach your USB device.) dev:# insmod usbip-core.ko and usbip-host.ko dev:# usbipd -D // Start usbip daemon. dev:# usbip list -l // List local USB devices

[PATCH][RFC] usb: renesas_usbhs: tidyup usbhs_for_each_dfifo macro

2015-04-02 Thread Kuninori Morimoto
From: Kuninori Morimoto Current usbhs_for_each_dfifo macro will read out-of-array's memory after last loop operation. It was not good C language operation, and the kernel which was compiled by (at least) gcc 4.8.1 will be broken. This patch is based on 925403f425a4a9c503f2fc295652647b1eb10d82 (u

[PATCH 03/13] USB/IP: safe completion against usb_kill_urb()

2015-04-02 Thread Nobuo Iwata
stub_shutdown_connection() : drivers/usb/usbip/stub_dev.c stub_device_cleanup_urbs() : drivers/usb/usbip/stub_main.c requests to kill pending URBs and clears priv lists. stub_complete() : drivers/usb/usbip/stub_tx.c might be called with URBs to have been requested to kill. To avoid kernel

[PATCH 06/13] USB/IP: readme about user space URBs transmission

2015-04-02 Thread Nobuo Iwata
Addition to README regarding user space URBs transmission. Signed-off-by: Nobuo Iwata --- tools/usb/usbip/README | 22 ++ 1 file changed, 22 insertions(+) diff --git a/tools/usb/usbip/README b/tools/usb/usbip/README index 74f4afb..6b61da5 100644 --- a/tools/usb/usbip/README

[PATCH 10/13] USB/IP: letting connection establishment replaceable

2015-04-02 Thread Nobuo Iwata
To introduce some application protocols like WebSocket, this patch allows to substitute connection establishment and termination. In combination with previous patch, both connection and transmission can be replaced. usbip_connection_operations_t includes open and close operation. Open method re

[PATCH 00/13] USB/IP: features to USB over WebSocket

2015-04-02 Thread Nobuo Iwata
Dear all, This series of patches introduces WebSocket to USB/IP. It also includes some independent features effective in themselves. 1) Exporting devices Export request and response PDU had been defined in a header but not been used. Now it works! Also, it supports senarios, for example, co

[PATCH 11/13] USB/IP: deriving functions as libraries

2015-04-02 Thread Nobuo Iwata
To utilize core parts of USB/IP to application protocol implementations, this patch derives libraries by exposing some functions of utilities and removing some unnecessary portions. Following functions are exposed. For command: - usbip_attach_device() - usbip_detach_port() - usbip_bind_device()

[PATCH -next] usb/misc: fix chaoskey build, needs HW_RANDOM

2015-04-02 Thread Randy Dunlap
ed reference to `hwrng_register' Signed-off-by: Randy Dunlap --- drivers/usb/misc/Kconfig |1 + 1 file changed, 1 insertion(+) --- linux-next-20150402.orig/drivers/usb/misc/Kconfig +++ linux-next-20150402/drivers/usb/misc/Kconfig @@ -258,6 +258,7 @@ config USB_LINK_LAYER_TEST

Re: [PATCH v3 1/4] extcon: usb-gpio: register extcon device before IRQ registration

2015-04-02 Thread Chanwoo Choi
Hi Robert, On 04/02/2015 10:13 PM, Robert Baldyga wrote: > IRQ handler touches info->edev, so if interrupt occurs before extcon > device initialization it can cause NULL pointer dereference. Doing extcon > initialization before IRQ handler registration fixes this problem. > > Signed-off-by: Rober

RE: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Liu, Bin
Alan, > -Original Message- > From: Alan Stern [mailto:st...@rowland.harvard.edu] > Sent: Thursday, April 02, 2015 3:28 PM > To: Liu, Bin > Cc: Balbi, Felipe; linux-usb@vger.kernel.org > Subject: RE: [PATCH v2] usb: musb: only set test mode once > > On Thu, 2 Apr 2015, Liu, Bin wrote: > >

RE: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Alan Stern
On Thu, 2 Apr 2015, Liu, Bin wrote: > > > This is to reset the bus, not the controller right? For the MUSB case, > > > the controller itself needs reset, no device/hub is connected on the > > > bus. > > > > IIRC, device-reset -D 1d6b:0002 -c 1 should work, but needs testing. > > I thought about

RE: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Liu, Bin
Felipe, > -Original Message- > From: Balbi, Felipe > Sent: Thursday, April 02, 2015 2:53 PM > To: Liu, Bin > Cc: Balbi, Felipe; linux-usb@vger.kernel.org > Subject: Re: [PATCH v2] usb: musb: only set test mode once > > Hi, > > On Thu, Apr 02, 2015 at 02:50:05PM -0500, Liu, Bin wrote: > >

Re: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Felipe Balbi
Hi, On Thu, Apr 02, 2015 at 02:50:05PM -0500, Liu, Bin wrote: > > > I really don't care about reset or not, it is just about board reboot, > > > not a big deal. The only thing I want to do is prevent the *** user > > > using the current driver loading test packets to FIFO multiple times > > > whic

RE: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Liu, Bin
Felipe, > -Original Message- > From: Balbi, Felipe > Sent: Thursday, April 02, 2015 2:44 PM > To: Liu, Bin > Cc: Balbi, Felipe; linux-usb@vger.kernel.org > Subject: Re: [PATCH v2] usb: musb: only set test mode once > > On Thu, Apr 02, 2015 at 01:48:35PM -0500, Liu, Bin wrote: > > Felipe,

Re: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Felipe Balbi
On Thu, Apr 02, 2015 at 01:48:35PM -0500, Liu, Bin wrote: > Felipe, > > > -Original Message- > > From: Balbi, Felipe > > Sent: Thursday, April 02, 2015 1:22 PM > > To: Liu, Bin > > Cc: linux-usb@vger.kernel.org; Balbi, Felipe > > Subject: Re: [PATCH v2] usb: musb: only set test mode once >

RE: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Liu, Bin
Felipe, > -Original Message- > From: Liu, Bin > Sent: Thursday, April 02, 2015 11:45 AM > To: linux-usb@vger.kernel.org > Cc: Balbi, Felipe > Subject: RE: [PATCH v2] usb: musb: only set test mode once > > Felipe, > > > -Original Message- > > From: Liu, Bin > > Sent: Tuesday, Marc

RE: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Liu, Bin
Felipe, > -Original Message- > From: Balbi, Felipe > Sent: Thursday, April 02, 2015 1:22 PM > To: Liu, Bin > Cc: linux-usb@vger.kernel.org; Balbi, Felipe > Subject: Re: [PATCH v2] usb: musb: only set test mode once > > On Thu, Apr 02, 2015 at 11:44:30AM -0500, Liu, Bin wrote: > > Felipe,

Re: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Felipe Balbi
On Thu, Apr 02, 2015 at 11:44:30AM -0500, Liu, Bin wrote: > Felipe, > > > -Original Message- > > From: Liu, Bin > > Sent: Tuesday, March 24, 2015 3:09 PM > > To: linux-usb@vger.kernel.org > > Cc: Balbi, Felipe; Liu, Bin > > Subject: [PATCH v2] usb: musb: only set test mode once > > > > Th

RE: [PATCH v2] usb: musb: only set test mode once

2015-04-02 Thread Liu, Bin
Felipe, > -Original Message- > From: Liu, Bin > Sent: Tuesday, March 24, 2015 3:09 PM > To: linux-usb@vger.kernel.org > Cc: Balbi, Felipe; Liu, Bin > Subject: [PATCH v2] usb: musb: only set test mode once > > The MUSB test mode register can only be set once, otherwise the result is > unde

Re: /sys/bus/usb/devices/2-5 to /dev/... mapping

2015-04-02 Thread Alan Stern
On Thu, 2 Apr 2015, Pieter Roodnat wrote: > Hi Alan, Hello. > Sorry for bothering you like this, but i am getting pretty desperate and on > what i see here > http://www.spinics.net/lists/linux-usb/msg60916.html > you are a real expert on this topic. > So i boldly ask you the following, hoping y

Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id

2015-04-02 Thread Johan Hovold
On Thu, Apr 02, 2015 at 04:25:50PM +0200, Dr. H. Nikolaus Schaller wrote: > But it is outdated. The parameters vendor= and product= are no longer > available since ca. 3.12 which means that documentation is lagging behind > quite some time. > >>> > >>> This is simply not true. The

Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id

2015-04-02 Thread Dr. H. Nikolaus Schaller
Hi, Am 30.03.2015 um 12:08 schrieb Johan Hovold : > On Mon, Mar 30, 2015 at 11:32:39AM +0200, Dr. H. Nikolaus Schaller wrote: >> Hi Johan, >> >> Am 30.03.2015 um 09:45 schrieb Johan Hovold : >> >>> On Sat, Mar 28, 2015 at 02:37:57PM +0100, Marek Belisko wrote: From: "H. Nikolaus Schaller"

Re: [PATCH v1 2/3] usb: ehci-platform: Use devm_of_phy_get_by_index

2015-04-02 Thread Alan Stern
On Wed, 1 Apr 2015, Arun Ramamurthy wrote: > Getting phys by index instead of phy names so that we do > not have to create a naming scheme when multiple phys > are present > > Signed-off-by: Arun Ramamurthy > Reviewed-by: Ray Jui > Reviewed-by: Scott Branden > @@ -204,36 +197,23 @@ static in

Re: [PATCH v3 2/4] extcon: usb-gpio: add support for VBUS detection

2015-04-02 Thread Roger Quadros
On 02/04/15 16:13, Robert Baldyga wrote: > This patch adds VBUS pin detection support to extcon-usb-gpio driver. > It allows to use this driver with boards which have both VBUS and ID > pins, or only one of them. > > Following table of states presents relationship between this signals > and detect

Re: Errata for Freescale root-hub TT?

2015-04-02 Thread Alan Stern
On Thu, 2 Apr 2015, Peter Chen wrote: > On Wed, Apr 01, 2015 at 10:35:16AM -0400, Alan Stern wrote: > > On Wed, 1 Apr 2015, Peter Chen wrote: > > > > > > This is bad. All the endpoints have maxpacket = 1023, and that's much > > > > too big for this test. We need a maxpacket size of 64 (maybe a

[PATCH v3 1/4] extcon: usb-gpio: register extcon device before IRQ registration

2015-04-02 Thread Robert Baldyga
IRQ handler touches info->edev, so if interrupt occurs before extcon device initialization it can cause NULL pointer dereference. Doing extcon initialization before IRQ handler registration fixes this problem. Signed-off-by: Robert Baldyga Acked-by: Roger Quadros --- drivers/extcon/extcon-usb-g

[PATCH v3 0/4] extcon: usb-gpio: fixes and improvements

2015-04-02 Thread Robert Baldyga
Hello, This patch set modifies extcon-usb-gpio driver fixing bugs, and adds new features - VBUS pin detection support and 'debounce' property in devicetree node. It also updates documentation with information about new features. More detailed description of changes can be found in commit messages

[PATCH v3 2/4] extcon: usb-gpio: add support for VBUS detection

2015-04-02 Thread Robert Baldyga
This patch adds VBUS pin detection support to extcon-usb-gpio driver. It allows to use this driver with boards which have both VBUS and ID pins, or only one of them. Following table of states presents relationship between this signals and detected cable type: State |ID | VBU

[PATCH v3 3/4] extcon: usb-gpio: make debounce value configurable in devicetree

2015-04-02 Thread Robert Baldyga
This patch adds devicetree property for setting debounce value. It allows to set debounce time shorter or longer depending on the needs of given platform. Signed-off-by: Robert Baldyga Acked-by: Roger Quadros --- drivers/extcon/extcon-usb-gpio.c | 14 +- 1 file changed, 9 insertions

[PATCH v3 4/4] Documentation: extcon: usb-gpio: update usb-gpio binding description

2015-04-02 Thread Robert Baldyga
Add information about VBUS pin detection support, 'debounce' property and some other details. Signed-off-by: Robert Baldyga Acked-by: Roger Quadros --- .../devicetree/bindings/extcon/extcon-usb-gpio.txt | 28 -- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/

[PATCH 0/5] usb: xhci: fixes for OTG/DRD use

2015-04-02 Thread Roger Quadros
Hi, While testing for OTG/DRD [1], I encountered a couple of problems with the XHCI driver. The first 2 patches clean up the HCD allocation logic as we want both primary and shared HCDs to be allocated before the primary HCD registers for OTG use. That's the only way the OTG core will know that i

[PATCH 3/5] usb: xhci: Allow usb_add/remove_hcd() to be called repeatedly

2015-04-02 Thread Roger Quadros
Don't set xhci->shared_hcd to NULL in xhci_stop() as we have still not de-allocated it. It was resulting in a NULL pointer de-reference if usb_add/remove_hcd() is called repeatedly. We want repeated add/remove to work for the OTG use case. Signed-off-by: Roger Quadros --- drivers/usb/host/xhci.

[PATCH 1/5] usb: xhci: cleanup xhci_hcd allocation

2015-04-02 Thread Roger Quadros
HCD core allocates memory for HCD private data in usb_create_[shared_]hcd() so make use of that mechanism to allocate the struct xhci_hcd. Introduce struct xhci_driver_overrides to provide the size of HCD private data and hc_driver operation overrides. As of now we only need to override the reset

[PATCH 4/5] usb: xhci: fix xhci locking up during hcd remove

2015-04-02 Thread Roger Quadros
The problem seems to be that if a new device is detected while we have already removed the shared HCD, then many of the xhci operations (e.g. xhci_alloc_dev(), xhci_setup_device()) hang as command never completes. I don't think XHCI can operate without the shared HCD as we've already called xhci_

[PATCH 5/5] usb: xhci: Fix suspend/resume when used with OTG core

2015-04-02 Thread Roger Quadros
In the OTG case, the controller might not yet have been added or is removed before the system suspends. Assign xhci->main_hcd during probe to prevent NULL pointer de-reference in xhci_suspend/resume(). Use the hcd->state flag to check if HCD is halted and if that is so do nothing for xhci_suspend

[PATCH 2/5] usb: xhci: plat: Create both HCDs before adding them

2015-04-02 Thread Roger Quadros
As xhci_hcd is now allocated by usb_create_hcd(), we don't need to add the primary HCD before creating the shared HCD. Creating the shared HCD before adding the primary HCD is particularly useful for the OTG use case so that we know at the OTG core if the HCD is in single configuration or dual (pr

Re: [PATCH v2 2/4] extcon: usb-gpio: add support for VBUS detection

2015-04-02 Thread Roger Quadros
Robert, On 01/04/15 14:49, Robert Baldyga wrote: > Hi Roger, > > On 04/01/2015 01:28 PM, Roger Quadros wrote: >> Robert, >> >> On 01/04/15 10:23, Robert Baldyga wrote: >>> This patch adds VBUS pin detection support to extcon-usb-gpio driver. >>> It allows to use this driver with boards which have

Re: [PATCH 1/2] usbhid: more mice with ALWAYS_POLL

2015-04-02 Thread Jiri Kosina
On Wed, 1 Apr 2015, Oliver Neukum wrote: > > I am postponing all these before it is clarified that this is indeed a > > case reporter is able to reproduce on different system as well to rule out > > the possibility of hub being the actual root cause. > > The test has been redone on a different

Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id

2015-04-02 Thread Jonathan Corbet
On Thu, 2 Apr 2015 12:35:09 +0200 Johan Hovold wrote: > This patch was incorrect and needed to be updated as discussed in the > thread. Can you drop it or is your tree immutable? Sigh...and I thought I was on top of that. Dropped, sorry for the confusion. jon -- To unsubscribe from this list:

[PATCH] usb: phy: rcar-gen2-usb: Fix USBHS_UGSTS_LOCK value

2015-04-02 Thread Yoshihiro Shimoda
According to the technical update (No. TN-RCS-B011A/E), the UGSTS LOCK bit location is bit 8, not bits 9 and 8. So, this patch fixes the USBHS_UGSTS_LOCK value. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/phy/phy-rcar-gen2-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH] Revert "usb: host/sl811-hcd: fix sparse warning"

2015-04-02 Thread Sudip Mukherjee
This reverts commit <1dc6120ef7f003305d99ef12f598a6b05eacc38c>. if we are doing allyesconfig on x86_64, build fails with error: drivers/built-in.o: In function `sl811_cs_probe': sl811_cs.c:(.text+0x1d4612e): undefined reference to `sl811h_driver' this commit has declared sl811h_driver as static b

Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id

2015-04-02 Thread Dr. H. Nikolaus Schaller
Am 02.04.2015 um 12:35 schrieb Johan Hovold : > On Thu, Apr 02, 2015 at 12:12:37PM +0200, Jonathan Corbet wrote: >> On Sat, 28 Mar 2015 14:37:57 +0100 >> Marek Belisko wrote: >> >>> This patch changes the documentation file as needed. >> >> Applied to the docs tree (with the changelog typo fix

Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id

2015-04-02 Thread Johan Hovold
On Thu, Apr 02, 2015 at 12:12:37PM +0200, Jonathan Corbet wrote: > On Sat, 28 Mar 2015 14:37:57 +0100 > Marek Belisko wrote: > > > This patch changes the documentation file as needed. > > Applied to the docs tree (with the changelog typo fixed). This patch was incorrect and needed to be updated

Re: [PATCH] Documentation: usb: serial: fixed how to provide vendor and product id

2015-04-02 Thread Jonathan Corbet
On Sat, 28 Mar 2015 14:37:57 +0100 Marek Belisko wrote: > This patch changes the documentation file as needed. Applied to the docs tree (with the changelog typo fixed). Thanks, jon -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vge