All of lore.kernel.org
 help / color / mirror / Atom feed
* ehci dynamic debug problem
@ 2012-04-13  8:56 Johannes Stezenbach
  2012-04-13 14:35 ` Alan Stern
  0 siblings, 1 reply; 13+ messages in thread
From: Johannes Stezenbach @ 2012-04-13  8:56 UTC (permalink / raw)
  To: Jason Baron; +Cc: linux-kernel, Alan Stern, linux-usb

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-04-16 19:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13  8:56 ehci dynamic debug problem Johannes Stezenbach
2012-04-13 14:35 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.