[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 <baolu...@linux.intel.com> --- 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-

[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 <baolu...@linux.intel.com> --- drivers/usb/host/xhci-ring.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/d

[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 <pombreda...@nexb.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- changes from v1: * Use plain C st

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 <baolu...@linux.intel.com> wrote: >> Update the xhci dbc files with the correct SPDX license identifiers. >> >> Fixes: dfba2174dc42 ("usb: xhci: Add

[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 <baolu...@linux.intel.com> --- drivers/usb/host/xhci-dbgcap.c | 1 + drivers/usb/host/xhci-dbgcap.h | 2 +- drive

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

2017-12-15 Thread Lu Baolu
k_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 <baolu...@linux.intel.com> --- 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 <mathias.ny...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Lu Baolu <baolu...@

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 <baolu...@linux.intel.com> >> --- >> driv

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 <baolu...@linux.intel.com> writes: >> The kernel FIFO implementation, kfifo, provides interfaces to manipulate >> a first-in-first-out circular buffer. Use kfifo instead of the homemade >>

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 the b

[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 <baolu...@linux.intel.com> --- drivers/usb/earl

[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 <baolu...@linux.intel.com> --- drivers/usb/gadget/function/u_serial.c

[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 <baolu...@linux.intel.com> --- 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..4

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

2017-11-14 Thread Lu Baolu
; + if (!db->buf_buf) >>> + return -ENOMEM; >>> + >>> + db->buf_size = size; >>> + db->buf_put = db->buf_buf; >>> + db->buf_get = db->buf_buf; >>> + >>> + return 0; >>> +} > you

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

2017-11-06 Thread Lu Baolu
quest 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. > > Cc

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

2017-11-06 Thread Lu Baolu
a 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: <sta...@vger.kernel.org> # v4.12+ Signed-off-by: Lu Baolu <baolu

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

2017-11-06 Thread Lu Baolu
;sta...@vger.kernel.org> # v4.12+ Cc: Johan Hovold <jo...@kernel.org> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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

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

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

2017-11-02 Thread Lu Baolu
;> >> > and disabling of the debug capability. >>>>>>> > >> >> > >>>>>>> > >> >> > When the debug capability is enabled, it will present a debug >>>>>>> > >> >> &g

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 <baolu...@linux.intel.com> --- drivers/usb/core/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/us

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

2017-09-29 Thread Lu Baolu
When a URB is cancled, xhci driver turns the untransferred trbs into no-ops. If an endpoint stalls on a no-op trb that belongs to the cancelled URB, the event handler won't reset the endpoint. Hence, it will stay halted. Link: http://marc.info/?l=linux-usb=149582598330127=2 Signed-off-by: Lu

[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 <baolu...@linux.intel.com> --- drivers/usb/host/xhci-ring.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drive

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

[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 <baolu...@linux.intel.

[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 <baolu...@linux.intel.com> --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file chang

[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 <baolu...@linux.intel.com> --- drivers/usb/host/xhci-mem.c

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

2017-08-31 Thread Lu Baolu
m> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci.c | 30 +- drivers/usb/host/xhci.h | 3 +-- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b

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

2017-08-31 Thread Lu Baolu
/?l=linux-usb=149362010728921=2 http://marc.info/?l=linux-usb=149252752825755=2 Suggested-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-)

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

2017-08-31 Thread Lu Baolu
94725821=2 Suggested-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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/dr

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

2017-08-31 Thread Lu Baolu
to a dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

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

2017-08-31 Thread Lu Baolu
=149252752825755=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: v1->v2: - Add 4 fi

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

2017-08-31 Thread Lu Baolu
c: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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/xh

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

2017-08-31 Thread Lu Baolu
the responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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/

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
ecking 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_disable_slot() returns error

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

2017-08-16 Thread Lu Baolu
m> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci.c | 30 +- drivers/usb/host/xhci.h | 3 +-- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b

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

2017-08-16 Thread Lu Baolu
c: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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/xh

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

2017-08-16 Thread Lu Baolu
the responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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/

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

2017-08-16 Thread Lu Baolu
/?l=linux-usb=149362010728921=2 http://marc.info/?l=linux-usb=149252752825755=2 Suggested-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/driv

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

2017-08-16 Thread Lu Baolu
to a dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

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
m> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci.c | 30 +- drivers/usb/host/xhci.h | 3 +-- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b

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

2017-08-10 Thread Lu Baolu
the responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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/

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

2017-08-10 Thread Lu Baolu
ecking 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 error when host is dead in xhci_disabl

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

2017-08-10 Thread Lu Baolu
to a dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

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

2017-08-10 Thread Lu Baolu
/?l=linux-usb=149362010728921=2 http://marc.info/?l=linux-usb=149252752825755=2 Suggested-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/driv

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

2017-08-10 Thread Lu Baolu
c: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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/xh

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 <baolu...@linux.intel.com> writes: >>> Lu Baolu <baolu...@linux.intel.com> writes: >>>> The component u_serial provides a glue layer between TTY layer >>>> and a U

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 <baolu...@linux.intel.com> 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_

[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 <baolu...@linux.intel.

[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 <baolu...@linux.intel.com> --- drivers/usb/host/xhci-mem.c

[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 <baolu...@linux.intel.com> --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file chang

[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 <baolu...@linux.intel.com> --- drivers/usb/Kconfig|3 + drivers/usb/Makefile |3 +- drivers/usb/common/Makefile|1 + drivers/usb/common/u_serial.c | 1604 +++ drivers/usb/

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

2017-08-01 Thread Lu Baolu
___enqueue <[ring enqueue pointer] |______trbs <---[ring trbs] Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Change log: v1->v2: - No need to check return valuse of debugfs interfaces. - Remove file entries when adding e

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

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 <baolu...@linux.intel.com> --- drivers/usb/host/Makefile | 4 + drivers/usb/host/xhci-debugfs.c | 552

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 <baolu...@linux.intel.com> writes: >> Xhci driver handles USB transaction errors on transfer events, >> but transaction errors are possible on address device command >> completion events as w

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

2017-07-26 Thread Lu Baolu
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 command. Lu Baolu (5):

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

2017-07-26 Thread Lu Baolu
the responsibilities to free the slot related data structure. Otherwise, memory leakage happens. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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/

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

2017-07-26 Thread Lu Baolu
/?l=linux-usb=149362010728921=2 http://marc.info/?l=linux-usb=149252752825755=2 Suggested-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/driv

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

2017-07-26 Thread Lu Baolu
to a dead host. Fixes: f9e609b82479 ("usb: xhci: Add helper function xhci_disable_slot().") Cc: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

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

2017-07-26 Thread Lu Baolu
c: Guoqing Zhang <guoqing.zh...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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

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

2017-07-26 Thread Lu Baolu
m> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci.c | 30 +- drivers/usb/host/xhci.h | 3 +-- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b

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=149362010728921=2 http://marc.info/?l=linux-usb=149252752825755=2 Suggested-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/driv

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 <baolu...@linux.intel.com> writes: >> +static void xhci_dbc_stop(struct xhci_hcd *xhci) >> +{ >> +struct xhci_dbc *dbc = xhci->dbc; >> + >> +WARN_ON(!dbc); &

[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 <baolu...@linux.intel.com> --- drivers/usb/host/xhci-mem.c

[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 <baolu...@linux.intel.com> --- Documentation/driver-api/usb/usb3-debug-port.rst | 68 1 file chang

[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 <baolu...@linux.intel.

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,

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

2017-06-03 Thread Lu Baolu
t; Cc: Peter Zijlstra <pet...@infradead.org> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/early/xhci-dbc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/

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

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 <baolu...@linux.intel.com> wrote: > > >>>> + >>>> +#define XDBC_TRACE >>>> +#ifdef XDBC_TRACE >>>> +#define xdbc_trace

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 extend

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(

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
1->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 <mi...@redhat.com> Cc: x...@kernel.org Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/admin-guide/kernel-parameters.txt

[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 <baolu...@linux.intel.com> --- Documentation/usb/usb3-debug-port.rst | 100 ++ 1 file change

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

[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 <mi...@redhat.com> Cc: x...@kernel.org Signed-off-by: Lu Baolu

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

2017-03-21 Thread Lu Baolu
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 <mi...@redhat.com> Cc: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu

Re: extcon-usb-gpio ACPI support

2017-03-21 Thread Lu Baolu
ins device 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 942c7924a51edb75baf8056

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 <baolu...@linux.intel.com> wrote: > >> Hi Ingo, >> >> On 03/02/2017 02:40 PM, Ingo Molnar wrote: >>> * Lu Baolu <baolu...@linux.intel.com> wrote: >>> >>>> Hi Ingo

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 <baolu...@linux.intel.com> 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

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 wil

[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 <baolu...@linux.intel.com> --- 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 2

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 <baolu...@linux.intel.com> writes: >>> Lu Baolu <baolu...@linux.intel.com> writes: >>>> diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci-trace.h >>>> index 1a

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 <baolu...@linux.intel.com> 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

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 <baolu...@linux.intel.com> 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 >&

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

2017-02-14 Thread Lu Baolu
plugin. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- 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 inse

[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 <baolu...@linux.intel.com> --- drivers/usb/host/xhci-dbg.c

  1   2   3   4   5   6   7   >