[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

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

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

2015-11-11 Thread Lu, Baolu
/2015 10:25 AM, Dave Young wrote: Hi, On 11/11/15 at 09:32am, Lu, Baolu wrote: On 11/10/2015 05:39 PM, Dave Young wrote: Hi, On 11/09/15 at 03:38pm, Lu Baolu wrote: This patch series adds support for early printk through USB3 debug port. USB3 debug port is described in xHCI specification

[PATCH v2 2/3] usb: core: lpm: add sysfs node for usb3 lpm permit

2015-11-11 Thread Lu Baolu
permitted, "u1" - only u1 is permitted, "u2" - only u2 is permitted, "u1_u2" - both u1 and u2 are permitted. With this interface, users can use an LPM-unfriendly USB device on a released Linux kernel. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> Signed-of

Re: [PATCH 3/3] usb: core: lpm: remove usb3_lpm_enabled in usb_device

2015-11-11 Thread Lu, Baolu
On 11/11/2015 11:10 PM, Alan Stern wrote: On Wed, 11 Nov 2015, Lu Baolu wrote: Commit 8306095fd2c1 ("USB: Disable USB 3.0 LPM in critical sections.") adds usb3_lpm_enabled member to struct usb_device. There is no reference to this member now. Hence, it could be removed. Signed-

[PATCH v2 1/3] usb: core: lpm: fix usb3_hardware_lpm sysfs node

2015-11-11 Thread Lu Baolu
u1 (for U1) and usb3_hardware_lpm_u2 (for U2), and recording the U1/U2 LPM status in right places. This patch should be back-ported to kernels as old as 4.3, that contains Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM"). Cc: sta...@vger.kernel.org Signed-off

[PATCH v2 0/3] usb: core: lpm: add sysfs node for usb3 lpm permit

2015-11-11 Thread Lu Baolu
-unfriendly USB devices on any released Linux kernels. This patch series contains a fix and a cleanup as well. Change log: v1->v2: Fix the "make htmldoc" warning reported by 0-day robot. Thanks, Baolu Lu Baolu (3): usb: core: lpm: fix usb3_hardware_lpm sysfs node usb: core: l

[PATCH v2 3/3] usb: core: lpm: remove usb3_lpm_enabled in usb_device

2015-11-11 Thread Lu Baolu
Commit 8306095fd2c1 ("USB: Disable USB 3.0 LPM in critical sections.") adds usb3_lpm_enabled member to struct usb_device. There is no reference to this member now. Hence, it could be removed. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- include/linux/usb.h | 2 -- 1

Re: [PATCH v2 3/3] usb: core: lpm: remove usb3_lpm_enabled in usb_device

2015-11-12 Thread Lu, Baolu
On 11/13/2015 12:20 AM, Alan Stern wrote: On Thu, 12 Nov 2015, Lu Baolu wrote: Commit 8306095fd2c1 ("USB: Disable USB 3.0 LPM in critical sections.") adds usb3_lpm_enabled member to struct usb_device. There is no reference to this member now. Hence, it could be removed. Signed-

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

2015-11-12 Thread Lu Baolu
On 11/13/2015 10:26 AM, Dave Young wrote: On 11/13/15 at 10:04am, Lu, Baolu wrote: Hi Dave, On 11/12/2015 02:01 PM, Dave Young wrote: Hi, Baolu On 11/12/15 at 10:45am, Lu, Baolu wrote: Hi Dave, Which device are you testing with? This implementation was developed and tested on Intel

Re: [PATCH v2 1/3] usb: core: lpm: fix usb3_hardware_lpm sysfs node

2015-11-12 Thread Lu, Baolu
On 11/13/2015 12:20 AM, Alan Stern wrote: On Thu, 12 Nov 2015, Lu Baolu wrote: Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM") introduced usb3_hardware_lpm sysfs node. This doesn't show the correct status of USB3 U1 and U2 LPM status. This p

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

2015-11-12 Thread Lu, Baolu
Hi Dave, On 11/12/2015 02:01 PM, Dave Young wrote: Hi, Baolu On 11/12/15 at 10:45am, Lu, Baolu wrote: >Hi Dave, > >Which device are you testing with? This implementation was developed >and tested on Intel Skylake devices. > >It doesn't surprise me if it doesn't work w

[PATCH v3 2/3] usb: core: lpm: add sysfs node for usb3 lpm permit

2015-11-14 Thread Lu Baolu
permitted, "u1" - only u1 is permitted, "u2" - only u2 is permitted, "u1_u2" - both u1 and u2 are permitted. With this interface, users can use an LPM-unfriendly USB device on a released Linux kernel. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> Signed-of

Re: [PATCH v2 1/3] usb: core: lpm: fix usb3_hardware_lpm sysfs node

2015-11-13 Thread Lu Baolu
On 11/13/2015 11:28 PM, Alan Stern wrote: On Fri, 13 Nov 2015, Lu, Baolu wrote: On 11/13/2015 12:20 AM, Alan Stern wrote: On Thu, 12 Nov 2015, Lu Baolu wrote: Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM") introduced usb3_hardware_lpm sysfs node. Th

[PATCH v3 3/3] usb: core: lpm: remove usb3_lpm_enabled in usb_device

2015-11-14 Thread Lu Baolu
Commit 8306095fd2c1 ("USB: Disable USB 3.0 LPM in critical sections.") adds usb3_lpm_enabled member to struct usb_device. There is no reference to this member now. Hence, it could be removed. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- include/linux/usb.h | 2 -- 1

[PATCH v3 1/3] usb: core: lpm: fix usb3_hardware_lpm sysfs node

2015-11-14 Thread Lu Baolu
u1 (for U1) and usb3_hardware_lpm_u2 (for U2), and recording the U1/U2 LPM status in right places. This patch should be back-ported to kernels as old as 4.3, that contains Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM"). Cc: sta...@vger.kernel.org Signed-off

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

2015-11-15 Thread Lu Baolu
Hi, On 11/13/2015 11:34 PM, Dmitry Malkin wrote: On Mon, 9 Nov 2015 15:38:33 +0800, Lu Baolu wrote: On Intel platform, if the debug target is connected with debug host, enabling DCE bit in command register leads to a hung bus state. In the hung state, the host system will not see a port

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

2015-11-10 Thread Lu, Baolu
On 11/11/2015 10:25 AM, Dave Young wrote: Hi, On 11/11/15 at 09:32am, Lu, Baolu wrote: On 11/10/2015 05:39 PM, Dave Young wrote: Hi, On 11/09/15 at 03:38pm, Lu Baolu wrote: This patch series adds support for early printk through USB3 debug port. USB3 debug port is described in xHCI

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

2015-11-10 Thread Lu, Baolu
+ * + * Copyright (C) 2015 Intel Corp. + * + * Author: Lu Baolu <baolu...@linux.intel.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#i

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

2015-11-10 Thread Lu, Baolu
On 11/10/2015 05:39 PM, Dave Young wrote: Hi, On 11/09/15 at 03:38pm, 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. I did a test with your previous patchset

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

2015-11-10 Thread Lu, Baolu
On 11/11/2015 10:25 AM, Dave Young wrote: [ 1616.823351] usb 2-2: new SuperSpeed USB device number 8 using xhci_hcd [ 1616.834520] usb 2-2: LPM exit latency is zeroed, disabling LPM. [ 1616.834856] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004 [ 1616.834858] usb 2-2: New USB

[PATCH 0/3] usb: core: lpm: add sysfs node for usb3 lpm permit

2015-11-11 Thread Lu Baolu
-unfriendly USB devices on any released Linux kernels. This patch series contains a fix and a cleanup as well. Thanks, Baolu Lu Baolu (3): usb: core: lpm: fix usb3_hardware_lpm sysfs node usb: core: lpm: add sysfs node for usb3 lpm permit usb: core: lpm: remove usb3_lpm_enabled

[PATCH 1/3] usb: core: lpm: fix usb3_hardware_lpm sysfs node

2015-11-11 Thread Lu Baolu
u1 (for U1) and usb3_hardware_lpm_u2 (for U2), and recording the U1/U2 LPM status in right places. This patch should be back-ported to kernels as old as 4.3, that contains Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM"). Cc: sta...@vger.kernel.org Signed-off

[PATCH 2/3] usb: core: lpm: add sysfs node for usb3 lpm permit

2015-11-11 Thread Lu Baolu
permitted, "u1" - only u1 is permitted, "u2" - only u2 is permitted, "u1_u2" - both u1 and u2 are permitted. With this interface, users can use an LPM-unfriendly USB device on a released Linux kernel. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> Signed-of

[PATCH 3/3] usb: core: lpm: remove usb3_lpm_enabled in usb_device

2015-11-11 Thread Lu Baolu
Commit 8306095fd2c1 ("USB: Disable USB 3.0 LPM in critical sections.") adds usb3_lpm_enabled member to struct usb_device. There is no reference to this member now. Hence, it could be removed. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- include/linux/usb.h | 1 - 1

Re: Overly conservative xHCI bandwidth estimation

2015-11-09 Thread Lu, Baolu
On 11/09/2015 05:27 PM, Steinar H. Gunderson wrote: On Mon, Nov 09, 2015 at 01:02:50PM +0800, Lu, Baolu wrote: We've got below facts: 1. One card works well w/ or w/o LPM enabled. No, this isn't right. One card works well without LPM; it does work with LPM but not well. There are ping

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

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

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.

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

2015-11-16 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 v4 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-16 Thread Lu Baolu
_cap_by_id() helper. (2) Patch 3 "bus hung state" changed to "port hung state" in commit message. (3) Patch 12 added verified platform information. Lu Baolu (12): usb: xhci: add sysfs file for xHCI debug port x86: fixmap: add permanent fixmap for xhci debug port usb

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

2015-11-16 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 v4 08/12] usb: xhci: dbc: handle endpoint stall

