mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
V4L/DVB (13409): firedtv: packet requeuing is likely to succeed
Packet DMA buffers are queued either initially all at once (then, a queueing failure will cause firedtv to release the DMA context as a whole) or subsequently one by one as they recycled after use (then a failure is extremely unlikely). Therefore we can be a little less cautious when counting at which packet buffer to set the interrupt flag. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
a8aeb7836e
commit
b1d33f4b0a
1 changed files with 4 additions and 9 deletions
|
@ -79,19 +79,14 @@ struct firedtv_receive_context {
|
||||||
static int queue_iso(struct firedtv_receive_context *ctx, int index)
|
static int queue_iso(struct firedtv_receive_context *ctx, int index)
|
||||||
{
|
{
|
||||||
struct fw_iso_packet p;
|
struct fw_iso_packet p;
|
||||||
int err;
|
|
||||||
|
|
||||||
p.payload_length = MAX_PACKET_SIZE;
|
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.skip = 0;
|
||||||
p.header_length = ISO_HEADER_SIZE;
|
p.header_length = ISO_HEADER_SIZE;
|
||||||
|
|
||||||
err = fw_iso_context_queue(ctx->context, &p, &ctx->buffer,
|
return fw_iso_context_queue(ctx->context, &p, &ctx->buffer,
|
||||||
index * MAX_PACKET_SIZE);
|
index * MAX_PACKET_SIZE);
|
||||||
if (!err)
|
|
||||||
ctx->interrupt_packet++;
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_iso(struct fw_iso_context *context, u32 cycle,
|
static void handle_iso(struct fw_iso_context *context, u32 cycle,
|
||||||
|
@ -150,7 +145,7 @@ static int start_iso(struct firedtv *fdtv)
|
||||||
if (err)
|
if (err)
|
||||||
goto fail_context_destroy;
|
goto fail_context_destroy;
|
||||||
|
|
||||||
ctx->interrupt_packet = 1;
|
ctx->interrupt_packet = 0;
|
||||||
ctx->current_packet = 0;
|
ctx->current_packet = 0;
|
||||||
|
|
||||||
for (i = 0; i < N_PAGES; i++)
|
for (i = 0; i < N_PAGES; i++)
|
||||||
|
|
Loading…
Reference in a new issue