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

2015-11-12 Thread Lu Baolu



On 11/13/2015 10:26 AM, Dave Young wrote:

On 11/13/15 at 10:04am, Lu, Baolu wrote:

Hi Dave,

On 11/12/2015 02:01 PM, Dave Young wrote:

Hi, Baolu

On 11/12/15 at 10:45am, Lu, Baolu wrote:

Hi Dave,

Which device are you testing with? This implementation was developed
and tested on Intel Skylake devices.

It doesn't surprise me if it doesn't work with other silicons. But it do
remind me to create a verified-list and put those known-to-work devices
in it.


I have not got time to do more test. What infomation do you want?
lsusb -v?

lspci -v


Here is the controller information:

Host side:

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family 
USB xHCI (rev 05) (prog-if 30 [XHCI])
Subsystem: Hewlett-Packard Company Device 1905
Flags: bus master, medium devsel, latency 0, IRQ 27
Memory at ef12 (64-bit, non-prefetchable) [size=64K]
Capabilities: 
Kernel driver in use: xhci_hcd

Target side:

00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04) 
(prog-if 30 [XHCI])
Subsystem: Lenovo Device 220c
Flags: bus master, medium devsel, latency 0, IRQ 41
Memory at f062 (64-bit, non-prefetchable) [size=64K]
Capabilities: 
Kernel driver in use: xhci_hcd


Okay, thank you.

Thanks,
-Baolu


Thanks
Dave



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

2015-11-12 Thread Lu, Baolu

Hi Dave,

On 11/12/2015 02:01 PM, Dave Young wrote:

Hi, Baolu

On 11/12/15 at 10:45am, Lu, Baolu wrote:

>Hi Dave,
>
>Which device are you testing with? This implementation was developed
>and tested on Intel Skylake devices.
>
>It doesn't surprise me if it doesn't work with other silicons. But it do
>remind me to create a verified-list and put those known-to-work devices
>in it.
>

I have not got time to do more test. What infomation do you want?
lsusb -v?


lspci -v

Thanks,
-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 v3 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-12 Thread Dave Young
On 11/13/15 at 10:04am, Lu, Baolu wrote:
> Hi Dave,
> 
> On 11/12/2015 02:01 PM, Dave Young wrote:
> >Hi, Baolu
> >
> >On 11/12/15 at 10:45am, Lu, Baolu wrote:
> >>>Hi Dave,
> >>>
> >>>Which device are you testing with? This implementation was developed
> >>>and tested on Intel Skylake devices.
> >>>
> >>>It doesn't surprise me if it doesn't work with other silicons. But it do
> >>>remind me to create a verified-list and put those known-to-work devices
> >>>in it.
> >>>
> >I have not got time to do more test. What infomation do you want?
> >lsusb -v?
> 
> lspci -v
> 

Here is the controller information:

Host side:

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family 
USB xHCI (rev 05) (prog-if 30 [XHCI])
Subsystem: Hewlett-Packard Company Device 1905
Flags: bus master, medium devsel, latency 0, IRQ 27
Memory at ef12 (64-bit, non-prefetchable) [size=64K]
Capabilities: 
Kernel driver in use: xhci_hcd

Target side:

00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04) 
(prog-if 30 [XHCI])
Subsystem: Lenovo Device 220c
Flags: bus master, medium devsel, latency 0, IRQ 41
Memory at f062 (64-bit, non-prefetchable) [size=64K]
Capabilities: 
Kernel driver in use: xhci_hcd

Thanks
Dave
--
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 v3 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-11 Thread Dave Young
Hi, Baolu

On 11/12/15 at 10:45am, Lu, Baolu wrote:
> Hi Dave,
> 
> Which device are you testing with? This implementation was developed
> and tested on Intel Skylake devices.
> 
> It doesn't surprise me if it doesn't work with other silicons. But it do
> remind me to create a verified-list and put those known-to-work devices
> in it.
> 

I have not got time to do more test. What infomation do you want? 
lsusb -v?


