[PATCH 2/2] usb: xhci: Remove ep_trb from finish_td()

2018-01-09 Thread Lu Baolu
Function argument ep_trb for finish_td() isn't needed anymore. Cleanup it. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-ring.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 642a070..88

[PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint()

2018-01-09 Thread Lu Baolu
Function argument ep_trb for xhci_cleanup_halted_endpoint() isn't needed anymore. Cleanup it. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-ring.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-r

[PATCH v2 1/1] usb: xhci: dbc: Add SPDX identifiers to dbc files

2017-12-22 Thread Lu Baolu
Update the xhci dbc files with the correct SPDX license identifiers. Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver") Cc: Philippe Ombredanne Signed-off-by: Lu Baolu --- changes from v1: * Use plain C style comments in header file. drivers/usb/host/xhci-db

Re: [PATCH 1/1] usb: xhci: dbc: Add SPDX identifiers to dbc files

2017-12-22 Thread Lu Baolu
Hi, On 12/22/2017 04:32 PM, Philippe Ombredanne wrote: > Lu, > > On Fri, Dec 22, 2017 at 2:34 AM, Lu Baolu wrote: >> Update the xhci dbc files with the correct SPDX license identifiers. >> >> Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI dri

[PATCH 1/1] usb: xhci: dbc: Add SPDX identifiers to dbc files

2017-12-21 Thread Lu Baolu
Update the xhci dbc files with the correct SPDX license identifiers. Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver") Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-dbgcap.c | 1 + drivers/usb/host/xhci-dbgcap.h | 2 +- drivers/usb/host/xhci-dbgtty.c | 1 + 3 fil

[PATCH 1/1] usb: xhci: dbc: Fix lockdep warning

2017-12-15 Thread Lu Baolu
33] ? kthread_delayed_work_timer_fn+0x80/0x80 [ 528.511755] ret_from_fork+0x24/0x30 Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver") Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-dbgcap.c | 20 drivers/usb/host/xhci-dbgtty.c | 20 --

[PATCH 1/1] usb: doc: Update document for USB3 debug port usage

2017-12-12 Thread Lu Baolu
Update Documentation/driver-api/usb/usb3-debug-port.rst. This update includes the guide for using xHCI debug capability based TTY serial link. Cc: Mathias Nyman Cc: Greg Kroah-Hartman Signed-off-by: Lu Baolu --- Documentation/driver-api/usb/usb3-debug-port.rst | 52 1

Re: [PATCH 1/1] usb: serial: usb_debug: Add new USB device id

2017-11-28 Thread Lu Baolu
Hi Johan, On 11/28/2017 05:01 PM, Johan Hovold wrote: > On Tue, Nov 28, 2017 at 12:40:59PM +0800, Lu Baolu wrote: >> USB vendor id and product id for Linux USB Debug Target is added. >> >> Signed-off-by: Lu Baolu >> --- >> drivers/usb/serial/usb_debug.c | 2 ++

Re: [PATCH 1/1] usb: gadget: u_serial: Use kfifo instead of homemade circular buffer

2017-11-28 Thread Lu Baolu
Hi Felipe, On 11/28/2017 04:05 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> The kernel FIFO implementation, kfifo, provides interfaces to manipulate >> a first-in-first-out circular buffer. Use kfifo instead of the homemade >> one to make the cod

Re: [PATCH 1/1] usb: early: Correct the endpoint type value for bulk in endpoint

2017-11-27 Thread Lu Baolu
Hi, On 11/28/2017 03:29 PM, Greg Kroah-Hartman wrote: > On Tue, Nov 28, 2017 at 12:52:24PM +0800, Lu Baolu wrote: >> This corrects the endpiont type value set to the DbC bulk in endpoint. >> The previous value doesn't cause any problems because that we now only >> use

[PATCH 1/1] usb: early: Correct the endpoint type value for bulk in endpoint

2017-11-27 Thread Lu Baolu
This corrects the endpiont type value set to the DbC bulk in endpoint. The previous value doesn't cause any problems because that we now only use the bulk out endpoint. Set the hardware with the correct value any way. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 2 +- 1

[PATCH 1/1] usb: gadget: u_serial: Use kfifo instead of homemade circular buffer

