Re: [PATCH] usb: otg: don't set a_alt_hnp_support feature for OTG 2.0 device

2015-08-25 Thread Peter Chen
On Tue, Aug 25, 2015 at 03:53:32PM +0800, Li Jun wrote: > Since a_alt_hnp_support is obsolete in OTG 2.0, HNP capable host should > send this set feature request only if the otg device is connecting to a > non-HNP port and it's compliant with OTG 1.x revision. This is done by > checking its otg des

Re: [PATCH 0/5] usb: common and dwc3: converting to unified device property

2015-08-25 Thread Peter Chen
On Tue, Aug 25, 2015 at 02:04:30PM +0300, Heikki Krogerus wrote: > Hi, > > While converting dwc3 to the unified device property interface, I > noticed that there is really nothing preventing of_usb_get_dr_mode and > of_usb_get_maximum_speed from being converted as well. Hope that's OK. > Place t

Re: [Bug 103461] i.MX USB runtime power management breaks the boot

2015-08-25 Thread Peter Chen
On Tue, Aug 25, 2015 at 02:37:45PM -0300, Fabio Estevam wrote: > On Tue, Aug 25, 2015 at 1:07 PM, Vincent Stehlé > wrote: > > Hi, > > > > I have encountered a bug related to the USB runtime pm in a specific > > boot configuration. > > > > The issue happens on an i.MX6 SabreSD platform with recent

Re: [PATCH 1/2] usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared

2015-08-25 Thread David Miller
From: Eugene Shatokhin Date: Mon, 24 Aug 2015 23:13:42 +0300 > It is needed to check EVENT_NO_RUNTIME_PM bit of dev->flags in > usbnet_stop(), but its value should be read before it is cleared > when dev->flags is set to 0. > > The problem was spotted and the fix was provided by > Oliver Neukum

Re: [PATCH 2/2] usbnet: Fix a race between usbnet_stop() and the BH

2015-08-25 Thread David Miller
From: Eugene Shatokhin Date: Mon, 24 Aug 2015 23:13:43 +0300 > The race may happen when a device (e.g. YOTA 4G LTE Modem) is > unplugged while the system is downloading a large file from the Net. > > Hardware breakpoints and Kprobes with delays were used to confirm that > the race does actually

Re: [PATCH 1/1] usb: dwc2: gadget: parity fix in isochronous mode

2015-08-25 Thread John Youn
On 8/25/2015 3:00 PM, Roman Bacik wrote: >> -Original Message- >> From: John Youn [mailto:john.y...@synopsys.com] >> Sent: August-25-15 2:52 PM >> To: Scott Branden; John Youn; Greg Kroah-Hartman; linux- >> u...@vger.kernel.org >> Cc: linux-ker...@vger.kernel.org; bcm-kernel-feedback-list;

RE: [PATCH 1/1] usb: dwc2: gadget: parity fix in isochronous mode

2015-08-25 Thread Roman Bacik
> -Original Message- > From: Felipe Balbi [mailto:ba...@ti.com] > Sent: August-25-15 3:36 PM > To: Roman Bacik > Cc: John Youn; Scott Branden; Greg Kroah-Hartman; linux- > u...@vger.kernel.org; linux-ker...@vger.kernel.org; bcm-kernel-feedback- > list > Subject: Re: [PATCH 1/1] usb: dwc2: g

Re: [PATCH 1/1] usb: dwc2: gadget: parity fix in isochronous mode

2015-08-25 Thread Felipe Balbi
On Tue, Aug 25, 2015 at 10:00:17PM +, Roman Bacik wrote: > > -Original Message- > > From: John Youn [mailto:john.y...@synopsys.com] > > Sent: August-25-15 2:52 PM > > To: Scott Branden; John Youn; Greg Kroah-Hartman; linux- > > u...@vger.kernel.org > > Cc: linux-ker...@vger.kernel.org;