> Thanks,
> Baolu
> 
> On 11/11/2015 10:25 AM, Dave Young wrote:
> >Hi,
> >
> >On 11/11/15 at 09:32am, Lu, Baolu wrote:
> >>
> >>On 11/10/2015 05:39 PM, Dave Young wrote:
> >>>Hi,
> >>>
> >>>On 11/09/15 at 03:38pm, Lu Baolu wrote:
> This patch series adds support for early printk through USB3 debug port.
> USB3 debug port is described in xHCI specification as an optional extended
> capability.
> 
> >>>I did a test with your previous patchset with the manually wired cable.
> >>>debug host detected the remote device, but later the devie automaticlly
> >>>disconnected and earlyprintk hangs.
> >>Hi Dave,
> >>
> >>What I have done is:
> >Retested it, seems it is not stable. I got a sucessful boot with earlyprintk
> >But only once and there was no "Press Y to continue", I just blindly pressed 
> >Y.
> >
> >The other tests failed.
> >
> >Since it is not convinience to test, do you have way to enable the dbc
> >after kernel boot? like echo 1 to a sysfs file to enable it.
> >>(1) Build a new kernel for debug target with this patch series applied.
> >>(2) Add "earlyprintk=xdbc" to the kernel option of debug target. The
> >>  "keep" option for early printk doesn't support yet. (That's my next
> >>  target.)
> >>
> >>(3) Boot the debug host, and disable USB runtime suspend:
> >>
> >># echo on > /sys/bus/pci/devices//power/control
> >># echo on | tee /sys/bus/usb/devices/*/power/control
> >>
> >>(4) Boot the debug target. Check the dmesg message on debug host.
> >>
> >># tail -f /var/log/kern.log
> >>
> >>Nov 12 01:27:50 allen-ult kernel: [ 1815.983374] usb 4-3: new SuperSpeed USB
> >>device number 4 using xhci_hcd
> >>Nov 12 01:27:50 allen-ult kernel: [ 1815.999595] usb 4-3: LPM exit latency
> >>is zeroed, disabling LPM.
> >>Nov 12 01:27:50 allen-ult kernel: [ 1815.999899] usb 4-3: New USB device
> >>found, idVendor=1d6b, idProduct=0004
> >>Nov 12 01:27:50 allen-ult kernel: [ 1815.02] usb 4-3: New USB device
> >>strings: Mfr=1, Product=2, SerialNumber=3
> >>Nov 12 01:27:50 allen-ult kernel: [ 1815.03] usb 4-3: Product: Remote
> >>GDB
> >>Nov 12 01:27:50 allen-ult kernel: [ 1815.04] usb 4-3: Manufacturer:
> >>Linux
> >>Nov 12 01:27:50 allen-ult kernel: [ 1815.05] usb 4-3: SerialNumber: 0001
> >>Nov 12 01:27:50 allen-ult kernel: [ 1816.000240] usb_debug 4-3:1.0: xhci_dbc
> >>converter detected
> >>Nov 12 01:27:50 allen-ult kernel: [ 1816.000360] usb 4-3: xhci_dbc converter
> >>now attached to ttyUSB0
> >>
> >>(5) Host has completed enumeration of debug device. Start "minicom" on debug
> >>host.
> >>
> >Most times I have no chance to run minicom before the usb disconnection here.
> >
> >>Welcome to minicom 2.7
> >>
> >>OPTIONS: I18n
> >>Compiled on Jan  1 2014, 17:13:19.
> >>Port /dev/ttyUSB0, 01:28:02
> >>
> >>Press CTRL-A Z for help on special keys
> >>
> >>Press Y to continue...
> >>
> >>(6) You should be able to see "Press Y to continue..." (if not, try pressing
> >>Enter key)
> >>Press Y key, debug target should go ahead with boot and early boot messages
> >>should show in mincom.
> >>
> >>Press Y to continue...
> >>[0.00] Initializing cgroup subsys cpuset
> >>[0.00] Initializing cgroup subsys cpu
> >>[0.00] Initializing cgroup subsys cpuacct
> >>[0.00] Linux version 4.3.0-rc7+ (allen@blu-skl) (gcc version 4.8.4
> >>(Ubuntu 4.8.4-2ubuntu1~14.04) 5
> >>[0.00] Command line: BOOT_IMAGE=/boot/vmlinuz-4.3.0-rc7+
> >>root=UUID=5a2fb856-0238-4b6e-aa45-beeccb7
> >>[0.00] KERNEL supported cpus:
> >>
> >>[...skipped...]
> >>
> >>[0.00]  Offload RCU callbacks from CPUs: 0-7.
> >>[0.00] Console: colour dummy device 80x25
> >>[0.00] console [tty0] enabled
> >>[0.00] bootconsole [earlyxdbc0] disabled
> >>
> >>
> >>So "the devie automaticlly disconnected and earlyprintk hangs" happens in
> >>which step?
> >>
> >Here is some log on host side.
> >
> >[ 1568.052135] usb 2-2: new SuperSpeed USB device number 5 using xhci_hcd
> >[ 1568.063416] usb 2-2: LPM exit latency is zeroed, disabling LPM.
> >[ 1568.063750] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004
> >[ 1568.063751] usb 2-2: New USB device strings: Mfr=1, Product=2, 
> >SerialNumber=3
> >[ 1568.063752] usb 2-2: Product: Remote GDB
> >[ 1568.063753] usb 2-2: Manufacturer: Linux
> >[ 1568.063754] usb 2-2: SerialNumber: 0001
> >[ 1568.065580] usb_debug 2-2:1.0: xhci_dbc converter detected
> >[ 1568.066309] usb 2-2: xhci_dbc converter now attached to ttyUSB0
> >[ 1580.464706] usb 2-2: USB disconnect, device number 5
> >[ 1580.464996] 

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

2015-11-11 Thread Lu, Baolu

Hi Dave,

Which device are you testing with? This implementation was developed
and tested on Intel Skylake devices.

It doesn't surprise me if it doesn't work with other silicons. But it do
remind me to create a verified-list and put those known-to-work devices
in it.

Thanks,
Baolu

On 11/11/2015 10:25 AM, Dave Young wrote:

Hi,

On 11/11/15 at 09:32am, Lu, Baolu wrote:


On 11/10/2015 05:39 PM, Dave Young wrote:

Hi,

On 11/09/15 at 03:38pm, Lu Baolu wrote:

This patch series adds support for early printk through USB3 debug port.
USB3 debug port is described in xHCI specification as an optional extended
capability.


I did a test with your previous patchset with the manually wired cable.
debug host detected the remote device, but later the devie automaticlly
disconnected and earlyprintk hangs.

Hi Dave,

What I have done is:

Retested it, seems it is not stable. I got a sucessful boot with earlyprintk
But only once and there was no "Press Y to continue", I just blindly pressed Y.

The other tests failed.

Since it is not convinience to test, do you have way to enable the dbc
after kernel boot? like echo 1 to a sysfs file to enable it.

(1) Build a new kernel for debug target with this patch series applied.
(2) Add "earlyprintk=xdbc" to the kernel option of debug target. The
  "keep" option for early printk doesn't support yet. (That's my next
  target.)

