[PATCH v6 4/4] usb: doc: add document for USB3 debug port usage

2017-01-21 Thread Lu Baolu
Add Documentation/usb/usb3-debug-port.rst. This document includes the user guide for USB3 debug port. Cc: linux-...@vger.kernel.org Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/usb/usb3-debug-port.rst | 98 +++ 1 file changed, 98 inse

[PATCH v6 2/4] x86: add support for earlyprintk via USB3 debug port

2017-01-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 v6 0/4] usb: early: add support for early printk through USB3 debug port

2017-01-21 Thread Lu Baolu
v2->v3: - Removed spinlock usage. - Removed work queue usage. - Refined the user guide document. v1->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.

[PATCH v6 3/4] usb: serial: add dbc debug device support to usb_debug

2017-01-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 v7 5/5] usb: doc: add document for USB3 debug port usage

2017-02-13 Thread Lu Baolu
Add Documentation/usb/usb3-debug-port.rst. This document includes the user guide for USB3 debug port. Cc: linux-...@vger.kernel.org Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/usb/usb3-debug-port.rst | 98 +++ 1 file changed, 98 inse

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

2017-02-13 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 v7 4/5] usb: serial: add dbc debug device support to usb_debug

2017-02-13 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 v7 0/5] usb: early: add support for early printk through USB3 debug port

2017-02-13 Thread Lu Baolu
ly tested on in the document. v2->v3: - Removed spinlock usage. - Removed work queue usage. - Refined the user guide document. v1->v2: - Refactor the duplicate code in xdbc_early_start() and xdbc_handle_external_reset(). - Free resources when hardware not used any more.

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

2017-02-13 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 v7 2/5] usb: dbc: early driver for xhci debug capability

2017-02-13 Thread Lu Baolu
. These interfaces could be used to implement early printk bootconsole or hook to various system debuggers. Cc: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- arch/x86/Kconfig.debug| 17 + drivers/usb/Kconfig |

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

2017-02-13 Thread Lu Baolu
Hi, On 02/14/2017 11:45 AM, Peter Chen wrote: > On Tue, Feb 14, 2017 at 10:27 AM, Lu Baolu <baolu...@linux.intel.com> wrote: > >> Add Documentation/usb/usb3-debug-port.rst. This document includes >> the user guide for USB3 debug port. >> >> Cc: linux-...@vger.k

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

2017-02-13 Thread Lu Baolu
Hi, On 02/14/2017 02:13 PM, Peter Chen wrote: > >> On 02/14/2017 11:45 AM, Peter Chen wrote: >>> On Tue, Feb 14, 2017 at 10:27 AM, Lu Baolu <baolu...@linux.intel.com> wrote: >>> >>>> Add Documentation/usb/usb3-debug-port.rst. This document inc

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-02-08 Thread Lu Baolu
Hi Ingo, On 01/26/2017 03:22 PM, Ingo Molnar wrote: > * Lu Baolu <baolu...@linux.intel.com> wrote: > >> Hi, >> >> On 01/25/2017 10:38 PM, Peter Zijlstra wrote: >>> On Wed, Jan 25, 2017 at 08:27:38PM +0800, Lu Baolu wrote: >>>> In my

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

2017-02-14 Thread Lu Baolu
Hi, On 02/14/2017 05:23 PM, Sergei Shtylyov wrote: > Hello! > > On 2/14/2017 5:27 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

[PATCH 0/6] usb: xhci: several patches for xhci trace

2017-02-14 Thread Lu Baolu
device contexts of a USB device. This also includes some cleanups to remove duplicated code. Best regards, Lu Baolu Lu Baolu (6): usb: xhci: add xhci_log_cmd trace events usb: xhci: enhance xhci_log_ctx trace events usb: xhci: remove xhci_debug_trb() usb: xhci: remove xhci_dbg_ctx() usb

[PATCH 5/6] usb: xhci: fix link trb decoding

2017-02-14 Thread Lu Baolu
xhci_decode_trb() treats a link trb in the same way as that for an event trb. This patch fixes this by decoding the link trb according to the spec. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.h | 12 +--- 1 file changed, 5 insertions(+), 7 del

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

2017-02-14 Thread Lu Baolu
the xhci input or output context changes. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-trace.h | 63 ++- drivers/usb/host/xhci.c | 23 +++- drivers/usb/host/xhci.h

[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

[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 3/6] usb: xhci: remove xhci_debug_trb()

2017-02-14 Thread Lu Baolu
Every XHCI TRB has already been traced by the trb trace events. It is unnecessary to put the same message in kernel log. This patch removes xhci_debug_trb(). Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-dbg.c

[PATCH 6/6] usb: xhci: cleanup xhci_decode_trb() slightly

2017-02-14 Thread Lu Baolu
Replace 'TRB_FIELD_TO_TYPE(field3)' with 'type' to simplify code. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.h | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/usb/host/xhci.h b/drivers/us

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

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 v5 0/4] usb: early: add support for early printk through USB3 debug port

2017-01-17 Thread Lu Baolu
Hi Greg, This patch series has been there for 2 months without further comments. Will you consider it for usb-next? Best regards, Lu Baolu On 11/15/2016 02:02 PM, Lu Baolu wrote: > xHCI debug capability (DbC) is an optional but standalone > functionality provided by an xHCI host cont

Re: [PATCH 36/37] usb: host: xhci: add xhci_virt_device tracer

2017-01-16 Thread Lu Baolu
the same time. > + > DECLARE_EVENT_CLASS(xhci_log_urb, > TP_PROTO(struct urb *urb), > TP_ARGS(urb), > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c > index c0f3670e5a51..e5f095b276fc 100644 > --- a/drivers/usb/host/xhci.c > +++ b/drivers/usb/host

Re: [PATCH 30/37] usb: host: xhci: make a generic TRB tracer

2017-01-15 Thread Lu Baolu
Hi, On 01/16/2017 03:03 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu <baolu...@linux.intel.com> writes: >> On 12/29/2016 07:01 PM, Felipe Balbi wrote: >>> instead of having a tracer that can only trace command completions, >>> let's promote this tr

Re: [PATCH 31/37] usb: host: xhci: add urb_enqueue/dequeue/giveback tracers

2017-01-15 Thread Lu Baolu
usb/host/xhci.c > @@ -1383,6 +1383,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb > *urb, gfp_t mem_flags) > urb_priv->td_cnt = 0; > urb->hcpriv = urb_priv; > > + trace_xhci_urb_enqueue(urb); > + > if (usb_endpoint_xfer_control(&

Re: [PATCH 35/37] usb: host: xhci: remove newline from tracer

2017-01-15 Thread Lu Baolu
(unsigned long long) __entry->ctx_dma, __entry->ctx_va > ) This patch looks good to me. Best regards, Lu Baolu -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 36/37] usb: host: xhci: add xhci_virt_device tracer

2017-01-16 Thread Lu Baolu
Hi, On 01/16/2017 05:08 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu <baolu...@linux.intel.com> writes: >> Hi, >> >> On 12/29/2016 07:01 PM, Felipe Balbi wrote: >>> Let's start tracing at least part of an xhci_virt_device lifetime. We >>&g

Re: [PATCH 31/37] usb: host: xhci: add urb_enqueue/dequeue/giveback tracers

2017-01-16 Thread Lu Baolu
Hi, On 01/16/2017 04:59 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu <baolu...@linux.intel.com> writes: >> Hi, >> >> On 12/29/2016 07:01 PM, Felipe Balbi wrote: >>> These three new tracers will help us tie TRBs into URBs by *also* >>> looking

Re: [PATCH 30/37] usb: host: xhci: make a generic TRB tracer

2017-01-16 Thread Lu Baolu
Hi, On 01/16/2017 04:55 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu <baolu...@linux.intel.com> writes: >>>>> + __entry->type = ring->type; >>>>> + __entry->field0 = le32_to_cpu(trb->field[0]); >>>>> +

Re: [PATCH v5 2/4] x86: add support for earlyprintk via USB3 debug port

2017-01-19 Thread Lu Baolu
Hi Ingo, On 01/19/2017 05:38 PM, Ingo Molnar wrote: > * Lu Baolu <baolu...@linux.intel.com> wrote: > >> index 8a12199..c4031b9 100644 >> --- a/arch/x86/kernel/early_printk.c >> +++ b/arch/x86/kernel/early_printk.c >> @@ -17,6 +17,7 @@ >> #include

Re: [PATCH v5 3/4] usb: serial: usb_debug: add support for dbc debug device

