[PATCH] Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts"

2017-08-22 Thread Kai-Heng Feng
This reverts commit dec08194ffeccfa1cf085906b53d301930eae18f. Commit dec08194ffec ("xhci: Limit USB2 port wake support for AMD Promontory hosts") makes all high speed USB ports on ASUS PRIME B350M-A cease to function after enabling runtime PM. All boards with this chipsets will be affected, so re

Possible bug in cypress_m8.ko

2017-08-22 Thread Anton Volkov
Hello. Judging by the code of cypress_m8.c some functions are considered to be capable of working concurrently with other functions, e.g. cypress_open. There are, however, entities that are protected by the locks at one place and not protected in another. Lines are given using the info from Li

[PATCH 4/4] [media] usb: constify videobuf_queue_ops structures

2017-08-22 Thread Arvind Yadav
videobuf_queue_ops are not supposed to change at runtime. All functions working with videobuf_queue_ops provided by work with const videobuf_queue_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/media/usb/cx231xx/cx231xx-417.c | 2 +- drivers/media/usb/cx2

[PATCH 2/4] [media] pci: constify videobuf_queue_ops structures

2017-08-22 Thread Arvind Yadav
videobuf_queue_ops are not supposed to change at runtime. All functions working with videobuf_queue_ops provided by work with const videobuf_queue_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/media/pci/bt8xx/bttv-driver.c | 2 +- drivers/media/pci/cx18/cx

[PATCH 3/4] [media] platform: constify videobuf_queue_ops structures

2017-08-22 Thread Arvind Yadav
videobuf_queue_ops are not supposed to change at runtime. All functions working with videobuf_queue_ops provided by work with const videobuf_queue_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/media/platform/davinci/vpfe_capture.c | 2 +- drivers/media/pla

[PATCH 1/4] [media] saa7146: constify videobuf_queue_ops structures

2017-08-22 Thread Arvind Yadav
videobuf_queue_ops are not supposed to change at runtime. All functions working with videobuf_queue_ops provided by work with const videobuf_queue_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/media/common/saa7146/saa7146_vbi.c | 2 +- drivers/media/comm

[PATCH 0/4] constify videobuf_queue_ops structures