(3) Boot the debug host, and disable USB runtime suspend:

# echo on > /sys/bus/pci/devices//power/control
# echo on | tee /sys/bus/usb/devices/*/power/control

(4) Boot the debug target. Check the dmesg message on debug host.

# tail -f /var/log/kern.log

Nov 12 01:27:50 allen-ult kernel: [ 1815.983374] usb 4-3: new SuperSpeed USB
device number 4 using xhci_hcd
Nov 12 01:27:50 allen-ult kernel: [ 1815.999595] usb 4-3: LPM exit latency
is zeroed, disabling LPM.
Nov 12 01:27:50 allen-ult kernel: [ 1815.999899] usb 4-3: New USB device
found, idVendor=1d6b, idProduct=0004
Nov 12 01:27:50 allen-ult kernel: [ 1815.02] usb 4-3: New USB device
strings: Mfr=1, Product=2, SerialNumber=3
Nov 12 01:27:50 allen-ult kernel: [ 1815.03] usb 4-3: Product: Remote
GDB
Nov 12 01:27:50 allen-ult kernel: [ 1815.04] usb 4-3: Manufacturer:
Linux
Nov 12 01:27:50 allen-ult kernel: [ 1815.05] usb 4-3: SerialNumber: 0001
Nov 12 01:27:50 allen-ult kernel: [ 1816.000240] usb_debug 4-3:1.0: xhci_dbc
converter detected
Nov 12 01:27:50 allen-ult kernel: [ 1816.000360] usb 4-3: xhci_dbc converter
now attached to ttyUSB0