[PATCH v2] usb: message: remove redundant declaration

2015-08-25 Thread Kris Borer
Fix the Sparse warning: message.c:1390:21: warning: symbol 'i' shadows an earlier one message.c:1294:13: originally declared here Signed-off-by: Kris Borer --- drivers/usb/core/message.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c

RE: [PATCH 1/1] usb: dwc2: gadget: parity fix in isochronous mode

2015-08-25 Thread Roman Bacik
> -Original Message- > From: John Youn [mailto:john.y...@synopsys.com] > Sent: August-25-15 2:52 PM > To: Scott Branden; John Youn; Greg Kroah-Hartman; linux- > u...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org; bcm-kernel-feedback-list; Roman Bacik > Subject: Re: [PATCH 1/1] usb: dwc

Re: [PATCH 1/1] usb: dwc2: gadget: parity fix in isochronous mode

2015-08-25 Thread John Youn
On 8/18/2015 8:45 AM, Scott Branden wrote: > From: Roman Bacik > > USB OTG driver in isochronous mode has to set the parity of the receiving > microframe. The parity is set to even by default. This causes problems for > an audio gadget, if the host starts transmitting on odd microframes. > > Thi

Re: [PATCH] usb: message: remove redundant declaration

2015-08-25 Thread Sergei Shtylyov
Hello. On 08/25/2015 05:30 AM, Kris Borer wrote: Fix the Sparse warning: message.c:1390:21: warning: symbol 'i' shadows an earlier one message.c:1294:13: originally declared here Signed-off-by: Kris Borer --- drivers/usb/core/message.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dr

Re: PROBLEM: lsusb -v freezes kernel on Acer ES1-111M

2015-08-25 Thread Alan Stern
On Tue, 25 Aug 2015, Roland Weber wrote: > Hi Alan, > > > > 638139eb95d2d241781330a321e88c8dafe46078 is the first bad commit > > > > Are you certain you found the right one? > > Yes. I kept all the kernels during bisecting and double-checked today. > That was the second-to-last one, and it freez

Re: [TESTPATCH] xhci: custom debug patch for command mismatch

2015-08-25 Thread Vincent Pelletier
On Tue, 25 Aug 2015 21:09:20 +0200, Vincent Pelletier wrote: > I'm not sure how I'll get this (I have a lot to learn about kernel > debugging). Answering to myself: log_buf_len kernel parameter. I sent you my dmesg off-list (335KB raw, 46KB gzipped). > FWIW, I gave a try at unloading and reloadi

[PATCH v11 0/7] usb: interface authorization

2015-08-25 Thread Stefan Koch
This patch introduces an interface authorization for USB devices. The kernel supports a device authorization because of wireless USB. But the new interface authorization allows to authorize or deauthorize individual interfaces instead authorization or deauthorize a whole device. Therefore the aut

[PATCH v11 1/7] usb: interface authorization: Declare authorized attribute

2015-08-25 Thread Stefan Koch
The attribute authorized shows the authorization state for an interface. Signed-off-by: Stefan Koch --- include/linux/usb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/usb.h b/include/linux/usb.h index 447fe29..3deccab 100644 --- a/include/linux/usb.h +++ b/include/linux/us

[PATCH v11 7/7] usb: interface authorization: Use a flag for the default device authorization

