Skip to contentSkip to conversation

EHCI debug documentation

PATCH In review Yinghai Lu 9 participants 32 messages Mar 4, 2009 – Mar 6, 2009 1 message not in the archive Documentation

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Yinghai Lu

author
#1 lore raw
Quoted 6 lines · Sarah Sharp

Greetings,

You wrote the EHCI debug port patch for early printk back in July 2008 (commit 5c05917e7fe313a187ad6ebb94c1c6cf42862a0b).  Can you add some documentation to the Documentation directory about how a Linux user would set up a system (cables, files to open to get the printks, etc.)?

please check

==========================================================================================
USB Debug port using Howto

1. HW:

a. target system need to have debug port

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI])
Subsystem: Lenovo ThinkPad T61
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium

Quoted 1 line

TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

Latency: 0
Interrupt: pin D routed to IRQ 19
Region 0: Memory at fe227000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME+
Capabilities: [58] Debug port: BAR=1 offset=00a0 Kernel driver in use: ehci_hcd
Kernel modules: ehci-hcd
00: 86 80 36 28 06 01 90 02 03 20 03 0c 00 00 00 00
10: 00 70 22 fe 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 ab 20
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 04 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 58 c2 c9 00 80 00 00 0a 00 a0 20 00 00 00 00
60: 20 20 9f 01 00 00 00 00 01 00 00 01 00 00 08 80
70: c0 00 17 3f 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 aa ff 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 88 85 40 00 86 0f 05 00 06 17 02 20

b. netchip USB debug cable

c. console system: have USB port

2. SW setting
a. console system: need to have kernel config
CONFIG_USB_SERIAL_DEBUG
you should get /dev/ttyUSBx

   # cat /dev/ttyUSBx could get output

b. target system: need to have kernel config
CONFIG_EARLY_PRINTK_DBGP

boot command line: earlyprintk=dbgp

c. for Nvidia Southbridge based system: kernel will try to probe and find out which port has debug device connected.

#2 lore raw
Quoted 51 lines · Yinghai Lu
Quoted 6 lines · Sarah Sharp

Greetings,

You wrote the EHCI debug port patch for early printk back in July 2008 (commit 5c05917e7fe313a187ad6ebb94c1c6cf42862a0b). Can you add some documentation to the Documentation directory about how a Linux user would set up a system (cables, files to open to get the printks, etc.)?

please check

==========================================================================================
USB Debug port using Howto

1. HW:

a. target system need to have debug port

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI])
Subsystem: Lenovo ThinkPad T61
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium

Quoted 1 line

TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

Latency: 0
Interrupt: pin D routed to IRQ 19
Region 0: Memory at fe227000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME+
Capabilities: [58] Debug port: BAR=1 offset=00a0 Kernel driver in use: ehci_hcd
Kernel modules: ehci-hcd
00: 86 80 36 28 06 01 90 02 03 20 03 0c 00 00 00 00
10: 00 70 22 fe 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 ab 20
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 04 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 58 c2 c9 00 80 00 00 0a 00 a0 20 00 00 00 00
60: 20 20 9f 01 00 00 00 00 01 00 00 01 00 00 08 80
70: c0 00 17 3f 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 aa ff 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 88 85 40 00 86 0f 05 00 06 17 02 20

Quoted 1 line

b. netchip USB debug cable

http://www.plxtech.com/products/NET2000/NET20DC/default.asp

Quoted 16 lines

c. console system: have USB port

2. SW setting
a. console system: need to have kernel config
CONFIG_USB_SERIAL_DEBUG
you should get /dev/ttyUSBx

   # cat /dev/ttyUSBx could get output

b. target system: need to have kernel config
CONFIG_EARLY_PRINTK_DBGP

boot command line: earlyprintk=dbgp

c. for Nvidia Southbridge based system: kernel will try to probe and find out which port has debug device connected.

Signature · 1 line
~Randy
#3 lore raw
Quoted 52 lines · Randy Dunlap
Quoted 51 lines · Yinghai Lu
Quoted 6 lines · Sarah Sharp

Greetings,

You wrote the EHCI debug port patch for early printk back in July 2008 (commit 5c05917e7fe313a187ad6ebb94c1c6cf42862a0b). Can you add some documentation to the Documentation directory about how a Linux user would set up a system (cables, files to open to get the printks, etc.)?

please check

==========================================================================================
USB Debug port using Howto

1. HW:

a. target system need to have debug port

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI])
Subsystem: Lenovo ThinkPad T61
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium

Quoted 1 line

TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

Latency: 0
Interrupt: pin D routed to IRQ 19
Region 0: Memory at fe227000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME+
Capabilities: [58] Debug port: BAR=1 offset=00a0 Kernel driver in use: ehci_hcd
Kernel modules: ehci-hcd
00: 86 80 36 28 06 01 90 02 03 20 03 0c 00 00 00 00
10: 00 70 22 fe 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 ab 20
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 04 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 58 c2 c9 00 80 00 00 0a 00 a0 20 00 00 00 00
60: 20 20 9f 01 00 00 00 00 01 00 00 01 00 00 08 80
70: c0 00 17 3f 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 aa ff 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 88 85 40 00 86 0f 05 00 06 17 02 20

Quoted 21 lines
Quoted 1 line

b. netchip USB debug cable

http://www.plxtech.com/products/NET2000/NET20DC/default.asp

Quoted 16 lines

c. console system: have USB port

2. SW setting
a. console system: need to have kernel config
CONFIG_USB_SERIAL_DEBUG
you should get /dev/ttyUSBx

   # cat /dev/ttyUSBx could get output

b. target system: need to have kernel config
CONFIG_EARLY_PRINTK_DBGP

boot command line: earlyprintk=dbgp

c. for Nvidia Southbridge based system: kernel will try to probe and find out which port has debug device connected.

Would be nice to turn this all into a patch that adds this info to Documentation/x86/early-printk.txt or so.

Ingo

#4 lore raw
Quoted 4 lines · Randy Dunlap
Quoted 1 line · Yinghai Lu

b. netchip USB debug cable

