diff options
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/fw-ohci.c | 9 | ||||
-rw-r--r-- | drivers/firewire/fw-transaction.c | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 996d61f0d460..ca6d51efd8bb 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c | |||
@@ -401,7 +401,8 @@ static void ar_context_tasklet(unsigned long data) | |||
401 | 401 | ||
402 | if (d->res_count == 0) { | 402 | if (d->res_count == 0) { |
403 | size_t size, rest, offset; | 403 | size_t size, rest, offset; |
404 | dma_addr_t buffer_bus; | 404 | dma_addr_t start_bus; |
405 | void *start; | ||
405 | 406 | ||
406 | /* | 407 | /* |
407 | * This descriptor is finished and we may have a | 408 | * This descriptor is finished and we may have a |
@@ -410,9 +411,9 @@ static void ar_context_tasklet(unsigned long data) | |||
410 | */ | 411 | */ |
411 | 412 | ||
412 | offset = offsetof(struct ar_buffer, data); | 413 | offset = offsetof(struct ar_buffer, data); |
413 | buffer_bus = le32_to_cpu(ab->descriptor.data_address) - offset; | 414 | start = buffer = ab; |
415 | start_bus = le32_to_cpu(ab->descriptor.data_address) - offset; | ||
414 | 416 | ||
415 | buffer = ab; | ||
416 | ab = ab->next; | 417 | ab = ab->next; |
417 | d = &ab->descriptor; | 418 | d = &ab->descriptor; |
418 | size = buffer + PAGE_SIZE - ctx->pointer; | 419 | size = buffer + PAGE_SIZE - ctx->pointer; |
@@ -427,7 +428,7 @@ static void ar_context_tasklet(unsigned long data) | |||
427 | buffer = handle_ar_packet(ctx, buffer); | 428 | buffer = handle_ar_packet(ctx, buffer); |
428 | 429 | ||
429 | dma_free_coherent(ohci->card.device, PAGE_SIZE, | 430 | dma_free_coherent(ohci->card.device, PAGE_SIZE, |
430 | buffer, buffer_bus); | 431 | start, start_bus); |
431 | ar_context_add_page(ctx); | 432 | ar_context_add_page(ctx); |
432 | } else { | 433 | } else { |
433 | buffer = ctx->pointer; | 434 | buffer = ctx->pointer; |
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 99529e59a0b1..e6f1bda38940 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c | |||
@@ -736,6 +736,12 @@ fw_core_handle_response(struct fw_card *card, struct fw_packet *p) | |||
736 | break; | 736 | break; |
737 | } | 737 | } |
738 | 738 | ||
739 | /* | ||
740 | * The response handler may be executed while the request handler | ||
741 | * is still pending. Cancel the request handler. | ||
742 | */ | ||
743 | card->driver->cancel_packet(card, &t->packet); | ||
744 | |||
739 | t->callback(card, rcode, data, data_length, t->callback_data); | 745 | t->callback(card, rcode, data, data_length, t->callback_data); |
740 | } | 746 | } |
741 | EXPORT_SYMBOL(fw_core_handle_response); | 747 | EXPORT_SYMBOL(fw_core_handle_response); |