(5) Host has completed enumeration of debug device. Start "minicom" on debug
host.


Most times I have no chance to run minicom before the usb disconnection here.


Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Jan  1 2014, 17:13:19.
Port /dev/ttyUSB0, 01:28:02

Press CTRL-A Z for help on special keys

Press Y to continue...

(6) You should be able to see "Press Y to continue..." (if not, try pressing
Enter key)
Press Y key, debug target should go ahead with boot and early boot messages
should show in mincom.

Press Y to continue...
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 4.3.0-rc7+ (allen@blu-skl) (gcc version 4.8.4
(Ubuntu 4.8.4-2ubuntu1~14.04) 5
[0.00] Command line: BOOT_IMAGE=/boot/vmlinuz-4.3.0-rc7+
root=UUID=5a2fb856-0238-4b6e-aa45-beeccb7
[0.00] KERNEL supported cpus:

[...skipped...]

[0.00]  Offload RCU callbacks from CPUs: 0-7.
[0.00] Console: colour dummy device 80x25
[0.00] console [tty0] enabled
[0.00] bootconsole [earlyxdbc0] disabled


So "the devie automaticlly disconnected and earlyprintk hangs" happens in
which step?


Here is some log on host side.

[ 1568.052135] usb 2-2: new SuperSpeed USB device number 5 using xhci_hcd
[ 1568.063416] usb 2-2: LPM exit latency is zeroed, disabling LPM.
[ 1568.063750] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004
[ 1568.063751] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1568.063752] usb 2-2: Product: Remote GDB
[ 1568.063753] usb 2-2: Manufacturer: Linux
[ 1568.063754] usb 2-2: SerialNumber: 0001
[ 1568.065580] usb_debug 2-2:1.0: xhci_dbc converter detected
[ 1568.066309] usb 2-2: xhci_dbc converter now attached to ttyUSB0
[ 1580.464706] usb 2-2: USB disconnect, device number 5
[ 1580.464996] xhci_dbc ttyUSB0: xhci_dbc converter now disconnected from 
ttyUSB0
[ 1580.465062] usb_debug 2-2:1.0: device disconnected
[ 1580.670743] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
[ 1580.682068] usb 2-2: LPM exit latency is zeroed, disabling LPM.
[ 1580.682667] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004
[ 1580.682672] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1580.682675] usb 2-2: Product: Remote GDB
[ 1580.682678] usb 2-2: Manufacturer: Linux
[ 1580.682681] usb 2-2: SerialNumber: 0001
[ 1580.685190] usb_debug 2-2:1.0: 

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

2015-11-10 Thread Dave Young
Hi,

On 11/09/15 at 03:38pm, Lu Baolu wrote:
> This patch series adds support for early printk through USB3 debug port.
> USB3 debug port is described in xHCI specification as an optional extended
> capability.
> 

I did a test with your previous patchset with the manually wired cable.
debug host detected the remote device, but later the devie automaticlly
disconnected and earlyprintk hangs.

I have not got more time, will try your new patchset when I have time.

Thanks
Dave
--
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 v3 00/12] usb: early: add support for early printk through USB3 debug port

2015-11-10 Thread Lu, Baolu



On 11/11/2015 10:25 AM, Dave Young wrote:

Hi,