http://www.plxtech.com/products/NET2000/NET20DC/default.asp

I have reports that the newer version of this device does not work on Linux as it isn't enumeratable as a "real" usb device on one end.

I don't have one of these new devices yet to test it out, has anyone else heard of this problem?

thanks,

greg k-h

#5 lore raw
Quoted 11 lines · Greg KH
Quoted 4 lines · Randy Dunlap
Quoted 1 line · Yinghai Lu

b. netchip USB debug cable

http://www.plxtech.com/products/NET2000/NET20DC/default.asp

I have reports that the newer version of this device does not work on Linux as it isn't enumeratable as a "real" usb device on one end.

I don't have one of these new devices yet to test it out, has anyone else heard of this problem?

With the first generation of devices I remember they were peculiar and finicky. I don't recall the exact details but I remember the devices able to get into weird states that may resemble what you describe.

Eric

#6 lore raw
Quoted 11 lines · Eric W. Biederman
Quoted 9 lines · Greg KH
Quoted 4 lines · Randy Dunlap
Quoted 1 line · Yinghai Lu

b. netchip USB debug cable

http://www.plxtech.com/products/NET2000/NET20DC/default.asp

I have reports that the newer version of this device does not work on Linux as it isn't enumeratable as a "real" usb device on one end.

Quoted 6 lines
Quoted 2 lines

I don't have one of these new devices yet to test it out, has anyone else heard of this problem?

With the first generation of devices I remember they were peculiar and finicky. I don't recall the exact details but I remember the devices able to get into weird states that may resemble what you describe.

Those devices were a little peculiar in that they were powered only on one side. That is, they would take bus power only from the right-hand connector (looking at the face with the PLX logo). So if you plugged in only the left side, the device would not show up or enumerate. But if you plugged in both sides, then both of them would enumerate okay.

Alan Stern

#7 lore raw
Quoted 20 lines · Alan Stern
Quoted 11 lines · Eric W. Biederman
Quoted 9 lines · Greg KH
Quoted 4 lines · Randy Dunlap
Quoted 1 line · Yinghai Lu

b. netchip USB debug cable

http://www.plxtech.com/products/NET2000/NET20DC/default.asp

I have reports that the newer version of this device does not work on Linux as it isn't enumeratable as a "real" usb device on one end.

Quoted 6 lines
Quoted 2 lines

I don't have one of these new devices yet to test it out, has anyone else heard of this problem?

With the first generation of devices I remember they were peculiar and finicky. I don't recall the exact details but I remember the devices able to get into weird states that may resemble what you describe.

Quoted 5 lines

Those devices were a little peculiar in that they were powered only on one side. That is, they would take bus power only from the right-hand connector (looking at the face with the PLX logo). So if you plugged in only the left side, the device would not show up or enumerate. But if you plugged in both sides, then both of them would enumerate okay.

That comment should be in the documentation for ehci early printks too.

Sarah Sharp

author
#8 lore raw

PATCH 1/1 x86/doc: doc the using earlyprintk=dbgp

Impact: doc

simple using howto for earlyprintk=dbgp

---
 Documentation/x86/earlyprintk.txt |   41 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
Documentation/x86/earlyprintk.txt new file +41 -0
Index: linux-2.6/Documentation/x86/earlyprintk.txt
===================================================================
@@ -0,0 +1,41 @@
+
+Using earlyprintk with USB2 Debug port and debug cable
+
+1. HW:
+a. target system need to have debug port
+
+# lspci -vvv
+...
+00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI])
+        Subsystem: Lenovo ThinkPad T61
+        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
+        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
+        Latency: 0
+        Interrupt: pin D routed to IRQ 19
+        Region 0: Memory at fe227000 (32-bit, non-prefetchable) [size=1K]
+        Capabilities: [50] Power Management version 2
+                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
+                Status: D0 PME-Enable- DSel=0 DScale=0 PME+
+        Capabilities: [58] Debug port: BAR=1 offset=00a0
+        Kernel driver in use: ehci_hcd
+        Kernel modules: ehci-hcd
+...
+b. netchip USB debug cable
+   http://www.plxtech.com/products/NET2000/NET20DC/default.asp
+
+c. console system: have USB2 port
+
+2. SW setting
+a. console system: need to have kernel config
+   CONFIG_USB_SERIAL_DEBUG
+   you should get /dev/ttyUSBx
+
+   # cat /dev/ttyUSBx could get output
+
+b. target system: need to have kernel config
+   CONFIG_EARLY_PRINTK_DBGP
+
+   boot command line: earlyprintk=dbgp
+
+c. for Nvidia Southbridge based system: kernel will try to probe and find out which port has debug device connneted.
+
author
#9 lore raw

[tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Commit-ID:  a1aade478862fca8710904532cbc6efed97fd05a
Gitweb:     http://git.kernel.org/tip/a1aade478862fca8710904532cbc6efed97fd05a
Author:     "Yinghai Lu" <[email protected]>
AuthorDate: Wed, 4 Mar 2009 16:11:35 -0800
Commit:     Ingo Molnar <[email protected]>
CommitDate: Thu, 5 Mar 2009 10:57:52 +0100

x86/doc: mini-howto for using earlyprintk=dbgp

[ mingo: small edits and extensions. ]

Cc "Eric W. Biederman" <[email protected]>
Cc Greg KH <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Alan Stern <[email protected]>
Cc Sarah Sharp <[email protected]>
Cc Andrew Morton <[email protected]>

LKML-Reference: <[email protected]>

---
 Documentation/x86/earlyprintk.txt |  101 +++++++++++++++++++++++++++++++++++++
 1 files changed, 101 insertions(+), 0 deletions(-)
Documentation/x86/earlyprintk.txt new file +101 -0
new file mode 100644
index 0000000..607b1a0
@@ -0,0 +1,101 @@
+
+Mini-HOWTO for using the earlyprintk=dbgp boot option with a
+USB2 Debug port key and a debug cable, on x86 systems.
+
+You need two computers, the 'USB debug key' special gadget and
+and two USB cables, connected like this:
+
+  [host/target] <-------> [USB debug key] <-------> [client/console]
+
+1. There are three specific hardware requirements:
+
+ a.) Host/target system needs to have USB debug port capability.
+
+ You can check this capability by looking at a 'Debug port' bit in
+ the lspci -vvv output:
+
+ # lspci -vvv
+ ...
+ 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI])
+         Subsystem: Lenovo ThinkPad T61
+         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
+         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
+         Latency: 0
+         Interrupt: pin D routed to IRQ 19
+         Region 0: Memory at fe227000 (32-bit, non-prefetchable) [size=1K]
+         Capabilities: [50] Power Management version 2
+                 Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
+                 Status: D0 PME-Enable- DSel=0 DScale=0 PME+
+         Capabilities: [58] Debug port: BAR=1 offset=00a0
+                            ^^^^^^^^^^^ <==================== [ HERE ]
+	 Kernel driver in use: ehci_hcd
+         Kernel modules: ehci-hcd
+ ...
+
+( If your system does not list a debug port capability then you probably
+  wont be able to use the USB debug key. )
+
+ b.) You also need a Netchip USB debug cable/key:
+
+        http://www.plxtech.com/products/NET2000/NET20DC/default.asp
+
+     This is a small blue plastic connector with two USB connections,
+     it draws power from its USB connections.
+
+ c.) Thirdly, you need a second client/console system with a regular USB port.
+
+2. Software requirements:
+
+ a.) On the host/target system:
+
+    You need to enable the following kernel config option:
+
+      CONFIG_EARLY_PRINTK_DBGP=y
+
+    And you need to add the boot command line: "earlyprintk=dbgp".
+    (If you are using Grub, append it to the 'kernel' line in
+     /etc/grub.conf)
+
+    NOTE: normally earlyprintk console gets turned off once the
+    regular console is alive - use "earlyprintk=dbgp,keep" to keep
+    this channel open beyond early bootup. This can be useful for
+    debugging crashes under Xorg, etc.
+
+ b.) On the client/console system:
+
+    You should enable the following kernel config option:
+
+      CONFIG_USB_SERIAL_DEBUG=y
+
+    On the next bootup with the modified kernel you should
+    get a /dev/ttyUSBx device(s).
+
+    Now this channel of kernel messages is ready to be used: start
+    your favorite terminal emulator (minicom, etc.) and set
+    it up to use /dev/ttyUSB0 - or use a raw 'cat /dev/ttyUSBx' to
+    see the raw output.
+
+ c.) On Nvidia Southbridge based systems: the kernel will try to probe
+     and find out which port has debug device connected.
+
+3. Testing that it works fine:
+
+   You can test the output by using earlyprintk=dbgp,keep and provoking
+   kernel messages on the host/target system. You can provoke a harmless
+   kernel message by for example doing:
+
+     echo h > /proc/sysrq-trigger
+
+   On the host/target system you should see this help line in "dmesg" output:
+
+     SysRq : HELP : loglevel(0-9) reBoot Crashdump terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount show-blocked-tasks(W) dump-ftrace-buffer(Z)
+
+   On the client/console system do:
+
+       cat /dev/ttyUSB0
+
+   And you should see the help line above displayed shortly after you've
+   provoked it on the host system.
+
+If it does not work then please ask about it on the [email protected]
+mailing list or contact the x86 maintainers.
#10 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 15 lines · Yinghai Lu
Documentation/x86/earlyprintk.txt new file +15 -0
+
+Mini-HOWTO for using the earlyprintk=dbgp boot option with a
+USB2 Debug port key and a debug cable, on x86 systems.
+
+You need two computers, the 'USB debug key' special gadget and
+and two USB cables, connected like this:
+
+  [host/target] <-------> [USB debug key] <-------> [client/console]
+
+1. There are three specific hardware requirements:
+
+ a.) Host/target system needs to have USB debug port capability.
+
+ You can check this capability by looking at a 'Debug port' bit in
+ the lspci -vvv output:

...

Quoted 1 line

+ c.) Thirdly, you need a second client/console system with a regular USB port.

You might want to combine a.) and c.) since there is some disconnect between the two. c.) doesn't explicitly say a second time that the client/console needs the debug port capability ..

Or say

a.) You will need two USB ports. One on the client/console system and one one the target system.

b.) The client/console and target USB ports must have the debug port capability. You can check for this as follows,

c.) ...

I just felt the disconnect between the two a.) , and c.) left some questions.

Documentation/x86/earlyprintk.txt line 57

Quoted 11 lines

+2. Software requirements:

Documentation/x86/earlyprintk.txt new file +10 -0
+
+ a.) On the host/target system:
+
+    You need to enable the following kernel config option:
+
+      CONFIG_EARLY_PRINTK_DBGP=y
+
+    And you need to add the boot command line: "earlyprintk=dbgp".
+    (If you are using Grub, append it to the 'kernel' line in
+     /etc/grub.conf)

Isn't the usual grub.conf in /boot/grub/grub.conf ? That's where mine always seem to end up.

Quoted 8 lines
Documentation/x86/earlyprintk.txt new file +8 -0
+    NOTE: normally earlyprintk console gets turned off once the
+    regular console is alive - use "earlyprintk=dbgp,keep" to keep
+    this channel open beyond early bootup. This can be useful for
+    debugging crashes under Xorg, etc.
+
+ b.) On the client/console system:
+
+    You should enable the following kernel config option:

Documentation/x86/earlyprintk.txt line 76

Quoted 10 lines
Documentation/x86/earlyprintk.txt new file +10 -0
+
+      CONFIG_USB_SERIAL_DEBUG=y
+
+    On the next bootup with the modified kernel you should
+    get a /dev/ttyUSBx device(s).
+
+    Now this channel of kernel messages is ready to be used: start
+    your favorite terminal emulator (minicom, etc.) and set
+    it up to use /dev/ttyUSB0 - or use a raw 'cat /dev/ttyUSBx' to
+    see the raw output.

You might want to switch the first /dev/ttyUSB0 to /dev/ttyUSBx .

Quoted 8 lines

