From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux-kernel@vger.kernel.org
Cc: linux1394-devel@lists.sourceforge.net
Subject: [PATCH 2/4] firewire: ohci: enable cycle timer fix on ALi and NEC controllers
Date: Sun, 14 Feb 2010 18:47:07 +0100 (CET) [thread overview]
Message-ID: <tkrat.638ff24c1118a82a@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.a3f2efe539e59c19@s5r6.in-berlin.de>
Discussed in "read_cycle_timer backwards for sub-cycle 0000, 0001",
http://thread.gmane.org/gmane.linux.kernel.firewire.devel/13704
Known bad controllers:
ALi M5271, listed by lspci as M5253 [10b9:5253]
NEC OrangeLink [1033:00cd] (rev 03)
NEC uPD72874 [1033:00f2] (rev 01)
VIA VT6306 [1106:3044] (rev 46)
VIA VT6308P, listed by lspci as rev c0
Reported-by: Pieter Palmers <pieterp@joow.be>
Reported-by: Håkan Johansson <f96hajo@chalmers.se>
Reported-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/ohci.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
Index: linux-2.6.33-rc8/drivers/firewire/ohci.c
===================================================================
--- linux-2.6.33-rc8.orig/drivers/firewire/ohci.c
+++ linux-2.6.33-rc8/drivers/firewire/ohci.c
@@ -1817,13 +1817,14 @@ static u64 ohci_get_bus_time(struct fw_c
c2 = reg_read(ohci, OHCI1394_IsochronousCycleTimer);
} else {
/*
- * VIA controllers have two bugs when updating the iso cycle
- * timer register:
- * 1) When the lowest six bits are wrapping around to zero,
+ * Some controllers exhibit one or more of the following bugs
+ * when updating the iso cycle timer register:
+ * - When the lowest six bits are wrapping around to zero,
* a read that happens at the same time will return garbage
* in the lowest ten bits.
- * 2) When the cycleOffset field wraps around to zero, the
+ * - When the cycleOffset field wraps around to zero, the
* cycleCount field is not incremented for about 60 ns.
+ * - Occasionally, the entire register reads zero.
*
* To catch these, we read the register three times and ensure
* that the difference between each two consecutive reads is
@@ -2547,7 +2548,9 @@ static int __devinit pci_probe(struct pc
#endif
ohci->bus_reset_packet_quirk = dev->vendor == PCI_VENDOR_ID_TI;
- ohci->iso_cycle_timer_quirk = dev->vendor == PCI_VENDOR_ID_VIA;
+ ohci->iso_cycle_timer_quirk = dev->vendor == PCI_VENDOR_ID_AL ||
+ dev->vendor == PCI_VENDOR_ID_NEC ||
+ dev->vendor == PCI_VENDOR_ID_VIA;
ar_context_init(&ohci->ar_request_ctx, ohci,
OHCI1394_AsReqRcvContextControlSet);
--
Stefan Richter
-=====-==-=- --=- -===-
http://arcgraph.de/sr/
next prev parent reply other threads:[~2010-02-14 17:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-14 17:44 [PATCH 0/4] firewire: a hardware quirk workaround and related bits Stefan Richter
2010-02-14 17:46 ` [PATCH 1/4 resend] firewire: ohci: work around cycle timer bugs on VIA controllers Stefan Richter
2010-02-14 17:47 ` Stefan Richter [this message]
2010-02-14 17:47 ` [PATCH 3/4] firewire: get_cycle_timer optimization and cleanup Stefan Richter
2010-02-20 21:24 ` <linux/wait.h> requires <linux/sched.h> (was Re: [PATCH 3/4] firewire: get_cycle_timer optimization and cleanup) Stefan Richter
2010-02-14 17:49 ` [PATCH 4/4] firewire: remove incomplete Bus_Time CSR support 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.638ff24c1118a82a@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®