On 11/11/15 at 09:32am, Lu, Baolu wrote:


On 11/10/2015 05:39 PM, Dave Young wrote:

Hi,

On 11/09/15 at 03:38pm, Lu Baolu wrote:

This patch series adds support for early printk through USB3 debug port.
USB3 debug port is described in xHCI specification as an optional extended
capability.


I did a test with your previous patchset with the manually wired cable.
debug host detected the remote device, but later the devie automaticlly
disconnected and earlyprintk hangs.

Hi Dave,

What I have done is:

Retested it, seems it is not stable. I got a sucessful boot with earlyprintk
But only once and there was no "Press Y to continue", I just blindly pressed Y.

The other tests failed.


Problem seems to exist at the place where host and target sync with
each other.



Since it is not convinience to test, do you have way to enable the dbc
after kernel boot? like echo 1 to a sysfs file to enable it.


This is the first phase of code. I could do this in the next phase.
The problems exist in the interferer between DbC and the host
controller. They share the same power well so host reset, or
suspend/resume will cause DbC not work.


(1) Build a new kernel for debug target with this patch series applied.
(2) Add "earlyprintk=xdbc" to the kernel option of debug target. The
  "keep" option for early printk doesn't support yet. (That's my next
  target.)

(3) Boot the debug host, and disable USB runtime suspend:

# echo on > /sys/bus/pci/devices//power/control
# echo on | tee /sys/bus/usb/devices/*/power/control

(4) Boot the debug target. Check the dmesg message on debug host.

# tail -f /var/log/kern.log

Nov 12 01:27:50 allen-ult kernel: [ 1815.983374] usb 4-3: new SuperSpeed USB
device number 4 using xhci_hcd
Nov 12 01:27:50 allen-ult kernel: [ 1815.999595] usb 4-3: LPM exit latency
is zeroed, disabling LPM.
Nov 12 01:27:50 allen-ult kernel: [ 1815.999899] usb 4-3: New USB device
found, idVendor=1d6b, idProduct=0004
Nov 12 01:27:50 allen-ult kernel: [ 1815.02] usb 4-3: New USB device
strings: Mfr=1, Product=2, SerialNumber=3
Nov 12 01:27:50 allen-ult kernel: [ 1815.03] usb 4-3: Product: Remote
GDB
Nov 12 01:27:50 allen-ult kernel: [ 1815.04] usb 4-3: Manufacturer:
Linux
Nov 12 01:27:50 allen-ult kernel: [ 1815.05] usb 4-3: SerialNumber: 0001
Nov 12 01:27:50 allen-ult kernel: [ 1816.000240] usb_debug 4-3:1.0: xhci_dbc
converter detected
Nov 12 01:27:50 allen-ult kernel: [ 1816.000360] usb 4-3: xhci_dbc converter
now attached to ttyUSB0

(5) Host has completed enumeration of debug device. Start "minicom" on debug
host.


Most times I have no chance to run minicom before the usb disconnection here.


I will send you a new version for test later. By the way, which hardware
are you using for test?




Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Jan  1 2014, 17:13:19.
Port /dev/ttyUSB0, 01:28:02

Press CTRL-A Z for help on special keys

Press Y to continue...

(6) You should be able to see "Press Y to continue..." (if not, try pressing
Enter key)
Press Y key, debug target should go ahead with boot and early boot messages
should show in mincom.

