Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb9f2206b60ace29e49a057fbd9be86d79d86200
Commit:     bb9f2206b60ace29e49a057fbd9be86d79d86200
Parent:     478b233eda81bfe41307512b8336fd688c6553e0
Author:     Stefan Richter <[EMAIL PROTECTED]>
AuthorDate: Sat Dec 22 22:14:52 2007 +0100
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 22:22:24 2008 +0100

    firewire: fw-ohci: CycleTooLong interrupt management
    
    The firewire-ohci driver so far lacked the ability to resume cycle
    master duty after that condition happened, as added to ohci1394 in Linux
    2.6.18 by commit 57fdb58fa5a140bdd52cf4c4ffc30df73676f0a5.  This ports
    this patch to fw-ohci.
    
    The "cycle too long" condition has been seen in practice
      - with IIDC cameras if a mode with packets too large for a speed is
        chosen,
      - sporadically when capturing DV on a VIA VT6306 card with ohci1394/
        ieee1394/ raw1394/ dvgrab 2.
        https://bugzilla.redhat.com/show_bug.cgi?id=415841#c7
    (This does not fix Fedora bug 415841.)
    
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
---
 drivers/firewire/fw-ohci.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index a9f2d07..74d5d94 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1079,6 +1079,13 @@ static irqreturn_t irq_handler(int irq, void *data)
        if (unlikely(event & OHCI1394_postedWriteErr))
                fw_error("PCI posted write error\n");
 
+       if (unlikely(event & OHCI1394_cycleTooLong)) {
+               if (printk_ratelimit())
+                       fw_notify("isochronous cycle too long\n");
+               reg_write(ohci, OHCI1394_LinkControlSet,
+                         OHCI1394_LinkControl_cycleMaster);
+       }
+
        if (event & OHCI1394_cycle64Seconds) {
                cycle_time = reg_read(ohci, OHCI1394_IsochronousCycleTimer);
                if ((cycle_time & 0x80000000) == 0)
@@ -1152,8 +1159,8 @@ static int ohci_enable(struct fw_card *card, u32 
*config_rom, size_t length)
                  OHCI1394_RQPkt | OHCI1394_RSPkt |
                  OHCI1394_reqTxComplete | OHCI1394_respTxComplete |
                  OHCI1394_isochRx | OHCI1394_isochTx |
-                 OHCI1394_postedWriteErr | OHCI1394_cycle64Seconds |
-                 OHCI1394_masterIntEnable);
+                 OHCI1394_postedWriteErr | OHCI1394_cycleTooLong |
+                 OHCI1394_cycle64Seconds | OHCI1394_masterIntEnable);
 
        /* Activate link_on bit and contender bit in our self ID packets.*/
        if (ohci_update_phy_reg(card, 4, 0,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to