[PATCH] usb: dwc3: pci: make better use of gpiod API

2015-06-12 Thread Uwe Kleine-König
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Furthermore there is devm_gpiod_get_optional which is designed to get optional g

Re: [PATCH v2] USB SERIAL: option.c: add 2020:4000 IDs

2015-06-12 Thread Claudio Cappelli
On Wednesday 10 June 2015 20:38:30 Claudio Cappelli wrote: > From: Claudio Cappelli > > Add device Olivetti Olicard 300 (Network Connect: MT6225) - IDs 2020:4000. > > Signed-off-by: Claudio Cappelli > Suggested-by: Lars Melin > > --- > > drivers/usb/serial/option.c |1 + > 1 file changed

Re: [PATCH v2 05/22] doc: dt-binding: usb: add otg related properties

2015-06-12 Thread Roger Quadros
On Fri, 12 Jun 2015 09:42:04 +0800 Li Jun wrote: > On Thu, Jun 11, 2015 at 05:55:57PM +0300, Roger Quadros wrote: > > > > drivers/usb/core/hub.c > > > > > > > > static int usb_enumerate_device_otg(struct usb_device *udev) > > > > { > > > > int err = 0; > > > > > > > > #ifdef CONFIG_US

Re: [PATCH v2 05/22] doc: dt-binding: usb: add otg related properties

2015-06-12 Thread Li Jun
On Fri, Jun 12, 2015 at 11:02:13AM +0300, Roger Quadros wrote: > > On Fri, 12 Jun 2015 09:42:04 +0800 > Li Jun wrote: > > > On Thu, Jun 11, 2015 at 05:55:57PM +0300, Roger Quadros wrote: > > > > > drivers/usb/core/hub.c > > > > > > > > > > static int usb_enumerate_device_otg(struct usb_device *

Re: [PATCH v2 05/22] doc: dt-binding: usb: add otg related properties

2015-06-12 Thread Roger Quadros
On Fri, 12 Jun 2015 11:09:17 +0800 Li Jun wrote: > On Thu, Jun 11, 2015 at 05:52:15PM +0300, Roger Quadros wrote: > > > > On Thu, 11 Jun 2015 22:11:22 +0800 > > Li Jun wrote: > > > > > On Thu, Jun 11, 2015 at 03:37:03PM +0300, Roger Quadros wrote: > > > > > > > > On Thu, 11 Jun 2015 16:20:1

Re: [PATCH v2 05/22] doc: dt-binding: usb: add otg related properties

2015-06-12 Thread Roger Quadros
On Fri, 12 Jun 2015 16:23:59 +0800 Li Jun wrote: > On Fri, Jun 12, 2015 at 11:02:13AM +0300, Roger Quadros wrote: > > > > On Fri, 12 Jun 2015 09:42:04 +0800 > > Li Jun wrote: > > > > > On Thu, Jun 11, 2015 at 05:55:57PM +0300, Roger Quadros wrote: > > > > > > drivers/usb/core/hub.c > > > > >

Re: [PATCH v2 05/22] doc: dt-binding: usb: add otg related properties

2015-06-12 Thread Roger Quadros
On Fri, 12 Jun 2015 16:23:59 +0800 Li Jun wrote: > On Fri, Jun 12, 2015 at 11:02:13AM +0300, Roger Quadros wrote: > > > > On Fri, 12 Jun 2015 09:42:04 +0800 > > Li Jun wrote: > > > > > On Thu, Jun 11, 2015 at 05:55:57PM +0300, Roger Quadros wrote: > > > > > > drivers/usb/core/hub.c > > > > >

[PATCH v2 3/3] usb: dwc2: embed storage for reg backup in struct dwc2_hsotg

2015-06-12 Thread Mian Yousaf Kaukab
Register backup function can be called from atomic context. Instead of using atomic memory pool, embed backup storage space in struct dwc2_hsotg. Also add a valid flag in each struct as NULL pointer can't be used as the content validity check any more. Acked-by: John Youn Tested-by: Heiko Stuebn

[PATCH v2 0/3] usb: dwc2: fix sleep while atomic bugs

2015-06-12 Thread Mian Yousaf Kaukab
This series fixes 3 sources of sleep while atomic bugs. Including the one reported by Heiko Stuebner here: http://www.spinics.net/lists/linux-usb/msg125186.html Please review. Thank you, Best regards, Yousaf History: v2: - Fixed John's comment v1: - Added John's Acked-by Mian Yousaf Kaukab (

[PATCH v2 1/3] usb: dwc2: host: allocate qh before atomic enqueue

2015-06-12 Thread Mian Yousaf Kaukab
To avoid sleep while atomic bugs, allocate qh before calling dwc2_hcd_urb_enqueue. qh pointer can be used directly now instead of passing ep->hcpriv as double pointer. Acked-by: John Youn Tested-by: Heiko Stuebner Signed-off-by: Mian Yousaf Kaukab --- drivers/usb/dwc2/hcd.c | 31

[PATCH v2 2/3] usb: dwc2: host: allocate qtd before atomic enqueue

2015-06-12 Thread Mian Yousaf Kaukab
To avoid sleep while atomic bugs, allocate qtd before calling dwc2_hcd_urb_enqueue. No need to pass mem_flags to dwc2_hcd_urb_enqueue any more as no memory allocations are done in it. Acked-by: John Youn Tested-by: Heiko Stuebner Signed-off-by: Mian Yousaf Kaukab --- drivers/usb/dwc2/hcd.c | 2

Re: [PATCH v2 05/22] doc: dt-binding: usb: add otg related properties

2015-06-12 Thread Li Jun
On Fri, Jun 12, 2015 at 11:41:40AM +0300, Roger Quadros wrote: > > > On Fri, 12 Jun 2015 16:23:59 +0800 > Li Jun wrote: > > > On Fri, Jun 12, 2015 at 11:02:13AM +0300, Roger Quadros wrote: > > > > > > On Fri, 12 Jun 2015 09:42:04 +0800 > > > Li Jun wrote: > > > > > > > On Thu, Jun 11, 2015 a

Re: [BUG] usb/at91: usb hub does not work

2015-06-12 Thread Jiří Prchal
On 11.6.2015 15:53, Alan Stern wrote: On Thu, 11 Jun 2015, Jiří Prchal wrote: Hi all, I discovered some bug when I change kernel from 3.18.13 to 3.18.14. I have board with usb hub CY7C65632 on it. In .13 it works fine but in .14 it repeats this message: [ 19.17] usb 2-3: new full-speed

Re: [PATCH RESEND (1-3)/4] Add usb interface authorization

2015-06-12 Thread Stefan Koch
Am Dienstag, den 09.06.2015, 13:20 -0400 schrieb Alan Stern: > On Tue, 9 Jun 2015, Stefan Koch wrote: > > > Am Dienstag, den 09.06.2015, 10:31 -0400 schrieb Alan Stern: > > > On Tue, 9 Jun 2015, Stefan Koch wrote: > > > > > > > Hi > > > > > > > > I think whitespaces should be ok now. I have test

Re: [PATCH RESEND (1-3)/4] Add usb interface authorization

2015-06-12 Thread Oliver Neukum
On Fri, 2015-06-12 at 12:17 +0200, Stefan Koch wrote: > There is one problem with that simple approach without the manually > probe patch. As example the USB-Tethering with smartphones. > > There is a driver (module) loading. It is loaded although > usb_probe_interface() denies the interface. > >

Re: [PATCH 00/21] On-demand device registration

2015-06-12 Thread Alexander Holler
Am 12.06.2015 um 09:25 schrieb Linus Walleij: On Thu, Jun 11, 2015 at 6:40 PM, Alexander Holler wrote: Am 11.06.2015 um 14:30 schrieb Linus Walleij: Certainly it is possible to create deadlocks in this scenario, but the scope is not to create an ubreakable system. IAnd what happens if you

Re: [PATCH 00/21] On-demand device registration

2015-06-12 Thread Alexander Holler
Am 12.06.2015 um 13:19 schrieb Alexander Holler: Am 12.06.2015 um 09:25 schrieb Linus Walleij: On Thu, Jun 11, 2015 at 6:40 PM, Alexander Holler wrote: Am 11.06.2015 um 14:30 schrieb Linus Walleij: Certainly it is possible to create deadlocks in this scenario, but the scope is not to create

Re: [ehci-orion] ETIMEOUT with ehci_setup()'s ehci_halt()

2015-06-12 Thread Valentin Longchamp
On 06/08/2015 01:46 PM, Valentin Longchamp wrote: > On 06/06/2015 02:17 PM, Sebastian Hesselbarth wrote: >> On 05.06.2015 17:19, Andrew Lunn wrote: >>> On Fri, Jun 05, 2015 at 04:34:54PM +0200, Valentin Longchamp wrote: I am currently bringing up the USB 2.0 Host controller of the Bobcat's >>

[PATCH v2 1/5] usb: Add usb interface authorization: Declare attributes of structures

2015-06-12 Thread Stefan Koch
These attributes are authorized, mask and mask_changed. The first shows the authorization state for an interface. The second describes the authorization states of all device interfaces. The third is a status bit to control a manual setting of the mask. Signed-off-by: Stefan Koch --- include/linu

[PATCH v2 0/5] usb: Add usb interface authorization

2015-06-12 Thread Stefan Koch
This is a patch that introduces an interface authorization for USB devices. The kernel supports already a device authorization bacause of wireless USB. But the new interface authorization allows to enable or disable individual interfaces per bitmask instead allow or deny a whole device. The patc

[PATCH v2 5/5] usb: Add usb interface authorization: SysFS part of usb interface authorization.

2015-06-12 Thread Stefan Koch
To allow (1) or deny (0) interfaces it is needed to write to the mask. As default each bit has the initial value of the default authorization bit. The value would showed or have to be written in hexadecimal format. Entry: /sys/bus/usb/devices/*-*/interface_authorization_mask Example: Only the inte

[PATCH v2 2/5] usb: Add usb interface authorization: Introduces the default interface authorization

2015-06-12 Thread Stefan Koch
Interfaces would allowed per default. This can disabled or enabled by writing 0 or 1 to /sys/bus/usb/devices/usb*/interface_authorized_default Signed-off-by: Stefan Koch --- drivers/usb/core/hcd.c | 47 ++ drivers/usb/core/message.c | 8

[PATCH v2 4/5] usb: Add usb interface authorization: Introduces the usb interface authorization.

2015-06-12 Thread Stefan Koch
The kernel supports already a device authorization because of wireless USB. These is usable for wired usb devices, too. These new interface authorization allows to enable or disable individual interfaces per bitmask instead a whole device. The authorization is done stepwise for each respective int

[PATCH v2 3/5] usb: Add usb interface authorization: Control interface probing and claiming

2015-06-12 Thread Stefan Koch
Driver probings and interface claims could rejected if an interface is not authorized. Signed-off-by: Stefan Koch --- drivers/base/base.h | 1 - drivers/usb/core/driver.c | 11 +++ include/linux/device.h| 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dri

Re: [PATCH v2 5/5] usb: Add usb interface authorization: SysFS part of usb interface authorization.

2015-06-12 Thread Krzysztof Opasiak
On 06/12/2015 02:33 PM, Stefan Koch wrote: To allow (1) or deny (0) interfaces it is needed to write to the mask. As default each bit has the initial value of the default authorization bit. The value would showed or have to be written in hexadecimal format. Entry: /sys/bus/usb/devices/*-*/inter

Re: [PATCH v2 5/5] usb: Add usb interface authorization: SysFS part of usb interface authorization.

2015-06-12 Thread Oliver Neukum
On Fri, 2015-06-12 at 14:57 +0200, Krzysztof Opasiak wrote: > > +/* > > + * show authorization status of usb interface as bitmask > > + * 1 is authorized, 0 is not authorized > > + * > > + * example: 0b0101 interfaces 0 and 2 are authorized > > + * the others are not authorized > > +

[PATCH] usb: dwc3: Use ASCII space in Kconfig

2015-06-12 Thread Thierry Reding
From: Thierry Reding The USB_DWC3_ULPI Kconfig entry uses a UTF-8 non-breaking space (0xca20) instead of a regular ASCII space (0x20). Commit 2e0d737fc76f ("kconfig: don't silently ignore unhandled characters") exposes this by warning about unhandled characters. Signed-off-by: Thierry Reding --

Re: [PATCH v2 5/5] usb: Add usb interface authorization: SysFS part of usb interface authorization.

2015-06-12 Thread Krzysztof Opasiak
On 06/12/2015 03:10 PM, Oliver Neukum wrote: On Fri, 2015-06-12 at 14:57 +0200, Krzysztof Opasiak wrote: +/* + * show authorization status of usb interface as bitmask + * 1 is authorized, 0 is not authorized + * + * example: 0b0101 interfaces 0 and 2 are authorized + * the others

Re: [PATCH v2 5/5] usb: Add usb interface authorization: SysFS part of usb interface authorization.

2015-06-12 Thread Oliver Neukum
On Fri, 2015-06-12 at 15:22 +0200, Krzysztof Opasiak wrote: > > On 06/12/2015 03:10 PM, Oliver Neukum wrote: > > Some drivers (BT, CDC ACM, ...) require multiple interfaces > > The authorization must be given atomically or probing will > > fail. > > > > Please correct me if I'm wrong but this: >

[Patch V2 3/3] xen: add Xen pvUSB maintainer

2015-06-12 Thread Juergen Gross
Add myself as maintainer for the Xen pvUSB stuff. Signed-off-by: Juergen Gross Acked-by: Konrad Rzeszutek Wilk --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d8afd29..5f54a0d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10965,6 +109

[Patch V2 0/3] xen, usb: support pvUSB frontend driver

2015-06-12 Thread Juergen Gross
This series adds XEN guest pvUSB support. With pvUSB it is possible to use physical USB devices from a XEN domain. The support consists of a frontend in the unprivileged domU passing I/O-requests to the backend in a driver domain (usually Dom0). The backend is not part of this patch series, as it

[Patch V2 2/3] usb: Introduce Xen pvUSB frontend

2015-06-12 Thread Juergen Gross
Introduces the Xen pvUSB frontend. With pvUSB it is possible for a Xen domU to communicate with a USB device assigned to that domU. The communication is all done via the pvUSB backend in a driver domain (usually Dom0) which is owner of the physical device. The code is taken from the pvUSB implemen

[Patch V2 1/3] usb: Add Xen pvUSB protocol description

2015-06-12 Thread Juergen Gross
Add the definition of pvUSB protocol used between the pvUSB frontend in a Xen domU and the pvUSB backend in a Xen driver domain (usually Dom0). This header was originally provided by Fujitsu for Xen based on Linux 2.6.18. Changes are: - adapt to Linux style guide Signed-off-by: Juergen Gross --

Re: [PATCH v2 5/5] usb: Add usb interface authorization: SysFS part of usb interface authorization.

2015-06-12 Thread Krzysztof Opasiak
On 06/12/2015 03:42 PM, Oliver Neukum wrote: On Fri, 2015-06-12 at 15:22 +0200, Krzysztof Opasiak wrote: On 06/12/2015 03:10 PM, Oliver Neukum wrote: Some drivers (BT, CDC ACM, ...) require multiple interfaces The authorization must be given atomically or probing will fail. Please corre

Re: [PATCH v2 5/5] usb: Add usb interface authorization: SysFS part of usb interface authorization.

2015-06-12 Thread Stefan Koch
Am Freitag, den 12.06.2015, 16:16 +0200 schrieb Krzysztof Opasiak: > > On 06/12/2015 03:42 PM, Oliver Neukum wrote: > > On Fri, 2015-06-12 at 15:22 +0200, Krzysztof Opasiak wrote: > >> > >> On 06/12/2015 03:10 PM, Oliver Neukum wrote: > > > >>> Some drivers (BT, CDC ACM, ...) require multiple inte

Re: [PATCH 1/1] staging:f81534 Add F81532/534 Driver

2015-06-12 Thread Greg KH
On Fri, Jun 12, 2015 at 01:38:39PM +0800, Peter Hung wrote: > Greg KH 於 2015/6/12 下午 12:33 寫道: > >Why not just do the work now to clean up the file and get it merged > >"properly"? Why put this in staging at all? > > > > I'll clear up the file and resend it to usb-serial subsystem mail list. Not

Re: [Patch V2 2/3] usb: Introduce Xen pvUSB frontend

2015-06-12 Thread Greg KH
On Fri, Jun 12, 2015 at 04:10:00PM +0200, Juergen Gross wrote: > Introduces the Xen pvUSB frontend. With pvUSB it is possible for a Xen > domU to communicate with a USB device assigned to that domU. The > communication is all done via the pvUSB backend in a driver domain > (usually Dom0) which is o

Re: [Patch V2 1/3] usb: Add Xen pvUSB protocol description

2015-06-12 Thread Greg KH
On Fri, Jun 12, 2015 at 04:09:59PM +0200, Juergen Gross wrote: > +enum usb_spec_version { > + USB_VER_UNKNOWN = 0, > + USB_VER_USB11, > + USB_VER_USB20, > + USB_VER_USB30, /* not supported yet */ > +}; > + You are defining a bunch of things in this .h file that start with "usb" ye

Re: [Xen-devel] [Patch V2 2/3] usb: Introduce Xen pvUSB frontend

2015-06-12 Thread David Vrabel
On 12/06/15 17:20, Greg KH wrote: > On Fri, Jun 12, 2015 at 04:10:00PM +0200, Juergen Gross wrote: >> Introduces the Xen pvUSB frontend. With pvUSB it is possible for a Xen >> domU to communicate with a USB device assigned to that domU. The >> communication is all done via the pvUSB backend in a dr

Re: [PATCH 1/1] usb: core: lpm: set lpm_capable for root hub device

2015-06-12 Thread Alan Stern
On Fri, 12 Jun 2015, Lu Baolu wrote: > Commit 25cd2882e2fc ("usb/xhci: Change how we indicate a host supports > Link PM.") removed the code to set lpm_capable for USB 3.0 super-speed > root hub. The intention of that change was to avoid touching usb core > internal field, a.k.a. lpm_capable, and l

[PATCH RESENT] phy: tusb1210: make better use of gpiod API

2015-06-12 Thread Uwe Kleine-König
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Furthermore there is devm_gpiod_get_optional which is designed to get optional g

Re: [Xen-devel] [Patch V2 2/3] usb: Introduce Xen pvUSB frontend

2015-06-12 Thread Greg KH
On Fri, Jun 12, 2015 at 05:33:46PM +0100, David Vrabel wrote: > On 12/06/15 17:20, Greg KH wrote: > > On Fri, Jun 12, 2015 at 04:10:00PM +0200, Juergen Gross wrote: > >> Introduces the Xen pvUSB frontend. With pvUSB it is possible for a Xen > >> domU to communicate with a USB device assigned to tha

Re: [PATCH v2 0/5] usb: Add usb interface authorization

2015-06-12 Thread Alan Stern
On Fri, 12 Jun 2015, Stefan Koch wrote: > This is a patch that introduces an interface authorization for USB devices. > The kernel supports already a device authorization bacause of wireless USB. > > But the new interface authorization allows to enable or disable individual > interfaces per bitm

FX3 on Linux

2015-06-12 Thread Philip.Joslin
Knowing that you have experts in USB 3.0 support for Linux, I am writing to your organization hoping that you may be able to offer some direction on a problem I have encountered. I am trying to track down a problem I am having with a USB 3.0 PCIe-x1 card on Linux while trying to talk to a Cypre

Re: FX3 on Linux

2015-06-12 Thread Rajaram R
Please find reply inline On Fri, Jun 12, 2015 at 11:48 PM, wrote: > > Knowing that you have experts in USB 3.0 support for Linux, I am writing to > your organization hoping that you may be able to offer some direction on a > problem I have encountered. > > I am trying to track down a problem I

Re: [PATCH v2 0/5] usb: Add usb interface authorization

2015-06-12 Thread Stefan Koch
Am Freitag, den 12.06.2015, 14:09 -0400 schrieb Alan Stern: > On Fri, 12 Jun 2015, Stefan Koch wrote: > There is a lot of questionable material here. > > First of all, I agree with Krzysztof that having an "authorized" > attribute in each interface's sysfs directory would be simpler and > easie

Re: [PATCH v2 0/5] usb: Add usb interface authorization

2015-06-12 Thread Alan Stern
On Fri, 12 Jun 2015, Stefan Koch wrote: > Am Freitag, den 12.06.2015, 14:09 -0400 schrieb Alan Stern: > > On Fri, 12 Jun 2015, Stefan Koch wrote: > > There is a lot of questionable material here. > > > > First of all, I agree with Krzysztof that having an "authorized" > > attribute in each inte

Re: [PATCH v2 0/5] usb: Add usb interface authorization

2015-06-12 Thread Stefan Koch
Am Freitag, den 12.06.2015, 16:34 -0400 schrieb Alan Stern: > On Fri, 12 Jun 2015, Stefan Koch wrote: > > > Am Freitag, den 12.06.2015, 14:09 -0400 schrieb Alan Stern: > > > On Fri, 12 Jun 2015, Stefan Koch wrote: > > > There is a lot of questionable material here. > > > > > > First of all, I agr

[PATCH v2 6/5] usb: Add usb interface authorization: second SysFS part for usb interface authorization attribute.

2015-06-12 Thread Stefan Koch
To allow (1) or deny (0) interfaces a mask or interface attributes could written. For interfaces that belongs together use the mask for authorization. As default each bit has the initial value of the default authorization bit. Entry: /sys/bus/usb/devices/*-*:*.*/interface_authorized Signed-off-by

Re: [PATCH 1/1] usb: core: lpm: set lpm_capable for root hub device

2015-06-12 Thread Lu, Baolu
On 06/13/2015 01:43 AM, Alan Stern wrote: On Fri, 12 Jun 2015, Lu Baolu wrote: Commit 25cd2882e2fc ("usb/xhci: Change how we indicate a host supports Link PM.") removed the code to set lpm_capable for USB 3.0 super-speed root hub. The intention of that change was to avoid touching usb core in

Re: [PATCH v2 6/5] usb: Add usb interface authorization: second SysFS part for usb interface authorization attribute.

2015-06-12 Thread Greg KH
On Fri, Jun 12, 2015 at 11:28:33PM +0200, Stefan Koch wrote: > To allow (1) or deny (0) interfaces a mask or interface attributes could > written. > For interfaces that belongs together use the mask for authorization. > As default each bit has the initial value of the default authorization bit. >

Re: [PATCH v2] USB SERIAL: option.c: add 2020:4000 IDs

2015-06-12 Thread Greg Kroah-Hartman
On Fri, Jun 12, 2015 at 09:32:31AM +0200, Claudio Cappelli wrote: > On Wednesday 10 June 2015 20:38:30 Claudio Cappelli wrote: > > From: Claudio Cappelli > > > > Add device Olivetti Olicard 300 (Network Connect: MT6225) - IDs 2020:4000. > > > > Signed-off-by: Claudio Cappelli > > Suggested-by:

Re: Locking issues w/ functionfs gadget and aio?

2015-06-12 Thread John Stultz
On Mon, Jun 8, 2015 at 6:14 PM, John Stultz wrote: > After setting up functionfs for adb w/ 4.1-rc7, I noticed some flakey > behavior. > I enabled some lock debugging and got the following: > > [ 91.648093] read strings > [ 91.650264] g_ffs gadget: g_ffs ready > [ 91.652551] ci_hdrc ci_hdrc