+ c.) On Nvidia Southbridge based systems: the kernel will try to probe

Documentation/x86/earlyprintk.txt new file +7 -0
+     and find out which port has debug device connected.
+
+3. Testing that it works fine:
+
+   You can test the output by using earlyprintk=dbgp,keep and provoking
+   kernel messages on the host/target system. You can provoke a harmless
+   kernel message by for example doing:

Documentation/x86/earlyprintk.txt line 95

Quoted 10 lines
Documentation/x86/earlyprintk.txt new file +10 -0
+
+     echo h > /proc/sysrq-trigger
+
+   On the host/target system you should see this help line in "dmesg" output:
+
+     SysRq : HELP : loglevel(0-9) reBoot Crashdump terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-tasks(I) saK show-backtrace-all-active-cpus(L) show-memory-usage(M) nice-all-RT-tasks(N) powerOff show-registers(P) show-all-timers(Q) unRaw Sync show-task-states(T) Unmount show-blocked-tasks(W) dump-ftrace-buffer(Z)
+
+   On the client/console system do:
+
+       cat /dev/ttyUSB0

Missing "x" here too.

Seems like a nice document. Thanks for writing it.

Daniel

author
#11 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 28 lines · Daniel Walker
Quoted 15 lines · Yinghai Lu
Documentation/x86/earlyprintk.txt new file +15 -0
+
+Mini-HOWTO for using the earlyprintk=dbgp boot option with a
+USB2 Debug port key and a debug cable, on x86 systems.
+
+You need two computers, the 'USB debug key' special gadget and
+and two USB cables, connected like this:
+
+  [host/target] <-------> [USB debug key] <-------> [client/console]
+
+1. There are three specific hardware requirements:
+
+ a.) Host/target system needs to have USB debug port capability.
+
+ You can check this capability by looking at a 'Debug port' bit in
+ the lspci -vvv output:

...

Quoted 1 line

+ c.) Thirdly, you need a second client/console system with a regular USB port.

You might want to combine a.) and c.) since there is some disconnect between the two. c.) doesn't explicitly say a second time that the client/console needs the debug port capability ..

Or say

Quoted 7 lines

a.) You will need two USB ports. One on the client/console system and one one the target system.

b.) The client/console and target USB ports must have the debug port capability. You can check for this as follows,

c.) ...

thanks for checking it.

can you submit patch to Ingo according to tip/master?

YH

#12 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 4 lines · Yinghai Lu

thanks for checking it.

can you submit patch to Ingo according to tip/master?

Hows this?

--

Fix up some typos, and make the requirements section slightly cleaner.

Documentation/x86/earlyprintk.txt +7 -7
index 607b1a0..5b51aef 100644
@@ -9,7 +9,9 @@ and two USB cables, connected like this:
 
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one one the target system.
+ 
+ b.) The client/console and target USB ports must have the debug port capability.
 
  You can check this capability by looking at a 'Debug port' bit in
  the lspci -vvv output:
@@ -35,15 +37,13 @@ and two USB cables, connected like this:
 ( If your system does not list a debug port capability then you probably
   wont be able to use the USB debug key. )
 
- b.) You also need a Netchip USB debug cable/key:
+ c.) You also need a Netchip USB debug cable/key:
 
         http://www.plxtech.com/products/NET2000/NET20DC/default.asp
 
      This is a small blue plastic connector with two USB connections,
      it draws power from its USB connections.
 
- c.) Thirdly, you need a second client/console system with a regular USB port.
-
 2. Software requirements:
 
  a.) On the host/target system:
@@ -54,7 +54,7 @@ and two USB cables, connected like this:
 
     And you need to add the boot command line: "earlyprintk=dbgp".
     (If you are using Grub, append it to the 'kernel' line in
-     /etc/grub.conf)
+     grub.conf (i.e. /boot/grub/grub.conf) )
 
     NOTE: normally earlyprintk console gets turned off once the
     regular console is alive - use "earlyprintk=dbgp,keep" to keep
@@ -72,7 +72,7 @@ and two USB cables, connected like this:
 
     Now this channel of kernel messages is ready to be used: start
     your favorite terminal emulator (minicom, etc.) and set
-    it up to use /dev/ttyUSB0 - or use a raw 'cat /dev/ttyUSBx' to
+    it up to use /dev/ttyUSBx - or use a raw 'cat /dev/ttyUSBx' to
     see the raw output.
 
  c.) On Nvidia Southbridge based systems: the kernel will try to probe
@@ -92,7 +92,7 @@ and two USB cables, connected like this:
 
    On the client/console system do:
 
-       cat /dev/ttyUSB0
+       cat /dev/ttyUSBx
 
    And you should see the help line above displayed shortly after you've
    provoked it on the host system.
#13 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 9 lines · Daniel Walker

Fix up some typos, and make the requirements section slightly cleaner.

Documentation/x86/earlyprintk.txt +0 -0
index 607b1a0..5b51aef 100644

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 12

Quoted 5 lines
Documentation/x86/earlyprintk.txt +1 -1
@@ -9,7 +9,9 @@ and two USB cables, connected like this:
 
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one one the target system.

s/one one/one on/

You might also try harder to observe the 80-column rule.

Quoted 6 lines
Documentation/x86/earlyprintk.txt +2 -0
+ 
+ b.) The client/console and target USB ports must have the debug port capability.
 
  You can check this capability by looking at a 'Debug port' bit in
  the lspci -vvv output:

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 45

Quoted 10 lines
Documentation/x86/earlyprintk.txt +1 -1
@@ -35,15 +37,13 @@ and two USB cables, connected like this:
 ( If your system does not list a debug port capability then you probably
   wont be able to use the USB debug key. )
 
- b.) You also need a Netchip USB debug cable/key:
+ c.) You also need a Netchip USB debug cable/key:
 
         http://www.plxtech.com/products/NET2000/NET20DC/default.asp
 
      This is a small blue plastic connector with two USB connections,
      it draws power from its USB connections.

