Re: Overly conservative xHCI bandwidth estimation

2015-11-08 Thread Lu, Baolu
e sysfs file. They should read 0. 6) start the two devices at the same time, can they work at the same time? Thanks, Baolu For fun, I tried also with a USB 2.0 cable. U1 and U2 comes up as disabled, but of course, the device doesn't work. /* Steinar */ >From 836c0ab187bcc5a08ac3a6d55136203f9

[PATCH v3 02/12] x86: fixmap: add permanent fixmap for xhci debug port

2015-11-08 Thread Lu Baolu
in fixed_addresses table for xHCI mmio access. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- arch/x86/include/asm/fixmap.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index f80d700..fbf452f 100644 --- a/arch/x86/inclu

[PATCH v3 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-11-08 Thread Lu Baolu
This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> Acked-by: Johan Hovold <jo...@kernel.org> --- drivers/usb/serial/usb_debug.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --g

[PATCH v3 12/12] usb: doc: add document for xHCI DbC driver

2015-11-08 Thread Lu Baolu
Add Documentation/usb/xhci-dbc.txt. This document includes development status and user guide for USB3 debug port. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/usb/xhci-dbc.txt | 325 + MAINTAINERS| 1 + d

[PATCH v3 04/12] usb: xhci: dbc: add support for Intel xHCI dbc quirk

2015-11-08 Thread Lu Baolu
a port reset to the debug port from the host xHCI. This patch introduces this work around. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 52 include/linux/usb/xhci-dbc.h | 2 ++ 2 files changed, 54 inse

[PATCH v3 05/12] usb: xhci: dbc: add debug buffer

2015-11-08 Thread Lu Baolu
DBC_DEBUG is defined. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 62 ++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index

[PATCH v3 07/12] usb: xhci: dbc: handle dbc-configured exit

2015-11-08 Thread Lu Baolu
DbC might exit configured state in some cases (refer to 7.6.4.4 in xHCI spec 1.1). Software needs detect and clear this situation by clearing DCCTRL.DCR and wait until the DbC configured before read or write oprations. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/earl

[PATCH v3 03/12] usb: xhci: dbc: probe and setup xhci debug capability

2015-11-08 Thread Lu Baolu
between the debug host and target. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- MAINTAINERS | 7 + arch/x86/Kconfig.debug | 12 + drivers/usb/early/Makefile | 1 + drivers/usb/early/xhci-dbc.c | 787 +++ include/lin

[PATCH v3 09/12] x86: early_printk: add USB3 debug port earlyprintk support

2015-11-08 Thread Lu Baolu
Add support for early printk by writing debug messages to the USB3 debug port. Users can use this type of early printk by specifying kernel parameter of "earlyprintk=xdbc". This gives users a chance of providing debug output. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --

[PATCH v3 06/12] usb: xhci: dbc: add bulk out and bulk in interfaces

2015-11-08 Thread Lu Baolu
This patch adds interfaces for bulk out and bulk in ops. These interfaces could be used to implement early printk bootconsole or hook to various system debuggers. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c

[PATCH v3 10/12] usb: xhci: dbc: add handshake between debug target and host

2015-11-08 Thread Lu Baolu
' in the tty application. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 68a7139..b75c523 100644 --- a/drivers/usb

[PATCH v3 08/12] usb: xhci: dbc: handle endpoint stall

2015-11-08 Thread Lu Baolu
. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 8a5a51f..aaf655f 100644 --- a/drivers/usb/early/xhci

[PATCH v3 01/12] usb: xhci: add sysfs file for xHCI debug port

2015-11-08 Thread Lu Baolu
this file will show users the state (disabled, enabled or configured) of the debug port. With a host that does NOT support debug port, "debug_port_state" file won't be created. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- .../ABI/testing/sysfs-bus-pci-drivers-xhci_hcd |

[PATCH v3 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-08 Thread Lu Baolu
uot; has been replaced with sysfs. The scope reduced from all extended capabilities to debug port specific. (2) Patch 11 changed. Removed unnecessary .bulk_out_size setting. v2->v3: (1) Patch 11 got acked by Johan Hovold. Lu Baolu (12): usb: xhci: add sysfs file for xHCI debug port

Re: Overly conservative xHCI bandwidth estimation

2015-11-05 Thread Lu, Baolu
afraid I can't help you at this point. My recommendation to include the patch still stands, though. /* Steinar */ >From c8cd71a0703cf26cfca9d89a3ad451f79c7232af Mon Sep 17 00:00:00 2001 From: Lu Baolu <baolu...@linux.intel.com> Date: Thu, 5 Nov 2015 14:08:48 +0800 Subject: [PATCH 1/2] usb:

Re: Overly conservative xHCI bandwidth estimation

2015-11-05 Thread Lu, Baolu
On 11/06/2015 02:45 AM, Steinar H. Gunderson wrote: On Thu, Nov 05, 2015 at 04:12:24PM +0800, Lu, Baolu wrote: 1) apply the attached patch on top the latest kernel. I applied on top of a clean 4.3.0. $ cat /sys/bus/usb/devices//power/usb3_hardware_lpm_u1 $ cat /sys/bus/usb/devices//power

Re: Overly conservative xHCI bandwidth estimation

2015-11-05 Thread Lu, Baolu
On 11/06/2015 08:45 AM, Steinar H. Gunderson wrote: On Fri, Nov 06, 2015 at 08:39:28AM +0800, Lu, Baolu wrote: Have you set CONFIG_PM? Yes. CONFIG_PM=y. Can you reproduce the problem with this kernel? I reproduced the U1/U2 disconnect issues several times. I didn't try the issue

[PATCH v2 10/12] usb: xhci: dbc: add handshake between debug target and host

2015-11-03 Thread Lu Baolu
' in the tty application. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 68a7139..b75c523 100644 --- a/drivers/usb

[PATCH v2 08/12] usb: xhci: dbc: handle endpoint stall

2015-11-03 Thread Lu Baolu
. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 8a5a51f..aaf655f 100644 --- a/drivers/usb/early/xhci

[PATCH v2 09/12] x86: early_printk: add USB3 debug port earlyprintk support

2015-11-03 Thread Lu Baolu
Add support for early printk by writing debug messages to the USB3 debug port. Users can use this type of early printk by specifying kernel parameter of "earlyprintk=xdbc". This gives users a chance of providing debug output. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --

[PATCH v2 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-03 Thread Lu Baolu
uot; has been replaced with sysfs. The scope reduced from all extended capabilities to debug port specific. (2) Patch 11 changed. Removed unnecessary .bulk_out_size setting. Lu Baolu (12): usb: xhci: add sysfs file for xHCI debug port x86: fixmap: add permanent fixmap for xhci debug por

[PATCH v2 06/12] usb: xhci: dbc: add bulk out and bulk in interfaces

2015-11-03 Thread Lu Baolu
This patch adds interfaces for bulk out and bulk in ops. These interfaces could be used to implement early printk bootconsole or hook to various system debuggers. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c

[PATCH v2 04/12] usb: xhci: dbc: add support for Intel xHCI dbc quirk

2015-11-03 Thread Lu Baolu
a port reset to the debug port from the host xHCI. This patch introduces this work around. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 52 include/linux/usb/xhci-dbc.h | 2 ++ 2 files changed, 54 inse

[PATCH v2 05/12] usb: xhci: dbc: add debug buffer

2015-11-03 Thread Lu Baolu
DBC_DEBUG is defined. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 62 ++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index

[PATCH v2 12/12] usb: doc: add document for xHCI DbC driver

2015-11-03 Thread Lu Baolu
Add Documentation/usb/xhci-dbc.txt. This document includes development status and user guide for USB3 debug port. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/usb/xhci-dbc.txt | 325 + MAINTAINERS| 1 + d

[PATCH v2 03/12] usb: xhci: dbc: probe and setup xhci debug capability

2015-11-03 Thread Lu Baolu
between the debug host and target. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- MAINTAINERS | 7 + arch/x86/Kconfig.debug | 12 + drivers/usb/early/Makefile | 1 + drivers/usb/early/xhci-dbc.c | 787 +++ include/lin

[PATCH v2 02/12] x86: fixmap: add permanent fixmap for xhci debug port

2015-11-03 Thread Lu Baolu
in fixed_addresses table for xHCI mmio access. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- arch/x86/include/asm/fixmap.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index f80d700..fbf452f 100644 --- a/arch/x86/inclu

[PATCH v2 07/12] usb: xhci: dbc: handle dbc-configured exit

2015-11-03 Thread Lu Baolu
DbC might exit configured state in some cases (refer to 7.6.4.4 in xHCI spec 1.1). Software needs detect and clear this situation by clearing DCCTRL.DCR and wait until the DbC configured before read or write oprations. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/earl

[PATCH v2 01/12] usb: xhci: add sysfs file for xHCI debug port

2015-11-03 Thread Lu Baolu
this file will show users the state (disabled, enabled or configured) of the debug port. With a host that does NOT support debug port, "debug_port_state" file won't be created. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- .../ABI/testing/sysfs-bus-pci-drivers-xhci_hcd |

[PATCH v2 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-11-03 Thread Lu Baolu
This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/serial/usb_debug.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/

Re: [PATCH 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-03 Thread Lu, Baolu
On 11/03/2015 05:42 PM, Dave Young wrote: On 10/28/15 at 04:00pm, Lu Baolu wrote: This patch series adds support for early printk through USB3 debug port. USB3 debug port is described in xHCI specification as an optional extended capability. The first patch adds a file in debugfs, through

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-11-02 Thread Lu, Baolu
On 10/30/2015 10:45 PM, Greg Kroah-Hartman wrote: On Fri, Oct 30, 2015 at 08:09:17PM +0800, Lu, Baolu wrote: On 10/28/2015 08:40 PM, Greg Kroah-Hartman wrote: +static const char *get_extcap_desc(u32 cap_id) +{ + switch (cap_id) { + case XHCI_EXT_CAPS_LEGACY

Re: Overly conservative xHCI bandwidth estimation

2015-11-02 Thread Lu, Baolu
Thanks for the information. I will let you know if I have anything. Thanks, Baolu On 11/01/2015 04:20 AM, Steinar H. Gunderson wrote: On Wed, Oct 21, 2015 at 09:49:16AM +0800, Lu, Baolu wrote: I could spend some time on this issue a week later. I'd like to check whether there is any bugs

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-30 Thread Lu, Baolu
On 10/28/2015 08:40 PM, Greg Kroah-Hartman wrote: +static const char *get_extcap_desc(u32 cap_id) >+{ >+ switch (cap_id) { >+ case XHCI_EXT_CAPS_LEGACY: >+ return "USB Legacy Support"; >+ case XHCI_EXT_CAPS_PROTOCOL: >+ return "Supported Protocol"; >+ case

Re: [PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-30 Thread Lu, Baolu
On 10/28/2015 08:33 PM, Greg Kroah-Hartman wrote: On Wed, Oct 28, 2015 at 04:00:42PM +0800, Lu Baolu wrote: This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/serial/usb_debug.

Re: [PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-30 Thread Lu, Baolu
On 10/30/2015 10:41 PM, Greg Kroah-Hartman wrote: On Fri, Oct 30, 2015 at 07:46:45PM +0800, Lu, Baolu wrote: On 10/28/2015 08:33 PM, Greg Kroah-Hartman wrote: On Wed, Oct 28, 2015 at 04:00:42PM +0800, Lu Baolu wrote: This patch add dbc debug device support in usb_debug driver. Signed-off

Re: [PATCH v2 1/1] usb: xhci: fix checking ep busy for CFC

2015-10-29 Thread Lu, Baolu
On 10/29/2015 08:51 PM, Sergei Shtylyov wrote: Hello. On 10/29/2015 5:46 AM, Lu Baolu wrote: Function ep_ring_is_processing() checks the dequeue pointer in endpoint context to know whether an endpoint is busy with processing TRBs. This is not correct since dequeue pointer field

[PATCH v3 1/1] usb: xhci: fix checking ep busy for CFC

2015-10-29 Thread Lu Baolu
audio noise when playing sound with USB headset connected to host controllers which support CFC (one of xhci 1.1 features). This patch should exist in stable kernel since v4.3. Reported-and-tested-by: YD Tseng <yd_ts...@asmedia.com.tw> Signed-off-by: Lu Baolu <baolu...@linux.intel.com>

Re: [PATCH v2 1/1] usb: xhci: fix checking ep busy for CFC

2015-10-29 Thread Lu, Baolu
On 10/29/2015 10:08 PM, Mathias Nyman wrote: On 29.10.2015 14:58, Lu, Baolu wrote: On 10/29/2015 08:51 PM, Sergei Shtylyov wrote: Hello. On 10/29/2015 5:46 AM, Lu Baolu wrote: Function ep_ring_is_processing() checks the dequeue pointer in endpoint context to know whether an endpoint

[PATCH 08/12] usb: xhci: dbc: handle endpoint stall

2015-10-28 Thread Lu Baolu
. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 8a5a51f..aaf655f 100644 --- a/drivers/usb/early/xhci

[PATCH 12/12] usb: doc: add document for xHCI DbC driver

2015-10-28 Thread Lu Baolu
Add Documentation/usb/xhci-dbc.txt. This document includes development status and usage guide for USB3 debug port. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/usb/xhci-dbc.txt | 325 + MAINTAINERS

[PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-28 Thread Lu Baolu
This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/serial/usb_debug.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/usb_debug.c b/drive

[PATCH 03/12] usb: xhci: dbc: probe and setup xhci debug capability

2015-10-28 Thread Lu Baolu
between the debug host and target. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- MAINTAINERS | 7 + arch/x86/Kconfig.debug | 12 + drivers/usb/early/Makefile | 1 + drivers/usb/early/xhci-dbc.c | 787 +++ include/lin

[PATCH 05/12] usb: xhci: dbc: add debug buffer

2015-10-28 Thread Lu Baolu
DBC_DEBUG is defined. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 62 ++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index

[PATCH 06/12] usb: xhci: dbc: add bulk out and bulk in interfaces

2015-10-28 Thread Lu Baolu
This patch adds interfaces for bulk out and bulk in ops. These interfaces could be used to implement early printk bootconsole or hook to various system debuggers. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c

[PATCH 04/12] usb: xhci: dbc: add support for Intel xHCI dbc quirk

2015-10-28 Thread Lu Baolu
a port reset to the debug port from the host xHCI. This patch introduces this work around. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 52 include/linux/usb/xhci-dbc.h | 2 ++ 2 files changed, 54 inse

[PATCH 07/12] usb: xhci: dbc: handle dbc-configured exit

2015-10-28 Thread Lu Baolu
DbC might exit configured state in some cases (refer to 7.6.4.4 in xHCI spec 1.1). Software needs detect and clear this situation by clearing DCCTRL.DCR and wait until the DbC configured before read or write oprations. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/earl

[PATCH 09/12] x86: early_printk: add USB3 debug port earlyprintk support

2015-10-28 Thread Lu Baolu
Add support for early printk by writing debug messages to the USB3 debug port. Users can use this type of early printk by specifying kernel parameter of "earlyprintk=xdbc". This gives users a chance of providing debug output. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --

[PATCH 10/12] usb: xhci: dbc: add handshake between debug target and host

2015-10-28 Thread Lu Baolu
' in the tty application. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 68a7139..b75c523 100644 --- a/drivers/usb

[PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-28 Thread Lu Baolu
this. This patch exposes extended capabilities supported by the xHCI host via debugfs. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-dbg.c | 212 +++ drivers/usb/host/xhci-ext-caps.h | 9 +- drivers/usb/host/xhci.c

[PATCH 00/12] usb: early: add support for early printk through USB3 debug port

2015-10-28 Thread Lu Baolu
have done in drivers/usb/early/ehci-dbgp.c. Patch 11 is a minor change to usb_debug module. This change is required to bind usb_debug with the USB3 debug device. Patch 12 is the design document and user guide. Lu Baolu (12): usb: xhci: expose xhci extended capabilities via debugfs x86: fixmap

[PATCH 02/12] x86: fixmap: add permanent fixmap for xhci debug port

2015-10-28 Thread Lu Baolu
in fixed_addresses table for xHCI mmio access. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- arch/x86/include/asm/fixmap.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index f80d700..fbf452f 100644 --- a/arch/x86/inclu

Re: [PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-28 Thread Lu, Baolu
On 10/28/2015 05:10 PM, Johan Hovold wrote: On Wed, Oct 28, 2015 at 04:00:42PM +0800, Lu Baolu wrote: This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/serial/usb_debug.c | 29 ++-

[PATCH v2 1/1] usb: xhci: fix checking ep busy for CFC

2015-10-28 Thread Lu Baolu
audio noise when playing sound with USB headset connected to host controllers which support CFC (one of xhci 1.1 features). This patch should exist in stable kernel since v4.3. Reported-and-tested-by: YD Tseng <yd_ts...@asmedia.com.tw> Signed-off-by: Lu Baolu <baolu...@linux.intel.com>

Re: [PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-10-28 Thread Lu, Baolu
On 10/28/2015 08:33 PM, Greg Kroah-Hartman wrote: On Wed, Oct 28, 2015 at 04:00:42PM +0800, Lu Baolu wrote: This patch add dbc debug device support in usb_debug driver. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/serial/usb_debug.

Re: [PATCH 1/1] usb: xhci: fix checking ep busy for CFC

2015-10-28 Thread Lu, Baolu
On 10/28/2015 09:27 PM, Mathias Nyman wrote: On 28.10.2015 03:36, Lu Baolu wrote: Function ep_ring_is_processing() checks the dequeue pointer in endpoint context to know whether an endpoint is busy with processing TRBs. This is not correct since dequeue pointer field in an endpoint context

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-28 Thread Lu, Baolu
On 10/28/2015 05:27 PM, Oliver Neukum wrote: +static int fill_buffer(struct debug_buffer *buf) >+{ >+ int ret; >+ >+ if (buf->output_buf) >+ return -EINVAL; >+ >+ buf->alloc_size = PAGE_SIZE; >+ buf->output_buf = vmalloc(buf->alloc_size); That really makes no sense. If you

Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs

2015-10-28 Thread Lu, Baolu
On 10/28/2015 08:40 PM, Greg Kroah-Hartman wrote: >+struct debug_buffer { >+ ssize_t (*fill_func)(struct debug_buffer *); >+ struct usb_bus *bus; >+ struct mutex mutex; >+ size_t count; >+ char *output_buf; >+ size_t alloc_size; >+}; >+ >+static const char *get_extcap_desc(u32

[PATCH 1/1] usb: xhci: fix checking ep busy for CFC

2015-10-27 Thread Lu Baolu
audio noise when playing sound with USB headset connected to host controllers which support CFC (one of xhci 1.1 features). This patch should exist in stable kernel since v4.3. Reported-and-tested-by: YD Tseng <yd_ts...@asmedia.com.tw> Signed-off-by: Lu Baolu <baolu...@linux.intel.com>

Re: Overly conservative xHCI bandwidth estimation

2015-10-20 Thread Lu, Baolu
I could spend some time on this issue a week later. I'd like to check whether there is any bugs in the driver itself. Otherwise, blacklist this specific device for LPM. Thanks, Baolu On 10/21/2015 07:05 AM, Steinar H. Gunderson wrote: On Mon, Sep 28, 2015 at 02:32:13PM +0200, Steinar H.

Re: [PATCH] USB: EHCI: fix dereference of ERR_PTR

2015-09-20 Thread Lu, Baolu
On 09/16/2015 10:08 PM, Sudip Mukherjee wrote: On error find_tt() returns either a NULL pointer or the error value in ERR_PTR. But we were dereferencing it directly without even checking if find_tt() returned a valid pointer or not. Signed-off-by: Sudip Mukherjee ---

Re: [PATCH v5 3/3] usb: xhci: remove stop device and ring doorbell in hub control and bus suspend

2015-06-25 Thread Lu, Baolu
On 06/25/2015 10:53 PM, Mathias Nyman wrote: On 09.05.2015 04:15, Lu Baolu wrote: There is no need to call xhci_stop_device() and xhci_ring_device() in hub control and bus suspend functions since all device suspend and resume have been notified through device_suspend/device_resume interfaces

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

2015-06-15 Thread Lu Baolu
...@vger.kernel.org # 3.15 Reported-by: Kevin Strasser kevin.stras...@linux.intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com Acked-by: Alan Stern st...@rowland.harvard.edu --- drivers/usb/core/hcd.c | 7 +-- drivers/usb/core/hub.c | 2 +- drivers/usb/core/usb.h | 1 + 3 files changed, 7

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

2015-06-14 Thread Lu Baolu
...@vger.kernel.org # 3.15 Reported-by: Kevin Strasser kevin.stras...@linux.intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com --- drivers/usb/core/hcd.c | 7 +-- drivers/usb/core/hub.c | 2 +- drivers/usb/core/usb.h | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) v1-v2 change

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

2015-06-14 Thread Lu, Baolu
On 06/13/2015 11:00 PM, Alan Stern wrote: On Sat, 13 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

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

2015-06-13 Thread Lu Baolu
...@vger.kernel.org # 3.15 Reported-by: Kevin Strasser kevin.stras...@linux.intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com --- drivers/usb/core/hcd.c | 7 +-- drivers/usb/core/hub.c | 2 +- drivers/usb/core/usb.h | 6 ++ 3 files changed, 12 insertions(+), 3 deletions(-) v1-v2

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

2015-06-12 Thread Lu, Baolu
On 06/12/2015 12:32 PM, Greg Kroah-Hartman wrote: On Fri, Jun 12, 2015 at 09:29:37AM +0800, 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

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

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

2015-06-11 Thread Lu Baolu
...@vger.kernel.org # 3.15 Reported-by: Kevin Strasser kevin.stras...@linux.intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com --- drivers/usb/core/hcd.c | 6 ++ drivers/usb/core/hub.c | 2 +- drivers/usb/core/usb.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git

Re: USB3 external HDD not recognized [regression]

2015-06-07 Thread Lu, Baolu
On 06/06/2015 04:56 AM, Ralf Jung wrote: Hi, I got some untested and not yet reviewed usb3 resume race fixes from Zhuang Jin Can If you can try them out and see if they help it would be great. They are sitting in a topic branch called xhci_usb3_pm_fixes in my tree: (5 extra patches on top

Re: [PATCH v4 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-06-04 Thread Lu, Baolu
On 06/04/2015 08:17 PM, Heikki Krogerus wrote: Hi Baolu, On Thu, May 28, 2015 at 08:50:12AM +0800, Lu, Baolu wrote: On 05/28/2015 12:53 AM, David Cohen wrote: Hi, On Tue, May 26, 2015 at 07:37:02PM -0700, Greg Kroah-Hartman wrote: On Wed, May 27, 2015 at 09:45:37AM +0800, Lu Baolu wrote

[PATCH v5 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-06-04 Thread Lu Baolu
. Reported-by: Zhuo Qiuxu qiuxu.z...@intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com Acked-by: Heikki Krogerus heikki.kroge...@linux.intel.com --- drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) v0-v5 change log: Various changes in the commit description. diff

Re: [PATCH v4 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-27 Thread Lu, Baolu
On 05/28/2015 12:53 AM, David Cohen wrote: Hi, On Tue, May 26, 2015 at 07:37:02PM -0700, Greg Kroah-Hartman wrote: On Wed, May 27, 2015 at 09:45:37AM +0800, Lu Baolu wrote: Phy drivers and the ulpi interface providers depend on the registration of the ulpi bus. Ulpi registers the bus

Re: [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-26 Thread Lu, Baolu
On 05/26/2015 10:50 PM, Felipe Balbi wrote: Hi, On Mon, May 25, 2015 at 02:24:00PM +0800, Lu, Baolu wrote: On 05/23/2015 12:08 AM, David Cohen wrote: Hi, On Fri, May 22, 2015 at 07:29:15PM +0800, Lu Baolu wrote: Phy drivers and the ulpi interface providers depend on the registeration

[PATCH v4 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-26 Thread Lu Baolu
Phy drivers and the ulpi interface providers depend on the registration of the ulpi bus. Ulpi registers the bus in module_init(). This could cause unnecessary probe delays. Reported-by: Zhuo Qiuxu qiuxu.z...@intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com Acked-by: Heikki Krogerus

Re: [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-25 Thread Lu, Baolu
On 05/23/2015 12:08 AM, David Cohen wrote: Hi, On Fri, May 22, 2015 at 07:29:15PM +0800, Lu Baolu wrote: Phy drivers and the ulpi interface providers depend on the registeration of the ulpi bus. Ulpi registers the bus in module_init(). This could result in a load order issue, i.e. It's

Re: [Bulk] seagate SRD00f2 expansion 4Tb desktop drive does not work on USB 3.0 Part 2 xhci-debug

2015-05-25 Thread Lu, Baolu
On 05/23/2015 10:00 PM, Donald Harter wrote: May 23 08:52:05 pc_u kernel: [53875.075976] xhci_hcd :00:14.0: Port Status Change Event for port 3 May 23 08:52:05 pc_u kernel: [53875.075979] xhci_hcd :00:14.0: port resume event for port 3 May 23 08:52:05 pc_u kernel: [53875.075981]

Re: [Bulk] seagate SRD00f2 expansion 4Tb desktop drive does not work on USB 3.0 Part 2 xhci-debug SOLVED

2015-05-25 Thread Lu, Baolu
bU2DevExitLat 512 micro seconds Device Status: 0x0001 Self Powered On 05/25/2015 05:34 AM, Lu, Baolu wrote: On 05/23/2015 10:00 PM, Donald Harter wrote: May 23 08:52:05 pc_u kernel: [53875.075976] xhci_hcd :00:14.0: Port Status Change Event for port 3 May 23 08:52:05 pc_u

Re: [PATCH v2 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-22 Thread Lu, Baolu
On 05/22/2015 11:11 AM, David Cohen wrote: On Thu, May 21, 2015 at 08:09:54PM -0700, David Cohen wrote: Hi, On Fri, May 22, 2015 at 10:07:05AM +0800, Lu Baolu wrote: Many drivers and modules depend on ULPI bus registeration to register ULPI interfaces and drivers. It's more appropriate

Re: [PATCH v2 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-22 Thread Lu, Baolu
On 05/22/2015 02:46 PM, Lu, Baolu wrote: On 05/22/2015 11:11 AM, David Cohen wrote: On Thu, May 21, 2015 at 08:09:54PM -0700, David Cohen wrote: Hi, On Fri, May 22, 2015 at 10:07:05AM +0800, Lu Baolu wrote: Many drivers and modules depend on ULPI bus registeration to register ULPI

[PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-22 Thread Lu Baolu
issue by putting ulpi_init in subsys_initcall(). Reported-by: Zhuo Qiuxu qiuxu.z...@intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com --- drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c

Re: [PATCH 1/1] usb: ulpi: ulpi_init should be used in subsys_initcall

2015-05-21 Thread Lu, Baolu
On 05/21/2015 03:33 PM, Heikki Krogerus wrote: On Thu, May 21, 2015 at 01:40:43PM +0800, Lu Baolu wrote: The intention of this change is to fix below kernel panic when USB_ULPI_BUS was configured as buildin. That is actually incorrect. Having the bus build-in does not cause this panic

Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-21 Thread Lu, Baolu
On 05/21/2015 05:22 AM, David Cohen wrote: Hi, On Wed, May 20, 2015 at 03:33:26PM -0400, Sasha Levin wrote: ULPI registers it's bus at module_init so if the bus fails to register, the A minor comment: s/it's/its/ module will fail to load and all will be well in the world. However, if the

[PATCH 1/1] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-21 Thread Lu Baolu
, which will panic the kernel. Fix that by checking that the bus was indeed initialized before trying to register drivers on top of it. Signed-off-by: Sasha Levin sasha.le...@oracle.com Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com

Re: [PATCH 1/1] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-21 Thread Lu, Baolu
Hi Heikki, Sasha and others, Please ignore this patch. I should not squash these two patches into one and sign it off behalf of other people. I apologize for this and I'm sorry if this lets you feel affronted. Thanks, Baolu On 05/21/2015 04:57 PM, Lu Baolu wrote: ULPI registers its bus

[PATCH v2 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-21 Thread Lu Baolu
of kernel panic by putting ulpi_init in subsys_initcall(). Reported-by: Zhuo Qiuxu qiuxu.z...@intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com --- drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common

[PATCH 1/1] usb: ulpi: ulpi_init should be used in subsys_initcall

2015-05-20 Thread Lu Baolu
] kernel_init+0xe/0xf0 [0.935266] [81b0f442] ret_from_fork+0x42/0x70 [0.941315] [81affed0] ? rest_init+0x90/0x90 Reported-by: Zhuo Qiuxu qiuxu.z...@intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com --- drivers/usb/common/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 2/3] usb: xhci: implement device_suspend/device_resume entries

2015-05-06 Thread Lu Baolu
the suspend. device_resume will be called when a USB device is just resumed. It will ring doorbells of all endpoint unconditionally. XHC may use these suspend/resume hints to optimize its operation. Signed-off-by: Lu Baolu baolu...@linux.intel.com --- drivers/usb/host/xhci-hub.c | 2 +- drivers

[RFC][PATCH 2/3] usb: xhci: implement hc_driver notify entry

2015-05-03 Thread Lu Baolu
, it will ring doorbells for all endpoints unconditionally. XHC may use these hints to optimize its operation on endpoint state cashes. Signed-off-by: Lu Baolu baolu...@linux.intel.com --- drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci.c | 28 drivers/usb

Re: [PATCHv2 01/12] usb: add bus type for USB ULPI

2015-03-23 Thread Lu, Baolu
On 03/18/2015 08:40 PM, Heikki Krogerus wrote: + +/** + * ulpi_register_driver - unregister a driver with the ULPI bus Hi Heikki, ulpi_register_driver should be changed to ulpi_unregister_driver. Thanks, Baolu + * @drv: driver to unregister + * + * Unregisters a driver with the ULPI bus. +

Re: [PATCH 1/1] usb: xhci: apply XHCI_AVOID_BEI quirk to Intel ValleyView and LynxPoint LP

2015-03-12 Thread Lu, Baolu
On 03/12/2015 04:46 PM, Mathias Nyman wrote: On 12.03.2015 03:39, Lu Baolu wrote: When a device with an isochronous endpoint is plugged into the Intel xHCI host controller, and the driver submits multiple frames per URB, the xHCI driver will set the Block Event Interrupt (BEI) flag on all

Re: [PATCH 1/1] usb: xhci: apply XHCI_AVOID_BEI quirk to Intel ValleyView and LynxPoint LP

2015-03-12 Thread Lu, Baolu
On 03/12/2015 03:54 PM, Greg Kroah-Hartman wrote: On Thu, Mar 12, 2015 at 09:39:06AM +0800, Lu Baolu wrote: When a device with an isochronous endpoint is plugged into the Intel xHCI host controller, and the driver submits multiple frames per URB, the xHCI driver will set the Block Event

[PATCH v2 1/1] usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllers

2015-03-12 Thread Lu Baolu
to user. This patch is to apply XHCI_AVOID_BEI quirk to Intel xHC devices. And it should be backported to kernels as old as 3.0, that contains the commit 69e848c2090a (Intel xhci: Support EHCI/xHCI port switching.). Signed-off-by: Lu Baolu baolu...@linux.intel.com Cc: sta...@vger.kernel.org

[PATCH v3 1/1] usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllers

2015-03-12 Thread Lu Baolu
to user. This patch is to apply XHCI_AVOID_BEI quirk to Intel xHC devices. And it should be backported to kernels as old as 3.0, that contains the commit 69e848c2090a (Intel xhci: Support EHCI/xHCI port switching.). Signed-off-by: Lu Baolu baolu...@linux.intel.com Tested-by: Alistair Grant

Re: [V4.0.0-rc3] Xhci Regression: ERROR Transfer event TRB DMA ptr not part of current TD

2015-03-11 Thread Lu, Baolu
On 03/11/2015 02:49 AM, Alan Stern wrote: On Tue, 10 Mar 2015, Mathias Nyman wrote: Mathias: Your patch description says this: The endpoint might already processesed some TRBs on the endpiont ring before we soft reset the endpoint. Make sure we set the dequeue pointer to where we were

[PATCH 1/1] usb: xhci: apply XHCI_AVOID_BEI quirk to Intel ValleyView and LynxPoint LP

2015-03-11 Thread Lu Baolu
. As the result, the xHC looks like dead to user. The patch is to apply XHCI_AVOID_BEI to Intel VallyView and Lynx Point LP devices. And it should be backported to kernels as old as 3.0, that contains the commit 69e848c2090a (Intel xhci: Support EHCI/xHCI port switching.) Signed-off-by: Lu Baolu baolu

Re: Control message failures kill entire XHCI stack

2015-03-10 Thread Lu, Baolu
Hi Devin, Do you mind to post output of lspci -xv on the machine where you saw this problem? We are facing the same problems in other cases. I could provide a patch for it later. Thanks, Baolu On 01/19/2015 04:55 AM, Devin Heitmueller wrote: Hello, I'm debugging some issues on a couple

Re: Control message failures kill entire XHCI stack

2015-03-10 Thread Lu, Baolu
Devin On Tue, Mar 10, 2015 at 5:55 AM, Lu, Baolu baolu...@linux.intel.com wrote: Hi Devin, Do you mind to post output of lspci -xv on the machine where you saw this problem? We are facing the same problems in other cases. I could provide a patch for it later. Thanks, Baolu On 01/19/2015 04

Re: [PATCH 1/1] usb: xhci: handle Config Error Change (CEC) in xhci driver

2015-03-08 Thread Lu, Baolu
Hi Alan, Do you have any comments for this patch? Thanks, Baolu On 03/06/2015 04:12 PM, Lu Baolu wrote: Linux xHCI driver doesn't report and handle port cofig error change. If Port Configure Error for root hub port occurs, CEC bit in PORTSC would be set by xHC and remains 1. This happends

[PATCH 1/1] usb: xhci: handle Config Error Change (CEC) in xhci driver

2015-03-06 Thread Lu Baolu
in xhci_clear_port_change_bit(). [Mathias Nyman contributed the idea. The commit log is based on patch posted at http://marc.info/?l=linux-kernelm=142323612321434w=2] Signed-off-by: Lu Baolu baolu...@linux.intel.com Cc: stable sta...@vger.kernel.org # v3.2+ --- drivers/usb/host/xhci-hub.c | 9 - 1 file

<    1   2   3   4   5   6   7   >