* [PATCH 1/2] firewire: ohci: fix Agere FW643 and multiple cameras
@ 2009-08-28 11:25 Stefan Richter
2009-08-28 11:26 ` [PATCH 2/2] firewire: ohci: fix Ricoh R5C832, video reception Stefan Richter
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Richter @ 2009-08-28 11:25 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel, Samuel Audet, Jonathan Cameron
Date:
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
Subject: firewire: ohci: fix Agere FW643 and multiple cameras
An Agere FW643 OHCI 1.1 card works fine for video reception from one
camera but fails early if receiving from two cameras. After a short
while, no IR IRQ events occur and the context control register does not
react anymore. This happens regardless whether both IR DMA contexts are
dual-buffer or one is dual-buffer and the other packet-per-buffer.
This can be worked around by disabling dual buffer DMA mode entirely.
http://sourceforge.net/mailarchive/message.php?msg_name=4A7C0594.2020208%40gmail.com
Reported-by: Samuel Audet <samuel.audet@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/ohci.c | 9 +++++++++
1 file changed, 9 insertions(+)
Index: linux-2.6.31-rc8/drivers/firewire/ohci.c
===================================================================
--- linux-2.6.31-rc8.orig/drivers/firewire/ohci.c
+++ linux-2.6.31-rc8/drivers/firewire/ohci.c
@@ -34,6 +34,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pci.h>
+#include <linux/pci_ids.h>
#include <linux/spinlock.h>
#include <linux/string.h>
@@ -2372,6 +2373,9 @@ static void ohci_pmac_off(struct pci_dev
#define ohci_pmac_off(dev)
#endif /* CONFIG_PPC_PMAC */
+#define PCI_VENDOR_ID_AGERE PCI_VENDOR_ID_ATT
+#define PCI_DEVICE_ID_AGERE_FW643 0x5901
+
static int __devinit pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
@@ -2422,6 +2426,11 @@ static int __devinit pci_probe(struct pc
version = reg_read(ohci, OHCI1394_Version) & 0x00ff00ff;
ohci->use_dualbuffer = version >= OHCI_VERSION_1_1;
+ /* dual-buffer mode is broken if more than one IR context is active */
+ if (dev->vendor == PCI_VENDOR_ID_AGERE &&
+ dev->device == PCI_DEVICE_ID_AGERE_FW643)
+ ohci->use_dualbuffer = false;
+
/* x86-32 currently doesn't use highmem for dma_alloc_coherent */
#if !defined(CONFIG_X86_32)
/* dual-buffer mode is broken with descriptor addresses above 2G */
--
Stefan Richter
-=====-==--= =--- ===--
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] firewire: ohci: fix Ricoh R5C832, video reception
2009-08-28 11:25 [PATCH 1/2] firewire: ohci: fix Agere FW643 and multiple cameras Stefan Richter
@ 2009-08-28 11:26 ` Stefan Richter
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Richter @ 2009-08-28 11:26 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel, Samuel Audet, Jonathan Cameron
In dual-buffer DMA mode, no video frames are ever received from R5C832
by libdc1394. Fallback to packet-per-buffer DMA works reliably.
http://thread.gmane.org/gmane.linux.kernel.firewire.devel/13393/focus=13476
Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/firewire/ohci.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-2.6.31-rc8/drivers/firewire/ohci.c
===================================================================
--- linux-2.6.31-rc8.orig/drivers/firewire/ohci.c
+++ linux-2.6.31-rc8/drivers/firewire/ohci.c
@@ -2431,6 +2431,11 @@ static int __devinit pci_probe(struct pc
dev->device == PCI_DEVICE_ID_AGERE_FW643)
ohci->use_dualbuffer = false;
+ /* dual-buffer mode is broken */
+ if (dev->vendor == PCI_VENDOR_ID_RICOH &&
+ dev->device == PCI_DEVICE_ID_RICOH_R5C832)
+ ohci->use_dualbuffer = false;
+
/* x86-32 currently doesn't use highmem for dma_alloc_coherent */
#if !defined(CONFIG_X86_32)
/* dual-buffer mode is broken with descriptor addresses above 2G */
--
Stefan Richter
-=====-==--= =--- ===--
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-28 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-28 11:25 [PATCH 1/2] firewire: ohci: fix Agere FW643 and multiple cameras Stefan Richter
2009-08-28 11:26 ` [PATCH 2/2] firewire: ohci: fix Ricoh R5C832, video reception Stefan Richter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome