From 9f406fdc849fa10f5409071649046b4b2a91a627 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 25 Oct 2010 11:43:05 +0200 Subject: [PATCH] --- yaml --- r: 221598 b: refs/heads/master c: 693fa7792e9db9f32da9436e633976fbacd04b55 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/firewire/ohci.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 253685524b1b..9801068953f9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 837596a61ba8f9bb53bb7aa27d17328ff9b2bcd5 +refs/heads/master: 693fa7792e9db9f32da9436e633976fbacd04b55 diff --git a/trunk/drivers/firewire/ohci.c b/trunk/drivers/firewire/ohci.c index b5ba66656c6c..84eb607d6c03 100644 --- a/trunk/drivers/firewire/ohci.c +++ b/trunk/drivers/firewire/ohci.c @@ -740,11 +740,13 @@ static void ar_context_tasklet(unsigned long data) struct ar_buffer *ab; struct descriptor *d; void *buffer, *end; + __le16 res_count; ab = ctx->current_buffer; d = &ab->descriptor; - if (d->res_count == 0) { + res_count = ACCESS_ONCE(d->res_count); + if (res_count == 0) { size_t size, size2, rest, pktsize, size3, offset; dma_addr_t start_bus; void *start; @@ -812,7 +814,7 @@ static void ar_context_tasklet(unsigned long data) } else { buffer = ctx->pointer; ctx->pointer = end = - (void *) ab + PAGE_SIZE - le16_to_cpu(d->res_count); + (void *) ab + PAGE_SIZE - le16_to_cpu(res_count); while (buffer < end) buffer = handle_ar_packet(ctx, buffer);