Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8a2f7d932fc6a4881ff837738e23b41a1c228338
Commit:     8a2f7d932fc6a4881ff837738e23b41a1c228338
Parent:     ef370ee74b7a9cb769d50bfb73b4023ee3e37719
Author:     Kristian Høgsberg <[EMAIL PROTECTED]>
AuthorDate: Wed Mar 28 14:26:10 2007 -0400
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Wed Mar 28 21:37:54 2007 +0200

    firewire: Fix start on cycle 0 for IT, implement start on cycle for IR.
    
    Signed-off-by: Kristian Høgsberg <[EMAIL PROTECTED]>
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
---
 drivers/firewire/fw-ohci.c |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index afd1817..b941239 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -1362,28 +1362,32 @@ static int ohci_start_iso(struct fw_iso_context *base,
 {
        struct iso_context *ctx = container_of(base, struct iso_context, base);
        struct fw_ohci *ohci = ctx->context.ohci;
-       u32 cycle_match = 0;
+       u32 control, match;
        int index;
 
        if (ctx->base.type == FW_ISO_CONTEXT_TRANSMIT) {
                index = ctx - ohci->it_context_list;
-               if (cycle > 0)
-                       cycle_match = IT_CONTEXT_CYCLE_MATCH_ENABLE |
+               match = 0;
+               if (cycle >= 0)
+                       match = IT_CONTEXT_CYCLE_MATCH_ENABLE |
                                (cycle & 0x7fff) << 16;
 
                reg_write(ohci, OHCI1394_IsoXmitIntEventClear, 1 << index);
                reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, 1 << index);
-               context_run(&ctx->context, cycle_match);
+               context_run(&ctx->context, match);
        } else {
                index = ctx - ohci->ir_context_list;
+               control = IR_CONTEXT_DUAL_BUFFER_MODE | IR_CONTEXT_ISOCH_HEADER;
+               match = (tags << 28) | (sync << 8) | ctx->base.channel;
+               if (cycle >= 0) {
+                       match |= (cycle & 0x07fff) << 12;
+                       control |= IR_CONTEXT_CYCLE_MATCH_ENABLE;
+               }
 
                reg_write(ohci, OHCI1394_IsoRecvIntEventClear, 1 << index);
                reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, 1 << index);
-               reg_write(ohci, context_match(ctx->context.regs),
-                         (tags << 28) | (sync << 8) | ctx->base.channel);
-               context_run(&ctx->context,
-                           IR_CONTEXT_DUAL_BUFFER_MODE |
-                           IR_CONTEXT_ISOCH_HEADER);
+               reg_write(ohci, context_match(ctx->context.regs), match);
+               context_run(&ctx->context, control);
        }
 
        return 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