Press Y to continue...
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 4.3.0-rc7+ (allen@blu-skl) (gcc version 4.8.4
(Ubuntu 4.8.4-2ubuntu1~14.04) 5
[0.00] Command line: BOOT_IMAGE=/boot/vmlinuz-4.3.0-rc7+
root=UUID=5a2fb856-0238-4b6e-aa45-beeccb7
[0.00] KERNEL supported cpus:

[...skipped...]

[0.00]  Offload RCU callbacks from CPUs: 0-7.
[0.00] Console: colour dummy device 80x25
[0.00] console [tty0] enabled
[0.00] bootconsole [earlyxdbc0] disabled


So "the devie automaticlly disconnected and earlyprintk hangs" happens in
which step?


Here is some log on host side.

[ 1568.052135] usb 2-2: new SuperSpeed USB device number 5 using xhci_hcd
[ 1568.063416] usb 2-2: LPM exit latency is zeroed, disabling LPM.
[ 1568.063750] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004
[ 1568.063751] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1568.063752] usb 2-2: Product: Remote GDB
[ 1568.063753] usb 2-2: Manufacturer: Linux
[ 1568.063754] usb 2-2: SerialNumber: 0001
[ 1568.065580] usb_debug 2-2:1.0: xhci_dbc converter detected
[ 1568.066309] usb 2-2: xhci_dbc converter now attached to ttyUSB0
[ 1580.464706] usb 2-2: USB disconnect, device number 5
[ 1580.464996] xhci_dbc ttyUSB0: xhci_dbc converter now disconnected from 
ttyUSB0
[ 1580.465062] usb_debug 2-2:1.0: device disconnected
[ 1580.670743] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
[ 1580.682068] usb 2-2: LPM exit latency is zeroed, disabling LPM.
[ 1580.682667] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004
[ 1580.682672] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1580.682675] usb 2-2: Product: 

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

2015-11-10 Thread Dave Young
Hi,

On 11/11/15 at 09:32am, Lu, Baolu wrote:
> 
> 
> On 11/10/2015 05:39 PM, Dave Young wrote:
> >Hi,
> >
> >On 11/09/15 at 03:38pm, Lu Baolu wrote:
> >>This patch series adds support for early printk through USB3 debug port.
> >>USB3 debug port is described in xHCI specification as an optional extended
> >>capability.
> >>
> >I did a test with your previous patchset with the manually wired cable.
> >debug host detected the remote device, but later the devie automaticlly
> >disconnected and earlyprintk hangs.
> 
> Hi Dave,
> 
> What I have done is:

Retested it, seems it is not stable. I got a sucessful boot with earlyprintk
But only once and there was no "Press Y to continue", I just blindly pressed Y.

The other tests failed.

Since it is not convinience to test, do you have way to enable the dbc
after kernel boot? like echo 1 to a sysfs file to enable it.
> 
> (1) Build a new kernel for debug target with this patch series applied.
> (2) Add "earlyprintk=xdbc" to the kernel option of debug target. The
>  "keep" option for early printk doesn't support yet. (That's my next
>  target.)
> 
> (3) Boot the debug host, and disable USB runtime suspend:
> 
> # echo on > /sys/bus/pci/devices//power/control
> # echo on | tee /sys/bus/usb/devices/*/power/control
> 
> (4) Boot the debug target. Check the dmesg message on debug host.
> 
> # tail -f /var/log/kern.log
> 
> Nov 12 01:27:50 allen-ult kernel: [ 1815.983374] usb 4-3: new SuperSpeed USB
> device number 4 using xhci_hcd
> Nov 12 01:27:50 allen-ult kernel: [ 1815.999595] usb 4-3: LPM exit latency
> is zeroed, disabling LPM.
> Nov 12 01:27:50 allen-ult kernel: [ 1815.999899] usb 4-3: New USB device
> found, idVendor=1d6b, idProduct=0004
> Nov 12 01:27:50 allen-ult kernel: [ 1815.02] usb 4-3: New USB device
> strings: Mfr=1, Product=2, SerialNumber=3
> Nov 12 01:27:50 allen-ult kernel: [ 1815.03] usb 4-3: Product: Remote
> GDB
> Nov 12 01:27:50 allen-ult kernel: [ 1815.04] usb 4-3: Manufacturer:
> Linux
> Nov 12 01:27:50 allen-ult kernel: [ 1815.05] usb 4-3: SerialNumber: 0001
> Nov 12 01:27:50 allen-ult kernel: [ 1816.000240] usb_debug 4-3:1.0: xhci_dbc
> converter detected
> Nov 12 01:27:50 allen-ult kernel: [ 1816.000360] usb 4-3: xhci_dbc converter
> now attached to ttyUSB0
> 
> (5) Host has completed enumeration of debug device. Start "minicom" on debug
> host.
> 