2015-11-16 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 v4 11/12] usb: serial: usb_debug: add support for dbc debug device

2015-11-16 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 v4 12/12] usb: doc: add document for xHCI DbC driver

2015-11-16 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 v4 05/12] usb: xhci: dbc: add debug buffer

2015-11-16 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 v4 10/12] usb: xhci: dbc: add handshake between debug target and host

2015-11-16 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 v4 09/12] x86: early_printk: add USB3 debug port earlyprintk support

2015-11-16 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 v4 01/12] usb: xhci: add sysfs file for xHCI debug port

2015-11-16 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 v4 03/12] usb: xhci: dbc: probe and setup xhci debug capability

2015-11-16 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 v4 02/12] x86: fixmap: add permanent fixmap for xhci debug port

2015-11-16 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 v4 06/12] usb: xhci: dbc: add bulk out and bulk in interfaces

2015-11-16 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

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: (4.3.0) r8152: deadlock related to runtime suspend?

2015-12-07 Thread Lu Baolu
Hi Peter, Have you ever tried disabling auto-pm? Did things go smoothly if auto-pm is disabled? I always disable usb auto-pm in below way. # echo on | tee /sys/bus/usb/devices/*/power/control # echo on > /sys/bus/pci/devices//power/control Thanks, Baolu On 12/05/2015 06:59 PM, Peter Wu

Re: [PATCH] usb: host: iounmap before return

2015-12-07 Thread Lu Baolu
On 12/06/2015 09:47 PM, Geyslan G. Bem wrote: > This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not > unmapping correctly. > > Coccinelle: scripts/coccinelle/free/iounmap.cocci > > Signed-off-by: Geyslan G. Bem > --- > drivers/usb/host/pci-quirks.c | 3

Re: (4.3.0) r8152: deadlock related to runtime suspend?

2015-12-07 Thread Lu Baolu
On 12/07/2015 05:37 PM, Peter Wu wrote: > On Mon, Dec 07, 2015 at 05:11:50PM +0800, Lu Baolu wrote: >> Hi Peter, >> >> Have you ever tried disabling auto-pm? Did things go smoothly if auto-pm is >> disabled? >> >> I always disable usb auto-pm in below

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

2015-12-01 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 | 350 + MAINTAINERS| 1 + d

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

2015-12-01 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 v5 10/12] usb: xhci: dbc: add handshake between debug target and host

2015-12-01 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 6c24ba0..37c5c87 100644 --- a/drivers/usb

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

2015-12-01 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 v5 06/12] usb: xhci: dbc: add bulk out and bulk in interfaces

2015-12-01 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 v5 05/12] usb: xhci: dbc: add debug buffer

2015-12-01 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 v5 09/12] x86: early_printk: add USB3 debug port earlyprintk support

2015-12-01 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 v5 08/12] usb: xhci: dbc: handle endpoint stall

2015-12-01 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 c81df40..344d93e 100644 --- a/drivers/usb/early/xhci

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

2015-12-01 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 | 774 +++ include/lin

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

2015-12-01 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 v5 02/12] x86: fixmap: add permanent fixmap for xhci debug port

2015-12-01 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 v5 04/12] usb: xhci: dbc: add support for Intel xHCI dbc quirk

2015-12-01 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 v5 00/12] usb: early: add support for early printk through USB3 debug port

2015-12-01 Thread Lu Baolu
ser guide information. (3) All patches rebased to the new usb-next branch which contains commit d5ddcdf(xhci: rework xhci extended capability list parsing functions). Lu Baolu (12): usb: xhci: add sysfs file for xHCI debug port x86: fixmap: add permanent fixmap for xhci debug port usb: xhci: db

Re: [PATCH 2/2] usb: pci-quirks: register USB mux found on Cherrytrail SOC

2015-12-01 Thread Lu Baolu
> configure it. Normally BIOS takes care of it. > > The driver for the mux is an "extcon" driver. With this we > only register the mux if it's detected. > > Suggested-by: Lu Baolu <baolu...@linux.intel.com> > Signed-off-by: Heikki Krogerus <heikki.kro

<    1   2   3   4   5   6   7   >