2015-08-25 Thread Stefan Koch
With this patch a flag instead of a variable is used for the default device authorization. Signed-off-by: Stefan Koch --- drivers/usb/core/hcd.c | 31 +-- drivers/usb/core/usb.c | 2 +- include/linux/usb/hcd.h | 16 +--- 3 files changed, 31 insertions(+

[PATCH v11 6/7] usb: interface authorization: Documentation part

2015-08-25 Thread Stefan Koch
This part adds the documentation for the interface authorization. Signed-off-by: Stefan Koch --- Documentation/ABI/testing/sysfs-bus-usb | 20 Documentation/usb/authorization.txt | 31 +++ 2 files changed, 51 insertions(+) diff --git a/Docume

[PATCH v11 3/7] usb: interface authorization: Control interface probing and claiming

2015-08-25 Thread Stefan Koch
Driver probings and interface claims get rejected if an interface is not authorized. Signed-off-by: Stefan Koch --- drivers/usb/core/driver.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 818369a..9908e74 100644 --- a/driv

[PATCH v11 5/7] usb: interface authorization: SysFS part of USB interface authorization

2015-08-25 Thread Stefan Koch
This introduces an attribute for each interface to authorize (1) or deauthorize (0) it: /sys/bus/usb/devices/INTERFACE/authorized Signed-off-by: Stefan Koch --- drivers/usb/core/sysfs.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/usb/core/sys

[PATCH v11 2/7] usb: interface authorization: Introduces the default interface authorization

2015-08-25 Thread Stefan Koch
Interfaces are allowed per default. This can disabled or enabled (again) by writing 0 or 1 to /sys/bus/usb/devices/usbX/interface_authorized_default Signed-off-by: Stefan Koch --- drivers/usb/core/hcd.c | 47 ++ drivers/usb/core/message.c | 1 + i

[PATCH v11 4/7] usb: interface authorization: Introduces the USB interface authorization

2015-08-25 Thread Stefan Koch
The kernel supports the 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 instead a whole device. If a deauthorized interface will be authorized so the driver probing must be

Re: [TESTPATCH] xhci: custom debug patch for command mismatch

2015-08-25 Thread Vincent Pelletier
On Tue, 25 Aug 2015 14:51:56 +0300, Mathias Nyman wrote: > Add extra command ring, event ring and command queue debugging > to get more info on command mismatch error triggered by > Vincent Pelletier on BayTrail Thanks, applied, built and loaded on target. > will blurt out around 500 lines when

Re: [PATCH v10 4/7] usb: interface authorization: Introduces the USB interface authorization

2015-08-25 Thread Krzysztof Opasiak
On 08/25/2015 08:20 PM, Stefan Koch wrote: Am Dienstag, den 25.08.2015, 11:58 +0200 schrieb Krzysztof Opasiak: On 08/24/2015 11:09 PM, Stefan Koch wrote: The kernel supports the device authorization because of wireless USB. These is usable for wired USB devices, too. These new interface auth

Re: [PATCH v10 4/7] usb: interface authorization: Introduces the USB interface authorization

2015-08-25 Thread Stefan Koch
Am Dienstag, den 25.08.2015, 11:58 +0200 schrieb Krzysztof Opasiak: > > On 08/24/2015 11:09 PM, Stefan Koch wrote: > > The kernel supports the device authorization because of wireless USB. > > These is usable for wired USB devices, too. > > These new interface authorization allows to enable or dis

Re: [Bug 103461] i.MX USB runtime power management breaks the boot

2015-08-25 Thread Fabio Estevam
On Tue, Aug 25, 2015 at 1:07 PM, Vincent Stehlé wrote: > Hi, > > I have encountered a bug related to the USB runtime pm in a specific > boot configuration. > > The issue happens on an i.MX6 SabreSD platform with recent kernel > versions (e.g. v4.2-rc8) and imx_v6_v7_defconfig, when booting u-boot

Fwd: [Bug 103461] i.MX USB runtime power management breaks the boot

2015-08-25 Thread Vincent Stehlé
Hi, I have encountered a bug related to the USB runtime pm in a specific boot configuration. The issue happens on an i.MX6 SabreSD platform with recent kernel versions (e.g. v4.2-rc8) and imx_v6_v7_defconfig, when booting u-boot by USB and the kernel by ethernet. I have bisected to a specific co

Re: [PATCH 1/2] usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared

2015-08-25 Thread Oliver Neukum
On Mon, 2015-08-24 at 23:13 +0300, Eugene Shatokhin wrote: > It is needed to check EVENT_NO_RUNTIME_PM bit of dev->flags in > usbnet_stop(), but its value should be read before it is cleared > when dev->flags is set to 0. > > The problem was spotted and the fix was provided by > Oliver Neukum . >

Re: [PATCH 1/2] usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared

2015-08-25 Thread Bjørn Mork
Oliver Neukum writes: > On Mon, 2015-08-24 at 23:13 +0300, Eugene Shatokhin wrote: >> It is needed to check EVENT_NO_RUNTIME_PM bit of dev->flags in >> usbnet_stop(), but its value should be read before it is cleared >> when dev->flags is set to 0. > > Can we agree that this at least is good and

Re: [PATCH 1/2] usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared

2015-08-25 Thread Oliver Neukum
On Mon, 2015-08-24 at 23:13 +0300, Eugene Shatokhin wrote: > It is needed to check EVENT_NO_RUNTIME_PM bit of dev->flags in > usbnet_stop(), but its value should be read before it is cleared > when dev->flags is set to 0. Can we agree that this at least is good and should go upstream and into stab

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-25 Thread Oliver Neukum
On Mon, 2015-08-24 at 14:21 -0400, Alan Stern wrote: > > In theory, an architecture could implement atomic bit operations > using > > a spinlock to insure atomicity. I don't know if any architectures > do > > this, but if they do then the scenario above could arise. > > Now that I see this in w

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

2015-08-25 Thread Oliver Neukum
On Mon, 2015-08-24 at 15:29 +0200, Bjørn Mork wrote: > Eugene Shatokhin writes: > > > 19.08.2015 15:31, Bjørn Mork пишет: > >> Eugene Shatokhin writes: > >> Stopping the tasklet rescheduling etc depends only on netif_running(), > >> which will be false when usbnet_stop is called. There is no n

[TESTPATCH] xhci: custom debug patch for command mismatch

2015-08-25 Thread Mathias Nyman
Add extra command ring, event ring and command queue debugging to get more info on command mismatch error triggered by Vincent Pelletier on BayTrail will blurt out around 500 lines when hitting a command mismatch Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-dbg.c | 6 +++--- drivers

[PATCH 3/5] usb: common: of_usb_get_dr_mode to usb_get_dr_mode

2015-08-25 Thread Heikki Krogerus
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus --- drivers/usb/chipidea/core.c | 2 +- drivers/usb/common/common.c | 15 --- drivers/usb/dwc2/platform.c |

[PATCH 4/5] usb: dwc3: core: convert to unified device property interface

2015-08-25 Thread Heikki Krogerus
No functional affect on existing platforms, but the driver is now ready to extract the properties also from ACPI tables as well as from DT. Signed-off-by: Heikki Krogerus --- drivers/usb/dwc3/core.c | 45 ++--- 1 file changed, 22 insertions(+), 23 deletion

[PATCH 5/5] usb: dwc3: pci: passing forward the ACPI companion

2015-08-25 Thread Heikki Krogerus
Sharing the ACPI companion with dwc3 core so it has access to the properties defined for DWC3 in ACPI tables. Signed-off-by: Heikki Krogerus --- drivers/usb/dwc3/dwc3-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index f626179

[PATCH 1/5] usb: common: of_usb_get_maximum_speed to usb_get_maximum_speed

2015-08-25 Thread Heikki Krogerus
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus --- drivers/usb/chipidea/core.c | 2 +- drivers/usb/common/common.c | 44 ++-- drivers/usb/

[PATCH 0/5] usb: common and dwc3: converting to unified device property

2015-08-25 Thread Heikki Krogerus
Hi, While converting dwc3 to the unified device property interface, I noticed that there is really nothing preventing of_usb_get_dr_mode and of_usb_get_maximum_speed from being converted as well. Hope that's OK. The only special case was dwc3-st.c, where the dr_mode is requested before the platfo

[PATCH 2/5] usb: dwc3: st: prepare the driver for generic usb_get_dr_mode function

2015-08-25 Thread Heikki Krogerus
of_usb_get_dr_mode will be converted into more generic usb_get_dr_mode function that will take struct device instead of struct device_node as it's parameter. To make the conversion possible later, waiting for the platform device for dwc3 to be populated before calling of_usb_get_dr_mode. Signed-o

Re: [PATCH v10 5/7] usb: interface authorization: SysFS part of USB interface authorization

2015-08-25 Thread Oliver Neukum
On Tue, 2015-08-25 at 12:03 +0200, Krzysztof Opasiak wrote: > shouldn't we return error if user tries to authorize interface which > is > already authorized an likewise when he is trying to deauthorize > interface which is not autorized? That would be awkward if the user and udev try to do this

Re: [PATCH v10 5/7] usb: interface authorization: SysFS part of USB interface authorization

2015-08-25 Thread Krzysztof Opasiak
On 08/24/2015 11:09 PM, Stefan Koch wrote: This introduces an attribute for each interface to authorize (1) or deauthorize (0) it: /sys/bus/usb/devices/INTERFACE/authorized Signed-off-by: Stefan Koch --- drivers/usb/core/sysfs.c | 36 1 file changed, 36

Re: [PATCH v10 4/7] usb: interface authorization: Introduces the USB interface authorization

2015-08-25 Thread Krzysztof Opasiak
On 08/24/2015 11:09 PM, Stefan Koch wrote: The kernel supports the 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 instead a whole device. If a deauthorized interface w

Re: [PATCH v10 3/7] usb: interface authorization: Control interface probing and claiming

2015-08-25 Thread Krzysztof Opasiak
On 08/24/2015 11:09 PM, Stefan Koch wrote: Driver probings and interface claims get rejected if an interface is not authorized. Signed-off-by: Stefan Koch --- drivers/usb/core/driver.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/

Re: USB suspend resume issue on Vybrid (Chipidea IP/MXS PHY)

2015-08-25 Thread maitysanchayan
On 15-08-24 11:22:17, Felipe Balbi wrote: > Hi, > > On Mon, Aug 24, 2015 at 09:40:04PM +0530, Sanchayan Maity wrote: > > Hello, > > > > I am working on Freescale Vybrid which is a Cortex A5 based SoC, > > with a Chipidea based USB controller and a Sigmatel Phy or some- > > thing if my memory serv

Re: USB suspend resume issue on Vybrid (Chipidea IP/MXS PHY)

2015-08-25 Thread maitysanchayan
On 15-08-25 10:37:27, Peter Chen wrote: > On Mon, Aug 24, 2015 at 09:40:04PM +0530, Sanchayan Maity wrote: > > Hello, > > > > I am working on Freescale Vybrid which is a Cortex A5 based SoC, > > with a Chipidea based USB controller and a Sigmatel Phy or some- > > thing if my memory serves me right

Re: 4.2 kernel trace when hot unplug a mounted USB/SATA/MMC devices with ext2/ext3/ext4 file system

2015-08-25 Thread Christoph Hellwig
On Mon, Aug 24, 2015 at 02:20:07PM -0700, Duc Dang wrote: > For more information. We tested kernel at commit 5f80f62ada "ext4: > remove useless condition in if statement." > (right before your commit) and still saw the issue. > > df3305156f989339529b3d6744b898d498fb1f7b [media] v4l: xilinx: Add >

[PATCH] usb: otg: don't set a_alt_hnp_support feature for OTG 2.0 device

2015-08-25 Thread Li Jun
Since a_alt_hnp_support is obsolete in OTG 2.0, HNP capable host should send this set feature request only if the otg device is connecting to a non-HNP port and it's compliant with OTG 1.x revision. This is done by checking its otg descriptor length, OTG 2.0 uses usb_otg20_descriptor which has diff