Most times I have no chance to run minicom before the usb disconnection here.

> 
> Welcome to minicom 2.7
> 
> OPTIONS: I18n
> Compiled on Jan  1 2014, 17:13:19.
> Port /dev/ttyUSB0, 01:28:02
> 
> Press CTRL-A Z for help on special keys
> 
> Press Y to continue...
> 
> (6) You should be able to see "Press Y to continue..." (if not, try pressing
> Enter key)
> Press Y key, debug target should go ahead with boot and early boot messages
> should show in mincom.
> 
> Press Y to continue...
> [0.00] Initializing cgroup subsys cpuset
> [0.00] Initializing cgroup subsys cpu
> [0.00] Initializing cgroup subsys cpuacct
> [0.00] Linux version 4.3.0-rc7+ (allen@blu-skl) (gcc version 4.8.4
> (Ubuntu 4.8.4-2ubuntu1~14.04) 5
> [0.00] Command line: BOOT_IMAGE=/boot/vmlinuz-4.3.0-rc7+
> root=UUID=5a2fb856-0238-4b6e-aa45-beeccb7
> [0.00] KERNEL supported cpus:
> 
> [...skipped...]
> 
> [0.00]  Offload RCU callbacks from CPUs: 0-7.
> [0.00] Console: colour dummy device 80x25
> [0.00] console [tty0] enabled
> [0.00] bootconsole [earlyxdbc0] disabled
> 
> 
> So "the devie automaticlly disconnected and earlyprintk hangs" happens in
> which step?
> 

Here is some log on host side.

[ 1568.052135] usb 2-2: new SuperSpeed USB device number 5 using xhci_hcd
[ 1568.063416] usb 2-2: LPM exit latency is zeroed, disabling LPM.
[ 1568.063750] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004
[ 1568.063751] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1568.063752] usb 2-2: Product: Remote GDB
[ 1568.063753] usb 2-2: Manufacturer: Linux
[ 1568.063754] usb 2-2: SerialNumber: 0001
[ 1568.065580] usb_debug 2-2:1.0: xhci_dbc converter detected
[ 1568.066309] usb 2-2: xhci_dbc converter now attached to ttyUSB0
[ 1580.464706] usb 2-2: USB disconnect, device number 5
[ 1580.464996] xhci_dbc ttyUSB0: xhci_dbc converter now disconnected from 
ttyUSB0
[ 1580.465062] usb_debug 2-2:1.0: device disconnected
[ 1580.670743] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
[ 1580.682068] usb 2-2: LPM exit latency is zeroed, disabling LPM.
[ 1580.682667] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004
[ 1580.682672] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1580.682675] usb 2-2: Product: Remote GDB
[ 1580.682678] usb 2-2: Manufacturer: Linux
[ 1580.682681] usb 2-2: SerialNumber: 0001
[ 1580.685190] usb_debug 2-2:1.0: xhci_dbc converter detected
[ 1580.687106] usb 2-2: xhci_dbc converter now attached to ttyUSB0
[ 1586.751477] usb 2-2: USB disconnect, device 

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

2015-11-10 Thread Lu, Baolu



On 11/10/2015 05:39 PM, Dave Young wrote:

Hi,

On 11/09/15 at 03:38pm, Lu Baolu wrote:

This patch series adds support for early printk through USB3 debug port.
USB3 debug port is described in xHCI specification as an optional extended
capability.


I did a test with your previous patchset with the manually wired cable.
debug host detected the remote device, but later the devie automaticlly
disconnected and earlyprintk hangs.


Hi Dave,

What I have done is:

(1) Build a new kernel for debug target with this patch series applied.
(2) Add "earlyprintk=xdbc" to the kernel option of debug target. The
 "keep" option for early printk doesn't support yet. (That's my next
 target.)

(3) Boot the debug host, and disable USB runtime suspend:

# echo on > /sys/bus/pci/devices//power/control
# echo on | tee /sys/bus/usb/devices/*/power/control

(4) Boot the debug target. Check the dmesg message on debug host.

# tail -f /var/log/kern.log

Nov 12 01:27:50 allen-ult kernel: [ 1815.983374] usb 4-3: new SuperSpeed 
USB device number 4 using xhci_hcd
Nov 12 01:27:50 allen-ult kernel: [ 1815.999595] usb 4-3: LPM exit 
latency is zeroed, disabling LPM.
Nov 12 01:27:50 allen-ult kernel: [ 1815.999899] usb 4-3: New USB device 
found, idVendor=1d6b, idProduct=0004
Nov 12 01:27:50 allen-ult kernel: [ 1815.02] usb 4-3: New USB device 
strings: Mfr=1, Product=2, SerialNumber=3
Nov 12 01:27:50 allen-ult kernel: [ 1815.03] usb 4-3: Product: 
Remote GDB
Nov 12 01:27:50 allen-ult kernel: [ 1815.04] usb 4-3: Manufacturer: 
Linux

Nov 12 01:27:50 allen-ult kernel: [ 1815.05] usb 4-3: SerialNumber: 0001
Nov 12 01:27:50 allen-ult kernel: [ 1816.000240] usb_debug 4-3:1.0: 
xhci_dbc converter detected
Nov 12 01:27:50 allen-ult kernel: [ 1816.000360] usb 4-3: xhci_dbc 
converter now attached to ttyUSB0


(5) Host has completed enumeration of debug device. Start "minicom" on 
debug host.



Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Jan  1 2014, 17:13:19.
Port /dev/ttyUSB0, 01:28:02

Press CTRL-A Z for help on special keys

Press Y to continue...

(6) You should be able to see "Press Y to continue..." (if not, try 
pressing Enter key)
Press Y key, debug target should go ahead with boot and early boot 
messages should show in mincom.


Press Y to continue...
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 4.3.0-rc7+ (allen@blu-skl) (gcc version 
4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) 5
[0.00] Command line: BOOT_IMAGE=/boot/vmlinuz-4.3.0-rc7+ 
root=UUID=5a2fb856-0238-4b6e-aa45-beeccb7

[0.00] KERNEL supported cpus:

[...skipped...]

[0.00]  Offload RCU callbacks from CPUs: 0-7.
[0.00] Console: colour dummy device 80x25
[0.00] console [tty0] enabled
[0.00] bootconsole [earlyxdbc0] disabled


So "the devie automaticlly disconnected and earlyprintk hangs" happens 
in which step?


Thanks,
Baolu



I have not got more time, will try your new patchset when I have time.

Thanks
Dave



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

2015-11-10 Thread Lu, Baolu



On 11/11/2015 10:25 AM, Dave Young wrote:

[ 1616.823351] usb 2-2: new SuperSpeed USB device number 8 using xhci_hcd
[ 1616.834520] usb 2-2: LPM exit latency is zeroed, disabling LPM.
[ 1616.834856] usb 2-2: New USB device found, idVendor=1d6b, idProduct=0004
[ 1616.834858] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1616.834859] usb 2-2: Product: Remote GDB
[ 1616.834860] usb 2-2: Manufacturer: Linux
[ 1616.834860] usb 2-2: SerialNumber: 0001
[ 1616.836715] usb_debug 2-2:1.0: xhci_dbc converter detected
[ 1616.837327] usb 2-2: xhci_dbc converter now attached to ttyUSB0
[ 1622.719311] usb 2-2: USB disconnect, device number 8

 Hi Dave,

I revisited the kernel log. It seems the debug host enumerated
the debug target successfully. Can you please check the
minicom configuration?

The configure on my debug host looks like below.

Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Jan  1 2014, 17:13:19.
Port /dev/ttyUSB0, 01:28:02

Rate: 115200

Please make sure you have disabled runtime power management
for USB devices and host controller in debug host. And sometimes,
reboot the debug host helps when enumeration fails.

Thanks,
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