2017-11-27 Thread Lu Baolu
The kernel FIFO implementation, kfifo, provides interfaces to manipulate a first-in-first-out circular buffer. Use kfifo instead of the homemade one to make the code more concise and readable. Signed-off-by: Lu Baolu --- drivers/usb/gadget/function/u_serial.c | 192

[PATCH 1/1] usb: serial: usb_debug: Add new USB device id

2017-11-27 Thread Lu Baolu
USB vendor id and product id for Linux USB Debug Target is added. Signed-off-by: Lu Baolu --- drivers/usb/serial/usb_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index ab5a2ac..47636b6 100644 --- a/drivers/usb

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-14 Thread Lu Baolu
return -ENOMEM; >>> + >>> + db->buf_size = size; >>> + db->buf_put = db->buf_buf; >>> + db->buf_get = db->buf_buf; >>> + >>> + return 0; >>> +} > you may wanna have a look at kfifo. > Yeah! kfifo

Re: [PATCH 13/24] USB: early: Remove redundant license text

2017-11-06 Thread Lu Baolu
t to remove the 700+ different ways that files in > the kernel describe the GPL license text. And there's unneeded stuff > like the address (sometimes incorrect) for the FSF which is never > needed. > > No copyright headers or other non-license-description text was removed. >

[PATCH 1/2] USB: early: Use new USB product ID and strings for DbC device

2017-11-06 Thread Lu Baolu
valid one. The description strings are changed accordingly. This patch should be back-ported to kernels as old as v4.12, that contain the commit aeb9dd1de98c ("usb/early: Add driver for xhci debug capability"). Cc: # v4.12+ Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.h | 6

[PATCH 2/2] USB: serial: Change DbC debug device binding ID

2017-11-06 Thread Lu Baolu
# v4.12+ Cc: Johan Hovold Signed-off-by: Lu Baolu --- drivers/usb/serial/usb_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index 12f4c5a..48f285a 100644 --- a/drivers/usb/serial/usb_debug.c +++

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-06 Thread Lu Baolu
Hi, On 11/06/2017 04:00 PM, Greg Kroah-Hartman wrote: > On Mon, Nov 06, 2017 at 08:35:41AM +0800, Lu Baolu wrote: >> Hi, >> >> On 11/03/2017 02:27 PM, Greg Kroah-Hartman wrote: >>> On Fri, Nov 03, 2017 at 08:45:46AM +0800, Lu Baolu wrote: >>>> Hi, &g

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-05 Thread Lu Baolu
Hi, On 11/03/2017 02:27 PM, Greg Kroah-Hartman wrote: > On Fri, Nov 03, 2017 at 08:45:46AM +0800, Lu Baolu wrote: >> Hi, >> >> On 11/03/2017 12:51 AM, Greg Kroah-Hartman wrote: >>> On Thu, Nov 02, 2017 at 12:38:57PM +0200, Felipe Balbi wrote: >>>>&g

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-02 Thread Lu Baolu
y. >>>>>>> > >> >> > >>>>>>> > >> >> > When the debug capability is enabled, it will present a debug >>>>>>> > >> >> > device >>>>>>> > >> >> >

Re: [PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-11-01 Thread Lu Baolu
Hi Greg, On 09/05/2017 09:58 AM, Lu Baolu wrote: > xHCI compatible USB host controllers(i.e. super-speed USB3 controllers) > can be implemented with the Debug Capability(DbC). It presents a debug > device which is fully compliant with the USB framework and provides the > equivalent of

[PATCH 1/1] usb: Apply hardware LPM attributes to 3.1 device

2017-10-13 Thread Lu Baolu
The devices running at SuperSpeedPlus speed are also LPM capable. Apply usb3 hardware LPM attributes to those devices as well. Signed-off-by: Lu Baolu --- drivers/usb/core/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core

[PATCH 2/2] usb: xhci: Reset halted endpoint if trb is noop

2017-09-29 Thread Lu Baolu
Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-ring.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index c75cfe7..b1de9f2 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/hos

[PATCH 1/2] usb: xhci: Remove ep_trb from xhci_cleanup_halted_endpoint()

2017-09-29 Thread Lu Baolu
Function argument ep_trb for xhci_cleanup_halted_endpoint() isn't needed anymore. Cleanup it. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-ring.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c

[PATCH v3 0/3] usb: xhci: Add debug capability support in xhci

2017-09-04 Thread Lu Baolu
communication method between two servers. Best regards, Lu Baolu --- Change log: v1->v2: - Add a new patch to move u_serial.c from drivers/usb/gadget/function to drivers/usb/common/ and move u_serial.h to include/linux/usb/. v2->v3: - Remove the use of u_serial and add a new tty gl

[PATCH v3 2/3] usb: xhci: Add DbC support in xHCI driver

2017-09-04 Thread Lu Baolu
. Hence it can be remote accessed by a debug host. Another use case can probably be found in servers. It provides a peer-to-peer USB link between two host-only machines. This provides a reasonable out-of-band communication method between two servers. Signed-off-by: Lu Baolu --- .../ABI/testing/sysfs

[PATCH v3 3/3] usb: doc: Update document for USB3 debug port usage

2017-09-04 Thread Lu Baolu
Update Documentation/driver-api/usb/usb3-debug-port.rst. This update includes the guide for using xHCI debug capability based TTY serial link. Signed-off-by: Lu Baolu --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file changed, 68 insertions(+) diff --git

[PATCH v3 1/3] usb: xhci: Make some static functions global

2017-09-04 Thread Lu Baolu
This patch makes some static functions global to avoid duplications in different files. These functions can be used in the implementation of xHCI debug capability. There is no functional change. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-mem.c | 94

[PATCH v5 2/6] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-31 Thread Lu Baolu
pointer, but xhci_disable_slot() frees it when it detects a dead host. This patch fixes these two problems by removing the command parameter from xhci_disable_slot(). Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --

[PATCH v5 6/6] usb: xhci: Handle USB transaction error on address command

2017-08-31 Thread Lu Baolu
/?l=linux-usb&m=149362010728921&w=2 http://marc.info/?l=linux-usb&m=149252752825755&w=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers

[PATCH v5 5/6] usb: xhci: Remove xhci->mutex from xhci_alloc_dev()

2017-08-31 Thread Lu Baolu
306294725821&w=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 3bb3075..311cded 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.

[PATCH v5 4/6] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-08-31 Thread Lu Baolu
dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 129067

[PATCH v5 0/6] usb: xhci: Handle USB transaction error on address command

2017-08-31 Thread Lu Baolu
ux-usb&m=149252752825755&w=2 This patch set includes some fixes in xhci_disable_slot() as well which will be used to handle USB transaction error on address command. This patch set is based on the top of for-usb-next branch in your xhci tree. Best regards, Lu Baolu --- Change log:

[PATCH v5 1/6] usb: xhci: Disable slot even virt-dev is null

2017-08-31 Thread Lu Baolu
t;) Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-hub.c | 3 +++ drivers/usb/host/xhci.c | 4 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index ad89a6d..f0ae9df 100644 --- a/drivers/usb/host/x

[PATCH v5 3/6] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-08-31 Thread Lu Baolu
responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 502842b..1290674 100644

