Per DMA API docs, when using dma_map_single(), DMA_TO_DEVICE synchronization must be done after the last modification of the memory region by software before it can be handed off to the device and safely read. Such a sync is currently missing from firewire_ohci:at_context_queue_packet(). At least on my setup, where I could within seconds reliably reproduce a panic in handle_at_packet() by simply dd'ing from two drives on different controllers, the panic is gone. See http://bugzilla.kernel.org/show_bug.cgi?id=9617 Signed-off-by: Jarod Wilson <jwilson@redhat.com> --- drivers/firewire/fw-ohci.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 081a434..fc45868 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c @@ -780,6 +780,10 @@ at_context_queue_packet(struct context *ctx, struct fw_packet *packet) context_append(ctx, d, z, 4 - z); + /* Sync the DMA buffer up for the device to read from */ + dma_sync_single_for_device(ohci->card.device, payload_bus, + packet->payload_length, DMA_TO_DEVICE); + /* If the context isn't already running, start it up. */ reg = reg_read(ctx->ohci, CONTROL_SET(ctx->regs)); if ((reg & CONTEXT_RUN) == 0) -- Jarod Wilson jwilson@redhat.com --
| Eric Paris | TALPA - a threat model? well sorta. |
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Rafael J. Wysocki | [Bug #10741] bug in `tty: BKL pushdown'? |
git: | |
| David Brown | Re: Something is broken in repack |
| H. Peter Anvin | Re: First cut at git port to Cygwin |
| Kevin Leung | Edit log message after commit |
| Johannes Schindelin | Re: Official Git Homepage change? Re: git-scm.com |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Michael | Re: running mail server at home |
| Gerrit Renker | [PATCH 13/37] dccp: Deprecate Ack Ratio sysctl |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Jussi Kivilinna | [PATCH 02/14] [cdc_ether] Hardwire CDC descriptors when missing |
| Denis V. Lunev | [PATCH 12/17 net-2.6.26] [NETNS]: Process /proc/net/rt_cache inside a namespace. |
