From patchwork Wed Nov 18 19:01:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Richter X-Patchwork-Id: 61148 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAIJ5At1015904 for ; Wed, 18 Nov 2009 19:05:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932560AbZKRTBZ (ORCPT ); Wed, 18 Nov 2009 14:01:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932553AbZKRTBZ (ORCPT ); Wed, 18 Nov 2009 14:01:25 -0500 Received: from einhorn.in-berlin.de ([192.109.42.8]:35613 "EHLO einhorn.in-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932552AbZKRTBY (ORCPT ); Wed, 18 Nov 2009 14:01:24 -0500 X-Envelope-From: stefanr@s5r6.in-berlin.de Received: from stein ([83.221.231.7]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id nAIJ1FRL006424; Wed, 18 Nov 2009 20:01:16 +0100 Date: Wed, 18 Nov 2009 20:01:14 +0100 (CET) From: Stefan Richter Subject: [PATCH 2/6] firedtv: packet requeuing is likely to succeed To: linux-media@vger.kernel.org cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Disposition: INLINE X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Index: linux-2.6.32-rc7/drivers/media/dvb/firewire/firedtv-fw.c =================================================================== --- linux-2.6.32-rc7.orig/drivers/media/dvb/firewire/firedtv-fw.c +++ linux-2.6.32-rc7/drivers/media/dvb/firewire/firedtv-fw.c @@ -79,19 +79,14 @@ struct firedtv_receive_context { static int queue_iso(struct firedtv_receive_context *ctx, int index) { struct fw_iso_packet p; - int err; p.payload_length = MAX_PACKET_SIZE; - p.interrupt = !(ctx->interrupt_packet & (IRQ_INTERVAL - 1)); + p.interrupt = !(++ctx->interrupt_packet & (IRQ_INTERVAL - 1)); p.skip = 0; p.header_length = ISO_HEADER_SIZE; - err = fw_iso_context_queue(ctx->context, &p, &ctx->buffer, - index * MAX_PACKET_SIZE); - if (!err) - ctx->interrupt_packet++; - - return err; + return fw_iso_context_queue(ctx->context, &p, &ctx->buffer, + index * MAX_PACKET_SIZE); } static void handle_iso(struct fw_iso_context *context, u32 cycle, @@ -150,7 +145,7 @@ static int start_iso(struct firedtv *fdt if (err) goto fail_context_destroy; - ctx->interrupt_packet = 1; + ctx->interrupt_packet = 0; ctx->current_packet = 0; for (i = 0; i < N_PAGES; i++)