2017-08-22 Thread Arvind Yadav
videobuf_queue_ops are not supposed to change at runtime. All functions working with videobuf_queue_ops provided by work with const videobuf_queue_ops. So mark the non-const structs as const. Arvind Yadav (4): [PATCH 1/4] [media] saa7146: constify videobuf_queue_ops structures [PATCH 2/4] [me

Re: [PATCH 15/15] usb: make device_type const

2017-08-22 Thread Heikki Krogerus
On Sat, Aug 19, 2017 at 01:52:26PM +0530, Bhumika Goyal wrote: > Make this const as it is only stored in the type field of a device > structure, which is const. > Done using Coccinelle. > > Signed-off-by: Bhumika Goyal Acked-by: Heikki Krogerus > --- > drivers/usb/common/ulpi.c | 2 +- > 1 fi

Re: Possible bug in cypress_m8.ko

2017-08-22 Thread Oliver Neukum
Am Dienstag, den 22.08.2017, 15:11 +0300 schrieb Anton Volkov: > Hello. > > Judging by the code of cypress_m8.c some functions are considered to be > capable of working concurrently with other functions, e.g. cypress_open. > There are, however, entities that are protected by the locks at one > p

Possible double free in iowarrior.ko

2017-08-22 Thread Anton Volkov
Hello. While searching for races in the Linux kernel I've come across "drivers/usb/misc/iowarrior.ko" module. Here are questions that I came up with while analyzing results. Lines are given using the info from Linux v4.12. Consider the following case: Thread 1:Thread 2:

Re: [PATCH] udc: Memory leak on error path and use after free

2017-08-22 Thread Anton Vasilyev
Sorry for delayed reply. On 16.08.2017 19:35, Alan Stern wrote: On Wed, 16 Aug 2017, Anton Vasilyev wrote: On 16.08.2017 18:29, Alan Stern wrote: On Wed, 16 Aug 2017, Anton Vasilyev wrote: gadget_release() is responsible for cleanup dev memory. But if net2280_probe() fails after dev alloca

Web camera USB bandwidth allocation

2017-08-22 Thread Martin Oprešnik
Hello, we are working on a project, where we need multiple cameras connected to embedded computer. For computer we have chosen odroid XU4 and for cameras Logitech C920. We need at least 5 cameras running with 720p. The problem we have is allocated USB bandwidth (cameras are using isochronous

Possible regression between 4.9 and 4.13

2017-08-22 Thread Mason
Hello, The driver for my system's PCIe host bridge landed recently (in 4.13) but it was developed on 4.9 I tested the PCIe host bridge by plugging a 4-port USB3 adapter into the PCIe slot (system at rest) and plugging an USB3 Flash drive into the USB3 adapter (at run-time). On 4.9, the setup wor

Re: [PATCH] usb: gadget: f_midi: Use snd_card_free_when_closed with refcount

2017-08-22 Thread Jerry Zhang
Yes you're right. I'm not sure that would be the best approach though since you'd have to iterate through every function instance, and you'd end up leaking the memory if the device was open. I'm working on modifying the original patch to make use of the opts refcnt as well. On Mon, Aug 21, 2017 at

Re: Web camera USB bandwidth allocation

2017-08-22 Thread Alan Stern
On Tue, 22 Aug 2017, Martin Oprešnik wrote: > Hello, > > we are working on a project, where we need multiple cameras connected to > embedded computer. For computer we have chosen odroid XU4 and for > cameras Logitech C920. We need at least 5 cameras running with 720p. The > problem we have is

Re: [PATCH] udc: Memory leak on error path and use after free

2017-08-22 Thread Alan Stern
On Tue, 22 Aug 2017, Anton Vasilyev wrote: > Sorry for delayed reply. > > On 16.08.2017 19:35, Alan Stern wrote: > > On Wed, 16 Aug 2017, Anton Vasilyev wrote: > > > >> On 16.08.2017 18:29, Alan Stern wrote: > >>> On Wed, 16 Aug 2017, Anton Vasilyev wrote: > >>> > gadget_release() is respon

high irqs-off latency caused by USB serial driver

2017-08-22 Thread David Mosberger
Has anyone here looked into reducing the amount of time the USB serial driver disables interrupts? On an ARM system, I'm seeing about 746 us of latency for handling a USB interrupt, which seems rather excessive. I attached a trace captured with the irqsoff tracer. Note: the 500MHz ARM cycle count

Re: [GIT PULL] USB changes for v4.14

2017-08-22 Thread Greg Kroah-Hartman
On Mon, Aug 21, 2017 at 02:41:37PM +0300, Felipe Balbi wrote: > > Hi Greg, > > Here's the USB gadget pull request. Not much going on this time around. > > Changes have been in linux-next for a while with no bug reports. I have > also tested what I could on GLK. > > Let me know if you want anyth

Re: high irqs-off latency caused by USB serial driver

2017-08-22 Thread Greg KH
On Tue, Aug 22, 2017 at 12:42:33PM -0600, David Mosberger wrote: > Has anyone here looked into reducing the amount of time the USB serial > driver disables interrupts? On an ARM system, I'm seeing about 746 us > of latency for handling a USB interrupt, which seems rather excessive. > I attached a

Re: high irqs-off latency caused by USB serial driver

2017-08-22 Thread David Mosberger
Greg, On Tue, Aug 22, 2017 at 2:25 PM, Greg KH wrote: > USB has always been a big problem with this, the IRQ patch is very long, > and messy and complex. Yeah. > There was an option a while ago to turn USB irqs > into threaded irqs, do those work on your platform? If so, that might > help you

Re: high irqs-off latency caused by USB serial driver

2017-08-22 Thread Greg KH
On Tue, Aug 22, 2017 at 02:44:20PM -0600, David Mosberger wrote: > Greg, > > On Tue, Aug 22, 2017 at 2:25 PM, Greg KH wrote: > > > USB has always been a big problem with this, the IRQ patch is very long, > > and messy and complex. > > Yeah. > > > There was an option a while ago to turn USB irq

Re: high irqs-off latency caused by USB serial driver

2017-08-22 Thread David Mosberger
On Tue, Aug 22, 2017 at 3:40 PM, Greg KH wrote: > On Tue, Aug 22, 2017 at 02:44:20PM -0600, David Mosberger wrote: >> Greg, >> >> On Tue, Aug 22, 2017 at 2:25 PM, Greg KH wrote: >> >> > USB has always been a big problem with this, the IRQ patch is very long, >> > and messy and complex. >> >> Yeah

Re: [PATCH v2 2/4] usb: xhci-mtk: add generic compatible string

2017-08-22 Thread Chunfeng Yun
Hi, Mathias On Wed, 2017-08-16 at 14:08 +0800, Chunfeng Yun wrote: > The xhci-mtk driver is a generic driver for MediaTek xHCI IP, add > a generic compatible to avoid confusion when support new SoCs but > use a compatible with specific SoC's name "mt8173". > > Signed-off-by: Chunfeng Yun > --- >

Re: Need help investigating not working NKRO over USB in Linux

2017-08-22 Thread Greg KH
On Sun, Aug 20, 2017 at 09:43:01PM +0300, IFo Hancroft wrote: > Hello Everyone, > > Greg Kroah-Hartman directed me to here. > > Here is what I am trying to do, what problems am I facing and what I've > tried so far: > > My keyboard is USB and it is supposed to have NKRO (the ability to > registe

Re: Web camera USB bandwidth allocation

2017-08-22 Thread Felipe Balbi
Hi, Alan Stern writes: > On Tue, 22 Aug 2017, Martin Oprešnik wrote: > >> Hello, >> >> we are working on a project, where we need multiple cameras connected to >> embedded computer. For computer we have chosen odroid XU4 and for >> cameras Logitech C920. We need at least 5 cameras running wit

Re: Possible regression between 4.9 and 4.13

2017-08-22 Thread Felipe Balbi
Hi, Mason writes: > Hello, > > The driver for my system's PCIe host bridge landed recently > (in 4.13) but it was developed on 4.9 > > I tested the PCIe host bridge by plugging a 4-port USB3 adapter > into the PCIe slot (system at rest) and plugging an USB3 Flash > drive into the USB3 adapter (a

[PATCH] usb: reducing an usb-port auto-resume latency.

2017-08-22 Thread anshuman . gupta
From: Anshuman Gupta This patch will improve the variable auto-resume latency of an usb-port. When xhci gets a port status change event interrupt due to PORT_PLC (port link state transition), linux Host controller driver drives the resume signalling on the bus for the amount of time defined by U