Re: [PATCH usb-next] USB: Improve documentation for usbmon
From: Alan Stern
Date: Mon Apr 29 2013 - 15:20:07 EST
On Sun, 28 Apr 2013, Sedat Dilek wrote:
> This is a give-back to USB folks who helped me in a USB debug issue.
Thanks for sending this. Here are some suggestions for minor
> Signed-off-by: Sedat Dilek <sedat.dilek@xxxxxxxxx>
> Documentation/usb/usbmon.txt | 87 ++++++++++++++++++++++++++++----------------
> 1 file changed, 55 insertions(+), 32 deletions(-)
> diff --git a/Documentation/usb/usbmon.txt b/Documentation/usb/usbmon.txt
> index c42bb9c..02f5845 100644
> --- a/Documentation/usb/usbmon.txt
> +++ b/Documentation/usb/usbmon.txt
> @@ -23,35 +23,53 @@ in a text format. This is used for two purposes. First, it serves as a
> common trace exchange format for tools while more sophisticated formats
> are finalized. Second, humans can read it in case tools are not available.
> -To collect a raw text trace, execute following steps.
> +To collect a (raw text) usbmon trace, execute the following steps.
Might as well leave out the parentheses.
> -1. Prepare
> +Step #1: Prerequisites and preperation
> -Mount debugfs (it has to be enabled in your kernel configuration), and
> -load the usbmon module (if built as module). The second step is skipped
> -if usbmon is built into the kernel.
> +You should enable the following kernel-config options:
> -# mount -t debugfs none_debugs /sys/kernel/debug
> -# modprobe usbmon
> +CONFIG_DEBUG_FS=y <--- Enable DebugFS
> +CONFIG_USB_DEBUG=y <--- Enable USB debugging
As far as I know, CONFIG_USB_DEBUG is not needed.
> +CONFIG_USB_MON=m <--- Build usbmon as kernel-module
This could be either 'm' or 'y'. Many distributions set it to 'y'.
> -Verify that bus sockets are present.
> +Mount debugfs and load usbmon module:
> -# ls /sys/kernel/debug/usb/usbmon
> -0s 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u
> + # mount -t debugfs none_debugs /sys/kernel/debug
Distributions normally do this for you.
> -Now you can choose to either use the socket '0u' (to capture packets on all
> + # modprobe -v usbmon
> + insmod /lib/modules/$(uname -r)/kernel/drivers/usb/mon/usbmon.ko
The complicated insmod command isn't needed; modprobe works perfectly
> +The second step is skipped if usbmon is built into the kernel.
This is unclear. "second step" sounds like it refers to Step #2 below.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/