LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] firewire: fw-ohci: fix debug logging of phy packets
@ 2008-04-10 22:49 Stefan Richter
2008-04-10 22:51 ` [PATCH 2/2] firewire: fw-ohci: extend logging of bus generations and node ID Stefan Richter
2008-04-12 16:14 ` [PATCH 1/2] firewire: fw-ohci: fix debug logging of phy packets Stefan Richter
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Richter @ 2008-04-10 22:49 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
Fix harmless but irritating off-by-one bug in patch "firewire: debug
interrupt events". Should be folded into that one.
See OHCI 1.1 clause 8.7.1.4.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/fw-ohci.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux/drivers/firewire/fw-ohci.c
===================================================================
--- linux.orig/drivers/firewire/fw-ohci.c
+++ linux/drivers/firewire/fw-ohci.c
@@ -371,10 +371,10 @@ static void log_ar_at_event(char dir, in
if (unlikely(evt >= ARRAY_SIZE(evts)))
evt = 0x1f;
- if (header[0] == ~header[1]) {
+ if (header[1] == ~header[2]) {
printk(KERN_DEBUG "A%c %s, %s, %08x\n",
- dir, evts[evt], phys[header[0] >> 30 & 0x3],
- header[0]);
+ dir, evts[evt], phys[header[1] >> 30 & 0x3],
+ header[1]);
return;
}
--
Stefan Richter
-=====-==--- -=-- -=-==
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] firewire: fw-ohci: extend logging of bus generations and node ID
2008-04-10 22:49 [PATCH 1/2] firewire: fw-ohci: fix debug logging of phy packets Stefan Richter
@ 2008-04-10 22:51 ` Stefan Richter
2008-04-13 2:18 ` Jarod Wilson
2008-04-12 16:14 ` [PATCH 1/2] firewire: fw-ohci: fix debug logging of phy packets Stefan Richter
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Richter @ 2008-04-10 22:51 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
Extend the logging of "AR evt_bus_reset, link internal" to "AR
evt_bus_reset, generation ${selfIDGeneration}". That way we can check
whether this generation matches the one seen in self ID complete event
logging. See OHCI 1.1 clause 8.4.2.3.
Also extend logging of "firewire_ohci: * selfIDs, generation *" by
"local node ID ffc*" in self ID logging to make the local node in AT/AR
event logs more obvious.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/fw-ohci.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
Index: linux/drivers/firewire/fw-ohci.c
===================================================================
--- linux.orig/drivers/firewire/fw-ohci.c
+++ linux/drivers/firewire/fw-ohci.c
@@ -302,13 +302,13 @@ static char _p(u32 *s, int shift)
return port[*s >> shift & 3];
}
-static void log_selfids(int generation, int self_id_count, u32 *s)
+static void log_selfids(int node_id, int generation, int self_id_count, u32 *s)
{
if (likely(!(param_debug & OHCI_PARAM_DEBUG_SELFIDS)))
return;
- printk(KERN_DEBUG KBUILD_MODNAME ": %d selfIDs, generation %d\n",
- self_id_count, generation);
+ printk(KERN_DEBUG KBUILD_MODNAME ": %d selfIDs, generation %d, "
+ "local node ID %04x\n", self_id_count, generation, node_id);
for (; self_id_count--; ++s)
if ((*s & 1 << 23) == 0)
@@ -371,6 +371,12 @@ static void log_ar_at_event(char dir, in
if (unlikely(evt >= ARRAY_SIZE(evts)))
evt = 0x1f;
+ if (evt == OHCI1394_evt_bus_reset) {
+ printk(KERN_DEBUG "A%c evt_bus_reset, generation %d\n",
+ dir, (header[2] >> 16) & 0xff);
+ return;
+ }
+
if (header[1] == ~header[2]) {
printk(KERN_DEBUG "A%c %s, %s, %08x\n",
dir, evts[evt], phys[header[1] >> 30 & 0x3],
@@ -417,7 +423,7 @@ static void log_ar_at_event(char dir, in
#else
#define log_irqs(evt)
-#define log_selfids(generation, self_id_count, sid)
+#define log_selfids(node_id, generation, self_id_count, sid)
#define log_ar_at_event(dir, speed, header, evt)
#endif /* CONFIG_FIREWIRE_OHCI_DEBUG */
@@ -1320,7 +1326,8 @@ static void bus_reset_tasklet(unsigned l
dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
free_rom, free_rom_bus);
- log_selfids(generation, self_id_count, ohci->self_id_buffer);
+ log_selfids(ohci->node_id, generation,
+ self_id_count, ohci->self_id_buffer);
fw_core_handle_bus_reset(&ohci->card, ohci->node_id, generation,
self_id_count, ohci->self_id_buffer);
--
Stefan Richter
-=====-==--- -=-- -=-==
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] firewire: fw-ohci: fix debug logging of phy packets
2008-04-10 22:49 [PATCH 1/2] firewire: fw-ohci: fix debug logging of phy packets Stefan Richter
2008-04-10 22:51 ` [PATCH 2/2] firewire: fw-ohci: extend logging of bus generations and node ID Stefan Richter
@ 2008-04-12 16:14 ` Stefan Richter
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Richter @ 2008-04-12 16:14 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
I wrote:
> --- linux.orig/drivers/firewire/fw-ohci.c
> +++ linux/drivers/firewire/fw-ohci.c
> @@ -371,10 +371,10 @@ static void log_ar_at_event(char dir, in
> if (unlikely(evt >= ARRAY_SIZE(evts)))
> evt = 0x1f;
>
> - if (header[0] == ~header[1]) {
> + if (header[1] == ~header[2]) {
> printk(KERN_DEBUG "A%c %s, %s, %08x\n",
> - dir, evts[evt], phys[header[0] >> 30 & 0x3],
> - header[0]);
> + dir, evts[evt], phys[header[1] >> 30 & 0x3],
> + header[1]);
This patch is bogus. The indices were right.
--
Stefan Richter
-=====-==--- -=-- -==--
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] firewire: fw-ohci: extend logging of bus generations and node ID
2008-04-10 22:51 ` [PATCH 2/2] firewire: fw-ohci: extend logging of bus generations and node ID Stefan Richter
@ 2008-04-13 2:18 ` Jarod Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Jarod Wilson @ 2008-04-13 2:18 UTC (permalink / raw)
To: linux1394-devel; +Cc: Stefan Richter, linux-kernel
On Thursday 10 April 2008 06:51:15 pm Stefan Richter wrote:
> Extend the logging of "AR evt_bus_reset, link internal" to "AR
> evt_bus_reset, generation ${selfIDGeneration}". That way we can check
> whether this generation matches the one seen in self ID complete event
> logging. See OHCI 1.1 clause 8.4.2.3.
>
> Also extend logging of "firewire_ohci: * selfIDs, generation *" by
> "local node ID ffc*" in self ID logging to make the local node in AT/AR
> event logs more obvious.
>
> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
> ---
Good addition for debugging purposes.
Signed-off-by: Jarod Wilson <jwilson@redhat.com>
--
Jarod Wilson
jwilson@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-13 2:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-10 22:49 [PATCH 1/2] firewire: fw-ohci: fix debug logging of phy packets Stefan Richter
2008-04-10 22:51 ` [PATCH 2/2] firewire: fw-ohci: extend logging of bus generations and node ID Stefan Richter
2008-04-13 2:18 ` Jarod Wilson
2008-04-12 16:14 ` [PATCH 1/2] firewire: fw-ohci: fix debug logging of phy packets Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).