2017-01-19 Thread Lu Baolu
Hi Ingo, On 01/19/2017 05:39 PM, Ingo Molnar wrote: > * Lu Baolu <baolu...@linux.intel.com> wrote: > >> This patch add dbc debug device support in usb_debug driver. > s/add dbc debug device support in usb_debug driver > /adds dbc debug device support to the usb_deb

Re: [PATCH v5 4/4] usb: doc: add document for USB3 debug port usage

2017-01-19 Thread Lu Baolu
Hi Ingo, On 01/19/2017 05:41 PM, Ingo Molnar wrote: > * Lu Baolu <baolu...@linux.intel.com> wrote: > >> Add Documentation/usb/usb3-debug-port.rst. This document includes >> the user guide for USB3 debug port. >> >> Cc: linux-...@vger.kernel.org >> Signed-

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

2017-01-19 Thread Lu Baolu
Hi Ingo, On 01/19/2017 05:12 PM, Ingo Molnar wrote: > * Lu Baolu <baolu...@linux.intel.com> wrote: > >> xHCI debug capability (DbC) is an optional but standalone >> functionality provided by an xHCI host controller. With DbC >> hardware initialized, the syst

Re: [PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2017-01-19 Thread Lu Baolu
Hi Ingo, I'm very appreciated for your review comments. I've put my replies in lines. On 01/19/2017 05:37 PM, Ingo Molnar wrote: > * Lu Baolu <baolu...@linux.intel.com> wrote: > >> xHCI debug capability (DbC) is an optional but standalone >> functionality provided by

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: [RESEND PATCH 2/4] x86: add support for earlyprintk via USB3 debug port

2016-08-31 Thread Lu Baolu
Hi, On 08/31/2016 06:17 PM, Oliver Neukum wrote: > On Mon, 2016-08-29 at 13:26 +0800, Lu Baolu wrote: >> --- a/Documentation/kernel-parameters.txt >> +++ b/Documentation/kernel-parameters.txt >> @@ -1128,6 +1128,7 @@ bytes respectively. Such letter suffixes can >&g

Re: [RESEND PATCH 1/4] usb: dbc: early driver for xhci debug capability

2016-08-31 Thread Lu Baolu
Hi Oliver, Thanks for review. On 08/31/2016 05:53 PM, Oliver Neukum wrote: > On Mon, 2016-08-29 at 13:26 +0800, Lu Baolu wrote: >> + /* >> +* Memory barrier to ensure hardware sees the trbs >> +* enqueued above. >> +*/ >> +

[PATCH 1/1] usb: dwc3: avoid setting ClearPendIn for Intel Cherry Trail devices

2016-09-06 Thread Lu Baolu
Commit 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear Stall EP command") causes Clear Stall EP command failure on Intel Cherry Trail devices. This patch add a quirk to avoid setting this bit for those Intel devices. Cc: sta...@vger.kernel.org # 4.7+ Signed-off-by: Lu Ba

Re: [PATCH 1/1] usb: dwc3: fix Clear Stall EP command failure

2016-09-08 Thread Lu Baolu
Hi Felipe, On 09/08/2016 04:41 PM, Lu Baolu wrote: > Commit 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear > Stall EP command") sets ClearPendIN bit for all IN endpoints in > v2.60a+ cores no matter which speed mode they're in. This causes > Clear Stall EP c

[PATCH 1/1] usb: dwc3: fix Clear Stall EP command failure

2016-09-08 Thread Lu Baolu
e only need to apply this rule to those IN endpoints in SuperSpeed mode. Fixes: 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear Stall EP command") Cc: sta...@vger.kernel.org # 4.7+ Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/dwc3/gadget.c | 3 ++

Re: [PATCH v2 1/1] usb: xhci: fix return value of xhci_setup_device()

2016-09-08 Thread Lu Baolu
Hi Greg, On 09/08/2016 04:58 PM, Greg KH wrote: > On Thu, Sep 08, 2016 at 03:29:25PM +0800, Lu Baolu wrote: >> Hi Greg, >> >> On 09/08/2016 02:38 PM, Greg KH wrote: >>> On Thu, Sep 08, 2016 at 08:41:02AM +0800, Lu Baolu wrote: >>>> xhci_setup_device(

Re: [PATCH v2 1/1] usb: xhci: fix return value of xhci_setup_device()

2016-09-08 Thread Lu Baolu
Hi Greg, On 09/08/2016 02:38 PM, Greg KH wrote: > On Thu, Sep 08, 2016 at 08:41:02AM +0800, Lu Baolu wrote: >> xhci_setup_device() should return failure with correct error number >> when xhci host has died, removed or halted. >> >> Cc: sta...@vger.kernel.org # 4.3+ &g

Re: [PATCH 1/1] usb: dwc3: avoid setting ClearPendIn for Intel Cherry Trail devices

2016-09-08 Thread Lu Baolu
Hi Felipe, On 09/07/2016 11:05 AM, Lu Baolu wrote: > Commit 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear > Stall EP command") causes Clear Stall EP command failure on Intel > Cherry Trail devices. This patch add a quirk to avoid setting this > bit for those

Re: [PATCH 1/1] usb: xhci: fix return value of xhci_setup_device()

2016-09-07 Thread Lu Baolu
Hi Mathias, On 09/07/2016 02:51 PM, Mathias Nyman wrote: > On 07.09.2016 09:22, Lu Baolu wrote: >> From: "Lu, Baolu" <baolu...@linux.intel.com> >> >> xhci_setup_device() should return failure with correct error number >> when xhci host has died, removed

[PATCH v2 1/1] usb: xhci: fix return value of xhci_setup_device()

2016-09-07 Thread Lu Baolu
xhci_setup_device() should return failure with correct error number when xhci host has died, removed or halted. Cc: sta...@vger.kernel.org # 4.3+ Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- v1->v2: - fix email mismatch issue drivers/usb/host/xhci.c | 4 +++- 1 file c

[PATCH v3 1/1] usb: xhci: fix return value of xhci_setup_device()

2016-09-08 Thread Lu Baolu
ent xhci driver just returns success. This misleads usb core to continue the enumeration by reading the device descriptor, which will result in failure, and users will get a misleading message like "device descriptor read/8, error -110". Cc: <sta...@vger.kernel.org> # v4.3+ Sign

[PATCH v2 1/1] usb: dwc3: fix Clear Stall EP command failure

2016-09-08 Thread Lu Baolu
his rule to those IN endpoints that currently operating in SuperSpeed mode. Fixes: 50c763f8c1bac ("usb: dwc3: Set the ClearPendIN bit on Clear Stall EP command") Cc: <sta...@vger.kernel.org> # v4.7+ Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- v1->v2: - check current

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

2016-09-21 Thread Lu Baolu
Hi, On 09/20/2016 10:06 PM, Mathias Nyman wrote: > On 29.08.2016 08:26, 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 present a debug devic

Re: [RESEND PATCH 1/4] usb: dbc: early driver for xhci debug capability

2016-09-21 Thread Lu Baolu
Hi, On 09/20/2016 09:54 PM, Mathias Nyman wrote: > On 29.08.2016 08:26, 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

[PATCH 1/1] usb: xhci: fix return value of xhci_setup_device()

2016-09-07 Thread Lu Baolu
From: "Lu, Baolu" <baolu...@linux.intel.com> xhci_setup_device() should return failure with correct error number when xhci host has died, removed or halted. Cc: sta...@vger.kernel.org # 4.3+ Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci.c |

[RESEND PATCH 4/4] usb: doc: add document for USB3 debug port usage

2016-08-28 Thread Lu Baolu
Add Documentation/usb/early-xdbc.txt. This document includes the user guide for USB3 debug port. Cc: linux-...@vger.kernel.org Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/usb/early-xdbc.txt | 78 1 file changed, 78 inse

[RESEND PATCH 1/4] usb: dbc: early driver for xhci debug capability

2016-08-28 Thread Lu Baolu
.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- arch/x86/Kconfig.debug| 14 + drivers/usb/Kconfig |3 + drivers/usb/Makefile |2 +- drivers/usb/early/Makefile|1 + drivers/usb/early/xhci-d

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

2016-08-28 Thread Lu Baolu
debug device is enumerated. This is the resend version. Original patch set was submitted several months ago. This resend version addresses the review comment here [1]. [1] https://lkml.org/lkml/2016/2/16/444 Lu Baolu (4): usb: dbc: early driver for xhci debug capability x86: add support

[RESEND PATCH 2/4] x86: add support for earlyprintk via USB3 debug port

2016-08-28 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/kernel-parameters.txt | 1 + arch/x86/kernel/e

[RESEND PATCH 3/4] usb: serial: usb_debug: add support for dbc debug device

2016-08-28 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

Re: [PATCH v17 1/4] usb: gadget: Introduce the usb charger framework

2016-10-10 Thread Lu Baolu
b_charger_type type, > + unsigned int cur_limit); > +extern int usb_charger_set_cur_limit_by_gadget(struct usb_gadget *gadget, > +unsigned int cur_limit); > + > +extern int usb_charger_plug_by_gadget(struct usb_gadget *gadget, > + unsigned long state); > +extern enum usb_charger_type usb_charger_get_type(struct usb_charger > *uchger); > +extern int usb_charger_detect_type(struct usb_charger *uchger); > +extern enum usb_charger_state usb_charger_get_state(struct usb_charger > *uchger); > + > +extern int usb_charger_init(struct usb_gadget *ugadget); > +extern int usb_charger_exit(struct usb_gadget *ugadget); You don't need to put "extern" here. Please use "scripts/checkpatch.pl --strict" to check this. > +#else > +static inline struct usb_charger *usb_charger_find_by_name(const char *name) > +{ > + return ERR_PTR(-ENODEV); > +} > + > +static inline int usb_charger_register_notify(struct usb_charger *uchger, > + struct notifier_block *nb) > +{ > + return 0; > +} > + > +static inline int usb_charger_unregister_notify(struct usb_charger *uchger, > + struct notifier_block *nb) > +{ > + return 0; > +} > + > +static inline int usb_charger_set_current(struct usb_charger *uchger, > + struct usb_charger_current *values) > +{ > + return 0; > +} > + > +static inline int usb_charger_get_current(struct usb_charger *uchger, > + unsigned int *min, unsigned int *max) > +{ > + return 0; > +} > + > +static inline int > +usb_charger_set_cur_limit_by_type(struct usb_charger *uchger, > + enum usb_charger_type type, > + unsigned int cur_limit) > +{ > + return 0; > +} > + > +static inline int > +usb_charger_set_cur_limit_by_gadget(struct usb_gadget *gadget, > + unsigned int cur_limit) > +{ > + return 0; > +} > + > +static inline enum usb_charger_type > +usb_charger_get_type(struct usb_charger *uchger) > +{ > + return UNKNOWN_TYPE; > +} > + > +static inline enum usb_charger_state > +usb_charger_get_state(struct usb_charger *uchger) > +{ > + return USB_CHARGER_REMOVE; > +} > + > +static inline int usb_charger_detect_type(struct usb_charger *uchger) > +{ > + return 0; > +} > + > +static inline int usb_charger_plug_by_gadget(struct usb_gadget *gadget, > + unsigned long state) > +{ > + return 0; > +} > + > +static inline int usb_charger_init(struct usb_gadget *ugadget) > +{ > + return 0; > +} > + > +static inline int usb_charger_exit(struct usb_gadget *ugadget) > +{ > + return 0; > +} > +#endif > + > +#endif /* __LINUX_USB_CHARGER_H__ */ > diff --git a/include/uapi/linux/usb/charger.h > b/include/uapi/linux/usb/charger.h > new file mode 100644 > index 000..3c56ec4 > --- /dev/null > +++ b/include/uapi/linux/usb/charger.h > @@ -0,0 +1,31 @@ > +/* > + * This file defines the USB charger type and state that are needed for > + * USB device APIs. > + */ > + > +#ifndef _UAPI__LINUX_USB_CHARGER_H > +#define _UAPI__LINUX_USB_CHARGER_H > + > +/* > + * USB charger type: > + * SDP (Standard Downstream Port) > + * DCP (Dedicated Charging Port) > + * CDP (Charging Downstream Port) > + * ACA (Accessory Charger Adapters) > + */ > +enum usb_charger_type { > + UNKNOWN_TYPE, > + SDP_TYPE, > + DCP_TYPE, > + CDP_TYPE, > + ACA_TYPE, > +}; > + > +/* USB charger state */ > +enum usb_charger_state { > + USB_CHARGER_DEFAULT, > + USB_CHARGER_PRESENT, > + USB_CHARGER_REMOVE, > +}; > + > +#endif /* _UAPI__LINUX_USB_CHARGER_H */ Best regards, Lu Baolu -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v17 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger

2016-10-10 Thread Lu Baolu
/* > + * usb_charger_unregister() - Unregister a usb charger. > + * @uchger - the usb charger to be unregistered. > + */ > +static int usb_charger_unregister(struct usb_charger *uchger) > +{ > + ida_simple_remove(_charger_ida, uchger->id); > + sysfs_remove_groups(&g

Re: [RESEND PATCH v3 4/4] usb: doc: add document for USB3 debug port usage

2016-10-25 Thread Lu Baolu
Hi, On 10/25/2016 05:32 PM, Jani Nikula wrote: > On Tue, 25 Oct 2016, Lu Baolu <baolu...@linux.intel.com> wrote: >> Add Documentation/usb/usb3-debug-port.txt. This document includes >> the user guide for USB3 debug port. > It's in reStructuredText, please name it .rst.

Re: [PATCH v4 1/4] usb: dbc: early driver for xhci debug capability

2016-11-09 Thread Lu Baolu
Hi, On 11/09/2016 05:23 PM, Thomas Gleixner wrote: > On Tue, 1 Nov 2016, Lu Baolu wrote: >> +static int __init xdbc_init(void) >> +{ > ... >> +base = ioremap_nocache(xdbc.xhci_start, xdbc.xhci_length); >> +if (!base) { >> +xdbc_tra

Re: [PATCH v4 1/4] usb: dbc: early driver for xhci debug capability

2016-11-09 Thread Lu Baolu
Hi, On 11/09/2016 05:37 PM, Thomas Gleixner wrote: > On Tue, 1 Nov 2016, Lu Baolu wrote: >> +static void early_xdbc_write(struct console *con, const char *str, u32 n) >> +{ >> +int chunk, ret; >> +static char buf[XDBC_MAX_PACKET]; >> +int use_cr = 0

Re: [PATCH v4 1/4] usb: dbc: early driver for xhci debug capability

2016-11-10 Thread Lu Baolu
Hi Peter, On 11/10/2016 07:44 PM, Peter Zijlstra wrote: > On Thu, Nov 10, 2016 at 09:56:41AM +0100, Thomas Gleixner wrote: >> On Thu, 10 Nov 2016, Lu Baolu wrote: >>> This seems to be a common issue for all early printk drivers. >> No. The other early printk drivers

Re: [PATCH v4 1/4] usb: dbc: early driver for xhci debug capability

2016-11-10 Thread Lu Baolu
Hi, On 11/10/2016 04:56 PM, Thomas Gleixner wrote: > On Thu, 10 Nov 2016, Lu Baolu wrote: >> On 11/09/2016 05:37 PM, Thomas Gleixner wrote: >>> On Tue, 1 Nov 2016, Lu Baolu wrote: >>>> +static void early_xdbc_write(struct console *con, const char *str, u32 n)

Re: [PATCH v4 1/4] usb: dbc: early driver for xhci debug capability

2016-11-10 Thread Lu Baolu
Hi, On 11/11/2016 10:24 AM, Lu Baolu wrote: >> The only thing you can do to make this work is to prevent printing in NMI >> > context: >> > >> > write() >> > { >> >if (in_nmi()) >> >return; >> > >

[PATCH 1/1] usb: xhci: handle endpoint error caused by TRB error

2016-11-10 Thread Lu Baolu
onding USB device stays in unresponsive state. This patch enhances xHCI driver on this by printing out the malformed TRB and clearing the endpoint Error state. Tested-by: Wang Wendy <wendy.w...@inte.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb

[PATCH v2 1/1] usb: xhci: handle endpoint error caused by TRB error

2016-11-10 Thread Lu Baolu
onding USB device stays in unresponsive state. This patch enhances xHCI driver on this by printing out the malformed TRB and clearing the endpoint Error state. Tested-by: Wang Wendy <wendy.w...@intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Change log: v1->

Re: [PATCH 1/1] usb: xhci: handle endpoint error caused by TRB error

2016-11-10 Thread Lu Baolu
Hi, On 11/11/2016 09:03 AM, Lu Baolu wrote: > When xHCI host sees a malformed TRB in a transfer ring, > it will generate a transfer event with the completion > code set to COMP_TRB_ERR (5), and sets the endpoint > state in output endpoint context to EP_STATE_ERROR. > The endpoi

[PATCH 1/1] usb: xhci: move slot_id from xhci_hcd to xhci_command structure

2016-11-06 Thread Lu Baolu
ure and the command queue to xhci driver. It's better to move slot_id from xhci_hcd structure to xhci_command structure. Hence the race source is removed. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-ring.c | 8 drivers/usb/host/xhci.c | 2 +- drivers

Re: [PATCH 1/1] usb: xhci: clean up error_bitmask usage

2016-10-19 Thread Lu Baolu
Hi, On 10/19/2016 02:52 PM, Mathias Nyman wrote: > Hi > > On 19.10.2016 03:53, Lu Baolu wrote: >> In xhci_handle_event(), when errors are detected, driver always sets >> a bit in error_bitmask (one member of the xhci private driver data). >> That means users have to re

Re: [RESEND PATCH v2 4/4] usb: doc: add document for USB3 debug port usage

2016-10-19 Thread Lu Baolu
Hi Jani, On 10/19/2016 03:48 PM, Jani Nikula wrote: > On Wed, 19 Oct 2016, Lu Baolu <baolu...@linux.intel.com> wrote: >> Add Documentation/usb/usb3-debug-port.txt. This document includes >> the user guide for USB3 debug port. > If you're adding completely new files,

Re: [RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-20 Thread Lu Baolu
Hi Peter, Thanks for your comments. On 10/19/2016 09:09 PM, Peter Zijlstra wrote: > On Wed, Oct 19, 2016 at 08:18:22AM +0800, Lu Baolu wrote: >> +++ b/drivers/usb/early/xhci-dbc.c >> +static int xdbc_bulk_write(const char *bytes, int size) >> +{ >> +unsigned

[RESEND PATCH v3 4/4] usb: doc: add document for USB3 debug port usage

2016-10-24 Thread Lu Baolu
Add Documentation/usb/usb3-debug-port.txt. This document includes the user guide for USB3 debug port. Cc: linux-...@vger.kernel.org Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/usb/usb3-debug-port.txt | 89 +++ 1 file changed, 89 inse

[RESEND PATCH v3 2/4] x86: add support for earlyprintk via USB3 debug port

2016-10-24 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/kernel-parameters.txt | 1 + arch/x86/kernel/e

[RESEND PATCH v3 1/4] usb: dbc: early driver for xhci debug capability

2016-10-24 Thread Lu Baolu
.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- arch/x86/Kconfig.debug| 14 + drivers/usb/Kconfig |3 + drivers/usb/Makefile |2 +- drivers/usb/early/Makefile|1 + drivers/usb/early/xhci-d

[RESEND PATCH v3 3/4] usb: serial: usb_debug: add support for dbc debug device

2016-10-24 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

[RESEND PATCH v3 0/4] usb: early: add support for early printk through USB3 debug port

2016-10-24 Thread Lu Baolu
;v3: - Removed spinlock usage. - Removed work queue usage. - Refined the user guide document. v1->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 Ba

Re: [RESEND PATCH v3 0/4] usb: early: add support for early printk through USB3 debug port

2016-10-25 Thread Lu Baolu
Hi, On 10/25/2016 02:36 PM, Greg Kroah-Hartman wrote: > On Tue, Oct 25, 2016 at 12:32:41PM +0800, 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

Re: [RESEND PATCH v2 4/4] usb: doc: add document for USB3 debug port usage

2016-10-20 Thread Lu Baolu
Hi, On 10/20/2016 04:30 PM, Jani Nikula wrote: > On Thu, 20 Oct 2016, Lu Baolu <baolu...@linux.intel.com> wrote: >> Hi Jani, >> >> On 10/19/2016 03:48 PM, Jani Nikula wrote: >>> On Wed, 19 Oct 2016, Lu Baolu <baolu...@linux.intel.com> wrote: >

Re: [RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-20 Thread Lu Baolu
mostly work. > Thank you again. Your comments make sense to me. I will remove the lock and work queue usages in the new version. Best regards, Lu Baolu -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More

[PATCH v2 1/1] usb: xhci: clean up error_bitmask usage

2016-10-20 Thread Lu Baolu
in xhci_handle_event(). Otherwise, those errors are just ignored silently. This patch cleans up this by replacing the setting of error_bitmask with the kernel print functions, so that users can easily check and report the errors happened in xhci_handle_event(). Signed-off-by: Lu Baolu <ba

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

2016-10-18 Thread Lu Baolu
Add Documentation/usb/usb3-debug-port.txt. This document includes the user guide for USB3 debug port. Cc: linux-...@vger.kernel.org Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/usb/usb3-debug-port.txt | 87 +++ 1 file changed, 87 inse

[RESEND PATCH v2 0/4] usb: early: add support for early printk through USB3 debug port

2016-10-18 Thread Lu Baolu
;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 (4): usb: dbc: early driver for xhci debug capability x86: add support for earlyprintk via USB3 debug p

[PATCH 1/1] usb: xhci: clean up error_bitmask usage

2016-10-18 Thread Lu Baolu
in xhci_handle_event(). Otherwise, those errors are just ignored silently. This patch cleans up this by replacing the setting of error_bitmask with the kernel print functions, so that users can easily check and report the errors happened in xhci_handle_event(). Signed-off-by: Lu Baolu <ba

[RESEND PATCH v2 3/4] usb: serial: usb_debug: add support for dbc debug device

2016-10-18 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

[RESEND PATCH v2 2/4] x86: add support for earlyprintk via USB3 debug port

2016-10-18 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/kernel-parameters.txt | 1 + arch/x86/kernel/e

[RESEND PATCH v2 1/4] usb: dbc: early driver for xhci debug capability

2016-10-18 Thread Lu Baolu
.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- arch/x86/Kconfig.debug| 14 + drivers/usb/Kconfig |3 + drivers/usb/Makefile |2 +- drivers/usb/early/Makefile|1 + drivers/usb/early/xhci-d

[PATCH v5 1/4] usb: dbc: early driver for xhci debug capability

2016-11-14 Thread Lu Baolu
.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- arch/x86/Kconfig.debug| 14 + drivers/usb/Kconfig |3 + drivers/usb/Makefile |2 +- drivers/usb/early/Makefile|1 + drivers/usb/early/xhci-d

[PATCH v5 2/4] x86: add support for earlyprintk via USB3 debug port

2016-11-14 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/kernel-parameters.txt | 1 + arch/x86/kernel/e

[PATCH v5 3/4] usb: serial: usb_debug: add support for dbc debug device

2016-11-14 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 0/4] usb: early: add support for early printk through USB3 debug port

2016-11-14 Thread Lu Baolu
document. v1->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 (4): usb: dbc: early driver for xhci debug capability x86: add support for earlypri

Re: [PATCH v4 1/4] usb: dbc: early driver for xhci debug capability

2016-11-11 Thread Lu Baolu
Hi Peter, On 11/11/2016 08:28 PM, Peter Zijlstra wrote: > On Fri, Nov 11, 2016 at 12:33:29PM +0800, Lu Baolu wrote: > >> Things become complicated when it comes to USB debug port. >> But it's still addressable. >> >> At this time, we can do it like this. >>

[PATCH v4 1/4] usb: dbc: early driver for xhci debug capability

2016-10-31 Thread Lu Baolu
.ny...@linux.intel.com> Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- arch/x86/Kconfig.debug| 14 + drivers/usb/Kconfig |3 + drivers/usb/Makefile |2 +- drivers/usb/early/Makefile|1 + drivers/usb/early/xhci-d

[PATCH v4 2/4] x86: add support for earlyprintk via USB3 debug port

2016-10-31 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/kernel-parameters.txt | 1 + arch/x86/kernel/e

[PATCH v4 3/4] usb: serial: usb_debug: add support for dbc debug device

2016-10-31 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 4/4] usb: doc: add document for USB3 debug port usage

2016-10-31 Thread Lu Baolu
Add Documentation/usb/usb3-debug-port.rst. This document includes the user guide for USB3 debug port. Cc: linux-...@vger.kernel.org Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- Documentation/usb/usb3-debug-port.rst | 95 +++ 1 file changed, 95 inse

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

2016-10-31 Thread Lu Baolu
rly_start() and xdbc_handle_external_reset(). - Free resources when hardware not used any more. - Refine the user guide document. Lu Baolu (4): usb: dbc: early driver for xhci debug capability x86: add support for earlyprintk via USB3 debug port usb: serial: usb_debug: add support for dbc deb

[PATCH 1/1] usb: xhci: cleanup cmd_completion in xhci_virt_device

2016-11-03 Thread Lu Baolu
cmd_completion in struct xhci_virt_device is legacy. With command strutcture and command queue introduced in xhci, cmd_completion is not used any more. This patch removes it. Signed-off-by: Lu Baolu <baolu...@linux.intel.com> --- drivers/usb/host/xhci-mem.c | 1 - drivers/usb/host/xhci.h

<    1   2   3   4   5   6   7   >