From: Johannes Stezenbach <js@sig21.net>
To: Jason Baron <jbaron@redhat.com>
Cc: linux-kernel@vger.kernel.org,
Alan Stern <stern@rowland.harvard.edu>,
linux-usb@vger.kernel.org
Subject: ehci dynamic debug problem
Date: Fri, 13 Apr 2012 10:56:07 +0200 [thread overview]
Message-ID: <20120413085607.GA18024@sig21.net> (raw)
Hi,
I have a quirky device and enabled dynamic debug to
see the ehci driver debug messages to help me diagnose
the problem. I see stuff like this:
[1790542.363321] ehci_hub_control:940: ehci_hcd 0000:00:1a.0: \xffffffd8\xffffff94\xffffff94\xffffffa8\xffffff81\xffffffff\xffffffff\xffffffff\xffffffff}[<\xffffff81\xffffffff\xffffffff\xffffffff\xffffffff\x01
[1790542.363470] ehci_hub_control:940: ehci_hcd 0000:00:1a.0: \xffffffd8\xffffff94\xffffff94\xffffffa8\xffffff81\xffffffff\xffffffff\xffffffff\xffffffff}[<\xffffff81\xffffffff\xffffffff\xffffffff\xffffffff\x01
The problem is in ehci-dbg.c:
#define dbg_port(ehci, label, port, status) { \
char _buf [80]; \
dbg_port_buf (_buf, sizeof _buf, label, port, status); \
ehci_dbg (ehci, "%s\n", _buf); \
}
dbg_port_buf() is a no op when DEBUG is not defined, thus
the ehci_dbg() prints uninitialized memory.
Does dynamic debug offer an "is the message two lines below enabled" test?
Simply changing the "#ifdef DEBUG" for dbg_port_buf()
to "#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)"
is probably not acceptable due to the overhead of dbg_port_buf()?
Thanks,
Johannes
next reply other threads:[~2012-04-13 8:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 8:56 Johannes Stezenbach [this message]
2012-04-13 14:35 ` ehci dynamic debug problem Alan Stern
2012-04-13 14:57 ` Johannes Stezenbach
2012-04-13 15:19 ` Alan Stern
2012-04-13 17:41 ` Johannes Stezenbach
2012-04-13 18:13 ` Alan Stern
2012-04-13 19:03 ` Johannes Stezenbach
2012-04-13 19:40 ` Alan Stern
2012-04-16 15:11 ` Alan Stern
2012-04-16 15:54 ` Jason Baron
2012-04-16 16:41 ` Johannes Stezenbach
2012-04-16 17:15 ` Jason Baron
2012-04-16 19:07 ` Johannes Stezenbach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120413085607.GA18024@sig21.net \
--to=js@sig21.net \
--cc=jbaron@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox