diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/firewire/fw-ohci.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index ce18bab3f9d5..4789300b8241 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c | |||
@@ -950,8 +950,19 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet) | |||
950 | DESCRIPTOR_IRQ_ALWAYS | | 950 | DESCRIPTOR_IRQ_ALWAYS | |
951 | DESCRIPTOR_BRANCH_ALWAYS); | 951 | DESCRIPTOR_BRANCH_ALWAYS); |
952 | 952 | ||
953 | /* FIXME: Document how the locking works. */ | 953 | /* |
954 | if (ohci->generation != packet->generation) { | 954 | * If the controller and packet generations don't match, we need to |
955 | * bail out and try again. If IntEvent.busReset is set, the AT context | ||
956 | * is halted, so appending to the context and trying to run it is | ||
957 | * futile. Most controllers do the right thing and just flush the AT | ||
958 | * queue (per section 7.2.3.2 of the OHCI 1.1 specification), but | ||
959 | * some controllers (like a JMicron JMB381 PCI-e) misbehave and wind | ||
960 | * up stalling out. So we just bail out in software and try again | ||
961 | * later, and everyone is happy. | ||
962 | * FIXME: Document how the locking works. | ||
963 | */ | ||
964 | if (ohci->generation != packet->generation || | ||
965 | reg_read(ohci, OHCI1394_IntEventSet) & OHCI1394_busReset) { | ||
955 | if (packet->payload_length > 0) | 966 | if (packet->payload_length > 0) |
956 | dma_unmap_single(ohci->card.device, payload_bus, | 967 | dma_unmap_single(ohci->card.device, payload_bus, |
957 | packet->payload_length, DMA_TO_DEVICE); | 968 | packet->payload_length, DMA_TO_DEVICE); |