No. It draws power from one of its USB connections (the one on the right side when you're looking at the face with the PLX logo).

Alan Stern

#14 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 12 lines · Alan Stern
Quoted 10 lines · Daniel Walker

Fix up some typos, and make the requirements section slightly cleaner.

Documentation/x86/earlyprintk.txt +0 -0
index 607b1a0..5b51aef 100644
@@ -9,7 +9,9 @@ and two USB cables, connected like this:
 
Quoted 6 lines

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 12

Quoted 4 lines
Documentation/x86/earlyprintk.txt +1 -1
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one one the target system.

s/one one/one on/

Check.

Quoted 1 line

You might also try harder to observe the 80-column rule.

I wasn't aware it applied to documents ..

Quoted 12 lines
Quoted 12 lines
Documentation/x86/earlyprintk.txt +3 -1
+ 
+ b.) The client/console and target USB ports must have the debug port capability.
 
  You can check this capability by looking at a 'Debug port' bit in
  the lspci -vvv output:
@@ -35,15 +37,13 @@ and two USB cables, connected like this:
 ( If your system does not list a debug port capability then you probably
   wont be able to use the USB debug key. )
 
- b.) You also need a Netchip USB debug cable/key:
+ c.) You also need a Netchip USB debug cable/key:
 
Quoted 7 lines

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 45

Quoted 4 lines
Documentation/x86/earlyprintk.txt +0 -0
         http://www.plxtech.com/products/NET2000/NET20DC/default.asp
 
      This is a small blue plastic connector with two USB connections,
      it draws power from its USB connections.

No. It draws power from one of its USB connections (the one on the right side when you're looking at the face with the PLX logo).

I didn't write that part, but I suppose I could correct it..

Daniel

#15 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 19 lines · Daniel Walker
Quoted 12 lines · Alan Stern
Quoted 10 lines · Daniel Walker

Fix up some typos, and make the requirements section slightly cleaner.

Documentation/x86/earlyprintk.txt +0 -0
index 607b1a0..5b51aef 100644
@@ -9,7 +9,9 @@ and two USB cables, connected like this:
 
Quoted 5 lines

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 12

Quoted 4 lines
Documentation/x86/earlyprintk.txt +1 -1
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one one the target system.

s/one one/one on/

Quoted 5 lines

Check.

Quoted 1 line

You might also try harder to observe the 80-column rule.

I wasn't aware it applied to documents ..

Yes, it does.

Thanks.

Signature · 1 line
~Randy
#16 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 20 lines · Randy Dunlap
Quoted 19 lines · Daniel Walker
Quoted 17 lines · Alan Stern
Quoted 9 lines · Daniel Walker

Fix up some typos, and make the requirements section slightly cleaner.

Documentation/x86/earlyprintk.txt +0 -0
index 607b1a0..5b51aef 100644

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 12

Quoted 5 lines
Documentation/x86/earlyprintk.txt +1 -1
@@ -9,7 +9,9 @@ and two USB cables, connected like this:
 
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one one the target system.

s/one one/one on/

Quoted 8 lines
Quoted 5 lines

Check.

Quoted 1 line

You might also try harder to observe the 80-column rule.

I wasn't aware it applied to documents ..

Yes, it does.

Shall we add that to a document style guide? There's several other docs that don't conform to that..

Daniel

#17 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 22 lines · Daniel Walker
Quoted 21 lines · Randy Dunlap
Quoted 20 lines · Daniel Walker
Quoted 12 lines · Alan Stern
Quoted 10 lines · Daniel Walker

Fix up some typos, and make the requirements section slightly cleaner.

Documentation/x86/earlyprintk.txt +0 -0
index 607b1a0..5b51aef 100644
@@ -9,7 +9,9 @@ and two USB cables, connected like this:
 
Quoted 5 lines

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 12

Quoted 4 lines
Documentation/x86/earlyprintk.txt +1 -1
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one one the target system.

s/one one/one on/

Check.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line

You might also try harder to observe the 80-column rule.

I wasn't aware it applied to documents ..

Yes, it does.

Shall we add that to a document style guide? There's several other docs that don't conform to that..

Do we have a document style guide? The comments in Documentation/CodingStyle apply to documentation text files also, AFAIK. Maybe that needs to be stated explicitly.

As for other docs that don't conform: we typically don't go around just fixing 80-column rule infractions, but when a file is being modified anyway, we prefer that other parts of it also be updated.

Thanks,

Signature · 1 line
~Randy
#18 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 3 lines · Randy Dunlap

Do we have a document style guide? The comments in Documentation/CodingStyle apply to documentation text files also, AFAIK. Maybe that needs to be stated explicitly.

I guess you could assume it applies, but I don't think it's content can really be applied to Documents.. Since it speaks specifically to code.

Quoted 3 lines

As for other docs that don't conform: we typically don't go around just fixing 80-column rule infractions, but when a file is being modified anyway, we prefer that other parts of it also be updated.

I don't have a problem fixing it, but it would be nice to have any other rules layed out. Like the "No ascii art rule" (if it exists) or whatever other style guidelines there are. For example the 80 line limit can't apply to absolutely everything. I mean what about diagrams or /proc output samples? Most of that is over 80 (way over).

Daniel

#19 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 8 lines · Daniel Walker
Quoted 3 lines · Randy Dunlap

Do we have a document style guide? The comments in Documentation/CodingStyle apply to documentation text files also, AFAIK. Maybe that needs to be stated explicitly.

I guess you could assume it applies, but I don't think it's content can really be applied to Documents.. Since it speaks specifically to code.

OK. Historically we have applied the 80-column rule to text files, including documentation. But we haven't documented that.

Quoted 9 lines
Quoted 3 lines

As for other docs that don't conform: we typically don't go around just fixing 80-column rule infractions, but when a file is being modified anyway, we prefer that other parts of it also be updated.

I don't have a problem fixing it, but it would be nice to have any other rules layed out. Like the "No ascii art rule" (if it exists) or whatever other style guidelines there are. For example the 80 line limit can't apply to absolutely everything. I mean what about diagrams or /proc output samples? Most of that is over 80 (way over).

If you have time to make a proposal for all such rules, please go ahead. I don't have time for it just now.

Yes, some examples, diagrams, samples, etc. are over 80 columns. It's not a diehard rule.

And there is no rule against ASCII art AFAIK.

Signature · 1 line
~Randy
#20 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 2 lines · Randy Dunlap

If you have time to make a proposal for all such rules, please go ahead. I don't have time for it just now.

I don't know what kind of rules there are .. The 80 columns thing was new to me.

Quoted 2 lines

Yes, some examples, diagrams, samples, etc. are over 80 columns. It's not a diehard rule.

With code it sort of is die hard , even tho the CodingStyle doesn't specify it that way.

Daniel

#21 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 7 lines · Daniel Walker
Quoted 2 lines · Randy Dunlap

If you have time to make a proposal for all such rules, please go ahead. I don't have time for it just now.

I don't know what kind of rules there are .. The 80 columns thing was new to me.

In general, every rule in CodingStyle that _can_ apply to plain text documents _should_ apply. There aren't very many that _can_ apply, however. The 80-column rule may be the only one.

Quoted 5 lines
Quoted 2 lines

Yes, some examples, diagrams, samples, etc. are over 80 columns. It's not a diehard rule.

With code it sort of is die hard , even tho the CodingStyle doesn't specify it that way.

It is _not_ diehard, at least not according to Linus. He has posted a couple of messages expressing his opinion that overall readability is more important than sticking rigidly to 80 columns.

Alan Stern

#22 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 3 lines · Alan Stern

It is _not_ diehard, at least not according to Linus. He has posted a couple of messages expressing his opinion that overall readability is more important than sticking rigidly to 80 columns.

My experience has been that anyone sending over 80 columns is sure to get slammed, just like with this document patch. So when I say it's die hard that's what I mean. Plus we have the checkpatch clean phenomenon. So Linus may not care but everyone else on this list does seem to care..

Daniel

#23 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 10 lines · Daniel Walker
Quoted 3 lines · Alan Stern

It is _not_ diehard, at least not according to Linus. He has posted a couple of messages expressing his opinion that overall readability is more important than sticking rigidly to 80 columns.

My experience has been that anyone sending over 80 columns is sure to get slammed, just like with this document patch. So when I say it's die hard that's what I mean. Plus we have the checkpatch clean phenomenon. So Linus may not care but everyone else on this list does seem to care..

Well, I wouldn't have said anything if you ran over by only a few characters. But your line was 97 characters long!

Alan Stern

#24 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

In reply to Alan Stern
Quoted 35 lines · Alan Stern
Quoted 9 lines · Daniel Walker

Fix up some typos, and make the requirements section slightly cleaner.

Documentation/x86/earlyprintk.txt +0 -0
index 607b1a0..5b51aef 100644

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 12

Quoted 5 lines
Documentation/x86/earlyprintk.txt +1 -1
@@ -9,7 +9,9 @@ and two USB cables, connected like this:
 
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one one the target system.

s/one one/one on/

You might also try harder to observe the 80-column rule.

Quoted 14 lines
Documentation/x86/earlyprintk.txt +3 -1
+ 
+ b.) The client/console and target USB ports must have the debug port capability.
 
  You can check this capability by looking at a 'Debug port' bit in
  the lspci -vvv output:
