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 >

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: 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

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

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?

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: [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

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

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

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] 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

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

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

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

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: 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 >

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

[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]

[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

[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 |

[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

[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 ---

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

[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: [PATCH] usb: gadget: f_midi: Use snd_card_free_when_closed with refcount

2017-08-22 Thread Manu Gautam
Hi, On 8/18/2017 11:30 AM, Manu Gautam wrote: > Hi, > > > On 8/15/2017 2:44 AM, Jerry Zhang wrote: >> @@ -1197,14 +1200,21 @@ static void f_midi_free(struct usb_function *f) >> >> midi = func_to_midi(f); >> opts = container_of(f->fi, struct f_midi_opts, func_inst); > opts could be

[PATCH next 1/2] phy: phy-mtk-tphy: fix NULL point of chip bank

2017-08-22 Thread Chunfeng Yun
Chip bank of version-1 is initialized as NULL, but it's used by pcie_phy_instance_power_on/off(), so assign it a right address. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH next 2/2] phy: phy-mtk-tphy: add set_mode callback

2017-08-22 Thread Chunfeng Yun
This is used to force PHY with USB OTG function to enter a specific mode, and override OTG VBUS and ID signals. Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-tphy.c | 39 +++ 1 file changed, 39 insertions(+) diff --git