Re: [PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-19 Thread Lu Baolu
Hi, On 08/18/2017 09:31 PM, Mathias Nyman wrote: > On 16.08.2017 05:15, Lu Baolu wrote: >> Hi, >> >> On 08/15/2017 07:30 PM, Mathias Nyman wrote: >>> On 11.08.2017 05:41, Lu Baolu wrote: >>>> Xhci driver handles USB transaction errors on transfer events

[PATCH v4 0/5] usb: xhci: Handle USB transaction error on address command

2017-08-16 Thread Lu Baolu
nd. v2->v3: - Add checking virt dev for test mode in PATCH 1/5. v3->v4: - Resolve xhci->mutex locking issue in 5/5. Lu Baolu (5): usb: xhci: Disable slot even virt-dev is null usb: xhci: Fix potential memory leak in xhci_disable_slot() usb: xhci: Fix memory leak when xhci_disabl

[PATCH v4 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-16 Thread Lu Baolu
pointer, but xhci_disable_slot() frees it when it detects a dead host. This patch fixes these two problems by removing the command parameter from xhci_disable_slot(). Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --

[PATCH v4 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-16 Thread Lu Baolu
t;) Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-hub.c | 3 +++ drivers/usb/host/xhci.c | 4 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 00721e8..6fcb98d 100644 --- a/drivers/usb/host/x

[PATCH v4 3/5] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-08-16 Thread Lu Baolu
responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index cb2461a..2df601e 100644

[PATCH v4 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-16 Thread Lu Baolu
/?l=linux-usb&m=149362010728921&w=2 http://marc.info/?l=linux-usb&m=149252752825755&w=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci

[PATCH v4 4/5] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-08-16 Thread Lu Baolu
dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 2df601

Re: [PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-15 Thread Lu Baolu
Hi, On 08/15/2017 07:30 PM, Mathias Nyman wrote: > On 11.08.2017 05:41, Lu Baolu wrote: >> Xhci driver handles USB transaction errors on transfer events, >> but transaction errors are possible on address device command >> completion events as well. >> >> The

[PATCH v3 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-10 Thread Lu Baolu
pointer, but xhci_disable_slot() frees it when it detects a dead host. This patch fixes these two problems by removing the command parameter from xhci_disable_slot(). Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --

[PATCH v3 3/5] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-08-10 Thread Lu Baolu
responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index cb2461a..2df601e 100644

[PATCH v3 0/5] usb: xhci: Handle USB transaction error on address command

2017-08-10 Thread Lu Baolu
nd. v2->v3: - Add checking virt dev for test mode in PATCH 1/5. Lu Baolu (5): usb: xhci: Disable slot even virt-dev is null usb: xhci: Fix potential memory leak in xhci_disable_slot() usb: xhci: Fix memory leak when xhci_disable_slot() returns error usb: xhci: Return erro

[PATCH v3 5/5] usb: xhci: Handle USB transaction error on address command

2017-08-10 Thread Lu Baolu
/?l=linux-usb&m=149362010728921&w=2 http://marc.info/?l=linux-usb&m=149252752825755&w=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci

[PATCH v3 4/5] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-08-10 Thread Lu Baolu
dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 2df601

[PATCH v3 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-10 Thread Lu Baolu
t;) Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-hub.c | 3 +++ drivers/usb/host/xhci.c | 4 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 00721e8..6fcb98d 100644 --- a/drivers/usb/host/x

Re: [PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-10 Thread Lu Baolu
Hi, On 08/10/2017 06:00 PM, Mathias Nyman wrote: > On 10.08.2017 03:35, Lu Baolu wrote: >> Hi, >> >> On 08/09/2017 03:58 PM, Mathias Nyman wrote: >>> On 27.07.2017 05:21, Lu Baolu wrote: >>>> xhci_disable_slot() is a helper for disabling a slot when a de

Re: [PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-08-09 Thread Lu Baolu
Hi, On 08/09/2017 03:58 PM, Mathias Nyman wrote: > On 27.07.2017 05:21, Lu Baolu wrote: >> xhci_disable_slot() is a helper for disabling a slot when a device >> goes away or recovers from error situations. Currently, it checks >> the corespoding virt-dev pointer and returns

Re: [PATCH v2 2/4] usb: common: Move u_serial from gadget/function to usb/common

2017-08-08 Thread Lu Baolu
Hi, On 08/08/2017 02:14 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >>> Lu Baolu writes: >>>> The component u_serial provides a glue layer between TTY layer >>>> and a USB gadget device needed to provide a basic serial port >>>>

Re: [PATCH v2 2/4] usb: common: Move u_serial from gadget/function to usb/common

2017-08-07 Thread Lu Baolu
Hi, On 08/07/2017 04:13 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> The component u_serial provides a glue layer between TTY layer >> and a USB gadget device needed to provide a basic serial port >> functionality. Currently, u_serial sits under gadget

[PATCH v2 3/4] usb: xhci: Add DbC support in xHCI driver

2017-08-07 Thread Lu Baolu
. Hence it can be remote accessed by a debug host. Another use case can probably be found in servers. It provides a peer-to-peer USB link between two host-only machines. This provides a reasonable out-of-band communication method between two servers. Signed-off-by: Lu Baolu --- .../ABI/testing/sysfs

[PATCH v2 1/4] usb: xhci: Make some static functions global

2017-08-07 Thread Lu Baolu
This patch makes some static functions global to avoid duplications in different files. These functions can be used in the implementation of xHCI debug capability. There is no functional change. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-mem.c | 94

[PATCH v2 4/4] usb: doc: Update document for USB3 debug port usage

2017-08-07 Thread Lu Baolu
Update Documentation/driver-api/usb/usb3-debug-port.rst. This update includes the guide for using xHCI debug capability based TTY serial link. Signed-off-by: Lu Baolu --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file changed, 68 insertions(+) diff --git

[PATCH v2 0/4] usb: xhci: Add debug capability support in xhci

2017-08-07 Thread Lu Baolu
communication method between two servers. Best regards, Lu Baolu --- Change log: v1->v2: - Add a new patch to move u_serial.c from drivers/usb/gadget/function to drivers/usb/common/ and move u_serial.h to include/linux/usb/. Lu Baolu (4): usb: xhci: Make some static functions global

[PATCH v2 2/4] usb: common: Move u_serial from gadget/function to usb/common

2017-08-07 Thread Lu Baolu
-off-by: Lu Baolu --- drivers/usb/Kconfig|3 + drivers/usb/Makefile |3 +- drivers/usb/common/Makefile|1 + drivers/usb/common/u_serial.c | 1604 +++ drivers/usb/gadget/Kconfig |3

[PATCH v2 1/1] usb: xhci: Add debugfs interface for xHCI driver

2017-07-31 Thread Lu Baolu
] |__enqueue <[ring enqueue pointer] |__trbs <---[ring trbs] Signed-off-by: Lu Baolu --- Change log: v1->v2: - No need to check return valuse of debugfs interfaces. - Remove file entries when adding end

[PATCH 1/1] usb: xhci: Free the right ring in xhci_add_endpoint()

2017-07-31 Thread Lu Baolu
In the xhci_add_endpoint(), a new ring was allocated and saved at xhci_virt_ep->new_ring. Hence, when error happens, we need to free the allocated ring before returning error. Current code frees xhci_virt_ep->ring instead of the new_ring. This patch fixes this. Signed-off-by: Lu

Re: [PATCH 1/1] usb: xhci: Add debugfs interface for xHCI driver

2017-07-29 Thread Lu Baolu
Hi Greg, On 07/29/2017 09:34 PM, Greg KH wrote: > On Sat, Jul 29, 2017 at 04:18:03PM +0800, Lu Baolu wrote: >> +static void xhci_debugfs_create_files(struct xhci_hcd *xhci, >> + struct xhci_file_map *files, >> +

[PATCH 1/1] usb: xhci: Add debugfs interface for xHCI driver

2017-07-29 Thread Lu Baolu
] |__enqueue <[ring enqueue pointer] |__trbs <---[ring trbs] Signed-off-by: Lu Baolu --- drivers/usb/host/Makefile | 4 + drivers/usb/host/xhci-debugfs.c | 552 drivers/usb/host/

Re: [PATCH v2 5/5] usb: xhci: Handle USB transaction error on address command

2017-07-27 Thread Lu Baolu
Hi, On 07/27/2017 03:55 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> Xhci driver handles USB transaction errors on transfer events, >> but transaction errors are possible on address device command >> completion events as well. >> >> The xHCI sp

[PATCH v2 0/5] usb: xhci: Handle USB transaction error on address command

2017-07-26 Thread Lu Baolu
ux-usb&m=149252752825755&w=2 This patch set includes some fixes in xhci_disable_slot() as well which will be used to handle USB transaction error on address command. --- Change log: v1->v2: - include 4 fixes in xhci_disable_slot which will be used to handle USB transaction error on address co

[PATCH v2 3/5] usb: xhci: Fix memory leak when xhci_disable_slot() returns error

2017-07-26 Thread Lu Baolu
responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index cb2461a..2df601e 100644

[PATCH v2 5/5] usb: xhci: Handle USB transaction error on address command

2017-07-26 Thread Lu Baolu
/?l=linux-usb&m=149362010728921&w=2 http://marc.info/?l=linux-usb&m=149252752825755&w=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci

[PATCH v2 4/5] usb: xhci: Return error when host is dead in xhci_disable_slot()

2017-07-26 Thread Lu Baolu
dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 2df601

[PATCH v2 1/5] usb: xhci: Disable slot even virt-dev is null

2017-07-26 Thread Lu Baolu
t;) Cc: Guoqing Zhang Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index b2ff1ff..e69073f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -3567,11 +3567,7 @@ int xh

[PATCH v2 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-07-26 Thread Lu Baolu
pointer, but xhci_disable_slot() frees it when it detects a dead host. This patch fixes these two problems by removing the command parameter from xhci_disable_slot(). Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang Signed-off-by: Lu Baolu --

Re: [PATCH 1/1] usb: xhci: Handle USB transaction error on address command

2017-07-25 Thread Lu Baolu
Hi, On 07/26/2017 01:11 PM, Xing, Zhengjun wrote: > > > On 7/25/2017 1:09 PM, Lu Baolu wrote: >> Xhci driver handles USB transaction errors on transfer events, >> but transaction errors are possible on address device command >> completion events as well. >> &

[PATCH 1/1] usb: xhci: Handle USB transaction error on address command

2017-07-24 Thread Lu Baolu
/?l=linux-usb&m=149362010728921&w=2 http://marc.info/?l=linux-usb&m=149252752825755&w=2 Suggested-by: Mathias Nyman Signed-off-by: Lu Baolu --- drivers/usb/host/xhci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci

Re: [PATCH 2/3] usb: xhci: Add DbC support in xHCI driver

2017-07-23 Thread Lu Baolu
Hi Felipe, On 07/21/2017 06:31 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> +static void xhci_dbc_stop(struct xhci_hcd *xhci) >> +{ >> +struct xhci_dbc *dbc = xhci->dbc; >> + >> +WARN_ON(!dbc); >> + >> +cancel_del

[PATCH 1/3] usb: xhci: Make some static functions global

2017-07-21 Thread Lu Baolu
This patch makes some static functions global to avoid duplications in different files. These functions can be used in the implementation of xHCI debug capability. There is no functional change. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-mem.c | 94

[PATCH 0/3] usb: xhci: Add debug capability support in xhci

2017-07-21 Thread Lu Baolu
communication method between two servers. Best regards, Lu Baolu Lu Baolu (3): usb: xhci: Make some static functions global usb: xhci: Add DbC support in xHCI driver usb: doc: Update document for USB3 debug port usage .../ABI/testing/sysfs-bus-pci-drivers-xhci_hcd | 25

[PATCH 3/3] usb: doc: Update document for USB3 debug port usage

2017-07-21 Thread Lu Baolu
Update Documentation/driver-api/usb/usb3-debug-port.rst. This update includes the guide for using xHCI debug capability based TTY serial link. Signed-off-by: Lu Baolu --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file changed, 68 insertions(+) diff --git

[PATCH 2/3] usb: xhci: Add DbC support in xHCI driver

2017-07-21 Thread Lu Baolu
. Hence it can be remote accessed by a debug host. Another use case can probably be found in servers. It provides a peer-to-peer USB link between two host-only machines. This provides a reasonable out-of-band communication method between two servers. Signed-off-by: Lu Baolu --- .../ABI/testing/sysfs

Re: [PATCH v8 1/5] x86: add simple udelay calibration

2017-07-12 Thread Lu Baolu
Hi, On 07/13/2017 09:39 AM, Dou Liyang wrote: > Hi, Lu > > At 07/13/2017 09:17 AM, Lu Baolu wrote: >> Hi, >> >> On 07/12/2017 04:02 PM, Dou Liyang wrote: >>> Hi, Lu >>> >>> At 05/05/2017 08:50 PM, Boris Ostrovsky wrote: >>>> On 0

Re: [PATCH v8 1/5] x86: add simple udelay calibration

2017-07-12 Thread Lu Baolu
Hi, On 07/12/2017 04:02 PM, Dou Liyang wrote: > Hi, Lu > > At 05/05/2017 08:50 PM, Boris Ostrovsky wrote: >> On 05/05/2017 01:41 AM, Lu Baolu wrote: >>> Hi, >>> >>> On 05/03/2017 06:38 AM, Boris Ostrovsky wrote: >>>> On 03/21/2017 04:01 AM, Lu

[PATCH 1/1] usb/early: Remove trace_printk() callers in xhci-dbc

2017-06-03 Thread Lu Baolu
d-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 1268818..12fe70b 100644 --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early/xhci-dbc.c @@ -32,7 +32,6 @@ static s

Re: [PATCH v8 2/5] usb: early: add driver for xhci debug capability

2017-05-31 Thread Lu Baolu
Hi, On 05/31/2017 05:38 PM, Vlastimil Babka wrote: > On 05/31/2017 05:27 AM, Lu Baolu wrote: >> Hi, >> >> On 05/30/2017 09:46 PM, Vlastimil Babka wrote: >>> On 03/21/2017 09:01 AM, Lu Baolu wrote: >>>> XHCI debug capability (DbC) is an optional but st

Re: [PATCH v8 2/5] usb: early: add driver for xhci debug capability

2017-05-31 Thread Lu Baolu
Hi, On 05/31/2017 02:24 PM, Steven Rostedt wrote: > On Wed, 31 May 2017 11:27:19 +0800 > Lu Baolu wrote: > > >>>> + >>>> +#define XDBC_TRACE >>>> +#ifdef XDBC_TRACE >>>> +#define xdbc_trace trace_printk >>> Did you

Re: [PATCH v8 2/5] usb: early: add driver for xhci debug capability

2017-05-30 Thread Lu Baolu
Hi, On 05/30/2017 09:46 PM, Vlastimil Babka wrote: > On 03/21/2017 09:01 AM, Lu Baolu wrote: >> XHCI debug capability (DbC) is an optional but standalone >> functionality provided by an xHCI host controller. Software >> learns this capability by walking through the extended

Re: [PATCH v8 1/5] x86: add simple udelay calibration

2017-05-04 Thread Lu Baolu
Hi, On 05/03/2017 06:38 AM, Boris Ostrovsky wrote: > On 03/21/2017 04:01 AM, Lu Baolu wrote: >> Add a simple udelay calibration in x86 architecture-specific >> boot-time initializations. This will get a workable estimate >> for loops_per_jiffy. Hence, udelay() cou

Re: [PATCH v8 0/5] usb: early: add support for early printk through USB3 debug port

2017-03-21 Thread Lu Baolu
Hi, On 03/21/2017 07:33 PM, Ingo Molnar wrote: >> Lu Baolu (5): >> > x86: add simple udelay calibration >> > usb: early: add driver for xhci debug capability >> > x86: add support for earlyprintk via USB3 debug port >> > usb: serial: add dbc de

[PATCH v8 0/5] usb: early: add support for early printk through USB3 debug port

2017-03-21 Thread Lu Baolu
gt;v2: - Refactor the duplicate code in xdbc_early_start() and xdbc_handle_external_reset(). - Free resources when hardware not used any more. - Refine the user guide document. Lu Baolu (5): x86: add simple udelay calibration usb: early: add driver for xhci debug capability x86: add support

[PATCH v8 3/5] x86: add support for earlyprintk via USB3 debug port

2017-03-21 Thread Lu Baolu
ory blocks. This requires to delay setting up debugging hardware and registering boot console until the memblocks are filled. Cc: Ingo Molnar Cc: x...@kernel.org Signed-off-by: Lu Baolu --- Documentation/admin-guide/kernel-parameters.txt | 1 + arch/x86/kernel/early_printk.c | 5 +

[PATCH v8 5/5] usb: doc: add document for USB3 debug port usage

2017-03-21 Thread Lu Baolu
Add Documentation/usb/usb3-debug-port.rst. This document includes the guide for using USB3 debug port. Cc: linux-...@vger.kernel.org Signed-off-by: Lu Baolu --- Documentation/usb/usb3-debug-port.rst | 100 ++ 1 file changed, 100 insertions(+) create mode 100644

[PATCH v8 4/5] usb: serial: add dbc debug device support to usb_debug

2017-03-21 Thread Lu Baolu
This patch adds dbc debug device support to the usb_debug driver. Signed-off-by: Lu Baolu Acked-by: Johan Hovold --- 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

[PATCH v8 1/5] x86: add simple udelay calibration

2017-03-21 Thread Lu Baolu
Add a simple udelay calibration in x86 architecture-specific boot-time initializations. This will get a workable estimate for loops_per_jiffy. Hence, udelay() could be used after this initialization. Cc: Ingo Molnar Cc: x...@kernel.org Signed-off-by: Lu Baolu --- arch/x86/kernel/setup.c | 22

[PATCH v8 2/5] usb: early: add driver for xhci debug capability

2017-03-21 Thread Lu Baolu
when your machine crashes very early before the regular console code is initialized. Other uses include simpler, lockless logging instead of a full-blown printk console driver and klogd. Cc: Ingo Molnar Cc: Mathias Nyman Signed-off-by: Lu Baolu --- arch/x86/Kconfig.debug| 23 + dr

Re: extcon-usb-gpio ACPI support

2017-03-21 Thread Lu Baolu
ce enumerated by this > driver? > 2. If "yes" on 1, does that DSDT contain _DSD method for the device? > 3. If "no" on 2, how is it supposed to work at all? > > So, regarding on the answers, I am in between of reverting > > commit 942c7924a51edb75baf805679141

Re: [PATCH v7 0/5] usb: early: add support for early printk through USB3 debug port

2017-03-16 Thread Lu Baolu
Hi Ingo, On 03/16/2017 03:17 PM, Ingo Molnar wrote: > * Lu Baolu wrote: > >> Hi Ingo, >> >> On 03/02/2017 02:40 PM, Ingo Molnar wrote: >>> * Lu Baolu wrote: >>> >>>> Hi Ingo, >>>> >>>> How about this version? Any fu

Re: [PATCH v7 0/5] usb: early: add support for early printk through USB3 debug port

2017-03-03 Thread Lu Baolu
Hi Ingo, On 03/02/2017 02:40 PM, Ingo Molnar wrote: > * Lu Baolu wrote: > >> Hi Ingo, >> >> How about this version? Any further comments? > So I have re-read the review feedback I gave on Jan 19 and found at least one > thing I pointed out that you didn't ad

Re: [PATCH v7 0/5] usb: early: add support for early printk through USB3 debug port

2017-03-01 Thread Lu Baolu
Hi Ingo, How about this version? Any further comments? Best regards, Lu Baolu On 02/14/2017 10:27 AM, Lu Baolu wrote: > xHCI debug capability (DbC) is an optional but standalone > functionality provided by an xHCI host controller. With DbC > hardware initialized, the system will

[PATCH 1/1] usb: dwc3: remove dwc3_log_msg trace class

2017-02-28 Thread Lu Baolu
dwc3_log_msg trace class isn't used any more. Suggest to remove it. Signed-off-by: Lu Baolu --- drivers/usb/dwc3/trace.h | 25 - 1 file changed, 25 deletions(-) diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h index 2b124f9..69671e4 100644 --- a/dr

Re: [PATCH 1/6] usb: xhci: add xhci_log_cmd trace events

2017-02-15 Thread Lu Baolu
Hi, On 02/15/2017 04:56 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >>> Lu Baolu writes: >>>> diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h >>>> index 1ac2cdf..c31eeaf 100644 >>>> --- a/drivers/usb/host

Re: [PATCH 2/6] usb: xhci: enhance xhci_log_ctx trace events

2017-02-15 Thread Lu Baolu
Hi, On 02/15/2017 04:00 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> XHCI driver has defined xhci_log_ctx trace events to trace >> the change of an xhci input or output context. This patch >> extends the trace class of xhci_log_ctx to print out the >>

Re: [PATCH 1/6] usb: xhci: add xhci_log_cmd trace events

2017-02-15 Thread Lu Baolu
Hi, On 02/15/2017 03:58 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h >> index 1ac2cdf..c31eeaf 100644 >> --- a/drivers/usb/host/xhci-trace.h >> +++ b/drivers/usb/host/

[PATCH 1/6] usb: xhci: add xhci_log_cmd trace events

2017-02-14 Thread Lu Baolu
plugin. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-hub.c | 2 + drivers/usb/host/xhci-ring.c | 13 +-- drivers/usb/host/xhci-trace.h | 90 +++ drivers/usb/host/xhci.c | 7 4 files changed, 108 insertions(+), 4 deletions(-) diff

[PATCH 4/6] usb: xhci: remove xhci_dbg_ctx()

2017-02-14 Thread Lu Baolu
XHCI context changes have already been traced by the trace events. It's unnecessary to put the same message in kernel log. This patch removes the use of xhci_dbg_ctx(). Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-dbg.c | 143 drivers/usb

  1   2   3   4   5   6   7   >