@@ -35,15 +37,13 @@ and two USB cables, connected like this:
 ( If your system does not list a debug port capability then you probably
   wont be able to use the USB debug key. )
 
- b.) You also need a Netchip USB debug cable/key:
+ c.) You also need a Netchip USB debug cable/key:
 
         http://www.plxtech.com/products/NET2000/NET20DC/default.asp
 
Quoted 7 lines

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 45

Quoted 2 lines
Documentation/x86/earlyprintk.txt +0 -0
      This is a small blue plastic connector with two USB connections,
      it draws power from its USB connections.

No. It draws power from one of its USB connections (the one on the right side when you're looking at the face with the PLX logo).

Alan Stern

--

Fix up some typos, and make the requirements section slightly cleaner. Updated the power draw comment per Alan Stern.

Documentation/x86/earlyprintk.txt +11 -8
index 607b1a0..ac913a6 100644
@@ -9,7 +9,11 @@ and two USB cables, connected like this:
 
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one on 
+     the target system.
+ 
+ b.) The client/console and target USB ports must have the debug port
+     capability.
 
  You can check this capability by looking at a 'Debug port' bit in
  the lspci -vvv output:
@@ -35,14 +39,13 @@ and two USB cables, connected like this:
 ( If your system does not list a debug port capability then you probably
   wont be able to use the USB debug key. )
 
- b.) You also need a Netchip USB debug cable/key:
+ c.) You also need a Netchip USB debug cable/key:
 
         http://www.plxtech.com/products/NET2000/NET20DC/default.asp
 
      This is a small blue plastic connector with two USB connections,
-     it draws power from its USB connections.
-
- c.) Thirdly, you need a second client/console system with a regular USB port.
+     it draws power from one of its USB connections (the one on the 
+     right side when you're looking at the face with the PLX logo).
 
 2. Software requirements:
 
@@ -54,7 +57,7 @@ and two USB cables, connected like this:
 
     And you need to add the boot command line: "earlyprintk=dbgp".
     (If you are using Grub, append it to the 'kernel' line in
-     /etc/grub.conf)
+     grub.conf (i.e. /boot/grub/grub.conf) )
 
     NOTE: normally earlyprintk console gets turned off once the
     regular console is alive - use "earlyprintk=dbgp,keep" to keep
@@ -72,7 +75,7 @@ and two USB cables, connected like this:
 
     Now this channel of kernel messages is ready to be used: start
     your favorite terminal emulator (minicom, etc.) and set
-    it up to use /dev/ttyUSB0 - or use a raw 'cat /dev/ttyUSBx' to
+    it up to use /dev/ttyUSBx - or use a raw 'cat /dev/ttyUSBx' to
     see the raw output.
 
  c.) On Nvidia Southbridge based systems: the kernel will try to probe
@@ -92,7 +95,7 @@ and two USB cables, connected like this:
 
    On the client/console system do:
 
