via USB3 debug port"), comes much later
> into play.
Acked-by: Lu Baolu
>
> Signed-off-by: Jan Kiszka
> ---
> arch/x86/kernel/setup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
>
Hi,
On 05/25/2017 12:56 AM, Jan Kiszka wrote:
> On 2017-03-21 13:19, tip-bot for Lu Baolu wrote:
>> Commit-ID: dd759d93f4dd4fd2f345a78ad1223bb3edf3ee7b
>> Gitweb:
>> http://git.kernel.org/tip/dd759d93f4dd4fd2f345a78ad1223bb3edf3ee7b
>> Author: 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
Hi,
On 03/24/2017 07:47 PM, Chanwoo Choi wrote:
> Hi Lu Baolu,
>
> On 2017년 03월 24일 20:24, Andy Shevchenko wrote:
>> On Fri, 2017-03-24 at 20:03 +0900, Chanwoo Choi wrote:
>>> On 2017년 03월 22일 22:09, Andy Shevchenko wrote:
>>>> On Wed, 2017-03-22 at 10:14 +0900
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
Commit-ID: 57fb47279a04cd53641dc5ae55a6d47e4f32a2fd
Gitweb: http://git.kernel.org/tip/57fb47279a04cd53641dc5ae55a6d47e4f32a2fd
Author: Lu Baolu
AuthorDate: Tue, 21 Mar 2017 16:01:32 +0800
Committer: Ingo Molnar
CommitDate: Tue, 21 Mar 2017 12:30:17 +0100
usb/serial: Add DBC debug
Commit-ID: 1b326277798aa820c1043617786609b9bb4bee78
Gitweb: http://git.kernel.org/tip/1b326277798aa820c1043617786609b9bb4bee78
Author: Lu Baolu
AuthorDate: Tue, 21 Mar 2017 16:01:33 +0800
Committer: Ingo Molnar
CommitDate: Tue, 21 Mar 2017 12:30:17 +0100
usb/doc: Add document for USB3
Commit-ID: 1b5aeebf3a92273b4d85aeff37a16037bc3c3abf
Gitweb: http://git.kernel.org/tip/1b5aeebf3a92273b4d85aeff37a16037bc3c3abf
Author: Lu Baolu
AuthorDate: Tue, 21 Mar 2017 16:01:31 +0800
Committer: Ingo Molnar
CommitDate: Tue, 21 Mar 2017 12:30:16 +0100
x86/earlyprintk: Add support
Commit-ID: aeb9dd1de98c1a5f2007ea5d2a154c1244caf8a0
Gitweb: http://git.kernel.org/tip/aeb9dd1de98c1a5f2007ea5d2a154c1244caf8a0
Author: Lu Baolu
AuthorDate: Tue, 21 Mar 2017 16:01:30 +0800
Committer: Ingo Molnar
CommitDate: Tue, 21 Mar 2017 12:30:05 +0100
usb/early: Add driver for xhci
Commit-ID: dd759d93f4dd4fd2f345a78ad1223bb3edf3ee7b
Gitweb: http://git.kernel.org/tip/dd759d93f4dd4fd2f345a78ad1223bb3edf3ee7b
Author: Lu Baolu
AuthorDate: Tue, 21 Mar 2017 16:01:29 +0800
Committer: Ingo Molnar
CommitDate: Tue, 21 Mar 2017 12:28:45 +0100
x86/timers: Add simple udelay
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 +
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
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
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
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
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
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
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
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
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
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
>>
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/
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
---
drivers/usb/host/xhci.h | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/usb
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
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
---
drivers/usb/host/xhci-dbg.c | 57
drivers/usb/host/xhci-ring.c
xhci input or output context changes.
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-trace.h | 63 ++-
drivers/usb/host/xhci.c | 23 +++-
drivers/usb/host/xhci.h | 60 +
3 files changed, 121
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
Replace 'TRB_FIELD_TO_TYPE(field3)' with 'type' to simplify
code.
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci.h | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/
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
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, ude
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 wrote:
>>>
>>>> Add Documentation/usb/usb3-debug-port.rst. This document includes the
>>>>
Hi,
On 02/14/2017 11:45 AM, Peter Chen wrote:
> On Tue, Feb 14, 2017 at 10:27 AM, Lu Baolu wrote:
>
>> 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
cesfuly
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 mo
ocks.
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 +
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
---
Documentation/usb/usb3-debug-port.rst | 98 +++
1 file changed, 98 insertions(+)
create mode 100644
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
faces.
These interfaces could be used to implement early printk
bootconsole or hook to various system debuggers.
Cc: Mathias Nyman
Signed-off-by: Lu Baolu
---
arch/x86/Kconfig.debug| 17 +
drivers/usb/Kconfig |3 +
drivers/usb/Makefile |2 +-
drivers/usb/
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
Hi Ingo,
On 01/26/2017 03:22 PM, Ingo Molnar wrote:
> * Lu Baolu 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 driver, udelay() is mostly used to handle t
Hi Ingo,
On 01/26/2017 03:19 PM, Ingo Molnar wrote:
> * Lu Baolu wrote:
>
>> Fair enough.
>>
>> USB connection is stable enough, unless the user unplugs the
>> USB cable during debugging.
> What does the hardware do in this case? The XHCI registers are in th
Hi Ingo,
On 01/26/2017 03:19 PM, Ingo Molnar wrote:
> * Lu Baolu wrote:
>
>> Fair enough.
>>
>> USB connection is stable enough, unless the user unplugs the
>> USB cable during debugging.
> What does the hardware do in this case? The XHCI registers are in th
Hi,
On 01/26/2017 12:16 AM, Peter Zijlstra wrote:
> On Wed, Jan 25, 2017 at 11:51:34PM +0800, Lu Baolu wrote:
>
>>> What is timeout and why?
>> Put it in simple:
>>
>> The driver sets the RUN bit in control register and polls READY
>> bit in status
Hi Ingo,
On 01/25/2017 05:23 PM, Ingo Molnar wrote:
> * Lu Baolu wrote:
>
>>> Hiding essentially an early udelay() implementation in an early-printk
>>> driver is
>>> ugly and counterproductive.
>> Sure. How about below change?
>>
>> diff
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 driver, udelay() is mostly used to handle time out.
>>
>> Xdbc hides most USB things in its firmware. Early printk driver only needs
>> to setup th
Hi,
On 01/25/2017 05:57 PM, Peter Zijlstra wrote:
> On Wed, Jan 25, 2017 at 10:23:55AM +0100, Ingo Molnar wrote:
>> * Lu Baolu wrote:
>>
>>>> Hiding essentially an early udelay() implementation in an early-printk
>>>> driver is
>>>> ugly and
Hi,
On 01/25/2017 05:23 PM, Ingo Molnar wrote:
> * Lu Baolu wrote:
>
>>> Hiding essentially an early udelay() implementation in an early-printk
>>> driver is
>>> ugly and counterproductive.
>> Sure. How about below change?
>>
>> diff --git
Hi Ingo,
On 01/24/2017 04:20 PM, Ingo Molnar wrote:
> * Lu Baolu wrote:
>
>> Hi Ingo,
>>
>> On 01/22/2017 05:04 PM, Ingo Molnar wrote:
>>> * Lu Baolu wrote:
>>>
>>>>>> +static void xdbc_runtime_delay(unsigned long count)
>>&g
Hi Ingo,
On 01/22/2017 05:31 PM, Ingo Molnar wrote:
> * 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
>> cap
Hi Ingo,
On 01/22/2017 05:04 PM, Ingo Molnar wrote:
> * Lu Baolu wrote:
>
>>>> +static void xdbc_runtime_delay(unsigned long count)
>>>> +{
>>>> + udelay(count);
>>>> +}
>>>> +static void (*xdbc_delay)(unsigned long) = xdbc_early
faces could be used to implement early printk
bootconsole or hook to various system debuggers.
Cc: Mathias Nyman
Signed-off-by: Lu Baolu
---
arch/x86/Kconfig.debug| 17 +
drivers/usb/Kconfig |3 +
drivers/usb/Makefile |2 +-
drivers/usb/early/Makefile|
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
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
---
Documentation/usb/usb3-debug-port.rst | 98 +++
1 file changed, 98 insertions(+)
create mode 100644
ocks.
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 +
nt.
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 docum
Hi Ingo,
On 01/19/2017 05:12 PM, Ingo Molnar wrote:
> * 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 device
>&g
Hi Ingo,
On 01/19/2017 05:41 PM, Ingo Molnar wrote:
> * Lu Baolu wrote:
>
>> 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
>> ---
Hi Ingo,
On 01/19/2017 05:39 PM, Ingo Molnar wrote:
> * Lu Baolu 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_debug driver
>
> Please fix the tit
Hi Ingo,
On 01/19/2017 05:38 PM, Ingo Molnar wrote:
> * Lu Baolu wrote:
>
>> index 8a12199..c4031b9 100644
>> --- a/arch/x86/kernel/early_printk.c
>> +++ b/arch/x86/kernel/early_printk.c
>> @@ -17,6 +17,7 @@
>> #include
>> #include
>> #i
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 wrote:
>
>> xHCI debug capability (DbC) is an optional but standalone
>> functionality provided by an xHCI host control
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
Hi Mathias,
On 01/12/2017 04:53 PM, Lu Baolu wrote:
> Xhci spec requires in section 4.23.5.1.1.1 that the RWE bit of USB2
> PORTPMSC register should only set for remote wakeup capble devices.
>
> This was suggested by Mathias in the following discussion thread.
> http://marc.info
d-off-by: Lu Baolu
---
drivers/usb/host/xhci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 0c8deb9..d887e09 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -4191,7 +4191,
4+
Cc: Felipe Balbi
Signed-off-by: Lu Baolu
---
Change log:
v1->v2:
- Fixed a warning reported by 0-day kbuild robot.
drivers/usb/host/xhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 1cd5641..bb08c6b 1006
4+
CC: Felipe Balbi
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 1cd5641..18ea6b8 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -721,7 +
Hi,
On 12/27/2016 10:58 AM, Baolin Wang wrote:
> Hi,
>
> On 27 December 2016 at 10:39, Lu Baolu wrote:
>> Hi,
>>
>> On 12/26/2016 04:01 PM, Baolin Wang wrote:
>>> On some platfroms(like x86 platform), when one core is running the USB
>>> gadget
&g
and interrupt threads. Or, I missed anything?
Best regards,
Lu Baolu
>
> Signed-off-by: Baolin Wang
> ---
> drivers/usb/dwc3/gadget.c |6 +-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
>
ts, if the command completion for abort command
ring misses, we shall assume that there are larger problems
with the host and assert HCRST.
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-ring.c | 17 +
drivers/usb/host/xhci.h | 6 ++
2 files changed, 11 insertions(+), 12
The second try was a workaround for (what we thought was) command
ring failing to stop in the first place. But this turns out to be
due to the race that we have fixed(see "xhci: Fix race related to
abort operation"). With that fix, it is time to remove the second
try.
Signed-off-by
usb: xhci: warn on command timeout in stopped command ring
are my proposals.
They base on the top of your timeout_race_fixes branch.
(git://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git
timeout_race_fixes)
Lu Baolu (4):
usb: xhci: remove unnecessary second abort try
usb: xhci: r
cpu cycles are wasted on polling
registers. This patch removes polling for CRR (Command Ring
Running). Wait for completion, and check CRR if completion
times out is enough.
Suggested-by: Mathias Nyman
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-ring.c | 49
situation to the upper layer. In rare cases,
if the driver sees a command timeout in a stopped command
ring, driver should let the user know it.
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-ring.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci
ng
waiting for the command stopped event.
It sits at the same place in your timeout_race_fixes branch.
(git://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git
timeout_race_fixes)
Best regards,
Lu Baolu
OGAWA Hirofumi (1):
xhci: Fix race related to abort operation
drivers/usb/host
CMD_RING_PAUSE
operation]
[baolu: release xhci->lock before wait and apply it back again after
wait. This is the reason my signed-off-by is added.]
CC:
Signed-off-by: OGAWA Hirofumi
Signed-off-by: Lu Baolu
Signed-off-by: Mathias Nyman
---
drivers/usb/host/xhci-mem.c | 1 +
drivers/usb/host/x
Hi Mathias,
This is a follow-up patch for below comment
"fix the lock to cover abort+CRR check, and send it to usb-linus +stable"
in below discussion thread.
https://lkml.org/lkml/2016/12/21/186
It's based on v4.9.
Best regards,
Lu Baolu
Lu Baolu (1):
usb: xhci:
of calling functions without
locking in xhci_handle_command_timeout().
Cc: # 3.7+
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-ring.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 7971
D to
>> CMD_RING_STATE_RUNNING so ring will really restart in the interrupt
>> handler.
> Just for record (no chance to make patch I myself for now, sorry), while
> checking locking slightly, I noticed unrelated missing locking.
>
> xhci_cleanup_command_queue()
>
> We are calling it without locking, but we need to lock for accessing list.
Yeah. I can make the patch.
Best regards,
Lu Baolu
Hi,
On 12/21/2016 08:48 PM, Mathias Nyman wrote:
> On 21.12.2016 08:17, Lu Baolu wrote:
>> Hi Mathias,
>>
>> I have some comments for the implementation of xhci_abort_cmd_ring() below.
>>
>> On 12/20/2016 11:13 PM, Mathias Nyman wrote:
>>&
Hi,
On 12/21/2016 08:57 PM, Mathias Nyman wrote:
> On 21.12.2016 08:57, Lu Baolu wrote:
>> Hi Mathias,
>>
>> I have some comments for the implementation of
>> xhci_handle_command_timeout() as well.
>>
>> On 12/20/2016 11:13 PM, Mathias Nyman wrote:
>
>current_cmd);
1327 spin_unlock_irqrestore(&xhci->lock, flags);
This part of code is tricky. I have no idea about in which case should this
code be executed? Anyway, we shouldn't call xhci_handle_stopped_cmd_ring()
here, right?
1328 return;
1329 }
Best regards,
Lu Baolu
n");
368 xhci_cleanup_command_queue(xhci);
369 } else {
370 unsigned long flags;
371
372 spin_lock_irqsave(&xhci->lock, flags);
373 xhci_handle_stopped_cmd_ring(xhci,
xhci_next_queued_cmd(xhci));
374 spin_unlock_irqrestore(&xhci->lock, flags);
375 }
376 return 0;
377 }
Best regards,
Lu Baolu
Hi,
On 12/20/2016 02:46 PM, Baolin Wang wrote:
> On 20 December 2016 at 14:39, Lu Baolu wrote:
>> Hi,
>>
>> On 12/20/2016 02:06 PM, Baolin Wang wrote:
>>> Hi,
>>>
>>> On 20 December 2016 at 12:29, Lu Baolu wrote:
>>>> Hi Mathias,
>
Hi,
On 12/20/2016 02:06 PM, Baolin Wang wrote:
> Hi,
>
> On 20 December 2016 at 12:29, Lu Baolu wrote:
>> Hi Mathias,
>>
>> On 12/19/2016 08:13 PM, Mathias Nyman wrote:
>>> On 19.12.2016 13:34, Baolin Wang wrote:
>>>> Hi Mathias,
>>>>
atch for that one case
> it seems that patch 2/2 can be replaced by a single line change:
>
> if (!xhci->current_cmd || timer_pending(&xhci->cmd_timer))
>
> Right?
>
> -Mathias
>
It seems that the watch dog algorithm for command queue becomes
more and more complicated and hard for maintain. I am also seeing
another case where a command may lose the chance to be tracked by
the watch dog timer.
Say,
queue_command(the only command in queue)
- completion irq fires--- timer times out at same time--
- another command enqueue--
- lock(xhci_lock ) - spin_on(xhci_lock)
- spin_on(xhci_lock)
- del_timer() fail
- free the command and
set current_cmd to NULL
- unlock(xhci_lock)
- lock(xhci_lock)
- queue_command()(timer will
not rescheduled since the timer
is pending)
- lock(xhci_lock)
- no current command
- return
As the result, the later command isn't under track of the watch dog.
If hardware fails to response to this command, kernel will hang in
the thread which is waiting for the completion of the command.
I can write a patch to fix this and cc stable kernel as well. For long
term, in order to make it simple and easy to maintain, how about
allocating a watch dog timer for each command? It could be part
of the command structure and be managed just like the life cycle
of a command structure.
I can write a patch for review and discussion, if you think this
change is possible.
Best regards,
Lu Baolu
Hi,
On 12/02/2016 09:39 PM, Mathias Nyman wrote:
> On 02.12.2016 04:29, Lu Baolu wrote:
>> handle_cmd_completion() frees a command structure which might
>> be still referenced by xhci->current_cmd. This might cause
>> problem when xhci->current_cmd is accessed after t
Hi,
On 12/02/2016 12:18 PM, Baolin Wang wrote:
> On 2 December 2016 at 10:29, Lu Baolu wrote:
>> handle_cmd_completion() frees a command structure which might
>> be still referenced by xhci->current_cmd. This might cause
>> problem when xhci->current_cmd is accessed af
# v3.16+
Signed-off-by: Lu Baolu
---
drivers/usb/host/xhci-ring.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index bdf6b13..13e05f6 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/h
Hi,
On 12/01/2016 04:03 PM, Baolin Wang wrote:
> On 1 December 2016 at 15:44, Lu Baolu wrote:
>> Hi,
>>
>> On 12/01/2016 03:35 PM, Baolin Wang wrote:
>>> On 1 December 2016 at 14:35, Lu Baolu wrote:
>>>> Hi,
>>>>
>>>> On 12/01/
Hi,
On 12/01/2016 03:35 PM, Baolin Wang wrote:
> On 1 December 2016 at 14:35, Lu Baolu wrote:
>> Hi,
>>
>> On 12/01/2016 02:04 PM, Baolin Wang wrote:
>>> Hi Baolu,
>>>
>>> On 1 December 2016 at 13:45, Lu Baolu wrote:
>>>> Hi,
>&
Hi,
On 12/01/2016 02:04 PM, Baolin Wang wrote:
> Hi Baolu,
>
> On 1 December 2016 at 13:45, Lu Baolu wrote:
>> Hi,
>>
>> On 11/30/2016 05:02 PM, Baolin Wang wrote:
>>> If the hardware never responds to the stop endpoint command, the
>>> URBs will
stop endpoint commands. If the timer is the tail end of the last
- * stop endpoint command, and the endpoint's command is still pending, we
assume
- * the host is dying.
Best regards,
Lu Baolu
>
> We also need to clean up the command queue before trying to halt the
> xHCI host in xhci_stop_endpoint_command_timeout() function.
>
> Signed-off-by: Baolin Wang
ocks.
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/kernel-parameters.txt | 1 +
arch/x86/kernel/early_printk.c | 5 +
arch/x86/kern
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 Baolu (4):
usb: dbc: early driver for xhci debug capability
x86: add support for ear
ew file mode 100644
index 000..5ac4223
--- /dev/null
+++ b/drivers/usb/early/xhci-dbc.c
@@ -0,0 +1,1068 @@
+/**
+ * xhci-dbc.c - xHCI debug capability early driver
+ *
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * Author: Lu Baolu
+ *
+ * This program is free software; you can redistr
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
---
Documentation/usb/usb3-debug-port.rst | 95 +++
1 file changed, 95 insertions(+)
create mode 100644
This patch add dbc debug device support in 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/serial
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.
&g
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 like
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;
>> >
>>
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)
rresponding 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
Signed-off-by: Lu Baolu
---
Change log:
v1->v2:
- Correct the email of Tested-by.
drivers/usb/hos
701 - 800 of 1212 matches
Mail list logo