From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] firewire: detect and log TSB81BA3 erratum
Date: Sat, 8 Nov 2008 12:03:28 +0100 (CET) [thread overview]
Message-ID: <tkrat.f09c80ed76dd6c79@s5r6.in-berlin.de> (raw)
While testing a larger 1394b bus, I saw the following Texas Instruments
TSB81BA3 hardware bug at work: On a 1394b-only bus with three or more
PHYs and differing cable lengths or differing hop speeds, the PHYs
repeatedly cause bus resets during traffic on the bus, as documented in
TI's "TSB81BA3 Errata (Rev. C)" SLLZ015C. These resets cause massive
I/O failures.
Self-ID complete events after such resets consistently show more than
one self-ID zero packet with i bit set ( = initiated reset). If this
happens, emit a warning in dmesg and suggest hardware workarounds to the
user. (There is no software workaround.)
The hardware bug is fixed in TSB81BA3 revision D but there are probably
many FireWire 800 products out there which have a buggy version of this
chip.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/fw-topology.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
Index: linux/drivers/firewire/fw-topology.c
===================================================================
--- linux.orig/drivers/firewire/fw-topology.c
+++ linux/drivers/firewire/fw-topology.c
@@ -179,7 +179,7 @@ static struct fw_node *build_tree(struct
struct list_head stack, *h;
u32 *next_sid, *end, q;
int i, port_count, child_port_count, phy_id, parent_count, stack_depth;
- int gap_count;
+ int gap_count, reset_initiators;
bool beta_repeaters_present;
local_node = NULL;
@@ -190,6 +190,7 @@ static struct fw_node *build_tree(struct
phy_id = 0;
irm_node = NULL;
gap_count = SELF_ID_GAP_COUNT(*sid);
+ reset_initiators = 0;
beta_repeaters_present = false;
while (sid < end) {
@@ -285,6 +286,8 @@ static struct fw_node *build_tree(struct
list_add_tail(&node->link, &stack);
stack_depth += 1 - child_port_count;
+ reset_initiators += SELF_ID_PHY_INITIATOR(q);
+
if (node->phy_speed == SCODE_BETA &&
parent_count + child_port_count > 1)
beta_repeaters_present = true;
@@ -307,6 +310,14 @@ static struct fw_node *build_tree(struct
card->gap_count = gap_count;
card->beta_repeaters_present = beta_repeaters_present;
+ if (reset_initiators != 1) {
+ fw_error("%d bus reset initiators, hardware bug?\n",
+ reset_initiators);
+ if (beta_repeaters_present)
+ fw_error("try cables with matched length "
+ "or add a 1394a node\n");
+ }
+
return local_node;
}
--
Stefan Richter
-=====-==--- =-== -=---
http://arcgraph.de/sr/
next reply other threads:[~2008-11-08 11:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-08 11:03 Stefan Richter [this message]
2008-11-08 19:46 ` Stefan Richter
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=tkrat.f09c80ed76dd6c79@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®