-       cat /dev/ttyUSB0
+       cat /dev/ttyUSBx
 
    And you should see the help line above displayed shortly after you've
    provoked it on the host system.
#25 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 54 lines · Daniel Walker
Quoted 32 lines · Alan Stern
Quoted 9 lines · Daniel Walker

Fix up some typos, and make the requirements section slightly cleaner.

Documentation/x86/earlyprintk.txt +0 -0
index 607b1a0..5b51aef 100644

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 12

Quoted 5 lines
Documentation/x86/earlyprintk.txt +1 -1
@@ -9,7 +9,9 @@ and two USB cables, connected like this:
 
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one one the target system.

s/one one/one on/

You might also try harder to observe the 80-column rule.

Quoted 12 lines
Documentation/x86/earlyprintk.txt +3 -1
+ 
+ b.) The client/console and target USB ports must have the debug port capability.
 
  You can check this capability by looking at a 'Debug port' bit in
  the lspci -vvv output:
@@ -35,15 +37,13 @@ and two USB cables, connected like this:
 ( If your system does not list a debug port capability then you probably
   wont be able to use the USB debug key. )
 
- b.) You also need a Netchip USB debug cable/key:
+ c.) You also need a Netchip USB debug cable/key:
 
Quoted 8 lines

Documentation/x86/earlyprintk.txt and two USB cables, connected like this:

Quoted 4 lines
Documentation/x86/earlyprintk.txt +0 -0
         http://www.plxtech.com/products/NET2000/NET20DC/default.asp
 
      This is a small blue plastic connector with two USB connections,
      it draws power from its USB connections.

No. It draws power from one of its USB connections (the one on the right side when you're looking at the face with the PLX logo).

Alan Stern

--

Fix up some typos, and make the requirements section slightly cleaner. Updated the power draw comment per Alan Stern.

Documentation/x86/earlyprintk.txt +0 -0
index 607b1a0..ac913a6 100644

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 16

Quoted 9 lines
Documentation/x86/earlyprintk.txt +5 -1
@@ -9,7 +9,11 @@ and two USB cables, connected like this:
 
 1. There are three specific hardware requirements:
 
- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one on 
+     the target system.
+ 
+ b.) The client/console and target USB ports must have the debug port
+     capability.

Is that correct on the (ugh, I think that the naming/terminology is still mucked up, but you didn't do that) host/target system?

On the client/console (which I would call the host and I would call the "Host/target" here just the Target system), a USB debug port is needed, but on the Host/target, it should just look like a USB device. At least that was the intent AFAIK/IIRC. No?

Signature · 1 line
~Randy
#26 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 10 lines · Randy Dunlap

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 16

Quoted 6 lines

- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one on

Documentation/x86/earlyprintk.txt +4 -0
+     the target system.
+ 
+ b.) The client/console and target USB ports must have the debug port
+     capability.

Is that correct on the (ugh, I think that the naming/terminology is still mucked up, but you didn't do that) host/target system?

Quoted 7 lines

On the client/console (which I would call the host and I would call the "Host/target" here just the Target system), a USB debug port is needed, but on the Host/target, it should just look like a USB device. At least that was the intent AFAIK/IIRC. No?

From the rest of document I assumed Host/target was referring to both

sides of the connection. So you would need USB on both sides for this thing to work. I assumed Client/console was just the host. I guess that is all kind of confusing tho ..

Daniel

#27 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 18 lines · Daniel Walker
Quoted 15 lines · Randy Dunlap

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 16

Quoted 6 lines

- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one on

Documentation/x86/earlyprintk.txt +4 -0
+     the target system.
+ 
+ b.) The client/console and target USB ports must have the debug port
+     capability.

Is that correct on the (ugh, I think that the naming/terminology is still mucked up, but you didn't do that) host/target system?

On the client/console (which I would call the host and I would call the "Host/target" here just the Target system), a USB debug port is needed, but on the Host/target, it should just look like a USB device. At least that was the intent AFAIK/IIRC. No?

Quoted 4 lines
Quoted 1 line

From the rest of document I assumed Host/target was referring to both

sides of the connection. So you would need USB on both sides for this thing to work. I assumed Client/console was just the host. I guess that is all kind of confusing tho ..

The term "Host" is too confusing to be used here; it has too many other meanings. "Target" is good.

"Client" is probably okay too, but I don't like "Console" so much because both machines will have a console. "Debugging console" is more accurate but also more cumbersome.

Quoted 4 lines

The document indicates you need this one capability on your USB port in addition to the USB device (check the complete document for how to find the capability). So both host and target need this one capability, and then you also need the USB device for the whole thing to work.

In fact the original document was rather clear about this; it says only that the target machine needs the debug capability. The client machine uses its normal USB driver and treats the debugging cable as a normal USB serial device.

Alan Stern

#28 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 20 lines · Alan Stern
Quoted 18 lines · Daniel Walker
Quoted 15 lines · Randy Dunlap

Documentation/x86/earlyprintk.txt and two USB cables, connected like this: · line 16

Quoted 6 lines

- a.) Host/target system needs to have USB debug port capability.
+ a.) You will need two USB ports. One on the client/console system and one on

Documentation/x86/earlyprintk.txt +4 -0
+     the target system.
+ 
+ b.) The client/console and target USB ports must have the debug port
+     capability.

Is that correct on the (ugh, I think that the naming/terminology is still mucked up, but you didn't do that) host/target system?

On the client/console (which I would call the host and I would call the "Host/target" here just the Target system), a USB debug port is needed, but on the Host/target, it should just look like a USB device. At least that was the intent AFAIK/IIRC. No?

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

From the rest of document I assumed Host/target was referring to both

sides of the connection. So you would need USB on both sides for this thing to work. I assumed Client/console was just the host. I guess that is all kind of confusing tho ..

The term "Host" is too confusing to be used here; it has too many other meanings. "Target" is good.

I used Host/Target for that reason, consistently so. The combo gives us the best of both worlds.

Quoted 3 lines

"Client" is probably okay too, but I don't like "Console" so much because both machines will have a console. "Debugging console" is more accurate but also more cumbersome.

I used client/console term for that reason.

Quoted 10 lines
Quoted 5 lines

The document indicates you need this one capability on your USB port in addition to the USB device (check the complete document for how to find the capability). So both host and target need this one capability, and then you also need the USB device for the whole thing to work.

In fact the original document was rather clear about this; it says only that the target machine needs the debug capability. The client machine uses its normal USB driver and treats the debugging cable as a normal USB serial device.

yes.

btw., i think this document is being over-engineered. Significantly so.

Ingo

#29 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

Quoted 11 lines · Ingo Molnar
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

From the rest of document I assumed Host/target was referring to both

sides of the connection. So you would need USB on both sides for this thing to work. I assumed Client/console was just the host. I guess that is all kind of confusing tho ..

The term "Host" is too confusing to be used here; it has too many other meanings. "Target" is good.

I used Host/Target for that reason, consistently so. The combo gives us the best of both worlds.

What meaning of Host did you intend? Is Host/Target just referring to one machine in this scenario or both?

Quoted 5 lines
Quoted 3 lines

"Client" is probably okay too, but I don't like "Console" so much because both machines will have a console. "Debugging console" is more accurate but also more cumbersome.

I used client/console term for that reason.

Same questions for this as above, one machine or both? I think it's clear from the text when you read it all (not to mention this doesn't seem like a sophisticated setup), but if someone had trouble with this they might start reading into the terms and get more confused.

Quoted 11 lines
Quoted 10 lines
Quoted 5 lines

The document indicates you need this one capability on your USB port in addition to the USB device (check the complete document for how to find the capability). So both host and target need this one capability, and then you also need the USB device for the whole thing to work.

In fact the original document was rather clear about this; it says only that the target machine needs the debug capability. The client machine uses its normal USB driver and treats the debugging cable as a normal USB serial device.

Quoted 4 lines

yes.

btw., i think this document is being over-engineered. Significantly so.

I agree (but what are you going to do?)

Daniel

#30 lore raw

Re: [tip:x86/doc] x86/doc: mini-howto for using earlyprintk=dbgp

In reply to Randy Dunlap
Quoted 8 lines · Randy Dunlap

Is that correct on the (ugh, I think that the naming/terminology is still mucked up, but you didn't do that) host/target system?

On the client/console (which I would call the host and I would call the "Host/target" here just the Target system), a USB debug port is needed, but on the Host/target, it should just look like a USB device. At least that was the intent AFAIK/IIRC. No?

The document indicates you need this one capability on your USB port in addition to the USB device (check the complete document for how to find the capability). So both host and target need this one capability, and then you also need the USB device for the whole thing to work.

Daniel

#31 lore raw
In reply to Alan Stern
Quoted 20 lines · Alan Stern
Quoted 11 lines · Eric W. Biederman
Quoted 9 lines · Greg KH
Quoted 4 lines · Randy Dunlap
Quoted 1 line · Yinghai Lu

b. netchip USB debug cable

http://www.plxtech.com/products/NET2000/NET20DC/default.asp

I have reports that the newer version of this device does not work on Linux as it isn't enumeratable as a "real" usb device on one end.

Quoted 6 lines
Quoted 2 lines

I don't have one of these new devices yet to test it out, has anyone else heard of this problem?

With the first generation of devices I remember they were peculiar and finicky. I don't recall the exact details but I remember the devices able to get into weird states that may resemble what you describe.

Quoted 5 lines

Those devices were a little peculiar in that they were powered only on one side. That is, they would take bus power only from the right-hand connector (looking at the face with the PLX logo). So if you plugged in only the left side, the device would not show up or enumerate. But if you plugged in both sides, then both of them would enumerate okay.

Thanks for the information, I'll try to get the person that reported this to retest and see if both sides plugged in at the same time works better.

greg k-h

#32 lore raw
In reply to Yinghai Lu
Quoted 9 lines · Yinghai Lu
Quoted 6 lines · Sarah Sharp

Greetings,

You wrote the EHCI debug port patch for early printk back in July 2008 (commit 5c05917e7fe313a187ad6ebb94c1c6cf42862a0b).  Can you add some documentation to the Documentation directory about how a Linux user would set up a system (cables, files to open to get the printks, etc.)?

please check

This documentation looks fine, aside from the two comments below. Can you turn it into a patch, as Ingo suggested? Thanks!

Sarah Sharp

Quoted 6 lines

==========================================================================================
USB Debug port using Howto

1. HW:

a. target system need to have debug port

(I assume the following output is from you running lspci -vvv as root, so you should mention that in your documentation).

Quoted 7 lines

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI])
Subsystem: Lenovo ThinkPad T61
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium

Quoted 1 line

TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

Quoted 10 lines

Latency: 0
Interrupt: pin D routed to IRQ 19
Region 0: Memory at fe227000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME+
Capabilities: [58] Debug port: BAR=1 offset=00a0 Kernel driver in use: ehci_hcd
Kernel modules: ehci-hcd

What is the following output from? Is it useful to the user setting up the system? How are people supposed to decrypt this?

Quoted 39 lines

00: 86 80 36 28 06 01 90 02 03 20 03 0c 00 00 00 00 10: 00 70 22 fe 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 ab 20 30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 04 00 00 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 50: 01 58 c2 c9 00 80 00 00 0a 00 a0 20 00 00 00 00 60: 20 20 9f 01 00 00 00 00 01 00 00 01 00 00 08 80 70: c0 00 17 3f 00 00 00 00 00 00 00 00 00 00 00 00 80: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 aa ff 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 88 85 40 00 86 0f 05 00 06 17 02 20

b. netchip USB debug cable

c. console system: have USB port

2. SW setting
a. console system: need to have kernel config
CONFIG_USB_SERIAL_DEBUG
you should get /dev/ttyUSBx

   # cat /dev/ttyUSBx could get output

b. target system: need to have kernel config
CONFIG_EARLY_PRINTK_DBGP

boot command line: earlyprintk=dbgp

c. for Nvidia Southbridge based system: kernel will try to probe and find out which port has debug device connected.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html