Re: xhci_hcd and Canon Lide 110 not playing well together

2013-12-25 Thread Alan Stern
On Wed, 25 Dec 2013, Matthias [ISO-8859-1] Bl�sing wrote: > The slow down can be tracked to: > > usb_enable_interface(dev, intf, true); > > I springled comments like this: > > > dev_info(&dev->dev, "T1\n"); > /* re-init hc/hcd interface/endpoint state */ > for (i = 0; i < con

RE: [PATCH] usb/core: fix NULL pointer dereference in recursively_mark_NOTATTACHED

2013-12-25 Thread Du, ChangbinX
> On Tue, 24 Dec 2013, Alan Stern wrote: > I think this will fix it. Take a close look and do some careful testing. > > Alan Stern > > Index: usb-3.13/drivers/usb/core/hub.c > == > = > --- usb-3.13.orig/drivers/usb/core/hub.c > +++

Re: xhci_hcd and Canon Lide 110 not playing well together

2013-12-25 Thread Matthias Bläsing
Hey Alan, On Mo, 2013-12-23 at 15:38 -0500, Alan Stern wrote: > On Mon, 23 Dec 2013, Matthias [ISO-8859-1] Blsing wrote: > > Looking at the strace alone, I see, that the USBDEVFS_SETCONFIGURATION > > ioctl calls take excessive time. > > > > You're right; those calls took an excessively long time

RE: [PATCH] usb/core: fix NULL pointer dereference in recursively_mark_NOTATTACHED

2013-12-25 Thread Alan Stern
On Tue, 24 Dec 2013, Alan Stern wrote: > > This is my analysis, how do you think? > > There is another reason why usb_hub_to_struct_hub() could return NULL: > if usb_get_intfdata(hdev->actconfig->interface[0]) is NULL. This could > happen if recursively_mark_NOTATTACHED() is called _while_ >

[PATCH v2 2/2] USB: c67x00: add proper delays to HPI read/write

2013-12-25 Thread Max Filippov
According to CY7C67300 specification HPI read and write cycle duration Tcyc must be at least 6T long, where T is 1/48MHz, which is 125ns. Without this delay fast host processor cannot write to chip registers. Add proper ndelay to hpi_{read,write}_reg. Signed-off-by: Max Filippov Acked-by: Peter K

[PATCH v2 1/2] USB: c67x00: move URB private data allocation from under spinlock

2013-12-25 Thread Max Filippov
This fixes the following warning: BUG: sleeping function called from invalid context at mm/slub.c:940 in_atomic(): 1, irqs_disabled(): 1, pid: 17, name: khubd CPU: 0 PID: 17 Comm: khubd Not tainted 3.12.0-4-g938dd60-dirty #1 __might_sleep+0xbe/0xc0 kmem_cache_alloc_trace+0x36/0x17

[PATCH v2 0/2] Fixes for CY7C67x00 host controller

2013-12-25 Thread Max Filippov
Hello, there are two fixes for the CY7C67x00 host controller: one fixes memory allocation with non-atomic flags in the atomic context, the other adds proper delays to the register access methods which makes possible to use the chip with fast host CPU. Changes v1 -> v2: - add HPI_T_CYC_NS macro wi

Re: Using both usbmon and ftrace?

2013-12-25 Thread Smilen Dimitrov
Hi Alan, Many thanks for your response! On 2013-12-25 02:49, Alan Stern wrote: > > This was a long and rather rambling message. Sorry about that, it was my attempt at being detailed :) > The main points I > gathered from it were: > > You are using a very old kernel version. You re

Re: [PATCH 2/2] USB: c67x00: add proper delays to HPI read/write

2013-12-25 Thread Peter Korsgaard
> "Max" == Max Filippov writes: > According to CY7C67300 specification HPI read and write cycle duration > Tcyc must be at least 6T long, where T is 1/48MHz, which is 125ns. > Without this delay fast host processor cannot write to chip registers. > Add proper ndelay to hpi_{read,write}_re

Re: [PATCH 1/2] USB: c67x00: move URB private data allocation from under spinlock

2013-12-25 Thread Peter Korsgaard
> "Max" == Max Filippov writes: > This fixes the following warning: > BUG: sleeping function called from invalid context at mm/slub.c:940 > in_atomic(): 1, irqs_disabled(): 1, pid: 17, name: khubd > CPU: 0 PID: 17 Comm: khubd Not tainted 3.12.0-4-g938dd60-dirty #1 >__might